diff options
author | Sachin <sachinsetia1001@gmail.com> | 2020-06-29 16:35:00 +0530 |
---|---|---|
committer | Sachin <sachinsetia1001@gmail.com> | 2020-06-29 16:35:44 +0530 |
commit | 821f7599a8fe32c93b97b05db056f8c9c5880567 (patch) | |
tree | baed79a86e9928a1b3f13d1a1a4cc37aedab7ef1 /sql/sql_table.cc | |
parent | 3572a6db24cdeb2a06e1e5cb3e0b367a0a7aceda (diff) | |
download | mariadb-git-10.5-olter-v4.tar.gz |
MDEV-22985 Assertion `!(thd->rgi_slave && thd->rgi_slave->did_mark_start_commit)' failed in ha_rollback_trans10.5-olter-v4
Partial fix
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 936c97b8ac5..84242d7138f 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -7579,9 +7579,9 @@ static int mysql_inplace_alter_table(THD *thd, bool reopen_tables= false; bool res; handlerton *hton; - Master_info *mi= NULL; - if (thd->slave_thread) - mi= thd->rgi_slave->rli->mi; +// Master_info *mi= NULL; + //if (thd->slave_thread) + //mi= thd->rgi_slave->rli->mi; int return_result= 0; DBUG_ENTER("mysql_inplace_alter_table"); @@ -7747,7 +7747,8 @@ static int mysql_inplace_alter_table(THD *thd, thd->abort_on_warning= false; if (thd->lex->alter_info.alter_identifier && !thd->direct_commit_alter) { - if ((return_result= master_result(thd, mi, info, res))) + wait_for_master(thd, info); + if (info->state == start_alter_state::ROLLBACK_ALTER) goto rollback; } if (res) @@ -10303,6 +10304,10 @@ do_continue:; if(write_bin_log(thd, false, send_query, strlen(send_query), true, true)) DBUG_RETURN(true); } + if (start_alter_id) + { + master_result(thd, mi, info, res); + } cleanup_table_after_inplace_alter(&altered_table); DBUG_RETURN(true); } |