summaryrefslogtreecommitdiff
path: root/mysql-test/t/sp-prelocking.test
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2005-08-03 03:37:32 +0000
committerunknown <sergefp@mysql.com>2005-08-03 03:37:32 +0000
commitb323667ffc7176482073ca7d626560dcd8d7ee75 (patch)
treeab04bd1a5e1f34ad54866fd6df3fab3dfb0ae2e2 /mysql-test/t/sp-prelocking.test
parent11abe15eab3f444b600200e965cf18539af55392 (diff)
downloadmariadb-git-b323667ffc7176482073ca7d626560dcd8d7ee75.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 mysql-test/r/sp-prelocking.result: Prelocking-free SPs, post-review fixes: Added comment, s/testdb/mysqltest/, fixed a wrong test (error wasnt reported because of known bug in mysqltestrun) mysql-test/r/sp-security.result: Don't drop the table we're not using. mysql-test/r/sp.result: Prelocking-free SPs, post-review fixes: remove redundant "drop table if exists t3" statements mysql-test/t/sp-prelocking.test: Prelocking-free SPs, post-review fixes: Added comment, s/testdb/mysqltest/, fixed a wrong test (error wasnt reported because of known bug in mysqltestrun) mysql-test/t/sp-security.test: Don't drop the table we're not using. mysql-test/t/sp.test: Prelocking-free SPs, post-review fixes: remove redundant "drop table if exists t3" statements sql/sp.cc: New, better defined, sp_get_prelocking_info() function to get info about statement prelocking options sql/sp.h: Prelocking-free SPs, post-review fixes: New, better defined, sp_get_prelocking_info() function to get info about statement prelocking options sql/sp_cache.h: Prelocking-free SPs, post-review fixes: Amended the comments sql/sp_head.cc: Prelocking-free SPs, post-review fixes: Amend the comments, simplify the code that attaches removes statement's prelocking tables. sql/sql_base.cc: Prelocking-free SPs, post-review fixes: * Use a better defined sp_get_prelocking_info() function to get info about statement prelocking options * Don't activate prelocked mode for evaluation of SP arguments that use tables but don't need prelocking. sql/sql_class.cc: Prelocking-free SPs, post-review fixes: Initialize THD members in the order they are declared.
Diffstat (limited to 'mysql-test/t/sp-prelocking.test')
-rw-r--r--mysql-test/t/sp-prelocking.test24
1 files changed, 15 insertions, 9 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;