Comment 1 for bug 897258

Revision history for this message
Lixun Peng (P.Linux) (plx) wrote :

Maybe you add can add "err = DB_ERROR;" on function row_rename_table_for_mysql of row0mysql.c.

search "if (!dict_table_rename_in_cache(table, new_name" on "storage/innodb_plugin/row/row0mysql.c", you can find this code, and add "err = DB_ERROR;" before " goto funct_exit;".

        if (!dict_table_rename_in_cache(table, new_name,
                        !new_is_tmp)) {
            trx->error_state = DB_SUCCESS;
            trx_general_rollback_for_mysql(trx, NULL);
            trx->error_state = DB_SUCCESS;
            err = DB_ERROR;
            goto funct_exit;
        }

The rollback code(on funct_exit) does not real execute because not set err = DB_ERROR after the failure of function dict_table_rename_in_cache(), add "err = DB_ERROR" before "goto funct_exit;" to enable the rollback logic on funct_exit.