summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <holyfoot@vva.(none)>2006-03-20 17:30:01 +0400
committerunknown <holyfoot@vva.(none)>2006-03-20 17:30:01 +0400
commitafe397ff66299fb0707cf080cbb51bcf3cadace8 (patch)
tree44832da5b86101dae050c8fe1ccc93c17961b8c1 /mysql-test
parent723c3a504fcbd2b9fc37ae7369a7eb93ab3d3997 (diff)
downloadmariadb-git-afe397ff66299fb0707cf080cbb51bcf3cadace8.tar.gz
bug #17290 (sp with delete, create and rollback causes MySQLD core)
additional fixes mysql-test/r/partition.result: result fixed mysql-test/t/partition.test: testcase sql/sql_parse.cc: part_info cloning moved here sql/sql_partition.cc: fixes sql/sql_table.cc: part_info cloning removed
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/partition.result25
-rw-r--r--mysql-test/t/partition.test30
2 files changed, 55 insertions, 0 deletions
diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result
index f31692bea0a..4ef61745cda 100644
--- a/mysql-test/r/partition.result
+++ b/mysql-test/r/partition.result
@@ -557,4 +557,29 @@ t2 CREATE TABLE `t2` (
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='no comment' PARTITION BY KEY (a)
drop table t2;
+prepare stmt1 from 'create table t1 (s1 int) partition by hash (s1)';
+execute stmt1;
+execute stmt1;
+ERROR 42S01: Table 't1' already exists
+drop table t1;
+CREATE PROCEDURE test.p1(IN i INT)
+BEGIN
+DECLARE CONTINUE HANDLER FOR sqlexception BEGIN END;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1 (num INT,PRIMARY KEY(num));
+START TRANSACTION;
+INSERT INTO t1 VALUES(i);
+savepoint t1_save;
+INSERT INTO t1 VALUES (14);
+ROLLBACK to savepoint t1_save;
+COMMIT;
+END|
+CALL test.p1(12);
+Warnings:
+Note 1051 Unknown table 't1'
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+CALL test.p1(13);
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+drop table t1;
End of 5.1 tests
diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test
index 73949733426..fb7d6476f00 100644
--- a/mysql-test/t/partition.test
+++ b/mysql-test/t/partition.test
@@ -714,4 +714,34 @@ show create table t2;
drop table t2;
+#
+# bug #14350 Partitions: crash if prepared statement
+#
+prepare stmt1 from 'create table t1 (s1 int) partition by hash (s1)';
+execute stmt1;
+--error 1050
+execute stmt1;
+drop table t1;
+
+#
+# bug 17290 SP with delete, create and rollback to save point causes MySQLD core
+#
+delimiter |;
+eval CREATE PROCEDURE test.p1(IN i INT)
+BEGIN
+ DECLARE CONTINUE HANDLER FOR sqlexception BEGIN END;
+ DROP TABLE IF EXISTS t1;
+ CREATE TABLE t1 (num INT,PRIMARY KEY(num));
+ START TRANSACTION;
+ INSERT INTO t1 VALUES(i);
+ savepoint t1_save;
+ INSERT INTO t1 VALUES (14);
+ ROLLBACK to savepoint t1_save;
+ COMMIT;
+END|
+delimiter ;|
+CALL test.p1(12);
+CALL test.p1(13);
+drop table t1;
+
--echo End of 5.1 tests