summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormysqldev@mysql.com <>2005-03-17 22:17:37 +0100
committermysqldev@mysql.com <>2005-03-17 22:17:37 +0100
commitc59e0fc78b6454eef27f4098b0f631f3358df544 (patch)
treee55dc71260693d58f62c13e24874dd8e0f6bab88
parentfec41395fbe37cbca24f056322961f13ca479e20 (diff)
parent7d5c7f5ec69de405bc91cf1c7c4dcfd4d7ec6fe4 (diff)
downloadmariadb-git-c59e0fc78b6454eef27f4098b0f631f3358df544.tar.gz
Merge
-rw-r--r--mysql-test/r/sp.result22
-rw-r--r--mysql-test/r/sp_trans.result22
-rw-r--r--mysql-test/t/sp.test25
-rw-r--r--mysql-test/t/sp_trans.test35
4 files changed, 57 insertions, 47 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 2984bd3975f..5366ecb2be3 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -2778,25 +2778,3 @@ a
drop procedure bug8937|
delete from t1|
drop table t1,t2;
-drop procedure if exists sp1;
-create table t1 (a int) engine=innodb|
-create procedure sp1 ()
-begin
-truncate table t1; insert t1 values (1); rollback;
-end
-|
-set autocommit=0;
-insert t1 values (2);
-call sp1();
-ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
-commit;
-set autocommit=1;
-select * from t1;
-a
-2
-call sp1();
-select * from t1;
-a
-1
-drop table t1;
-drop procedure sp1;
diff --git a/mysql-test/r/sp_trans.result b/mysql-test/r/sp_trans.result
new file mode 100644
index 00000000000..0a28fae3c0d
--- /dev/null
+++ b/mysql-test/r/sp_trans.result
@@ -0,0 +1,22 @@
+drop procedure if exists sp1;
+create table t1 (a int) engine=innodb|
+create procedure sp1 ()
+begin
+truncate table t1; insert t1 values (1); rollback;
+end|
+set autocommit=0;
+insert t1 values (2);
+call sp1();
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+commit;
+select * from t1;
+a
+2
+call sp1();
+ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
+set autocommit=1;
+select * from t1;
+a
+2
+drop table t1;
+drop procedure sp1;
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index 31c6a16580f..cf7415a3048 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -3390,28 +3390,3 @@ delete from t1|
delimiter ;|
drop table t1,t2;
-#
-# BUG#8850
-#
---disable_warnings
-drop procedure if exists sp1;
---enable_warnings
-delimiter |;
-create table t1 (a int) engine=innodb|
-create procedure sp1 ()
-begin
- truncate table t1; insert t1 values (1); rollback;
-end
-|
-delimiter ;|
-set autocommit=0;
-insert t1 values (2);
---error 1192
-call sp1();
-commit;
-set autocommit=1;
-select * from t1;
-call sp1();
-select * from t1;
-drop table t1;
-drop procedure sp1;
diff --git a/mysql-test/t/sp_trans.test b/mysql-test/t/sp_trans.test
new file mode 100644
index 00000000000..30622027a94
--- /dev/null
+++ b/mysql-test/t/sp_trans.test
@@ -0,0 +1,35 @@
+#
+# tests that require InnoDB...
+#
+
+-- source include/have_innodb.inc
+
+#
+# BUG#8850
+#
+--disable_warnings
+drop procedure if exists sp1;
+--enable_warnings
+delimiter |;
+create table t1 (a int) engine=innodb|
+create procedure sp1 ()
+begin
+ truncate table t1; insert t1 values (1); rollback;
+end|
+delimiter ;|
+set autocommit=0;
+insert t1 values (2);
+--error 1192
+call sp1();
+commit;
+select * from t1;
+#
+# when CALL will be fixed to not start a transaction, the error should
+# go away
+--error 1192
+call sp1();
+set autocommit=1;
+select * from t1;
+drop table t1;
+drop procedure sp1;
+