1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#12845 - Stress test: Server crashes on CREATE .. SELECT statement

Solution for 5.0.
Changed calls to open_table(). Requested to ignore
flush at places where the command did already lock tables.
This could happen in CREATE ... SELECT and ALTER TABLE.

No test case. The bug can only be triggered by true concurrency.
The stress test suite provides a test case for this.
This commit is contained in:
ingo@mysql.com
2005-09-13 14:36:43 +02:00
parent ffc213a192
commit 7953594a4d
2 changed files with 19 additions and 15 deletions

View File

@ -1756,7 +1756,8 @@ TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
create_info, *extra_fields, *keys, 0,
select_field_count))
{
if (!(table= open_table(thd, create_table, thd->mem_root, (bool*)0, 0)))
if (! (table= open_table(thd, create_table, thd->mem_root, (bool*) 0,
MYSQL_LOCK_IGNORE_FLUSH)))
quick_rm_table(create_info->db_type, create_table->db,
table_case_name(create_info, create_table->table_name));
}
@ -3579,7 +3580,8 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
bzero((void*) &tbl, sizeof(tbl));
tbl.db= new_db;
tbl.table_name= tbl.alias= tmp_name;
new_table= open_table(thd, &tbl, thd->mem_root, 0, 0);
new_table= open_table(thd, &tbl, thd->mem_root, (bool*) 0,
MYSQL_LOCK_IGNORE_FLUSH);
}
else
{