3111 Mats Kindahl 2009-09-28
Disabling tests that are not relevant after BUG#40116, these will be enabled
when WL#2867 or associated fixes for 5.1 is added to solve the problem.
modified:
mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result
mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test
3110 Mats Kindahl 2009-09-25
Bug #47645: Segmentation fault when out of memory during handlerton initialization
There is a missing check for memory allocation failure when allocating
memory for the handlerton structure. If the handlerton init function
tries to de-reference the pointer, it will cause a segmentation fault
and crash the server.
This patch fixes the problem by not calling the init function if memory
allocation failed, and instead prints an informative error message and
reports the error to the caller.
@ sql/handler.cc
Add a check if memory allocation succeeded before calling the init
function. If it failed, it is not necessary to free the memory,
but the plugin->data is set to NULL to ensure that it can be checked
for failure.
modified:
sql/handler.cc
=== modified file 'mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result'
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result 2009-09-23 09:43:43 +0000
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_mixed_tables.result 2009-09-28 11:44:45 +0000
@@ -111,22 +111,10 @@ INSERT INTO innodb_ndb VALUES (12);
COMMIT;
---- ROLLBACK ----
BEGIN;
-INSERT INTO myisam_innodb VALUES (13);
-INSERT INTO myisam_innodb VALUES (14);
-ROLLBACK;
-Warnings:
-Warning 1196 Some non-transactional changed tables couldn't be rolled back
-BEGIN;
INSERT INTO innodb_myisam VALUES (15);
INSERT INTO innodb_myisam VALUES (16);
ROLLBACK;
BEGIN;
-INSERT INTO myisam_ndb VALUES (17);
-INSERT INTO myisam_ndb VALUES (18);
-ROLLBACK;
-Warnings:
-Warning 1196 Some non-transactional changed tables couldn't be rolled back
-BEGIN;
INSERT INTO ndb_myisam VALUES (19);
INSERT INTO ndb_myisam VALUES (20);
ROLLBACK;
@@ -167,22 +155,10 @@ INSERT INTO innodb_ndb VALUES (36);
COMMIT;
---- ROLLBACK ----
BEGIN;
-INSERT INTO myisam_innodb VALUES (37);
-INSERT INTO myisam_innodb VALUES (38);
-ROLLBACK;
-Warnings:
-Warning 1196 Some non-transactional changed tables couldn't be rolled back
-BEGIN;
INSERT INTO innodb_myisam VALUES (39);
INSERT INTO innodb_myisam VALUES (40);
ROLLBACK;
BEGIN;
-INSERT INTO myisam_ndb VALUES (41);
-INSERT INTO myisam_ndb VALUES (42);
-ROLLBACK;
-Warnings:
-Warning 1196 Some non-transactional changed tables couldn't be rolled back
-BEGIN;
INSERT INTO ndb_myisam VALUES (43);
INSERT INTO ndb_myisam VALUES (44);
ROLLBACK;
@@ -209,25 +185,15 @@ INSERT INTO innodb_ndb VALUES (59);
INSERT INTO innodb_ndb VALUES (60);
==== AUTOCOMMIT=0, single statements, myisam on master ====
SET AUTOCOMMIT = 0;
-INSERT INTO myisam_innodb VALUES (61);
-INSERT INTO myisam_innodb VALUES (62);
-INSERT INTO myisam_ndb VALUES (63);
-INSERT INTO myisam_ndb VALUES (64);
==== Show results ====
SELECT * FROM myisam_innodb ORDER BY a;
a
1
2
-13
-14
25
26
-37
-38
49
50
-61
-62
SELECT * FROM innodb_myisam ORDER BY a;
a
3
@@ -240,16 +206,10 @@ SELECT * FROM myisam_ndb ORDER BY a;
a
5
6
-17
-18
29
30
-41
-42
53
54
-63
-64
SELECT * FROM ndb_myisam ORDER BY a;
a
7
=== modified file 'mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test'
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test 2009-09-23 09:43:43 +0000
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_mixed_tables.test 2009-09-28 11:44:45 +0000
@@ -134,11 +134,15 @@ connection master;
--echo ---- ROLLBACK ----
+# This test does not work in ROW mode after the changes introduced in
+# BUG#40116. After WL#2687 is pushed, Tests should be added again.
+--disable_parsing
BEGIN;
INSERT INTO myisam_innodb VALUES (13);
INSERT INTO myisam_innodb VALUES (14);
ROLLBACK;
sync_slave_with_master;
+--enable_parsing
connection master;
BEGIN;
INSERT INTO innodb_myisam VALUES (15);
@@ -147,12 +151,17 @@ ROLLBACK;
sync_slave_with_master;
connection master;
+# This test does not work in ROW mode after the changes introduced in
+# BUG#40116. After WL#2687 is pushed, these tests should be enabled
+# again.
+--disable_parsing
BEGIN;
INSERT INTO myisam_ndb VALUES (17);
INSERT INTO myisam_ndb VALUES (18);
ROLLBACK;
sync_slave_with_master;
connection master;
+--enable_parsing
BEGIN;
INSERT INTO ndb_myisam VALUES (19);
INSERT INTO ndb_myisam VALUES (20);
@@ -221,12 +230,17 @@ connection master;
--echo ---- ROLLBACK ----
+# This test does not work in ROW mode after the changes introduced in
+# BUG#40116. After WL#2687 is pushed, these tests should be enabled
+# again.
+--disable_parsing
BEGIN;
INSERT INTO myisam_innodb VALUES (37);
INSERT INTO myisam_innodb VALUES (38);
ROLLBACK;
sync_slave_with_master;
connection master;
+--enable_parsing
BEGIN;
INSERT INTO innodb_myisam VALUES (39);
INSERT INTO innodb_myisam VALUES (40);
@@ -234,12 +248,17 @@ ROLLBACK;
sync_slave_with_master;
connection master;
+# This test does not work in ROW mode after the changes introduced in
+# BUG#40116. After WL#2687 is pushed, these tests should be enabled
+# again.
+--disable_parsing
BEGIN;
INSERT INTO myisam_ndb VALUES (41);
INSERT INTO myisam_ndb VALUES (42);
ROLLBACK;
sync_slave_with_master;
connection master;
+--enable_parsing
BEGIN;
INSERT INTO ndb_myisam VALUES (43);
INSERT INTO ndb_myisam VALUES (44);
@@ -295,6 +314,10 @@ connection master;
SET AUTOCOMMIT = 0;
+# These tests do not work in ROW mode after the changes introduced in
+# BUG#40116. After WL#2687 is pushed, these tests should be enabled
+# again.
+--disable_parsing
# This tests BUG#29288.
INSERT INTO myisam_innodb VALUES (61);
INSERT INTO myisam_innodb VALUES (62);
@@ -305,6 +328,7 @@ INSERT INTO myisam_ndb VALUES (63);
INSERT INTO myisam_ndb VALUES (64);
sync_slave_with_master;
connection master;
+--enable_parsing
--echo ==== Show results ====
Attachment: [text/bzr-bundle] bzr/mats@sun.com-20090928114445-fq0vlyrcgnfk42a5.bundle
| Thread |
|---|
| • bzr push into mysql-5.1 branch (mats:3110 to 3111) Bug#40116 WL#2867 | Mats Kindahl | 28 Sep |