Commit 8da8c60d authored by Jan Lindström's avatar Jan Lindström

Fix temporary table search

parent 37b3d944
...@@ -859,14 +859,11 @@ static bool wsrep_prepare_keys_for_isolation(THD* thd, ...@@ -859,14 +859,11 @@ static bool wsrep_prepare_keys_for_isolation(THD* thd,
ka->keys_len= 0; ka->keys_len= 0;
extern TABLE* find_temporary_table(THD*, const TABLE_LIST*); extern TABLE* find_temporary_table(THD*, const TABLE_LIST*);
extern TABLE* find_temporary_table(THD*, const char *, const char *);
if (db || table) if (db || table)
{ {
TABLE_LIST tmp_table; if (!table || !find_temporary_table(thd, db, table))
bzero((char*) &tmp_table,sizeof(tmp_table));
tmp_table.table_name= (char*)db;
tmp_table.db= (char*)table;
if (!table || !find_temporary_table(thd, &tmp_table))
{ {
if (!(ka->keys= (wsrep_key_t*)my_malloc(sizeof(wsrep_key_t), MYF(0)))) if (!(ka->keys= (wsrep_key_t*)my_malloc(sizeof(wsrep_key_t), MYF(0))))
{ {
...@@ -898,7 +895,7 @@ static bool wsrep_prepare_keys_for_isolation(THD* thd, ...@@ -898,7 +895,7 @@ static bool wsrep_prepare_keys_for_isolation(THD* thd,
{ {
wsrep_key_t* tmp; wsrep_key_t* tmp;
tmp= (wsrep_key_t*)my_realloc( tmp= (wsrep_key_t*)my_realloc(
ka->keys, (ka->keys_len + 1) * sizeof(wsrep_key_t), ka->keys, (ka->keys_len + 1) * sizeof(wsrep_key_t),
MYF(MY_ALLOW_ZERO_PTR)); MYF(MY_ALLOW_ZERO_PTR));
if (!tmp) if (!tmp)
{ {
......
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