Commit 3884629d authored by unknown's avatar unknown

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

Solution for 4.0 and 4.1.
If the caller cannot re-open table(s), it gives a NULL
'refresh' argument to open_table(). We used to ignore
flushes then. Now we ignore drops too.

parent 12ac3ab0
...@@ -871,6 +871,13 @@ TABLE *open_table(THD *thd,const char *db,const char *table_name, ...@@ -871,6 +871,13 @@ TABLE *open_table(THD *thd,const char *db,const char *table_name,
{ {
if (table->version != refresh_version) if (table->version != refresh_version)
{ {
if (! refresh)
{
/* Ignore flush for now, but force close after usage. */
thd->version= table->version;
continue;
}
/* /*
** There is a refresh in progress for this table ** There is a refresh in progress for this table
** Wait until the table is freed or the thread is killed. ** Wait until the table is freed or the thread is killed.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment