diff options
author | unknown <gshchepa/uchum@gleb.loc> | 2007-07-28 23:38:59 +0500 |
---|---|---|
committer | unknown <gshchepa/uchum@gleb.loc> | 2007-07-28 23:38:59 +0500 |
commit | 26c63ee58de39a9f34000dfb6215180cc82e928f (patch) | |
tree | 3a4cb12b8eda079abe9d993bb710d83aea0b76bd /mysql-test/r/sp.result | |
parent | 78dd1fe5305c58f19622eaa2faeb3e792d6e8658 (diff) | |
parent | 3c1716151e04527408f3a9b0ac17f070b35e09b7 (diff) | |
download | mariadb-git-26c63ee58de39a9f34000dfb6215180cc82e928f.tar.gz |
Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into gleb.loc:/home/uchum/work/bk/5.1-opt
mysql-test/r/sp.result:
Auto merged
mysql-test/t/sp.test:
Auto merged
sql/sql_base.cc:
Merge with 5.0-opt.
Diffstat (limited to 'mysql-test/r/sp.result')
-rw-r--r-- | mysql-test/r/sp.result | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 07661f9ae54..a17c3e4492e 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -1,5 +1,8 @@ use test; drop table if exists t1,t2,t3,t4; +drop view if exists v1; +drop procedure if exists p1; +drop procedure if exists p2; drop function if exists f1; drop function if exists f2; create table t1 ( @@ -6283,6 +6286,73 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI DROP VIEW v1; DROP FUNCTION metered; DROP TABLE t1; +SET @p1_p2_cnt= 2; +CREATE TABLE t1 (c1 INT); +CREATE VIEW v1 AS SELECT * FROM t1; +PREPARE s1 FROM 'SELECT c1 FROM v1'; +EXECUTE s1; +c1 +EXECUTE s1; +c1 +CREATE PROCEDURE p1(IN loops BIGINT(19) UNSIGNED) +BEGIN +WHILE loops > 0 DO +SELECT c1 FROM v1; +SET loops = loops - 1; +END WHILE; +END| +CREATE PROCEDURE p2(IN loops BIGINT(19) UNSIGNED) +BEGIN +WHILE loops > 0 DO +SELECT c1 FROM v1; +CALL p1(@p1_p2_cnt); +SET loops = loops - 1; +END WHILE; +END| +CREATE FUNCTION f1(loops INT UNSIGNED) +RETURNS INT +BEGIN +DECLARE tmp INT; +WHILE loops > 0 DO +SELECT c1 INTO tmp FROM v1; +SET loops = loops - 1; +END WHILE; +RETURN loops; +END| +CALL p1(2); +c1 +c1 +CALL p2(2); +c1 +c1 +c1 +c1 +c1 +c1 +SELECT f1(2); +f1(2) +0 +Warnings: +Warning 1329 No data - zero rows fetched, selected, or processed +Warning 1329 No data - zero rows fetched, selected, or processed +PREPARE s1 FROM 'SELECT f1(2)'; +EXECUTE s1; +f1(2) +0 +Warnings: +Warning 1329 No data - zero rows fetched, selected, or processed +Warning 1329 No data - zero rows fetched, selected, or processed +EXECUTE s1; +f1(2) +0 +Warnings: +Warning 1329 No data - zero rows fetched, selected, or processed +Warning 1329 No data - zero rows fetched, selected, or processed +DROP PROCEDURE p1; +DROP PROCEDURE p2; +DROP FUNCTION f1; +DROP VIEW v1; +DROP TABLE t1; drop database if exists mysqltest_db1; create database mysqltest_db1; create procedure mysqltest_db1.sp_bug28551() begin end; |