diff options
author | unknown <msvensson@pilot.blaudden> | 2007-02-20 12:48:56 +0100 |
---|---|---|
committer | unknown <msvensson@pilot.blaudden> | 2007-02-20 12:48:56 +0100 |
commit | 13f628fabc105137b3603bc21ef2503631e32095 (patch) | |
tree | f6c56f8cfbc1c0ac0a20d78d8cdc0c57b0f26700 /sql/sql_parse.cc | |
parent | 4392754e9697e19a3dadd971860889e097c69539 (diff) | |
parent | aafe189af0b5333ba6c2a9b891a0e736144ea758 (diff) | |
download | mariadb-git-13f628fabc105137b3603bc21ef2503631e32095.tar.gz |
Merge pilot.blaudden:/home/msvensson/mysql/bug20166/my50-bug20166
into pilot.blaudden:/home/msvensson/mysql/bug20166/my51-bug20166
mysql-test/mysql-test-run.pl:
Auto merged
sql/sql_parse.cc:
Auto merged
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index b45859c4e28..204f4866241 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1359,6 +1359,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. @@ -1366,16 +1367,26 @@ pthread_handler_t handle_bootstrap(void *arg) thd->query_id=next_query_id(); 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); |