summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/include/ps_conv.inc9
-rw-r--r--mysql-test/r/compound.result10
-rw-r--r--mysql-test/r/ps_2myisam.result41
-rw-r--r--mysql-test/r/ps_3innodb.result41
-rw-r--r--mysql-test/r/ps_4heap.result41
-rw-r--r--mysql-test/r/ps_5merge.result82
-rw-r--r--mysql-test/suite/maria/ps_maria.result41
-rw-r--r--mysql-test/suite/rpl/r/prepare_select_into.result26
-rw-r--r--mysql-test/suite/rpl/t/prepare_select_into.test27
-rw-r--r--mysql-test/t/compound.test8
-rw-r--r--sql/item.cc2
-rw-r--r--sql/item.h1
-rw-r--r--sql/sql_class.cc5
-rw-r--r--sql/sql_class.h11
-rw-r--r--sql/sql_prepare.cc29
-rw-r--r--sql/sql_yacc.yy6
16 files changed, 10 insertions, 370 deletions
diff --git a/mysql-test/include/ps_conv.inc b/mysql-test/include/ps_conv.inc
index dba182e0b3e..2e42542d19a 100644
--- a/mysql-test/include/ps_conv.inc
+++ b/mysql-test/include/ps_conv.inc
@@ -256,14 +256,9 @@ execute stmt1 using @my_key ;
execute full_info ;
--disable_metadata
-# the next statement does not fail anymore
+# the next statement must fail
+--error 1064
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
-execute stmt1 using @result;
---enable_metadata
-execute full_info ;
---disable_metadata
-select @result;
-
diff --git a/mysql-test/r/compound.result b/mysql-test/r/compound.result
index 76aa3831553..dc1f33147a0 100644
--- a/mysql-test/r/compound.result
+++ b/mysql-test/r/compound.result
@@ -36,16 +36,6 @@ master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (6)
master-bin.000001 # Query # # COMMIT
-PREPARE stmt FROM "BEGIN NOT ATOMIC
- DECLARE v_res INT;
- SELECT COUNT(*) INTO v_res FROM t1;
- SELECT 'Hello World', v_res INTO ?,?;
-END"|
-SET @val="", @val2=""|
-EXECUTE stmt USING @val, @val2|
-SELECT @val, @val2|
-@val @val2
-Hello World 6
DROP TABLE t1|
CREATE DATABASE mysqltest1|
CREATE PROCEDURE mysqltest1.sp1()
diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result
index 75a6b669a40..6ca76191db5 100644
--- a/mysql-test/r/ps_2myisam.result
+++ b/mysql-test/r/ps_2myisam.result
@@ -2265,46 +2265,7 @@ def @arg32 250 16777215 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
-execute stmt1 using @result;
-execute full_info ;
-Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def @arg01 8 20 1 Y 32896 0 63
-def @arg02 8 20 0 Y 32896 0 63
-def @arg03 8 20 0 Y 32896 0 63
-def @arg04 8 20 0 Y 32896 0 63
-def @arg05 8 20 0 Y 32896 0 63
-def @arg06 8 20 0 Y 32896 0 63
-def @arg07 5 23 0 Y 32896 31 63
-def @arg08 5 23 0 Y 32896 31 63
-def @arg09 5 23 0 Y 32896 31 63
-def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
-def @arg17 8 20 0 Y 32928 0 63
-def @arg18 8 20 0 Y 32896 0 63
-def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
-@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
-0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
-select @result;
-@result
-1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '? from t9 where c1= 1' at line 1
test_sequence
-- insert into numeric columns --
insert into t9
diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result
index 17be5e53418..47237790ae5 100644
--- a/mysql-test/r/ps_3innodb.result
+++ b/mysql-test/r/ps_3innodb.result
@@ -2248,46 +2248,7 @@ def @arg32 250 16777215 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
-execute stmt1 using @result;
-execute full_info ;
-Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def @arg01 8 20 1 Y 32896 0 63
-def @arg02 8 20 0 Y 32896 0 63
-def @arg03 8 20 0 Y 32896 0 63
-def @arg04 8 20 0 Y 32896 0 63
-def @arg05 8 20 0 Y 32896 0 63
-def @arg06 8 20 0 Y 32896 0 63
-def @arg07 5 23 0 Y 32896 31 63
-def @arg08 5 23 0 Y 32896 31 63
-def @arg09 5 23 0 Y 32896 31 63
-def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
-def @arg17 8 20 0 Y 32928 0 63
-def @arg18 8 20 0 Y 32896 0 63
-def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
-@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
-0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
-select @result;
-@result
-1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '? from t9 where c1= 1' at line 1
test_sequence
-- insert into numeric columns --
insert into t9
diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result
index 5c0f01788a6..57532797dd7 100644
--- a/mysql-test/r/ps_4heap.result
+++ b/mysql-test/r/ps_4heap.result
@@ -2249,46 +2249,7 @@ def @arg32 250 16777215 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
-execute stmt1 using @result;
-execute full_info ;
-Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def @arg01 8 20 1 Y 32896 0 63
-def @arg02 8 20 0 Y 32896 0 63
-def @arg03 8 20 0 Y 32896 0 63
-def @arg04 8 20 0 Y 32896 0 63
-def @arg05 8 20 0 Y 32896 0 63
-def @arg06 8 20 0 Y 32896 0 63
-def @arg07 5 23 0 Y 32896 31 63
-def @arg08 5 23 0 Y 32896 31 63
-def @arg09 5 23 0 Y 32896 31 63
-def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
-def @arg17 8 20 0 Y 32928 0 63
-def @arg18 8 20 0 Y 32896 0 63
-def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 0 31 8
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 0 31 8
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 0 31 8
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 0 31 8
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
-@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
-0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
-select @result;
-@result
-1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '? from t9 where c1= 1' at line 1
test_sequence
-- insert into numeric columns --
insert into t9
diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result
index 861dba2bd04..9a9f457a212 100644
--- a/mysql-test/r/ps_5merge.result
+++ b/mysql-test/r/ps_5merge.result
@@ -2185,46 +2185,7 @@ def @arg32 250 16777215 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
-execute stmt1 using @result;
-execute full_info ;
-Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def @arg01 8 20 1 Y 32896 0 63
-def @arg02 8 20 0 Y 32896 0 63
-def @arg03 8 20 0 Y 32896 0 63
-def @arg04 8 20 0 Y 32896 0 63
-def @arg05 8 20 0 Y 32896 0 63
-def @arg06 8 20 0 Y 32896 0 63
-def @arg07 5 23 0 Y 32896 31 63
-def @arg08 5 23 0 Y 32896 31 63
-def @arg09 5 23 0 Y 32896 31 63
-def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
-def @arg17 8 20 0 Y 32928 0 63
-def @arg18 8 20 0 Y 32896 0 63
-def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
-@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
-0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
-select @result;
-@result
-1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '? from t9 where c1= 1' at line 1
test_sequence
-- insert into numeric columns --
insert into t9
@@ -5578,46 +5539,7 @@ def @arg32 250 16777215 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
-execute stmt1 using @result;
-execute full_info ;
-Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def @arg01 8 20 1 Y 32896 0 63
-def @arg02 8 20 0 Y 32896 0 63
-def @arg03 8 20 0 Y 32896 0 63
-def @arg04 8 20 0 Y 32896 0 63
-def @arg05 8 20 0 Y 32896 0 63
-def @arg06 8 20 0 Y 32896 0 63
-def @arg07 5 23 0 Y 32896 31 63
-def @arg08 5 23 0 Y 32896 31 63
-def @arg09 5 23 0 Y 32896 31 63
-def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
-def @arg17 8 20 0 Y 32928 0 63
-def @arg18 8 20 0 Y 32896 0 63
-def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
-@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
-0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
-select @result;
-@result
-1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '? from t9 where c1= 1' at line 1
test_sequence
-- insert into numeric columns --
insert into t9
diff --git a/mysql-test/suite/maria/ps_maria.result b/mysql-test/suite/maria/ps_maria.result
index 30b877e042c..774bf8af54a 100644
--- a/mysql-test/suite/maria/ps_maria.result
+++ b/mysql-test/suite/maria/ps_maria.result
@@ -2265,46 +2265,7 @@ def @arg32 250 16777215 0 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
prepare stmt1 from "select c1 into ? from t9 where c1= 1" ;
-execute stmt1 using @result;
-execute full_info ;
-Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def @arg01 8 20 1 Y 32896 0 63
-def @arg02 8 20 0 Y 32896 0 63
-def @arg03 8 20 0 Y 32896 0 63
-def @arg04 8 20 0 Y 32896 0 63
-def @arg05 8 20 0 Y 32896 0 63
-def @arg06 8 20 0 Y 32896 0 63
-def @arg07 5 23 0 Y 32896 31 63
-def @arg08 5 23 0 Y 32896 31 63
-def @arg09 5 23 0 Y 32896 31 63
-def @arg10 5 23 0 Y 32896 31 63
-def @arg11 246 83 0 Y 32896 30 63
-def @arg12 246 83 0 Y 32896 30 63
-def @arg13 250 16777215 0 Y 0 31 8
-def @arg14 250 16777215 0 Y 0 31 8
-def @arg15 250 16777215 19 Y 0 31 8
-def @arg16 250 16777215 0 Y 0 31 8
-def @arg17 8 20 0 Y 32928 0 63
-def @arg18 8 20 0 Y 32896 0 63
-def @arg19 8 20 0 Y 32896 0 63
-def @arg20 250 16777215 0 Y 0 31 8
-def @arg21 250 16777215 0 Y 0 31 8
-def @arg22 250 16777215 0 Y 0 31 8
-def @arg23 250 16777215 0 Y 128 31 63
-def @arg24 250 16777215 0 Y 0 31 8
-def @arg25 250 16777215 0 Y 128 31 63
-def @arg26 250 16777215 0 Y 0 31 8
-def @arg27 250 16777215 0 Y 128 31 63
-def @arg28 250 16777215 0 Y 0 31 8
-def @arg29 250 16777215 0 Y 128 31 63
-def @arg30 250 16777215 0 Y 0 31 8
-def @arg31 250 16777215 0 Y 0 31 8
-def @arg32 250 16777215 0 Y 0 31 8
-@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
-0 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1991-01-01 01:01:01 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
-select @result;
-@result
-1
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '? from t9 where c1= 1' at line 1
test_sequence
-- insert into numeric columns --
insert into t9
diff --git a/mysql-test/suite/rpl/r/prepare_select_into.result b/mysql-test/suite/rpl/r/prepare_select_into.result
deleted file mode 100644
index ebf64f24967..00000000000
--- a/mysql-test/suite/rpl/r/prepare_select_into.result
+++ /dev/null
@@ -1,26 +0,0 @@
-include/master-slave.inc
-[connection master]
-create table t1 (a int, b int);
-create table t2 (c int);
-insert t1 values (1, 2), (3, 4);
-create function fn1(x int) returns int deterministic
-begin
-insert t2 values (x);
-return x;
-end|
-prepare stmt1 from "select fn1(a) into ? from t1 where b= 2";
-execute stmt1 using @result;
-select * from t2;
-c
-1
-1
-select @result;
-@result
-1
-select * from t2;
-c
-1
-1
-drop table t1, t2;
-drop function fn1;
-include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/prepare_select_into.test b/mysql-test/suite/rpl/t/prepare_select_into.test
deleted file mode 100644
index 995b81020a1..00000000000
--- a/mysql-test/suite/rpl/t/prepare_select_into.test
+++ /dev/null
@@ -1,27 +0,0 @@
-source include/master-slave.inc;
-
-create table t1 (a int, b int);
-create table t2 (c int);
-insert t1 values (1, 2), (3, 4);
-
-delimiter |;
-create function fn1(x int) returns int deterministic
-begin
- insert t2 values (x);
- return x;
-end|
-delimiter ;|
-
-prepare stmt1 from "select fn1(a) into ? from t1 where b= 2";
-execute stmt1 using @result;
-select * from t2;
-select @result;
-sync_slave_with_master;
-select * from t2;
-
-connection master;
-drop table t1, t2;
-drop function fn1;
-
-source include/rpl_end.inc;
-
diff --git a/mysql-test/t/compound.test b/mysql-test/t/compound.test
index 06d09817ac1..1c5d12a1665 100644
--- a/mysql-test/t/compound.test
+++ b/mysql-test/t/compound.test
@@ -28,14 +28,6 @@ delimiter ;|
source include/show_binlog_events.inc;
delimiter |;
-PREPARE stmt FROM "BEGIN NOT ATOMIC
- DECLARE v_res INT;
- SELECT COUNT(*) INTO v_res FROM t1;
- SELECT 'Hello World', v_res INTO ?,?;
-END"|
-SET @val="", @val2=""|
-EXECUTE stmt USING @val, @val2|
-SELECT @val, @val2|
DROP TABLE t1|
#
diff --git a/sql/item.cc b/sql/item.cc
index d585ace5717..cf3741b3b59 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -3154,7 +3154,7 @@ default_set_param_func(Item_param *param,
Item_param::Item_param(uint pos_in_query_arg) :
Rewritable_query_parameter(pos_in_query_arg, 1),
- state(NO_VALUE), inout(IN_PARAM),
+ state(NO_VALUE),
item_result_type(STRING_RESULT),
/* Don't pretend to be a literal unless value for this item is set. */
item_type(PARAM_ITEM),
diff --git a/sql/item.h b/sql/item.h
index 050d573f3f5..dc394b05e3c 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -2465,7 +2465,6 @@ public:
STRING_VALUE, TIME_VALUE, LONG_DATA_VALUE,
DECIMAL_VALUE
} state;
- enum { IN_PARAM, OUT_PARAM } inout;
/*
A buffer for string and long data values. Historically all allocated
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index f5d51cfeaee..422a83aab55 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -3755,11 +3755,6 @@ bool my_var_sp::set(THD *thd, Item *item)
return thd->spcont->set_variable(thd, offset, &item);
}
-bool my_var_param::set(THD *thd, Item *item)
-{
- return param->set_value(thd, 0, &item);
-}
-
int select_dumpvar::send_data(List<Item> &items)
{
List_iterator_fast<my_var> var_li(var_list);
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 24eda567dcc..1e02e056474 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -4947,17 +4947,6 @@ public:
virtual bool set(THD *thd, Item *val) = 0;
};
-class my_var_param: public my_var {
-public:
- Settable_routine_parameter *param;
- my_var_param(Item_param *p)
- : my_var(null_lex_str, PARAM_VAR),
- param(p->get_settable_routine_parameter())
- { p->inout= Item_param::OUT_PARAM; }
- ~my_var_param() { }
- bool set(THD *thd, Item *val);
-};
-
class my_var_sp: public my_var {
public:
uint offset;
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index c32f3f66813..0afe376b793 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -1174,30 +1174,6 @@ static bool insert_params_from_vars(Prepared_statement *stmt,
DBUG_RETURN(0);
}
-static bool update_vars_from_params(Prepared_statement *stmt,
- List<LEX_STRING>& varnames)
-{
- Item_param **begin= stmt->param_array;
- Item_param **end= begin + stmt->param_count;
- LEX_STRING *varname;
- List_iterator<LEX_STRING> var_it(varnames);
- DBUG_ENTER("update_vars_from_params");
-
- for (Item_param **it= begin; it < end; ++it)
- {
- Item_param *param= *it;
- varname= var_it++;
- if (param->inout != Item_param::OUT_PARAM)
- continue;
- Item_func_set_user_var *suv= new Item_func_set_user_var(*varname, param);
- if (suv->fix_fields(stmt->thd, 0))
- DBUG_RETURN(1);
- suv->save_item_result(param);
- if (suv->update())
- DBUG_RETURN(1);
- }
- DBUG_RETURN(0);
-}
/**
Do the same as insert_params_from_vars but also construct query text for
@@ -3704,11 +3680,6 @@ reexecute:
if (! error) /* Success */
goto reexecute;
}
-
- /* Assign values for OUT-parameters (SELECT INTO) in the SQL PS */
- if (!packet)
- update_vars_from_params(this, thd->lex->prepared_stmt_params);
-
reset_stmt_params(this);
return error;
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 0aa165fe3f7..5913efaf941 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -11457,7 +11457,7 @@ limit_option:
}
| param_marker
{
- ((Item_param *) $1)->limit_clause_param= TRUE;
+ $1->limit_clause_param= TRUE;
}
| ULONGLONG_NUM
{
@@ -11648,10 +11648,6 @@ select_outvar:
{
$$ = Lex->result ? new my_var_user($2) : NULL;
}
- | param_marker
- {
- $$ = Lex->result ? new my_var_param($1) : NULL;
- }
| ident_or_text
{
sp_variable *t;