mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
This commit is contained in:
@ -1424,8 +1424,7 @@ out:
|
||||
@retval FALSE The statement isn't updating any relevant tables.
|
||||
*/
|
||||
|
||||
static my_bool deny_updates_if_read_only_option(THD *thd,
|
||||
TABLE_LIST *all_tables)
|
||||
static bool deny_updates_if_read_only_option(THD *thd, TABLE_LIST *all_tables)
|
||||
{
|
||||
DBUG_ENTER("deny_updates_if_read_only_option");
|
||||
|
||||
@ -1447,10 +1446,20 @@ static my_bool deny_updates_if_read_only_option(THD *thd,
|
||||
if (lex->sql_command == SQLCOM_UPDATE_MULTI)
|
||||
DBUG_RETURN(FALSE);
|
||||
|
||||
/* a table-to-create is not in the temp table list, needs a special check */
|
||||
/*
|
||||
a table-to-be-created is not in the temp table list yet,
|
||||
so CREATE TABLE needs a special treatment
|
||||
*/
|
||||
if (lex->sql_command == SQLCOM_CREATE_TABLE)
|
||||
DBUG_RETURN(!lex->tmp_table());
|
||||
|
||||
/*
|
||||
a table-to-be-dropped might not exist (DROP TEMPORARY TABLE IF EXISTS),
|
||||
cannot use the temp table list either.
|
||||
*/
|
||||
if (lex->sql_command == SQLCOM_DROP_TABLE && lex->tmp_table())
|
||||
DBUG_RETURN(FALSE);
|
||||
|
||||
/* Check if we created or dropped databases */
|
||||
if ((sql_command_flags[lex->sql_command] & CF_DB_CHANGE))
|
||||
DBUG_RETURN(TRUE);
|
||||
@ -4034,7 +4043,7 @@ mysql_execute_command(THD *thd)
|
||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||
{
|
||||
partition_info *part_info= thd->lex->part_info;
|
||||
if (part_info && !(part_info= thd->lex->part_info->get_clone(thd)))
|
||||
if (part_info && !(part_info= part_info->get_clone(thd)))
|
||||
{
|
||||
res= -1;
|
||||
goto end_with_restore_list;
|
||||
@ -4511,7 +4520,7 @@ end_with_restore_list:
|
||||
if (up_result != 2)
|
||||
break;
|
||||
}
|
||||
/* Fall through */
|
||||
/* fall through */
|
||||
case SQLCOM_UPDATE_MULTI:
|
||||
{
|
||||
DBUG_ASSERT(first_table == all_tables && first_table != 0);
|
||||
@ -4623,7 +4632,7 @@ end_with_restore_list:
|
||||
DBUG_PRINT("debug", ("Just after generate_incident()"));
|
||||
}
|
||||
#endif
|
||||
/* fall through */
|
||||
/* fall through */
|
||||
case SQLCOM_INSERT:
|
||||
{
|
||||
WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE);
|
||||
|
Reference in New Issue
Block a user