summaryrefslogtreecommitdiff
path: root/storage/xtradb/handler/handler0alter.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-12-13 10:13:18 +0100
committerSergei Golubchik <serg@mariadb.org>2015-12-13 10:13:18 +0100
commit1e270d504d56cb015efe060b319e3a5b9bc6513f (patch)
treeef18e249732ce1a0ff98b342fa3edb8d2eceb46f /storage/xtradb/handler/handler0alter.cc
parent6a821d78a6a33aaf81909ab2858d13f95dbe2708 (diff)
downloadmariadb-git-1e270d504d56cb015efe060b319e3a5b9bc6513f.tar.gz
5.6.27-76.0
Diffstat (limited to 'storage/xtradb/handler/handler0alter.cc')
-rw-r--r--storage/xtradb/handler/handler0alter.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/storage/xtradb/handler/handler0alter.cc b/storage/xtradb/handler/handler0alter.cc
index 65a01f1cbab..764c6904853 100644
--- a/storage/xtradb/handler/handler0alter.cc
+++ b/storage/xtradb/handler/handler0alter.cc
@@ -234,7 +234,7 @@ ha_innobase::check_if_supported_inplace_alter(
{
DBUG_ENTER("check_if_supported_inplace_alter");
- if (srv_read_only_mode) {
+ if (high_level_read_only) {
ha_alter_info->unsupported_reason =
innobase_get_err_msg(ER_READ_ONLY_MODE);
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
@@ -2600,15 +2600,10 @@ prepare_inplace_alter_table_dict(
/* Create a background transaction for the operations on
the data dictionary tables. */
ctx->trx = innobase_trx_allocate(ctx->prebuilt->trx->mysql_thd);
-
- if (UNIV_UNLIKELY(ctx->trx->fake_changes)) {
- trx_rollback_to_savepoint(ctx->trx, NULL);
- trx_free_for_mysql(ctx->trx);
- DBUG_RETURN(HA_ERR_WRONG_COMMAND);
- }
-
trx_start_for_ddl(ctx->trx, TRX_DICT_OP_INDEX);
+ DBUG_ASSERT(!ctx->trx->fake_changes);
+
/* Create table containing all indexes to be built in this
ALTER TABLE ADD INDEX so that they are in the correct order
in the table. */