summaryrefslogtreecommitdiff
path: root/storage/spider
diff options
context:
space:
mode:
authorKentoku SHIBA <kentokushiba@gmail.com>2013-09-25 02:42:49 +0900
committerKentoku SHIBA <kentokushiba@gmail.com>2013-09-25 02:42:49 +0900
commite980797da35449feaa425e1830f86ba10d70e19b (patch)
tree400473f76b827bb95609d8f0f4cb0d6895d5e8e0 /storage/spider
parent240e62b8906bd07515104e976e86c09987a9a73d (diff)
downloadmariadb-git-e980797da35449feaa425e1830f86ba10d70e19b.tar.gz
fix crash at thd_wait_begin()
Diffstat (limited to 'storage/spider')
-rw-r--r--storage/spider/spd_trx.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/storage/spider/spd_trx.cc b/storage/spider/spd_trx.cc
index e980a6437f3..f3ca117d1ce 100644
--- a/storage/spider/spd_trx.cc
+++ b/storage/spider/spd_trx.cc
@@ -2429,14 +2429,18 @@ int spider_initinal_xa_recover(
}
}
+/*
if (!thd)
{
+*/
if (!(thd = spider_create_tmp_thd()))
{
error_num = HA_ERR_OUT_OF_MEM;
goto error_create_thd;
}
+/*
}
+*/
/*
select
@@ -2465,8 +2469,10 @@ int spider_initinal_xa_recover(
}
free_root(&mem_root, MYF(0));
+/*
if (cnt < (int) len)
{
+*/
end_read_record(read_record);
spider_close_sys_table(thd, table_xa, open_tables_backup, TRUE);
table_xa = NULL;
@@ -2476,7 +2482,9 @@ int spider_initinal_xa_recover(
read_record = NULL;
delete open_tables_backup;
open_tables_backup = NULL;
+/*
}
+*/
DBUG_RETURN(cnt);
/*
@@ -3749,6 +3757,11 @@ void spider_free_tmp_thd(
THD *thd
) {
DBUG_ENTER("spider_free_tmp_thd");
+#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100000
+ thd->reset_globals();
+#else
+ thd->restore_globals();
+#endif
thd->cleanup();
delete thd;
DBUG_VOID_RETURN;