summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <stewart@mysql.com>2005-08-19 00:04:45 +1000
committerunknown <stewart@mysql.com>2005-08-19 00:04:45 +1000
commit749f599efa81de151401d0af33c4b31292727b15 (patch)
tree10b37f7b15d43536be51a2bcae6ea81934bbc6e0 /mysql-test/t
parent320d451deaaa5c0cbca5376d3fed390658d7d9e5 (diff)
parent8d593d499d314c5c7bf2882a68f7798f5be02b73 (diff)
downloadmariadb-git-749f599efa81de151401d0af33c4b31292727b15.tar.gz
Merge ssmith@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/stewart/Documents/MySQL/5.0/main
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/sp.test59
1 files changed, 59 insertions, 0 deletions
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index f4f527fd222..cde5d3922ab 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -3871,6 +3871,65 @@ where t.table_schema = 'test' and t.table_name = 't1'|
drop function bug10055|
#
+# Bug #12297 "SP crashes the server if data inserted inside a lon loop"
+# The test for memleak bug, so actually there is no way to test it
+# from the suite. The test below could be used to check SP memory
+# consumption by passing large input parameter.
+#
+
+#
+# Note: the test is currenly disabled because of the
+# Bug #12637: SP crashes the server if it has update query with user var
+# & binlog is enabled.
+#
+
+--disable_warnings
+#drop procedure if exists bug12297|
+--enable_warnings
+
+#create procedure bug12297(lim int)
+#begin
+# set @x = 0;
+# repeat
+# insert into t1(id,data)
+# values('aa', @x);
+# set @x = @x + 1;
+# until @x >= lim
+# end repeat;
+#end|
+
+#call bug12297(10)|
+#drop procedure bug12297|
+
+#
+# Bug #11247 "Stored procedures: Function calls in long loops leak memory"
+# One more memleak bug test. One could use this test to check that the memory
+# isn't leaking by increasing the input value for p_bug11247.
+#
+
+--disable_warnings
+drop function if exists f_bug11247|
+drop procedure if exists p_bug11247|
+--enable_warnings
+
+create function f_bug11247(param int)
+ returns int
+return param + 1|
+
+create procedure p_bug11247(lim int)
+begin
+ declare v int default 0;
+
+ while v < lim do
+ set v= f_bug11247(v);
+ end while;
+end|
+
+call p_bug11247(10)|
+drop function f_bug11247|
+drop procedure p_bug11247|
+
+#
# BUG#NNNN: New bug synopsis
#
#--disable_warnings