diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-09-07 15:25:27 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-09-07 15:25:27 +0200 |
commit | db947b75997248ca4b0a6b6600df993bf84cd601 (patch) | |
tree | b6c16037931b17f645d4b71b0db8c4ebf3479435 /sql/sql_alter.cc | |
parent | f95d26b4d3ec0e4b039e80439f85e4f22bd79fe7 (diff) | |
parent | 2482306861ca107adfb6c8823cd9f6e413912ebe (diff) | |
download | mariadb-git-db947b75997248ca4b0a6b6600df993bf84cd601.tar.gz |
Merge branch '10.0-galera' into 10.1
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 f17931ae919..0accc04c10d 100644 --- a/sql/sql_alter.cc +++ b/sql/sql_alter.cc @@ -307,12 +307,17 @@ bool Sql_cmd_alter_table::execute(THD *thd) #ifdef WITH_WSREP TABLE *find_temporary_table(THD *thd, const TABLE_LIST *tl); - if ((!thd->is_current_stmt_binlog_format_row() || + if (WSREP(thd) && + (!thd->is_current_stmt_binlog_format_row() || !find_temporary_table(thd, 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 */ @@ -325,11 +330,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 */ } |