From 2e3b543b15b3bfcf94c16621b3fa9937d7a1b6f9 Mon Sep 17 00:00:00 2001 From: Dmitry Shulga Date: Wed, 15 Jun 2022 18:01:19 +0700 Subject: MDEV-5816: Stored programs: validation of stored program statements Fixed the test main.sp --- mysql-test/main/sp.result | 10 +++++----- mysql-test/main/sp.test | 7 +++---- 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 -- cgit v1.2.1