summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorunknown <ingo@mysql.com>2005-09-13 20:19:59 +0200
committerunknown <ingo@mysql.com>2005-09-13 20:19:59 +0200
commit3884629d888c48ec113de6463db569c9edc907d6 (patch)
tree41d0a9f82130c4634aff778e92aca0525e39fe28 /sql/sql_base.cc
parent12ac3ab033a59d1fed9d812497766994eb2d7187 (diff)
downloadmariadb-git-3884629d888c48ec113de6463db569c9edc907d6.tar.gz
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.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 7d3bb81793a..bc2ad9fff50 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -871,6 +871,13 @@ TABLE *open_table(THD *thd,const char *db,const char *table_name,
{
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
** Wait until the table is freed or the thread is killed.