1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00

Bug#20166 mysql-test-run.pl does not test system privilege tables creation

- Add test of bootstrap mode
 - Make mysqld return error if bootstrap failed
This commit is contained in:
msvensson@pilot.blaudden
2007-02-20 12:48:15 +01:00
parent 00ee20edaa
commit bcd368fcfb
4 changed files with 71 additions and 3 deletions

View File

@@ -1308,6 +1308,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.
@@ -1315,16 +1316,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);