diff --git a/handler/ha_innodb.cc b/handler/ha_innodb.cc index f6bcdb1512b..b5abe667455 100644 --- a/handler/ha_innodb.cc +++ b/handler/ha_innodb.cc @@ -8327,6 +8327,10 @@ ha_innobase::add_index( ut_a(key_info); ut_a(num_of_keys); + if (srv_created_new_raw || srv_force_recovery) { + DBUG_RETURN(HA_ERR_WRONG_COMMAND); + } + update_thd(ha_thd()); heap = mem_heap_create(1024); @@ -8601,6 +8605,9 @@ ha_innobase::prepare_drop_index( ut_ad(table); ut_ad(key_num); ut_ad(num_of_keys); + if (srv_created_new_raw || srv_force_recovery) { + DBUG_RETURN(HA_ERR_WRONG_COMMAND); + } thd = ha_thd(); @@ -8746,6 +8753,10 @@ ha_innobase::final_drop_index( DBUG_ENTER("ha_innobase::final_drop_index"); ut_ad(table); + if (srv_created_new_raw || srv_force_recovery) { + DBUG_RETURN(HA_ERR_WRONG_COMMAND); + } + thd = ha_thd(); trx = check_trx_exists(thd);