1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Merge remote-tracking branch 'origin/5.5-galera' into 10.0-galera

This commit is contained in:
Jan Lindström
2018-05-07 13:49:14 +03:00
118 changed files with 1536 additions and 473 deletions

View File

@ -1053,7 +1053,7 @@ bool do_command(THD *thd)
* bail out if DB snapshot has not been installed. We however,
* allow queries "SET" and "SHOW", they are trapped later in execute_command
*/
if (thd->variables.wsrep_on && !thd->wsrep_applier && !wsrep_ready &&
if (thd->variables.wsrep_on && !thd->wsrep_applier && !wsrep_ready_get() &&
command != COM_QUERY &&
command != COM_PING &&
command != COM_QUIT &&
@ -2630,7 +2630,7 @@ mysql_execute_command(THD *thd)
We additionally allow all other commands that do not change data in
case wsrep_dirty_reads is enabled.
*/
if (thd->variables.wsrep_on && !thd->wsrep_applier && !wsrep_ready &&
if (thd->variables.wsrep_on && !thd->wsrep_applier && !wsrep_ready_get() &&
lex->sql_command != SQLCOM_SET_OPTION &&
!(thd->variables.wsrep_dirty_reads &&
!is_update_query(lex->sql_command)) &&
@ -2750,6 +2750,7 @@ mysql_execute_command(THD *thd)
{
WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_SHOW);
execute_show_status(thd, all_tables);
break;
}
case SQLCOM_SHOW_EXPLAIN:
@ -3782,7 +3783,7 @@ end_with_restore_list:
case SQLCOM_INSERT_SELECT:
{
WSREP_SYNC_WAIT(thd, WSREP_SYNC_WAIT_BEFORE_INSERT_REPLACE);
select_result *sel_result;
select_insert *sel_result;
bool explain= MY_TEST(lex->describe);
DBUG_ASSERT(first_table == all_tables && first_table != 0);
if ((res= insert_precheck(thd, all_tables)))
@ -4350,7 +4351,6 @@ end_with_restore_list:
if (res)
break;
WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL)
switch (lex->sql_command) {
case SQLCOM_CREATE_EVENT:
{
@ -4386,7 +4386,6 @@ end_with_restore_list:
lex->spname->m_name);
break;
case SQLCOM_DROP_EVENT:
WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL)
if (!(res= Events::drop_event(thd,
lex->spname->m_db, lex->spname->m_name,
lex->check_exists)))
@ -5395,7 +5394,6 @@ create_sp_error:
Note: SQLCOM_CREATE_VIEW also handles 'ALTER VIEW' commands
as specified through the thd->lex->create_view_mode flag.
*/
WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL)
res= mysql_create_view(thd, first_table, thd->lex->create_view_mode);
break;
}
@ -5411,7 +5409,6 @@ create_sp_error:
case SQLCOM_CREATE_TRIGGER:
{
/* Conditionally writes to binlog. */
WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL)
res= mysql_create_or_drop_trigger(thd, all_tables, 1);
break;
@ -5419,7 +5416,6 @@ create_sp_error:
case SQLCOM_DROP_TRIGGER:
{
/* Conditionally writes to binlog. */
WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL)
res= mysql_create_or_drop_trigger(thd, all_tables, 0);
break;
}
@ -5484,13 +5480,11 @@ create_sp_error:
my_ok(thd);
break;
case SQLCOM_INSTALL_PLUGIN:
WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL)
if (! (res= mysql_install_plugin(thd, &thd->lex->comment,
&thd->lex->ident)))
my_ok(thd);
break;
case SQLCOM_UNINSTALL_PLUGIN:
WSREP_TO_ISOLATION_BEGIN(WSREP_MYSQL_DB, NULL, NULL)
if (! (res= mysql_uninstall_plugin(thd, &thd->lex->comment,
&thd->lex->ident)))
my_ok(thd);