summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorsergefp@mysql.com <>2005-08-03 03:37:32 +0000
committersergefp@mysql.com <>2005-08-03 03:37:32 +0000
commitb6a6fe0849a3cba46c4ed6446612bfdb29d162ba (patch)
treeab04bd1a5e1f34ad54866fd6df3fab3dfb0ae2e2 /mysql-test/t
parentde02193bddedd55364f6d9e7c29c240a2dddb52b (diff)
downloadmariadb-git-b6a6fe0849a3cba46c4ed6446612bfdb29d162ba.tar.gz
Prelocking-free SPs, post-review fixes:
* Don't activate prelocking mode for evaluating procedure arguments when it is not necessary. * Code structure simplification and cleanup. * Cleanup in .test files
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/sp-prelocking.test24
-rw-r--r--mysql-test/t/sp-security.test2
-rw-r--r--mysql-test/t/sp.test62
3 files changed, 17 insertions, 71 deletions
diff --git a/mysql-test/t/sp-prelocking.test b/mysql-test/t/sp-prelocking.test
index 9dbf4f4af7e..e5f35b19fa7 100644
--- a/mysql-test/t/sp-prelocking.test
+++ b/mysql-test/t/sp-prelocking.test
@@ -1,5 +1,13 @@
+#
+# Tests of prelocking-free execution of stored procedures.
+# Currently two properties of prelocking-free SP execution are checked:
+# - It is possible to execute DDL statements in prelocking-free stored
+# procedure
+# - The same procedure can be called in prelocking-free mode and
+# in prelocked mode (from within a function).
+
--disable_warnings
-drop database if exists testdb;
+drop database if exists mysqltest;
drop table if exists t1, t2, t3, t4;
drop procedure if exists sp1;
drop procedure if exists sp2;
@@ -12,9 +20,9 @@ drop function if exists f3;
# BUG#8072
-create database testdb;
+create database mysqltest;
delimiter //;
-use testdb//
+use mysqltest//
create procedure sp1 ()
begin
drop table if exists t1;
@@ -29,11 +37,11 @@ select database();
use test;
select database();
-call testdb.sp1();
+call mysqltest.sp1();
select database();
-drop procedure testdb.sp1;
-drop database testdb;
+drop procedure mysqltest.sp1;
+drop database mysqltest;
# BUG#8766
@@ -96,7 +104,7 @@ begin
insert into t1 values(1);
call sp1();
select 't1', a from t1;
- select 't2', b from t2;
+ select 't2', a from t2;
drop table t1;
drop table t2;
end//
@@ -151,8 +159,6 @@ end //
delimiter ;//
call sp4();
-drop temporary table t1;
-drop temporary table t2;
drop procedure sp1;
drop procedure sp2;
drop procedure sp3;
diff --git a/mysql-test/t/sp-security.test b/mysql-test/t/sp-security.test
index 69529fd1ed0..15fcba5ebe9 100644
--- a/mysql-test/t/sp-security.test
+++ b/mysql-test/t/sp-security.test
@@ -15,7 +15,7 @@ grant usage on *.* to user1@localhost;
flush privileges;
--disable_warnings
-drop table if exists t1,t2;
+drop table if exists t1;
drop database if exists db1_secret;
--enable_warnings
# Create our secret database
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index d70ce702daf..a41e54deb1a 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -147,9 +147,6 @@ drop procedure setcontext|
# Set things to null
---disable_warnings
-drop table if exists t3|
---enable_warnings
create table t3 ( d date, i int, f double, s varchar(32) )|
--disable_warnings
@@ -683,9 +680,6 @@ begin
end|
delete from t1|
---disable_warnings
-drop table if exists t3|
---enable_warnings
create table t3 ( s char(16), d int)|
call into_test4()|
select * from t3|
@@ -741,14 +735,9 @@ begin
insert into test.t3 values (concat(x, "2"), y+2);
end|
---disable_warnings
-drop table if exists t3|
---enable_warnings
call create_select("cs", 90)|
select * from t1, t3|
---disable_warnings
-drop table if exists t3|
---enable_warnings
+drop table t3|
delete from t1|
drop procedure create_select|
@@ -922,9 +911,6 @@ drop procedure hndlr3|
# Variables might be uninitialized when using handlers
# (Otherwise the compiler can detect if a variable is not set, but
# not in this case.)
---disable_warnings
-drop table if exists t3|
---enable_warnings
create table t3 ( id char(16), data int )|
--disable_warnings
@@ -977,9 +963,6 @@ call cur1()|
select * from t1|
drop procedure cur1|
---disable_warnings
-drop table if exists t3|
---enable_warnings
create table t3 ( s char(16), i int )|
--disable_warnings
@@ -1611,9 +1594,6 @@ insert into t1 values ("foo", 3), ("bar", 2), ("zip", 5), ("zap", 1)|
select t1max()|
drop function t1max|
---disable_warnings
-drop table if exists t3|
---enable_warnings
create table t3 (
v char(16) not null primary key,
c int unsigned not null
@@ -1747,9 +1727,6 @@ drop procedure bug1656|
#
# BUG#1862
#
---disable_warnings
-drop table if exists t3|
---enable_warnings
create table t3(a int)|
--disable_warnings
@@ -2006,9 +1983,6 @@ drop procedure bug2776_2|
#
# BUG#2780
#
---disable_warnings
-drop table if exists t3|
---enable_warnings
create table t3 (s1 smallint)|
insert into t3 values (123456789012)|
@@ -2082,9 +2056,6 @@ drop table t3, t4|
#
# BUG#2656
#
---disable_warnings
-drop table if exists t3, t4|
---enable_warnings
create table t3 (
OrderID int not null,
@@ -2172,8 +2143,6 @@ drop procedure bug3426|
# BUG#3448
#
--disable_warnings
-drop table if exists t3, t4|
-
create table t3 (
a int primary key,
ach char(1)
@@ -2205,9 +2174,6 @@ drop table t3, t4|
#
# BUG#3734
#
---disable_warnings
-drop table if exists t3|
---enable_warnings
create table t3 (
id int unsigned auto_increment not null primary key,
title VARCHAR(200),
@@ -2383,9 +2349,6 @@ drop procedure bug3843|
#
# BUG#3368
#
---disable_warnings
-drop table if exists t3|
---enable_warnings
create table t3 ( s1 char(10) )|
insert into t3 values ('a'), ('b')|
@@ -2405,9 +2368,6 @@ drop table t3|
#
# BUG#4579
#
---disable_warnings
-drop table if exists t3|
---enable_warnings
create table t3 (f1 int, f2 int)|
insert into t3 values (1,1)|
@@ -2442,7 +2402,6 @@ drop table t3|
# BUG#2773: Function's data type ignored in stored procedures
#
--disable_warnings
-drop table if exists t3|
drop procedure if exists bug2773|
--enable_warnings
@@ -2471,10 +2430,6 @@ drop function bug3788|
#
# BUG#4726
#
---disable_warnings
-drop table if exists t3|
---enable_warnings
-
create table t3 (f1 int, f2 int, f3 int)|
insert into t3 values (1,1,1)|
@@ -2505,9 +2460,6 @@ drop table t3|
# BUG#4318
#
#QQ Don't know if HANDLER commands can work with SPs, or at all...
-#--disable_warnings
-#drop table if exists t3|
-#--enable_warnings
#
#create table t3 (s1 int)|
#insert into t3 values (3), (4)|
@@ -2589,10 +2541,6 @@ drop procedure bug4902_2|
# BUG#4904
#
--disable_warnings
-drop table if exists t3|
---enable_warnings
-
---disable_warnings
drop procedure if exists bug4904|
--enable_warnings
create procedure bug4904()
@@ -2845,7 +2793,6 @@ drop procedure bug3583|
# BUG#4905: Stored procedure doesn't clear for "Rows affected"
#
--disable_warnings
-drop table if exists t3|
drop procedure if exists bug4905|
--enable_warnings
@@ -2945,9 +2892,6 @@ drop procedure bug8540|
#
# BUG#6642: Stored procedure crash if expression with set function
#
---disable_warnings
-drop table if exists t3|
---enable_warnings
create table t3 (s1 int)|
--disable_warnings
@@ -3035,9 +2979,6 @@ drop table t3|
# BUG#8116: calling simple stored procedure twice in a row results
# in server crash
#
---disable_warnings
-drop table if exists t3|
---enable_warnings
create table t3 ( userid bigint(20) not null default 0 )|
--disable_warnings
@@ -3280,7 +3221,6 @@ delete from t1|
drop procedure if exists bug6900|
drop procedure if exists bug9074|
drop procedure if exists bug6900_9074|
-drop table if exists t3|
--enable_warnings
create table t3 (w char unique, x char)|