summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Shulga <dmitry.shulga@mariadb.com>2022-06-15 18:01:19 +0700
committerDmitry Shulga <dmitry.shulga@mariadb.com>2022-06-15 18:01:19 +0700
commit2e3b543b15b3bfcf94c16621b3fa9937d7a1b6f9 (patch)
treef3bd0642cd9e768b0f1faef71559958db687981c
parentb96b35897f8ce9c8bd013d7a5091a8901853b17a (diff)
downloadmariadb-git-10.9-MDEV-5816.tar.gz
MDEV-5816: Stored programs: validation of stored program statements10.9-MDEV-5816
Fixed the test main.sp
-rw-r--r--mysql-test/main/sp.result10
-rw-r--r--mysql-test/main/sp.test7
2 files changed, 8 insertions, 9 deletions
diff --git a/mysql-test/main/sp.result b/mysql-test/main/sp.result
index a7faeaf2f0d..103c6421bfd 100644
--- a/mysql-test/main/sp.result
+++ b/mysql-test/main/sp.result
@@ -6782,7 +6782,7 @@ call p1$
a
alter table t1 add b integer$
call p1$
-a
+a b
drop table t1;
drop procedure p1;
# ------------------------------------------------------------------
@@ -7247,12 +7247,12 @@ create table t1 (a int);
insert into t1 (a) values (1), (2), (3), (4), (5);
#
# Do we correctly resolve identifiers in LIMIT?
-# Since DROP and CREATE did not invalidate
-# the SP cache, we can't test until
-# we drop and re-create the procedure.
+# DROP and CREATE results in SP statement recompilation
+# so second execution of the procedure p1() doesn't lead
+# to issuing an error
#
call p1();
-ERROR 42S22: Unknown column 'test.t1.c1' in 'field list'
+a
#
# Drop and recreate the procedure, then repeat
#
diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test
index 058f42d5e92..36f92c125e8 100644
--- a/mysql-test/main/sp.test
+++ b/mysql-test/main/sp.test
@@ -8687,11 +8687,10 @@ create table t1 (a int);
insert into t1 (a) values (1), (2), (3), (4), (5);
--echo #
--echo # Do we correctly resolve identifiers in LIMIT?
---echo # Since DROP and CREATE did not invalidate
---echo # the SP cache, we can't test until
---echo # we drop and re-create the procedure.
+--echo # DROP and CREATE results in SP statement recompilation
+--echo # so second execution of the procedure p1() doesn't lead
+--echo # to issuing an error
--echo #
---error ER_BAD_FIELD_ERROR
call p1();
--echo #
--echo # Drop and recreate the procedure, then repeat