1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Manual merge

This commit is contained in:
Kristofer Pettersson
2009-03-06 11:49:39 +01:00
343 changed files with 10335 additions and 6896 deletions

View File

@@ -172,7 +172,9 @@ THD::THD()
/* statement id */ 0),
Open_tables_state(refresh_version),
lock_id(&main_lock_id),
user_time(0), in_sub_stmt(0), global_read_lock(0), is_fatal_error(0),
user_time(0), in_sub_stmt(0),
table_map_for_update(0),
global_read_lock(0), is_fatal_error(0),
transaction_rollback_request(0), is_fatal_sub_stmt_error(0),
rand_used(0), time_zone_used(0),
last_insert_id_used(0), last_insert_id_used_bin_log(0), insert_id_used(0),
@@ -397,6 +399,10 @@ void THD::init_for_queries()
void THD::change_user(void)
{
pthread_mutex_lock(&LOCK_status);
add_to_status(&global_status_var, &status_var);
pthread_mutex_unlock(&LOCK_status);
cleanup();
cleanup_done= 0;
init();
@@ -653,6 +659,8 @@ void THD::cleanup_after_query()
free_items();
/* Reset where. */
where= THD::DEFAULT_WHERE;
/* reset table map for multi-table update */
table_map_for_update= 0;
}
@@ -1049,6 +1057,11 @@ bool select_send::send_data(List<Item> &items)
my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
break;
}
/*
Reset buffer to its original state, as it may have been altered in
Item::send().
*/
buffer.set(buff, sizeof(buff), &my_charset_bin);
}
thd->sent_row_count++;
if (!thd->vio_ok())