summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/funcs_1
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:39:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 13:39:13 +0000
commit86fbb58c3ac0865482819c10a3e81f2eea001c36 (patch)
tree28c9e526ea739c6f9b89e36115e1e2698bddf981 /mysql-test/suite/funcs_1
parentReleasing progress-linux version 1:10.11.6-2~progress7.99u1. (diff)
downloadmariadb-86fbb58c3ac0865482819c10a3e81f2eea001c36.tar.xz
mariadb-86fbb58c3ac0865482819c10a3e81f2eea001c36.zip
Merging upstream version 1:10.11.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/funcs_1')
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_views.result2
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_is.result16
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_is_embedded.result16
-rw-r--r--mysql-test/suite/funcs_1/r/memory_views.result2
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_views-big.result2
-rw-r--r--mysql-test/suite/funcs_1/r/storedproc.result150
-rw-r--r--mysql-test/suite/funcs_1/t/storedproc.test211
-rw-r--r--mysql-test/suite/funcs_1/views/views_master.inc9
8 files changed, 345 insertions, 63 deletions
diff --git a/mysql-test/suite/funcs_1/r/innodb_views.result b/mysql-test/suite/funcs_1/r/innodb_views.result
index 90d72b45..5bd48cf9 100644
--- a/mysql-test/suite/funcs_1/r/innodb_views.result
+++ b/mysql-test/suite/funcs_1/r/innodb_views.result
@@ -22145,9 +22145,9 @@ DELETE FROM t1;
DROP VIEW v1;
CREATE VIEW v1 AS SELECT f1, f2, f3, 'HELLO' AS my_greeting FROM t1;
INSERT INTO v1 SET f1 = 1;
-ERROR HY000: The target table v1 of the INSERT is not insertable-into
SELECT * from t1;
f1 f2 f3 f4
+1 NULL NULL NULL
DELETE FROM t1;
INSERT INTO v1 SET f1 = 1, my_greeting = 'HELLO';
ERROR HY000: The target table v1 of the INSERT is not insertable-into
diff --git a/mysql-test/suite/funcs_1/r/is_columns_is.result b/mysql-test/suite/funcs_1/r/is_columns_is.result
index 1a363643..be9d2b4c 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_is.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_is.result
@@ -178,9 +178,9 @@ def information_schema GEOMETRY_COLUMNS MAX_PPR 12 NULL NO tinyint NULL NULL 3 0
def information_schema GEOMETRY_COLUMNS SRID 13 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) select NEVER NULL
def information_schema GEOMETRY_COLUMNS STORAGE_TYPE 9 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) select NEVER NULL
def information_schema GLOBAL_STATUS VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
-def information_schema GLOBAL_STATUS VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) select NEVER NULL
+def information_schema GLOBAL_STATUS VARIABLE_VALUE 2 NULL NO varchar 4096 12288 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(4096) select NEVER NULL
def information_schema GLOBAL_VARIABLES VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
-def information_schema GLOBAL_VARIABLES VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) select NEVER NULL
+def information_schema GLOBAL_VARIABLES VARIABLE_VALUE 2 NULL NO varchar 4096 12288 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(4096) select NEVER NULL
def information_schema INDEX_STATISTICS INDEX_NAME 3 NULL NO varchar 192 576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(192) select NEVER NULL
def information_schema INDEX_STATISTICS ROWS_READ 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) select NEVER NULL
def information_schema INDEX_STATISTICS TABLE_NAME 2 NULL NO varchar 192 576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(192) select NEVER NULL
@@ -340,9 +340,9 @@ def information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NULL NO varchar 64 192
def information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
def information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
def information_schema SESSION_STATUS VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
-def information_schema SESSION_STATUS VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) select NEVER NULL
+def information_schema SESSION_STATUS VARIABLE_VALUE 2 NULL NO varchar 4096 12288 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(4096) select NEVER NULL
def information_schema SESSION_VARIABLES VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) select NEVER NULL
-def information_schema SESSION_VARIABLES VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) select NEVER NULL
+def information_schema SESSION_VARIABLES VARIABLE_VALUE 2 NULL NO varchar 4096 12288 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(4096) select NEVER NULL
def information_schema SPATIAL_REF_SYS AUTH_NAME 2 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) select NEVER NULL
def information_schema SPATIAL_REF_SYS AUTH_SRID 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(5) select NEVER NULL
def information_schema SPATIAL_REF_SYS SRID 1 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) select NEVER NULL
@@ -729,9 +729,9 @@ NULL information_schema GEOMETRY_COLUMNS COORD_DIMENSION tinyint NULL NULL NULL
NULL information_schema GEOMETRY_COLUMNS MAX_PPR tinyint NULL NULL NULL NULL tinyint(2)
NULL information_schema GEOMETRY_COLUMNS SRID smallint NULL NULL NULL NULL smallint(5)
3.0000 information_schema GLOBAL_STATUS VARIABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
-3.0000 information_schema GLOBAL_STATUS VARIABLE_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema GLOBAL_STATUS VARIABLE_VALUE varchar 4096 12288 utf8mb3 utf8mb3_general_ci varchar(4096)
3.0000 information_schema GLOBAL_VARIABLES VARIABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
-3.0000 information_schema GLOBAL_VARIABLES VARIABLE_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema GLOBAL_VARIABLES VARIABLE_VALUE varchar 4096 12288 utf8mb3 utf8mb3_general_ci varchar(4096)
3.0000 information_schema INDEX_STATISTICS TABLE_SCHEMA varchar 192 576 utf8mb3 utf8mb3_general_ci varchar(192)
3.0000 information_schema INDEX_STATISTICS TABLE_NAME varchar 192 576 utf8mb3 utf8mb3_general_ci varchar(192)
3.0000 information_schema INDEX_STATISTICS INDEX_NAME varchar 192 576 utf8mb3 utf8mb3_general_ci varchar(192)
@@ -891,9 +891,9 @@ NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datet
3.0000 information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
3.0000 information_schema SCHEMA_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
3.0000 information_schema SESSION_STATUS VARIABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
-3.0000 information_schema SESSION_STATUS VARIABLE_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema SESSION_STATUS VARIABLE_VALUE varchar 4096 12288 utf8mb3 utf8mb3_general_ci varchar(4096)
3.0000 information_schema SESSION_VARIABLES VARIABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
-3.0000 information_schema SESSION_VARIABLES VARIABLE_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema SESSION_VARIABLES VARIABLE_VALUE varchar 4096 12288 utf8mb3 utf8mb3_general_ci varchar(4096)
NULL information_schema SPATIAL_REF_SYS SRID smallint NULL NULL NULL NULL smallint(5)
3.0000 information_schema SPATIAL_REF_SYS AUTH_NAME varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
NULL information_schema SPATIAL_REF_SYS AUTH_SRID int NULL NULL NULL NULL int(5)
diff --git a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
index 676d0ed5..79c43e18 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_is_embedded.result
@@ -178,9 +178,9 @@ def information_schema GEOMETRY_COLUMNS MAX_PPR 12 NULL NO tinyint NULL NULL 3 0
def information_schema GEOMETRY_COLUMNS SRID 13 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) NEVER NULL
def information_schema GEOMETRY_COLUMNS STORAGE_TYPE 9 NULL NO tinyint NULL NULL 3 0 NULL NULL NULL tinyint(2) NEVER NULL
def information_schema GLOBAL_STATUS VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
-def information_schema GLOBAL_STATUS VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) NEVER NULL
+def information_schema GLOBAL_STATUS VARIABLE_VALUE 2 NULL NO varchar 4096 12288 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(4096) NEVER NULL
def information_schema GLOBAL_VARIABLES VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
-def information_schema GLOBAL_VARIABLES VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) NEVER NULL
+def information_schema GLOBAL_VARIABLES VARIABLE_VALUE 2 NULL NO varchar 4096 12288 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(4096) NEVER NULL
def information_schema INDEX_STATISTICS INDEX_NAME 3 NULL NO varchar 192 576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(192) NEVER NULL
def information_schema INDEX_STATISTICS ROWS_READ 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(21) NEVER NULL
def information_schema INDEX_STATISTICS TABLE_NAME 2 NULL NO varchar 192 576 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(192) NEVER NULL
@@ -340,9 +340,9 @@ def information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NULL NO varchar 64 192
def information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
def information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
def information_schema SESSION_STATUS VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
-def information_schema SESSION_STATUS VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) NEVER NULL
+def information_schema SESSION_STATUS VARIABLE_VALUE 2 NULL NO varchar 4096 12288 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(4096) NEVER NULL
def information_schema SESSION_VARIABLES VARIABLE_NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(64) NEVER NULL
-def information_schema SESSION_VARIABLES VARIABLE_VALUE 2 NULL NO varchar 2048 6144 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(2048) NEVER NULL
+def information_schema SESSION_VARIABLES VARIABLE_VALUE 2 NULL NO varchar 4096 12288 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(4096) NEVER NULL
def information_schema SPATIAL_REF_SYS AUTH_NAME 2 NULL NO varchar 512 1536 NULL NULL NULL utf8mb3 utf8mb3_general_ci varchar(512) NEVER NULL
def information_schema SPATIAL_REF_SYS AUTH_SRID 3 NULL NO int NULL NULL 10 0 NULL NULL NULL int(5) NEVER NULL
def information_schema SPATIAL_REF_SYS SRID 1 NULL NO smallint NULL NULL 5 0 NULL NULL NULL smallint(5) NEVER NULL
@@ -729,9 +729,9 @@ NULL information_schema GEOMETRY_COLUMNS COORD_DIMENSION tinyint NULL NULL NULL
NULL information_schema GEOMETRY_COLUMNS MAX_PPR tinyint NULL NULL NULL NULL tinyint(2)
NULL information_schema GEOMETRY_COLUMNS SRID smallint NULL NULL NULL NULL smallint(5)
3.0000 information_schema GLOBAL_STATUS VARIABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
-3.0000 information_schema GLOBAL_STATUS VARIABLE_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema GLOBAL_STATUS VARIABLE_VALUE varchar 4096 12288 utf8mb3 utf8mb3_general_ci varchar(4096)
3.0000 information_schema GLOBAL_VARIABLES VARIABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
-3.0000 information_schema GLOBAL_VARIABLES VARIABLE_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema GLOBAL_VARIABLES VARIABLE_VALUE varchar 4096 12288 utf8mb3 utf8mb3_general_ci varchar(4096)
3.0000 information_schema INDEX_STATISTICS TABLE_SCHEMA varchar 192 576 utf8mb3 utf8mb3_general_ci varchar(192)
3.0000 information_schema INDEX_STATISTICS TABLE_NAME varchar 192 576 utf8mb3 utf8mb3_general_ci varchar(192)
3.0000 information_schema INDEX_STATISTICS INDEX_NAME varchar 192 576 utf8mb3 utf8mb3_general_ci varchar(192)
@@ -891,9 +891,9 @@ NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datet
3.0000 information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
3.0000 information_schema SCHEMA_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8mb3 utf8mb3_general_ci varchar(3)
3.0000 information_schema SESSION_STATUS VARIABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
-3.0000 information_schema SESSION_STATUS VARIABLE_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema SESSION_STATUS VARIABLE_VALUE varchar 4096 12288 utf8mb3 utf8mb3_general_ci varchar(4096)
3.0000 information_schema SESSION_VARIABLES VARIABLE_NAME varchar 64 192 utf8mb3 utf8mb3_general_ci varchar(64)
-3.0000 information_schema SESSION_VARIABLES VARIABLE_VALUE varchar 2048 6144 utf8mb3 utf8mb3_general_ci varchar(2048)
+3.0000 information_schema SESSION_VARIABLES VARIABLE_VALUE varchar 4096 12288 utf8mb3 utf8mb3_general_ci varchar(4096)
NULL information_schema SPATIAL_REF_SYS SRID smallint NULL NULL NULL NULL smallint(5)
3.0000 information_schema SPATIAL_REF_SYS AUTH_NAME varchar 512 1536 utf8mb3 utf8mb3_general_ci varchar(512)
NULL information_schema SPATIAL_REF_SYS AUTH_SRID int NULL NULL NULL NULL int(5)
diff --git a/mysql-test/suite/funcs_1/r/memory_views.result b/mysql-test/suite/funcs_1/r/memory_views.result
index 417c0e85..8ce1e1c7 100644
--- a/mysql-test/suite/funcs_1/r/memory_views.result
+++ b/mysql-test/suite/funcs_1/r/memory_views.result
@@ -22147,9 +22147,9 @@ DELETE FROM t1;
DROP VIEW v1;
CREATE VIEW v1 AS SELECT f1, f2, f3, 'HELLO' AS my_greeting FROM t1;
INSERT INTO v1 SET f1 = 1;
-ERROR HY000: The target table v1 of the INSERT is not insertable-into
SELECT * from t1;
f1 f2 f3 f4
+1 NULL NULL NULL
DELETE FROM t1;
INSERT INTO v1 SET f1 = 1, my_greeting = 'HELLO';
ERROR HY000: The target table v1 of the INSERT is not insertable-into
diff --git a/mysql-test/suite/funcs_1/r/myisam_views-big.result b/mysql-test/suite/funcs_1/r/myisam_views-big.result
index efd5ee1c..984ae74f 100644
--- a/mysql-test/suite/funcs_1/r/myisam_views-big.result
+++ b/mysql-test/suite/funcs_1/r/myisam_views-big.result
@@ -23849,9 +23849,9 @@ DELETE FROM t1;
DROP VIEW v1;
CREATE VIEW v1 AS SELECT f1, f2, f3, 'HELLO' AS my_greeting FROM t1;
INSERT INTO v1 SET f1 = 1;
-ERROR HY000: The target table v1 of the INSERT is not insertable-into
SELECT * from t1;
f1 f2 f3 f4
+1 NULL NULL NULL
DELETE FROM t1;
INSERT INTO v1 SET f1 = 1, my_greeting = 'HELLO';
ERROR HY000: The target table v1 of the INSERT is not insertable-into
diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result
index 6b103847..39be8c82 100644
--- a/mysql-test/suite/funcs_1/r/storedproc.result
+++ b/mysql-test/suite/funcs_1/r/storedproc.result
@@ -2088,9 +2088,11 @@ SELECT * from t1 where f2=f1;
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 'cursor()
SELECT * from t1 where f2=f1' at line 1
CREATE PROCEDURE database()
-SELECT * from t1 where f2=f1;
-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 'database()
-SELECT * from t1 where f2=f1' at line 1
+SELECT 1;
+CALL database();
+1
+1
+DROP PROCEDURE database;
CREATE PROCEDURE databases()
SELECT * from t1 where f2=f1;
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 'databases()
@@ -2350,6 +2352,12 @@ CREATE PROCEDURE join()
SELECT * from t1 where f2=f1;
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 'join()
SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE json_table()
+SELECT 1;
+CALL json_table();
+1
+1
+DROP PROCEDURE json_table;
CREATE PROCEDURE key()
SELECT * from t1 where f2=f1;
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 'key()
@@ -2470,6 +2478,12 @@ CREATE PROCEDURE natural()
SELECT * from t1 where f2=f1;
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 'natural()
SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE nested()
+SELECT 1;
+CALL nested();
+1
+1
+DROP PROCEDURE nested;
CREATE PROCEDURE not()
SELECT * from t1 where f2=f1;
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 'not()
@@ -2509,6 +2523,12 @@ CREATE PROCEDURE order()
SELECT * from t1 where f2=f1;
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 'order()
SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE ordinality()
+SELECT 1;
+CALL ordinality;
+1
+1
+DROP PROCEDURE ordinality;
CREATE PROCEDURE out()
SELECT * from t1 where f2=f1;
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 'out()
@@ -2521,6 +2541,12 @@ CREATE PROCEDURE outfile()
SELECT * from t1 where f2=f1;
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 'outfile()
SELECT * from t1 where f2=f1' at line 1
+CREATE PROCEDURE path()
+SELECT 1;
+CALL path();
+1
+1
+DROP PROCEDURE path;
CREATE PROCEDURE precision()
SELECT * from t1 where f2=f1;
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 'precision()
@@ -2602,9 +2628,11 @@ SELECT * from t1 where f2=f1;
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 'rlike()
SELECT * from t1 where f2=f1' at line 1
CREATE PROCEDURE schema()
-SELECT * from t1 where f2=f1;
-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 'schema()
-SELECT * from t1 where f2=f1' at line 1
+SELECT 1;
+CALL schema();
+1
+1
+DROP PROCEDURE schema;
CREATE PROCEDURE schemas()
SELECT * from t1 where f2=f1;
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 'schemas()
@@ -4204,9 +4232,6 @@ CREATE PROCEDURE sp1()
database:BEGIN
SELECT @x;
END//
-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 'database:BEGIN
-SELECT @x;
-END' at line 2
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
databases:BEGIN
@@ -4737,6 +4762,11 @@ SELECT @x;
END' at line 2
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
+json_table:BEGIN
+SELECT @x;
+END//
+DROP PROCEDURE sp1;
+CREATE PROCEDURE sp1()
key:BEGIN
SELECT @x;
END//
@@ -4977,6 +5007,11 @@ SELECT @x;
END' at line 2
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
+nested:BEGIN
+SELECT @x;
+END//
+DROP PROCEDURE sp1;
+CREATE PROCEDURE sp1()
not:BEGIN
SELECT @x;
END//
@@ -5057,6 +5092,11 @@ SELECT @x;
END' at line 2
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
+ordinality:BEGIN
+SELECT @x;
+END//
+DROP PROCEDURE sp1;
+CREATE PROCEDURE sp1()
out:BEGIN
SELECT @x;
END//
@@ -5081,6 +5121,11 @@ SELECT @x;
END' at line 2
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
+path:BEGIN
+SELECT @x;
+END//
+DROP PROCEDURE sp1;
+CREATE PROCEDURE sp1()
precision:BEGIN
SELECT @x;
END//
@@ -5253,9 +5298,6 @@ CREATE PROCEDURE sp1()
schema:BEGIN
SELECT @x;
END//
-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 'schema:BEGIN
-SELECT @x;
-END' at line 2
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
schemas:BEGIN
@@ -7811,8 +7853,6 @@ CREATE PROCEDURE sp1()
BEGIN
declare database char;
END//
-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 'database char;
-END' at line 3
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
BEGIN
@@ -8278,6 +8318,11 @@ END' at line 3
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
BEGIN
+declare json_table char;
+END//
+DROP PROCEDURE sp1;
+CREATE PROCEDURE sp1()
+BEGIN
declare key char;
END//
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 'key char;
@@ -8488,6 +8533,11 @@ END' at line 3
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
BEGIN
+declare nested char;
+END//
+DROP PROCEDURE sp1;
+CREATE PROCEDURE sp1()
+BEGIN
declare not char;
END//
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 'not char;
@@ -8556,6 +8606,11 @@ END' at line 3
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
BEGIN
+declare ordinality char;
+END//
+DROP PROCEDURE sp1;
+CREATE PROCEDURE sp1()
+BEGIN
declare out char;
END//
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 'out char;
@@ -8577,6 +8632,11 @@ END' at line 3
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
BEGIN
+declare path char;
+END//
+DROP PROCEDURE sp1;
+CREATE PROCEDURE sp1()
+BEGIN
declare precision char;
END//
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 'precision char;
@@ -8745,11 +8805,7 @@ CREATE PROCEDURE sp1()
BEGIN
declare schema char;
END//
-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 'schema char;
-END' at line 3
DROP PROCEDURE IF EXISTS sp1;
-Warnings:
-Note 1305 PROCEDURE db_storedproc.sp1 does not exist
CREATE PROCEDURE sp1()
BEGIN
declare schemas char;
@@ -9704,11 +9760,7 @@ BEGIN
declare database condition for sqlstate '02000';
declare exit handler for database set @var2 = 1;
END//
-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 'database condition for sqlstate '02000';
-declare exit handler for database se...' at line 3
DROP PROCEDURE IF EXISTS sp1;
-Warnings:
-Note 1305 PROCEDURE db_storedproc.sp1 does not exist
CREATE PROCEDURE sp1( )
BEGIN
declare databases condition for sqlstate '02000';
@@ -10372,6 +10424,12 @@ Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
CREATE PROCEDURE sp1( )
BEGIN
+declare json_table condition for sqlstate '02000';
+declare exit handler for json_table set @var2 = 1;
+END//
+DROP PROCEDURE sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
declare key condition for sqlstate '02000';
declare exit handler for key set @var2 = 1;
END//
@@ -10672,6 +10730,12 @@ Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
CREATE PROCEDURE sp1( )
BEGIN
+declare nested condition for sqlstate '02000';
+declare exit handler for nested set @var2 = 1;
+END//
+DROP PROCEDURE sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
declare not condition for sqlstate '02000';
declare exit handler for not set @var2 = 1;
END//
@@ -10768,6 +10832,12 @@ Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
CREATE PROCEDURE sp1( )
BEGIN
+declare ordinality condition for sqlstate '02000';
+declare exit handler for ordinality set @var2 = 1;
+END//
+DROP PROCEDURE sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
declare out condition for sqlstate '02000';
declare exit handler for out set @var2 = 1;
END//
@@ -10798,6 +10868,12 @@ Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
CREATE PROCEDURE sp1( )
BEGIN
+declare path condition for sqlstate '02000';
+declare exit handler for path set @var2 = 1;
+END//
+DROP PROCEDURE sp1;
+CREATE PROCEDURE sp1( )
+BEGIN
declare precision condition for sqlstate '02000';
declare exit handler for precision set @var2 = 1;
END//
@@ -11021,11 +11097,7 @@ BEGIN
declare schema condition for sqlstate '02000';
declare exit handler for schema set @var2 = 1;
END//
-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 'schema condition for sqlstate '02000';
-declare exit handler for schema set @v...' at line 3
DROP PROCEDURE IF EXISTS sp1;
-Warnings:
-Note 1305 PROCEDURE db_storedproc.sp1 does not exist
CREATE PROCEDURE sp1( )
BEGIN
declare schemas condition for sqlstate '02000';
@@ -11974,8 +12046,7 @@ CREATE PROCEDURE sp1( )
BEGIN
declare database handler for sqlstate '02000' set @var2 = 1;
END//
-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 'database handler for sqlstate '02000' set @var2 = 1;
-END' at line 3
+ERROR HY000: Unknown data type: 'handler'
DROP PROCEDURE IF EXISTS sp1;
Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
@@ -12571,6 +12642,11 @@ Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
CREATE PROCEDURE sp1( )
BEGIN
+declare json_table handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR HY000: Unknown data type: 'handler'
+CREATE PROCEDURE sp1( )
+BEGIN
declare key handler for sqlstate '02000' set @var2 = 1;
END//
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 'key handler for sqlstate '02000' set @var2 = 1;
@@ -12841,6 +12917,11 @@ Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
CREATE PROCEDURE sp1( )
BEGIN
+declare nested handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR HY000: Unknown data type: 'handler'
+CREATE PROCEDURE sp1( )
+BEGIN
declare not handler for sqlstate '02000' set @var2 = 1;
END//
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 'not handler for sqlstate '02000' set @var2 = 1;
@@ -12930,6 +13011,11 @@ Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
CREATE PROCEDURE sp1( )
BEGIN
+declare ordinality handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR HY000: Unknown data type: 'handler'
+CREATE PROCEDURE sp1( )
+BEGIN
declare out handler for sqlstate '02000' set @var2 = 1;
END//
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 'out handler for sqlstate '02000' set @var2 = 1;
@@ -12957,6 +13043,11 @@ Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
CREATE PROCEDURE sp1( )
BEGIN
+declare path handler for sqlstate '02000' set @var2 = 1;
+END//
+ERROR HY000: Unknown data type: 'handler'
+CREATE PROCEDURE sp1( )
+BEGIN
declare precision handler for sqlstate '02000' set @var2 = 1;
END//
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 'precision handler for sqlstate '02000' set @var2 = 1;
@@ -13164,8 +13255,7 @@ CREATE PROCEDURE sp1( )
BEGIN
declare schema handler for sqlstate '02000' set @var2 = 1;
END//
-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 'schema handler for sqlstate '02000' set @var2 = 1;
-END' at line 3
+ERROR HY000: Unknown data type: 'handler'
DROP PROCEDURE IF EXISTS sp1;
Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
diff --git a/mysql-test/suite/funcs_1/t/storedproc.test b/mysql-test/suite/funcs_1/t/storedproc.test
index 8712919e..e9c00742 100644
--- a/mysql-test/suite/funcs_1/t/storedproc.test
+++ b/mysql-test/suite/funcs_1/t/storedproc.test
@@ -1102,9 +1102,11 @@ CREATE PROCEDURE current_user()
CREATE PROCEDURE cursor()
SELECT * from t1 where f2=f1;
---error ER_PARSE_ERROR
CREATE PROCEDURE database()
- SELECT * from t1 where f2=f1;
+ SELECT 1;
+
+CALL database();
+DROP PROCEDURE database;
--error ER_PARSE_ERROR
CREATE PROCEDURE databases()
@@ -1367,6 +1369,12 @@ CREATE PROCEDURE iterate()
CREATE PROCEDURE join()
SELECT * from t1 where f2=f1;
+CREATE PROCEDURE json_table()
+ SELECT 1;
+
+CALL json_table();
+DROP PROCEDURE json_table;
+
--error ER_PARSE_ERROR
CREATE PROCEDURE key()
SELECT * from t1 where f2=f1;
@@ -1487,6 +1495,13 @@ CREATE PROCEDURE modifies()
CREATE PROCEDURE natural()
SELECT * from t1 where f2=f1;
+CREATE PROCEDURE nested()
+ SELECT 1;
+
+CALL nested();
+
+DROP PROCEDURE nested;
+
--error ER_PARSE_ERROR
CREATE PROCEDURE not()
SELECT * from t1 where f2=f1;
@@ -1527,6 +1542,13 @@ CREATE PROCEDURE or()
CREATE PROCEDURE order()
SELECT * from t1 where f2=f1;
+CREATE PROCEDURE ordinality()
+ SELECT 1;
+
+CALL ordinality;
+
+DROP PROCEDURE ordinality;
+
--error ER_PARSE_ERROR
CREATE PROCEDURE out()
SELECT * from t1 where f2=f1;
@@ -1539,6 +1561,13 @@ CREATE PROCEDURE outer()
CREATE PROCEDURE outfile()
SELECT * from t1 where f2=f1;
+CREATE PROCEDURE path()
+ SELECT 1;
+
+CALL path();
+
+DROP PROCEDURE path;
+
--error ER_PARSE_ERROR
CREATE PROCEDURE precision()
SELECT * from t1 where f2=f1;
@@ -1619,9 +1648,11 @@ CREATE PROCEDURE right()
CREATE PROCEDURE rlike()
SELECT * from t1 where f2=f1;
---error ER_PARSE_ERROR
CREATE PROCEDURE schema()
- SELECT * from t1 where f2=f1;
+ SELECT 1;
+
+CALL schema();
+DROP PROCEDURE schema;
--error ER_PARSE_ERROR
CREATE PROCEDURE schemas()
@@ -3481,7 +3512,7 @@ DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
delimiter //;
---error ER_PARSE_ERROR
+
CREATE PROCEDURE sp1()
database:BEGIN
SELECT @x;
@@ -4285,6 +4316,15 @@ DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
delimiter //;
+CREATE PROCEDURE sp1()
+ json_table:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+DROP PROCEDURE sp1;
+
+delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1()
key:BEGIN
@@ -4645,6 +4685,16 @@ DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
delimiter //;
+
+CREATE PROCEDURE sp1()
+ nested:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+DROP PROCEDURE sp1;
+
+delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1()
not:BEGIN
@@ -4766,6 +4816,16 @@ DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
delimiter //;
+
+CREATE PROCEDURE sp1()
+ ordinality:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+DROP PROCEDURE sp1;
+
+delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1()
out:BEGIN
@@ -4802,6 +4862,16 @@ DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
delimiter //;
+
+CREATE PROCEDURE sp1()
+ path:BEGIN
+ SELECT @x;
+END//
+delimiter ;//
+
+DROP PROCEDURE sp1;
+
+delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1()
precision:BEGIN
@@ -5066,7 +5136,7 @@ DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
delimiter //;
---error ER_PARSE_ERROR
+
CREATE PROCEDURE sp1()
schema:BEGIN
SELECT @x;
@@ -8938,7 +9008,7 @@ DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
delimiter //;
---error ER_PARSE_ERROR
+
CREATE PROCEDURE sp1()
BEGIN
declare database char;
@@ -9736,12 +9806,21 @@ BEGIN
declare join char;
END//
delimiter ;//
-
--disable_warnings
DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
delimiter //;
+
+CREATE PROCEDURE sp1()
+BEGIN
+ declare json_table char;
+END//
+delimiter ;//
+
+DROP PROCEDURE sp1;
+
+delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1()
BEGIN
@@ -10102,6 +10181,16 @@ DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
delimiter //;
+
+CREATE PROCEDURE sp1()
+BEGIN
+ declare nested char;
+END//
+delimiter ;//
+
+DROP PROCEDURE sp1;
+
+delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1()
BEGIN
@@ -10221,6 +10310,16 @@ DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
delimiter //;
+
+CREATE PROCEDURE sp1()
+BEGIN
+ declare ordinality char;
+END//
+delimiter ;//
+
+DROP PROCEDURE sp1;
+
+delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1()
BEGIN
@@ -10257,6 +10356,16 @@ DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
delimiter //;
+
+CREATE PROCEDURE sp1()
+BEGIN
+ declare path char;
+END//
+delimiter ;//
+
+DROP PROCEDURE sp1;
+
+delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1()
BEGIN
@@ -10506,7 +10615,7 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
---error ER_PARSE_ERROR
+
CREATE PROCEDURE sp1()
BEGIN
declare schema char;
@@ -11624,7 +11733,7 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
---error ER_PARSE_ERROR
+
CREATE PROCEDURE sp1( )
BEGIN
declare database condition for sqlstate '02000';
@@ -12361,6 +12470,17 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
+
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare json_table condition for sqlstate '02000';
+ declare exit handler for json_table set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE sp1;
+
+delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1( )
BEGIN
@@ -12691,6 +12811,17 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
+
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare nested condition for sqlstate '02000';
+ declare exit handler for nested set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE sp1;
+
+delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1( )
BEGIN
@@ -12800,6 +12931,17 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
+
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare ordinality condition for sqlstate '02000';
+ declare exit handler for ordinality set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE sp1;
+
+delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1( )
BEGIN
@@ -12833,6 +12975,17 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
+
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare path condition for sqlstate '02000';
+ declare exit handler for path set @var2 = 1;
+END//
+delimiter ;//
+
+DROP PROCEDURE sp1;
+
+delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1( )
BEGIN
@@ -13075,7 +13228,7 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
---error ER_PARSE_ERROR
+
CREATE PROCEDURE sp1( )
BEGIN
declare schema condition for sqlstate '02000';
@@ -14181,7 +14334,7 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
---error ER_PARSE_ERROR
+
CREATE PROCEDURE sp1( )
BEGIN
declare database handler for sqlstate '02000' set @var2 = 1;
@@ -14851,6 +15004,14 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare json_table handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1( )
BEGIN
@@ -15151,6 +15312,14 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare nested handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1( )
BEGIN
@@ -15251,6 +15420,14 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare ordinality handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1( )
BEGIN
@@ -15281,6 +15458,14 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
+--error ER_UNKNOWN_DATA_TYPE
+CREATE PROCEDURE sp1( )
+BEGIN
+ declare path handler for sqlstate '02000' set @var2 = 1;
+END//
+delimiter ;//
+
+delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1( )
BEGIN
@@ -15511,7 +15696,7 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
delimiter //;
---error ER_PARSE_ERROR
+--error ER_UNKNOWN_DATA_TYPE
CREATE PROCEDURE sp1( )
BEGIN
declare schema handler for sqlstate '02000' set @var2 = 1;
diff --git a/mysql-test/suite/funcs_1/views/views_master.inc b/mysql-test/suite/funcs_1/views/views_master.inc
index 526e9e34..0e175db4 100644
--- a/mysql-test/suite/funcs_1/views/views_master.inc
+++ b/mysql-test/suite/funcs_1/views/views_master.inc
@@ -3085,8 +3085,10 @@ eval SHOW CREATE VIEW test1.v$level;
# the following line as written as '--eror ER_TOO_MANY_TABLES' and the command
# is successful so assuming no expected error was intended
# --error ER_TOO_MANY_TABLES
+--disable_ps2_protocol
eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v$level;
+--enable_ps2_protocol
let $message= The output of following EXPLAIN is deactivated, because the result
differs on some platforms
FIXME Is this a bug ? ;
@@ -3116,16 +3118,20 @@ SELECT f1 as f2, f2 as f1 FROM test2.t1;
CREATE OR REPLACE VIEW test2.v0 AS
SELECT CAST('0001-01-01' AS DATE) as f1, f2 FROM test3.t1;
eval SHOW CREATE VIEW test1.v$toplevel;
+--disable_ps2_protocol
eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
+--enable_ps2_protocol
eval EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
# 2.3.3 UCS2 string instead of common string
CREATE OR REPLACE VIEW test3.v0 AS
SELECT f1 , CONVERT('ßÄäÖöÜü§' USING UCS2) as f2 FROM test1.t1;
eval SHOW CREATE VIEW test1.v$toplevel;
+--disable_ps2_protocol
eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
+--enable_ps2_protocol
eval EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
@@ -3133,8 +3139,10 @@ eval EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CREATE OR REPLACE VIEW test3.v0 AS
SELECT CONVERT('ßÄäÖöÜü§' USING UCS2) as f1, f2 FROM test1.t1;
eval SHOW CREATE VIEW test1.v$toplevel;
+--disable_ps2_protocol
eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
+--enable_ps2_protocol
eval EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1,
CAST(f2 AS CHAR) AS f2 FROM test1.v$toplevel;
--enable_result_log
@@ -3479,7 +3487,6 @@ CREATE VIEW v1 AS SELECT f1, f2, f3, 'HELLO' AS my_greeting FROM t1;
# Maybe the SQL standard allows the following INSERT.
# But it would be a very sophisticated DBMS.
---error ER_NON_INSERTABLE_TABLE
INSERT INTO v1 SET f1 = 1;
SELECT * from t1;
DELETE FROM t1;