summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authorunknown <aivanov@mysql.com>2006-06-06 23:37:42 +0400
committerunknown <aivanov@mysql.com>2006-06-06 23:37:42 +0400
commit9e3f90e54156b10deac06cbb8880fb00749fa8ba (patch)
tree0687926c1926ad0917b8cad8c89bf023b0c3be46 /innobase
parentdb3c64d6185875c6b377e57824c37708585f3545 (diff)
downloadmariadb-git-9e3f90e54156b10deac06cbb8880fb00749fa8ba.tar.gz
Applied innodb-5.0-ss609 snapshot.
Fixed BUG#19727 "InnoDB crashed server and crashed tables are not recoverable". innobase/row/row0mysql.c: Applied innodb-5.0-ss609 snapshot. Move trx_commit_for_mysql(trx) calls before calls to row_mysql_unlock_data_dictionary(trx). innobase/row/row0sel.c: Applied innodb-5.0-ss609 snapshot. row_sel_try_search_shortcut(): Do not return SEL_FOUND when the record was not found. This bug was introduced in InnoDB 5.0.3, but luckily it should nerver manifest itself, given that existing InnoDB SQL code never makes use of consistent reads. mysql-test/t/innodb.test: Applied innodb-5.0-ss609 snapshot. Add the big fat warning notice also to the bottom of innodb.test so that it will require more talent to ignore the change of policy.
Diffstat (limited to 'innobase')
-rw-r--r--innobase/row/row0mysql.c20
-rw-r--r--innobase/row/row0sel.c3
2 files changed, 12 insertions, 11 deletions
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c
index 89b82882d93..9e922a3e04a 100644
--- a/innobase/row/row0mysql.c
+++ b/innobase/row/row0mysql.c
@@ -2570,14 +2570,14 @@ do not allow the discard. We also reserve the data dictionary latch. */
}
}
funct_exit:
+ trx_commit_for_mysql(trx);
+
row_mysql_unlock_data_dictionary(trx);
if (graph) {
que_graph_free(graph);
}
- trx_commit_for_mysql(trx);
-
trx->op_info = "";
return((int) err);
@@ -2707,10 +2707,10 @@ row_import_tablespace_for_mysql(
}
funct_exit:
- row_mysql_unlock_data_dictionary(trx);
-
trx_commit_for_mysql(trx);
+ row_mysql_unlock_data_dictionary(trx);
+
trx->op_info = "";
return((int) err);
@@ -3398,6 +3398,8 @@ fputs(" InnoDB: You are trying to drop table ", stderr);
}
funct_exit:
+ trx_commit_for_mysql(trx);
+
if (locked_dictionary) {
row_mysql_unlock_data_dictionary(trx);
}
@@ -3408,8 +3410,6 @@ funct_exit:
que_graph_free(graph);
- trx_commit_for_mysql(trx);
-
trx->op_info = "";
#ifndef UNIV_HOTBACKUP
@@ -3488,10 +3488,10 @@ loop:
}
}
- row_mysql_unlock_data_dictionary(trx);
-
trx_commit_for_mysql(trx);
+ row_mysql_unlock_data_dictionary(trx);
+
trx->op_info = "";
return(err);
@@ -3905,6 +3905,8 @@ row_rename_table_for_mysql(
}
}
funct_exit:
+ trx_commit_for_mysql(trx);
+
if (!recovering_temp_table) {
row_mysql_unlock_data_dictionary(trx);
}
@@ -3917,8 +3919,6 @@ funct_exit:
mem_heap_free(heap);
}
- trx_commit_for_mysql(trx);
-
trx->op_info = "";
return((int) err);
diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c
index 1402d3aaba6..23971767e7e 100644
--- a/innobase/row/row0sel.c
+++ b/innobase/row/row0sel.c
@@ -1064,11 +1064,12 @@ row_sel_try_search_shortcut(
ut_ad(plan->pcur.latch_mode == node->latch_mode);
plan->n_rows_fetched++;
+ ret = SEL_FOUND;
func_exit:
if (UNIV_LIKELY_NULL(heap)) {
mem_heap_free(heap);
}
- return(SEL_FOUND);
+ return(ret);
}
/*************************************************************************