summaryrefslogtreecommitdiff
path: root/mysql-test/r/sp-prelocking.result
diff options
context:
space:
mode:
authorkostja@bodhi.(none) <>2007-07-18 17:09:03 +0400
committerkostja@bodhi.(none) <>2007-07-18 17:09:03 +0400
commit198b97a62579c73bd455bc476822230324de8a34 (patch)
treeaa5df5cea2fb2b599ff0a7b601d03909896007db /mysql-test/r/sp-prelocking.result
parent9bac763cc153cd4e5221c7baf3e5b0cf8e829b50 (diff)
downloadmariadb-git-198b97a62579c73bd455bc476822230324de8a34.tar.gz
Add a test case for Bug#22427 create table if not exists + stored
function results in inconsistent behavior. The bug itself was fixed by the patch for bug 20662.
Diffstat (limited to 'mysql-test/r/sp-prelocking.result')
-rw-r--r--mysql-test/r/sp-prelocking.result22
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/r/sp-prelocking.result b/mysql-test/r/sp-prelocking.result
index 5eac54803f0..c19bd1abd26 100644
--- a/mysql-test/r/sp-prelocking.result
+++ b/mysql-test/r/sp-prelocking.result
@@ -267,4 +267,26 @@ drop table bug_27907_logs;
insert into bug_27907_t1(a) values (1);
ERROR 42S02: Table 'test.bug_27907_logs' doesn't exist
drop table bug_27907_t1;
+
+Bug#22427 create table if not exists + stored function results in
+inconsistent behavior
+
+Add a test case, the bug itself was fixed by the patch for
+Bug#20662
+
+drop table if exists t1;
+drop function if exists f_bug22427;
+create table t1 (i int);
+insert into t1 values (1);
+create function f_bug22427() returns int return (select max(i) from t1);
+select f_bug22427();
+f_bug22427()
+1
+create table if not exists t1 select f_bug22427() as i;
+Warnings:
+Note 1050 Table 't1' already exists
+create table t1 select f_bug22427() as i;
+ERROR 42S01: Table 't1' already exists
+drop table t1;
+drop function f_bug22427;
End of 5.0 tests