mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Manual merge from mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts: Text conflict in .bzr-mysql/default.conf Text conflict in mysql-test/suite/rpl/r/rpl_loaddata_fatal.result Text conflict in mysql-test/suite/rpl/r/rpl_stm_log.result Text conflict in mysql-test/t/mysqlbinlog.test Text conflict in sql/sql_acl.cc Text conflict in sql/sql_servers.cc Text conflict in sql/sql_update.cc Text conflict in support-files/mysql.spec.sh
This commit is contained in:
@ -616,8 +616,10 @@ void free_items(Item *item)
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
/* This works because items are allocated with sql_alloc() */
|
||||
|
||||
/**
|
||||
This works because items are allocated with sql_alloc().
|
||||
@note The function also handles null pointers (empty list).
|
||||
*/
|
||||
void cleanup_items(Item *item)
|
||||
{
|
||||
DBUG_ENTER("cleanup_items");
|
||||
@ -3515,17 +3517,6 @@ end_with_restore_list:
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
If this is a slave thread, we may sometimes execute some
|
||||
DROP / * 40005 TEMPORARY * / TABLE
|
||||
that come from parts of binlogs (likely if we use RESET SLAVE or CHANGE
|
||||
MASTER TO), while the temporary table has already been dropped.
|
||||
To not generate such irrelevant "table does not exist errors",
|
||||
we silently add IF EXISTS if TEMPORARY was used.
|
||||
*/
|
||||
if (thd->slave_thread)
|
||||
lex->drop_if_exists= 1;
|
||||
|
||||
/* So that DROP TEMPORARY TABLE gets to binlog at commit/rollback */
|
||||
thd->options|= OPTION_KEEP_LOG;
|
||||
}
|
||||
@ -7052,13 +7043,13 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
|
||||
thd->store_globals();
|
||||
lex_start(thd);
|
||||
}
|
||||
|
||||
|
||||
if (thd)
|
||||
{
|
||||
bool reload_acl_failed= acl_reload(thd);
|
||||
bool reload_grants_failed= grant_reload(thd);
|
||||
bool reload_servers_failed= servers_reload(thd);
|
||||
|
||||
|
||||
if (reload_acl_failed || reload_grants_failed || reload_servers_failed)
|
||||
{
|
||||
result= 1;
|
||||
@ -7214,7 +7205,10 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables,
|
||||
if (options & REFRESH_USER_RESOURCES)
|
||||
reset_mqh((LEX_USER *) NULL, 0); /* purecov: inspected */
|
||||
*write_to_binlog= tmp_write_to_binlog;
|
||||
return result;
|
||||
/*
|
||||
If the query was killed then this function must fail.
|
||||
*/
|
||||
return result || thd->killed;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user