Merge lp:~laurynas-biveinis/percona-server/bug999147-5.1 into lp:percona-server/5.1

Proposed by Laurynas Biveinis
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 445
Proposed branch: lp:~laurynas-biveinis/percona-server/bug999147-5.1
Merge into: lp:percona-server/5.1
Diff against target: 80 lines (+43/-1)
5 files modified
Percona-Server/mysql-test/suite/innodb_plugin/r/percona_bug_999147.result (+10/-0)
Percona-Server/mysql-test/suite/innodb_plugin/t/percona_bug_999147-master.opt (+1/-0)
Percona-Server/mysql-test/suite/innodb_plugin/t/percona_bug_999147.test (+29/-0)
Percona-Server/storage/innodb_plugin/handler/handler0alter.cc (+2/-0)
Percona-Server/storage/innodb_plugin/row/row0mysql.c (+1/-1)
To merge this branch: bzr merge lp:~laurynas-biveinis/percona-server/bug999147-5.1
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+106108@code.launchpad.net

Description of the change

Merge the bug 999147 fix from 5.5.
Add explicit ENGINE=InnoDB in the test case.

http://jenkins.percona.com/job/percona-server-5.1-param/318/

Issue 23438

To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'Percona-Server/mysql-test/suite/innodb_plugin/r/percona_bug_999147.result'
--- Percona-Server/mysql-test/suite/innodb_plugin/r/percona_bug_999147.result 1970-01-01 00:00:00 +0000
+++ Percona-Server/mysql-test/suite/innodb_plugin/r/percona_bug_999147.result 2012-05-17 04:39:18 +0000
@@ -0,0 +1,10 @@
1DROP TABLE IF EXISTS t1;
2SET SESSION expand_fast_index_creation=ON;
3CREATE TEMPORARY TABLE t1 (a INT, b INT, INDEX(a)) ENGINE=InnoDB;
4SET debug="+d,crash_innodb_add_index_after";
5ALTER TABLE t1 ADD INDEX (b);
6ERROR HY000: Lost connection to MySQL server during query
7SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES;
8NAME
9SYS_FOREIGN
10SYS_FOREIGN_COLS
011
=== added file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_bug_999147-master.opt'
--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_bug_999147-master.opt 1970-01-01 00:00:00 +0000
+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_bug_999147-master.opt 2012-05-17 04:39:18 +0000
@@ -0,0 +1,1 @@
1--skip-stack-trace --skip-core-file --innodb-file-per-table=1
02
=== added file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_bug_999147.test'
--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_bug_999147.test 1970-01-01 00:00:00 +0000
+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_bug_999147.test 2012-05-17 04:39:18 +0000
@@ -0,0 +1,29 @@
1# Test for Percona Server bug 999147 (A crash that leaves behind an
2# InnoDB temporary table with indexes results in an unbootable server)
3# https://bugs.launchpad.net/percona-server/+bug/999147
4
5-- source include/not_embedded.inc
6-- source include/not_valgrind.inc
7-- source include/not_crashrep.inc
8-- source include/have_debug.inc
9-- source include/have_innodb.inc
10
11--disable_warnings
12DROP TABLE IF EXISTS t1;
13--enable_warnings
14
15SET SESSION expand_fast_index_creation=ON;
16
17CREATE TEMPORARY TABLE t1 (a INT, b INT, INDEX(a)) ENGINE=InnoDB;
18
19--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
20
21SET debug="+d,crash_innodb_add_index_after";
22--error 2013
23ALTER TABLE t1 ADD INDEX (b);
24
25--enable_reconnect
26
27--source include/wait_until_connected_again.inc
28
29SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES;
030
=== modified file 'Percona-Server/storage/innodb_plugin/handler/handler0alter.cc'
--- Percona-Server/storage/innodb_plugin/handler/handler0alter.cc 2012-05-09 04:14:12 +0000
+++ Percona-Server/storage/innodb_plugin/handler/handler0alter.cc 2012-05-17 04:39:18 +0000
@@ -823,6 +823,8 @@
823 innodb_table, indexed_table,823 innodb_table, indexed_table,
824 index, num_of_idx, table);824 index, num_of_idx, table);
825825
826 DBUG_EXECUTE_IF("crash_innodb_add_index_after", DBUG_SUICIDE(););
827
826error_handling:828error_handling:
827 /* After an error, remove all those index definitions from the829 /* After an error, remove all those index definitions from the
828 dictionary which were defined. */830 dictionary which were defined. */
829831
=== modified file 'Percona-Server/storage/innodb_plugin/row/row0mysql.c'
--- Percona-Server/storage/innodb_plugin/row/row0mysql.c 2012-05-09 04:14:12 +0000
+++ Percona-Server/storage/innodb_plugin/row/row0mysql.c 2012-05-17 04:39:18 +0000
@@ -3635,7 +3635,7 @@
3635 btr_pcur_store_position(&pcur, &mtr);3635 btr_pcur_store_position(&pcur, &mtr);
3636 btr_pcur_commit_specify_mtr(&pcur, &mtr);3636 btr_pcur_commit_specify_mtr(&pcur, &mtr);
36373637
3638 table = dict_load_table(table_name);3638 table = dict_table_get_low(table_name);
36393639
3640 if (table) {3640 if (table) {
3641 row_drop_table_for_mysql(table_name, trx, FALSE);3641 row_drop_table_for_mysql(table_name, trx, FALSE);

Subscribers

People subscribed via source and target branches