mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/mrg0306/51 client/mysqltest.c: Auto merged include/my_pthread.h: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/sp.result: Auto merged mysql-test/t/disabled.def: Auto merged mysql-test/t/sp.test: Auto merged mysys/my_wincond.c: Auto merged sql/event_queue.cc: Auto merged sql/field.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/log.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_load.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_trigger.cc: Auto merged client/mysql_upgrade.c: Manual merge; I chose to keep Magnus' changes because they make the code more simple; always use *only* the option file created by mysql_upgrade. mysql-test/extra/binlog_tests/ctype_cp932.test: Manual merge mysql-test/r/binlog_row_ctype_cp932.result: Manual merge mysql-test/r/binlog_stm_ctype_cp932.result: Manual merge mysql-test/r/mysqlbinlog.result: Manual merge mysql-test/r/rpl_switch_stm_row_mixed.result: Manual merge mysql-test/t/mysqlbinlog.test: Manual merge mysql-test/t/rpl_switch_stm_row_mixed.test: Manual merge
This commit is contained in:
@ -369,6 +369,7 @@ pthread_handler_t handle_bootstrap(void *arg)
|
||||
thd->query= thd->memdup_w_gap(buff, length+1,
|
||||
thd->db_length+1+QUERY_CACHE_FLAGS_SIZE);
|
||||
thd->query[length] = '\0';
|
||||
DBUG_PRINT("query",("%-.4096s",thd->query));
|
||||
/*
|
||||
We don't need to obtain LOCK_thread_count here because in bootstrap
|
||||
mode we have only one thread.
|
||||
@ -377,16 +378,26 @@ pthread_handler_t handle_bootstrap(void *arg)
|
||||
thd->set_time();
|
||||
mysql_parse(thd,thd->query,length);
|
||||
close_thread_tables(thd); // Free tables
|
||||
|
||||
if (thd->is_fatal_error)
|
||||
break;
|
||||
|
||||
if (thd->net.report_error)
|
||||
{
|
||||
/* The query failed, send error to log and abort bootstrap */
|
||||
net_send_error(thd);
|
||||
thd->fatal_error();
|
||||
break;
|
||||
}
|
||||
|
||||
free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC));
|
||||
#ifdef USING_TRANSACTIONS
|
||||
free_root(&thd->transaction.mem_root,MYF(MY_KEEP_PREALLOC));
|
||||
#endif
|
||||
}
|
||||
|
||||
/* thd->fatal_error should be set in case something went wrong */
|
||||
end:
|
||||
/* Remember the exit code of bootstrap */
|
||||
bootstrap_error= thd->is_fatal_error;
|
||||
|
||||
net_end(&thd->net);
|
||||
|
Reference in New Issue
Block a user