diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2018-09-14 08:47:22 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2018-09-14 08:47:22 +0200 |
commit | 28f08d3753eb10a1393a63e6c581d43aad9f93b9 (patch) | |
tree | 86c9df8c3fb6d4ebd99d431697c84f06ef242989 /sql/sql_alter.cc | |
parent | 38665893087e20c3ad65d5b0e227a75185a4865e (diff) | |
parent | f1bcfbb4373e40dda2c18c137f76fc6ff32e1a45 (diff) | |
download | mariadb-git-28f08d3753eb10a1393a63e6c581d43aad9f93b9.tar.gz |
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/sql_alter.cc')
-rw-r--r-- | sql/sql_alter.cc | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/sql/sql_alter.cc b/sql/sql_alter.cc index dbb138ed9ab..c8bc3952b61 100644 --- a/sql/sql_alter.cc +++ b/sql/sql_alter.cc @@ -306,12 +306,17 @@ bool Sql_cmd_alter_table::execute(THD *thd) thd->enable_slow_log= opt_log_slow_admin_statements; #ifdef WITH_WSREP - if ((!thd->is_current_stmt_binlog_format_row() || + if (WSREP(thd) && + (!thd->is_current_stmt_binlog_format_row() || !thd->find_temporary_table(first_table))) { - WSREP_TO_ISOLATION_BEGIN(((lex->name.str) ? select_lex->db : NULL), - ((lex->name.str) ? lex->name.str : NULL), - first_table); + WSREP_TO_ISOLATION_BEGIN_ALTER(((lex->name.str) ? select_lex->db : NULL), + ((lex->name.str) ? lex->name.str : NULL), + first_table, + &alter_info); + + thd->variables.auto_increment_offset = 1; + thd->variables.auto_increment_increment = 1; } #endif /* WITH_WSREP */ @@ -324,11 +329,12 @@ bool Sql_cmd_alter_table::execute(THD *thd) lex->ignore); DBUG_RETURN(result); - #ifdef WITH_WSREP error: - WSREP_WARN("ALTER TABLE isolation failure"); - DBUG_RETURN(TRUE); + { + WSREP_WARN("ALTER TABLE isolation failure"); + DBUG_RETURN(TRUE); + } #endif /* WITH_WSREP */ } |