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
1=== added file 'Percona-Server/mysql-test/suite/innodb_plugin/r/percona_bug_999147.result'
2--- Percona-Server/mysql-test/suite/innodb_plugin/r/percona_bug_999147.result 1970-01-01 00:00:00 +0000
3+++ Percona-Server/mysql-test/suite/innodb_plugin/r/percona_bug_999147.result 2012-05-17 04:39:18 +0000
4@@ -0,0 +1,10 @@
5+DROP TABLE IF EXISTS t1;
6+SET SESSION expand_fast_index_creation=ON;
7+CREATE TEMPORARY TABLE t1 (a INT, b INT, INDEX(a)) ENGINE=InnoDB;
8+SET debug="+d,crash_innodb_add_index_after";
9+ALTER TABLE t1 ADD INDEX (b);
10+ERROR HY000: Lost connection to MySQL server during query
11+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES;
12+NAME
13+SYS_FOREIGN
14+SYS_FOREIGN_COLS
15
16=== added file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_bug_999147-master.opt'
17--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_bug_999147-master.opt 1970-01-01 00:00:00 +0000
18+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_bug_999147-master.opt 2012-05-17 04:39:18 +0000
19@@ -0,0 +1,1 @@
20+--skip-stack-trace --skip-core-file --innodb-file-per-table=1
21
22=== added file 'Percona-Server/mysql-test/suite/innodb_plugin/t/percona_bug_999147.test'
23--- Percona-Server/mysql-test/suite/innodb_plugin/t/percona_bug_999147.test 1970-01-01 00:00:00 +0000
24+++ Percona-Server/mysql-test/suite/innodb_plugin/t/percona_bug_999147.test 2012-05-17 04:39:18 +0000
25@@ -0,0 +1,29 @@
26+# Test for Percona Server bug 999147 (A crash that leaves behind an
27+# InnoDB temporary table with indexes results in an unbootable server)
28+# https://bugs.launchpad.net/percona-server/+bug/999147
29+
30+-- source include/not_embedded.inc
31+-- source include/not_valgrind.inc
32+-- source include/not_crashrep.inc
33+-- source include/have_debug.inc
34+-- source include/have_innodb.inc
35+
36+--disable_warnings
37+DROP TABLE IF EXISTS t1;
38+--enable_warnings
39+
40+SET SESSION expand_fast_index_creation=ON;
41+
42+CREATE TEMPORARY TABLE t1 (a INT, b INT, INDEX(a)) ENGINE=InnoDB;
43+
44+--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
45+
46+SET debug="+d,crash_innodb_add_index_after";
47+--error 2013
48+ALTER TABLE t1 ADD INDEX (b);
49+
50+--enable_reconnect
51+
52+--source include/wait_until_connected_again.inc
53+
54+SELECT NAME FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES;
55
56=== modified file 'Percona-Server/storage/innodb_plugin/handler/handler0alter.cc'
57--- Percona-Server/storage/innodb_plugin/handler/handler0alter.cc 2012-05-09 04:14:12 +0000
58+++ Percona-Server/storage/innodb_plugin/handler/handler0alter.cc 2012-05-17 04:39:18 +0000
59@@ -823,6 +823,8 @@
60 innodb_table, indexed_table,
61 index, num_of_idx, table);
62
63+ DBUG_EXECUTE_IF("crash_innodb_add_index_after", DBUG_SUICIDE(););
64+
65 error_handling:
66 /* After an error, remove all those index definitions from the
67 dictionary which were defined. */
68
69=== modified file 'Percona-Server/storage/innodb_plugin/row/row0mysql.c'
70--- Percona-Server/storage/innodb_plugin/row/row0mysql.c 2012-05-09 04:14:12 +0000
71+++ Percona-Server/storage/innodb_plugin/row/row0mysql.c 2012-05-17 04:39:18 +0000
72@@ -3635,7 +3635,7 @@
73 btr_pcur_store_position(&pcur, &mtr);
74 btr_pcur_commit_specify_mtr(&pcur, &mtr);
75
76- table = dict_load_table(table_name);
77+ table = dict_table_get_low(table_name);
78
79 if (table) {
80 row_drop_table_for_mysql(table_name, trx, FALSE);

Subscribers

People subscribed via source and target branches