Commit a6ce71b0 authored by osku's avatar osku

Move trx_commit_for_mysql(trx) calls in row0mysql.c before calls to

row_mysql_unlock_data_dictionary(trx), fixing bug #19727.
parent 5ba4fc82
...@@ -2540,10 +2540,10 @@ do not allow the discard. We also reserve the data dictionary latch. */ ...@@ -2540,10 +2540,10 @@ do not allow the discard. We also reserve the data dictionary latch. */
} }
funct_exit: funct_exit:
row_mysql_unlock_data_dictionary(trx);
trx_commit_for_mysql(trx); trx_commit_for_mysql(trx);
row_mysql_unlock_data_dictionary(trx);
trx->op_info = ""; trx->op_info = "";
return((int) err); return((int) err);
...@@ -2673,10 +2673,10 @@ row_import_tablespace_for_mysql( ...@@ -2673,10 +2673,10 @@ row_import_tablespace_for_mysql(
} }
funct_exit: funct_exit:
row_mysql_unlock_data_dictionary(trx);
trx_commit_for_mysql(trx); trx_commit_for_mysql(trx);
row_mysql_unlock_data_dictionary(trx);
trx->op_info = ""; trx->op_info = "";
return((int) err); return((int) err);
...@@ -3304,6 +3304,8 @@ fputs(" InnoDB: You are trying to drop table ", stderr); ...@@ -3304,6 +3304,8 @@ fputs(" InnoDB: You are trying to drop table ", stderr);
} }
funct_exit: funct_exit:
trx_commit_for_mysql(trx);
if (locked_dictionary) { if (locked_dictionary) {
row_mysql_unlock_data_dictionary(trx); row_mysql_unlock_data_dictionary(trx);
} }
...@@ -3312,8 +3314,6 @@ fputs(" InnoDB: You are trying to drop table ", stderr); ...@@ -3312,8 +3314,6 @@ fputs(" InnoDB: You are trying to drop table ", stderr);
mem_free(dir_path_of_temp_table); mem_free(dir_path_of_temp_table);
} }
trx_commit_for_mysql(trx);
trx->op_info = ""; trx->op_info = "";
#ifndef UNIV_HOTBACKUP #ifndef UNIV_HOTBACKUP
...@@ -3392,10 +3392,10 @@ row_drop_database_for_mysql( ...@@ -3392,10 +3392,10 @@ row_drop_database_for_mysql(
} }
} }
row_mysql_unlock_data_dictionary(trx);
trx_commit_for_mysql(trx); trx_commit_for_mysql(trx);
row_mysql_unlock_data_dictionary(trx);
trx->op_info = ""; trx->op_info = "";
return(err); return(err);
...@@ -3788,6 +3788,8 @@ row_rename_table_for_mysql( ...@@ -3788,6 +3788,8 @@ row_rename_table_for_mysql(
} }
funct_exit: funct_exit:
trx_commit_for_mysql(trx);
if (!recovering_temp_table) { if (!recovering_temp_table) {
row_mysql_unlock_data_dictionary(trx); row_mysql_unlock_data_dictionary(trx);
} }
...@@ -3796,8 +3798,6 @@ row_rename_table_for_mysql( ...@@ -3796,8 +3798,6 @@ row_rename_table_for_mysql(
mem_heap_free(heap); mem_heap_free(heap);
} }
trx_commit_for_mysql(trx);
trx->op_info = ""; trx->op_info = "";
return((int) err); return((int) err);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment