summaryrefslogtreecommitdiff
path: root/mysql-test/t/sp.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/sp.test')
-rw-r--r--mysql-test/t/sp.test49
1 files changed, 43 insertions, 6 deletions
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index f5bad05a40a..7bd20d226c2 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -706,9 +706,9 @@ begin
insert into test.t1 values (concat(x, "2"), y+2);
end|
-# Remove spout file if it exists
---error 0,1
---remove_file $MYSQLTEST_VARDIR/tmp/spout
+# Check that file does not exists
+--error 1
+--file_exists $MYSQLTEST_VARDIR/tmp/spout
call into_outfile("ofile", 1)|
--remove_file $MYSQLTEST_VARDIR/tmp/spout
delete from t1|
@@ -725,9 +725,9 @@ begin
insert into test.t1 values (concat(x, "2"), y+2);
end|
-# Remove spdump file if it exists
---error 0,1
---remove_file $MYSQLTEST_VARDIR/tmp/spdump
+# Check that file does not exists
+--error 1
+--file_exists $MYSQLTEST_VARDIR/tmp/spdump
call into_dumpfile("dfile", 1)|
--remove_file $MYSQLTEST_VARDIR/tmp/spdump
delete from t1|
@@ -7250,6 +7250,43 @@ DROP VIEW v1;
DROP FUNCTION metered;
DROP TABLE t1;
+#
+# Bug#28551 "The warning 'No database selected' is reported when calling
+# stored procedures"
+#
+--disable_warnings
+drop database if exists mysqltest_db1;
+--enable_warnings
+create database mysqltest_db1;
+create procedure mysqltest_db1.sp_bug28551() begin end;
+call mysqltest_db1.sp_bug28551();
+show warnings;
+drop database mysqltest_db1;
+#
+# Bug#29050 Creation of a legal stored procedure fails if a database is not
+# selected prior
+#
+--disable_warnings
+drop database if exists mysqltest_db1;
+drop table if exists test.t1;
+--enable_warnings
+create database mysqltest_db1;
+use mysqltest_db1;
+# For the sake of its side effect
+drop database mysqltest_db1;
+# Now we have no current database selected.
+create table test.t1 (id int);
+insert into test.t1 (id) values (1);
+delimiter //;
+create procedure test.sp_bug29050() begin select * from t1; end//
+delimiter ;//
+show warnings;
+call test.sp_bug29050();
+show warnings;
+# Restore the old current database
+use test;
+drop procedure sp_bug29050;
+drop table t1;
#
# Bug#25411 (trigger code truncated)