3616 Mattias Jonsson 2011-11-16
BUG#11766440 - 59546: ASSERTION M_SP == __NULL
FAILS IN ITEM_FUNC_SP::INIT_RESULT_FIELD WITH FU
Post push patch for fixing the failing partitioning debug tests.
Reopen of tables under LOCK TABLES would fail, since
an error was already set.
Fixed by using a temporary Diagnostics_area during
reopen of locked tables.
modified:
sql/sql_partition.cc
3615 Luis Soares 2011-11-16 [merge]
BUG#11760927
Manual merge from mysql-5.5.
modified:
sql/rpl_rli.cc
=== modified file 'sql/sql_partition.cc'
--- a/sql/sql_partition.cc 2011-08-29 12:08:58 +0000
+++ b/sql/sql_partition.cc 2011-11-16 15:24:04 +0000
@@ -6456,8 +6456,24 @@ static void alter_partition_lock_handlin
lpt->table= 0;
lpt->old_table= 0;
lpt->table_list->table= 0;
- if (thd->locked_tables_list.reopen_tables(thd))
- sql_print_warning("We failed to reacquire LOCKs in ALTER TABLE");
+ if (thd->locked_tables_mode)
+ {
+ Diagnostics_area *stmt_da= NULL;
+ Diagnostics_area tmp_stmt_da;
+
+ if (thd->is_error())
+ {
+ /* reopen might fail if we have a previous error, use a temporary da. */
+ stmt_da= thd->get_stmt_da();
+ thd->set_stmt_da(&tmp_stmt_da);
+ }
+
+ if (thd->locked_tables_list.reopen_tables(thd))
+ sql_print_warning("We failed to reacquire LOCKs in ALTER TABLE");
+
+ if (stmt_da)
+ thd->set_stmt_da(stmt_da);
+ }
}
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk branch (mattias.jonsson:3615 to 3616) Bug#11766440 | Mattias Jonsson | 17 Nov |