mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Fix temporary table search
This commit is contained in:
@@ -859,14 +859,11 @@ static bool wsrep_prepare_keys_for_isolation(THD* thd,
|
||||
ka->keys_len= 0;
|
||||
|
||||
extern TABLE* find_temporary_table(THD*, const TABLE_LIST*);
|
||||
extern TABLE* find_temporary_table(THD*, const char *, const char *);
|
||||
|
||||
if (db || table)
|
||||
{
|
||||
TABLE_LIST tmp_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 (!table || !find_temporary_table(thd, db, table))
|
||||
{
|
||||
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,
|
||||
{
|
||||
wsrep_key_t* tmp;
|
||||
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));
|
||||
if (!tmp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user