mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
merge from mysql-trunk-bugfixing
This commit is contained in:
@@ -865,7 +865,7 @@ static void free_cache_entry(TABLE *table)
|
||||
|
||||
intern_close_table(table);
|
||||
|
||||
my_free((uchar*) table,MYF(0));
|
||||
my_free(table);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
@@ -877,7 +877,7 @@ void free_io_cache(TABLE *table)
|
||||
if (table->sort.io_cache)
|
||||
{
|
||||
close_cached_file(table->sort.io_cache);
|
||||
my_free((uchar*) table->sort.io_cache,MYF(0));
|
||||
my_free(table->sort.io_cache);
|
||||
table->sort.io_cache=0;
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
@@ -1760,6 +1760,7 @@ static inline uint tmpkeyval(THD *thd, TABLE *table)
|
||||
|
||||
void close_temporary_tables(THD *thd)
|
||||
{
|
||||
DBUG_ENTER("close_temporary_tables");
|
||||
TABLE *table;
|
||||
TABLE *next= NULL;
|
||||
TABLE *prev_table;
|
||||
@@ -1767,10 +1768,9 @@ void close_temporary_tables(THD *thd)
|
||||
bool was_quote_show= TRUE;
|
||||
|
||||
if (!thd->temporary_tables)
|
||||
return;
|
||||
DBUG_VOID_RETURN;
|
||||
|
||||
if (!mysql_bin_log.is_open() ||
|
||||
(thd->is_current_stmt_binlog_format_row() && thd->variables.binlog_format == BINLOG_FORMAT_ROW))
|
||||
if (!mysql_bin_log.is_open())
|
||||
{
|
||||
TABLE *tmp_next;
|
||||
for (table= thd->temporary_tables; table; table= tmp_next)
|
||||
@@ -1779,7 +1779,7 @@ void close_temporary_tables(THD *thd)
|
||||
close_temporary(table, 1, 1);
|
||||
}
|
||||
thd->temporary_tables= 0;
|
||||
return;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
/* Better add "if exists", in case a RESET MASTER has been done */
|
||||
@@ -1895,6 +1895,7 @@ void close_temporary_tables(THD *thd)
|
||||
if (!was_quote_show)
|
||||
thd->variables.option_bits&= ~OPTION_QUOTE_SHOW_CREATE; /* restore option */
|
||||
thd->temporary_tables=0;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2295,7 +2296,7 @@ void close_temporary(TABLE *table, bool free_share, bool delete_table)
|
||||
if (free_share)
|
||||
{
|
||||
free_table_share(table->s);
|
||||
my_free((char*) table,MYF(0));
|
||||
my_free(table);
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
@@ -3119,7 +3120,7 @@ bool open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
|
||||
|
||||
if (error)
|
||||
{
|
||||
my_free(table, MYF(0));
|
||||
my_free(table);
|
||||
|
||||
if (error == 7)
|
||||
(void) ot_ctx->request_backoff_action(Open_table_context::OT_DISCOVER,
|
||||
@@ -3134,7 +3135,7 @@ bool open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
|
||||
if (open_table_entry_fini(thd, share, table))
|
||||
{
|
||||
closefrm(table, 0);
|
||||
my_free((uchar*)table, MYF(0));
|
||||
my_free(table);
|
||||
goto err_lock;
|
||||
}
|
||||
|
||||
@@ -3879,10 +3880,10 @@ static bool open_table_entry_fini(THD *thd, TABLE_SHARE *share, TABLE *entry)
|
||||
query, (ulong)(end-query),
|
||||
FALSE, FALSE, FALSE, errcode))
|
||||
{
|
||||
my_free(query, MYF(0));
|
||||
my_free(query);
|
||||
return TRUE;
|
||||
}
|
||||
my_free(query, MYF(0));
|
||||
my_free(query);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3967,7 +3968,7 @@ static bool auto_repair_table(THD *thd, TABLE_LIST *table_list)
|
||||
closefrm(entry, 0);
|
||||
result= FALSE;
|
||||
}
|
||||
my_free(entry, MYF(0));
|
||||
my_free(entry);
|
||||
|
||||
mysql_mutex_lock(&LOCK_open);
|
||||
release_table_share(share);
|
||||
@@ -5854,7 +5855,7 @@ TABLE *open_temporary_table(THD *thd, const char *path, const char *db,
|
||||
{
|
||||
/* No need to lock share->mutex as this is not needed for tmp tables */
|
||||
free_table_share(share);
|
||||
my_free((char*) tmp_table,MYF(0));
|
||||
my_free(tmp_table);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user