diff options
author | Alexander Nozdrin <alik@sun.com> | 2010-06-25 19:32:59 +0400 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2010-06-25 19:32:59 +0400 |
commit | 514b9b25d256b71b90f4693549c7e596ad72177a (patch) | |
tree | 546fd92283955f11ad27a77c1740a6fd7c17b89b /storage/myisammrg | |
parent | 80af13189f69e17bf93ee6dfbc188f600f79aa34 (diff) | |
download | mariadb-git-514b9b25d256b71b90f4693549c7e596ad72177a.tar.gz |
Backport of revid:ingo.struewing@sun.com-20091223200354-r2uzbdkj2v6yv111
Bug#47633 - assert in ha_myisammrg::info during OPTIMIZE
The server crashed on an attempt to optimize a MERGE table with
non-existent child table.
mysql_admin_table() relied on the table to be successfully open
if a table object had been allocated.
Changed code to check return value of the open function before
calling a handler:: function on it.
Diffstat (limited to 'storage/myisammrg')
-rw-r--r-- | storage/myisammrg/ha_myisammrg.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/storage/myisammrg/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc index 63d20f127a1..67b81225b13 100644 --- a/storage/myisammrg/ha_myisammrg.cc +++ b/storage/myisammrg/ha_myisammrg.cc @@ -103,6 +103,7 @@ #include "myrg_def.h" #include "thr_malloc.h" // int_sql_alloc #include "sql_class.h" // THD +#include "debug_sync.h" static handler *myisammrg_create_handler(handlerton *hton, TABLE_SHARE *table, @@ -755,6 +756,7 @@ int ha_myisammrg::attach_children(void) /* Must not call this with attached children. */ DBUG_ASSERT(!this->file->children_attached); + DEBUG_SYNC(current_thd, "before_myisammrg_attach"); /* Must call this with children list in place. */ DBUG_ASSERT(this->table->pos_in_table_list->next_global == this->children_l); |