diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-08-07 11:02:42 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-08-07 11:02:42 +0200 |
commit | 5e23b6344f3b229edcb0d9c42ec23b689c329a38 (patch) | |
tree | 283a052512239fcff2281256eb4ea7531f3a0ead /storage | |
parent | 93d5cdf03f22df5cc6e071edd623a00f82b0e6e7 (diff) | |
download | mariadb-git-5e23b6344f3b229edcb0d9c42ec23b689c329a38.tar.gz |
MDEV-10506 Protocol::end_statement(): Assertion `0' failed upon ALTER TABLE
thd->clear_error() destroyed already existing error status
Diffstat (limited to 'storage')
-rw-r--r-- | storage/myisam/ha_myisam.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index a2e62d8ae1e..784da17d790 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -1433,6 +1433,7 @@ int ha_myisam::enable_indexes(uint mode) else if (mode == HA_KEY_SWITCH_NONUNIQ_SAVE) { THD *thd= table->in_use; + int was_error= thd->is_error(); HA_CHECK ¶m= *(HA_CHECK*) thd->alloc(sizeof(param)); const char *save_proc_info=thd->proc_info; @@ -1475,7 +1476,7 @@ int ha_myisam::enable_indexes(uint mode) might have been set by the first repair. They can still be seen with SHOW WARNINGS then. */ - if (! error) + if (! error && ! was_error) thd->clear_error(); } info(HA_STATUS_CONST); |