Commit 9d88c5b8 authored by Alexey Botchkov's avatar Alexey Botchkov

MDEV-31616 Problems with a stored function EMPTY() on upgrade to 10.6.

The IDENT_sys doesn't include keywords, so the function with the
keyword name can be created, but cannot be called.
Moving keywords to new rules keyword_func_sp_var_and_label and
keyword_func_sp_var_not_label so the functions with these
names are allowed.
parent 011d666a
......@@ -1507,7 +1507,7 @@ BEGIN NOT ATOMIC DECLARE history INT; SET history=10; SELECT history; END
SELECT history FROM t1
SELECT history 'alias' FROM t1
SELECT history()
Error 1064 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 '()' at line 1
Error 1630 FUNCTION test.history does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT history.history()
Error 1630 FUNCTION history.history does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT history DATE FROM t1
......@@ -1530,7 +1530,7 @@ BEGIN NOT ATOMIC DECLARE next INT; SET next=10; SELECT next; END
SELECT next FROM t1
SELECT next 'alias' FROM t1
SELECT next()
Error 1064 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 '()' at line 1
Error 1630 FUNCTION test.next does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT next.next()
Error 1630 FUNCTION next.next does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT next DATE FROM t1
......@@ -1577,7 +1577,7 @@ BEGIN NOT ATOMIC DECLARE previous INT; SET previous=10; SELECT previous; END
SELECT previous FROM t1
SELECT previous 'alias' FROM t1
SELECT previous()
Error 1064 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 '()' at line 1
Error 1630 FUNCTION test.previous does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT previous.previous()
Error 1630 FUNCTION previous.previous does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT previous DATE FROM t1
......@@ -1601,7 +1601,7 @@ BEGIN NOT ATOMIC DECLARE system INT; SET system=10; SELECT system; END
SELECT system FROM t1
SELECT system 'alias' FROM t1
SELECT system()
Error 1064 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 '()' at line 1
Error 1630 FUNCTION test.system does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT system.system()
Error 1630 FUNCTION system.system does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT system DATE FROM t1
......@@ -1624,7 +1624,7 @@ BEGIN NOT ATOMIC DECLARE system_time INT; SET system_time=10; SELECT system_time
SELECT system_time FROM t1
SELECT system_time 'alias' FROM t1
SELECT system_time()
Error 1064 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 '()' at line 1
Error 1630 FUNCTION test.system_time does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT system_time.system_time()
Error 1630 FUNCTION system_time.system_time does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT system_time DATE FROM t1
......@@ -1695,7 +1695,7 @@ BEGIN NOT ATOMIC DECLARE transaction INT; SET transaction=10; SELECT transaction
SELECT transaction FROM t1
SELECT transaction 'alias' FROM t1
SELECT transaction()
Error 1064 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 '()' at line 1
Error 1630 FUNCTION test.transaction does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT transaction.transaction()
Error 1630 FUNCTION transaction.transaction does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT transaction DATE FROM t1
......@@ -1741,7 +1741,7 @@ BEGIN NOT ATOMIC DECLARE versioning INT; SET versioning=10; SELECT versioning; E
SELECT versioning FROM t1
SELECT versioning 'alias' FROM t1
SELECT versioning()
Error 1064 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 '()' at line 1
Error 1630 FUNCTION test.versioning does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT versioning.versioning()
Error 1630 FUNCTION versioning.versioning does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT versioning DATE FROM t1
......@@ -1764,7 +1764,7 @@ BEGIN NOT ATOMIC DECLARE without INT; SET without=10; SELECT without; END
SELECT without FROM t1
SELECT without 'alias' FROM t1
SELECT without()
Error 1064 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 '()' at line 1
Error 1630 FUNCTION test.without does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT without.without()
Error 1630 FUNCTION without.without does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT without DATE FROM t1
......
......@@ -9008,4 +9008,77 @@ BEGIN NOT ATOMIC DECLARE r ROW TYPE OF t1 DEFAULT (SELECT * FROM t1); SELECT r.a
r.a
1
SET SESSION log_slow_verbosity= @tmp;
#
# MDEV-31616 Problems with a stored function EMPTY() on upgrade to 10.6.
#
CREATE OR REPLACE FUNCTION empty(a VARCHAR(128)) RETURNS int RETURN LENGTH(a)=0;
Warnings:
Note 1585 This function 'empty' has the same name as a native function
SELECT empty('1');
empty('1')
0
Warnings:
Note 1585 This function 'empty' has the same name as a native function
DROP FUNCTION empty;
CREATE OR REPLACE FUNCTION json_table(a VARCHAR(128)) RETURNS int RETURN LENGTH(a)=0;
Warnings:
Note 1585 This function 'json_table' has the same name as a native function
SELECT json_table('1');
json_table('1')
0
Warnings:
Note 1585 This function 'json_table' has the same name as a native function
DROP FUNCTION json_table;
CREATE OR REPLACE FUNCTION nested(a VARCHAR(128)) RETURNS int RETURN LENGTH(a)=0;
Warnings:
Note 1585 This function 'nested' has the same name as a native function
SELECT nested('1');
nested('1')
0
Warnings:
Note 1585 This function 'nested' has the same name as a native function
DROP FUNCTION nested;
CREATE OR REPLACE FUNCTION ordinality(a VARCHAR(128)) RETURNS int RETURN LENGTH(a)=0;
Warnings:
Note 1585 This function 'ordinality' has the same name as a native function
SELECT ordinality('1');
ordinality('1')
0
Warnings:
Note 1585 This function 'ordinality' has the same name as a native function
DROP FUNCTION ordinality;
CREATE OR REPLACE FUNCTION path(a VARCHAR(128)) RETURNS int RETURN LENGTH(a)=0;
Warnings:
Note 1585 This function 'path' has the same name as a native function
SELECT path('1');
path('1')
0
Warnings:
Note 1585 This function 'path' has the same name as a native function
DROP FUNCTION path;
CREATE OR REPLACE FUNCTION fast(a VARCHAR(128)) RETURNS int RETURN LENGTH(a)=0;
Warnings:
Note 1585 This function 'fast' has the same name as a native function
SELECT fast('1');
fast('1')
0
Warnings:
Note 1585 This function 'fast' has the same name as a native function
DROP FUNCTION fast;
CREATE OR REPLACE FUNCTION relay(a VARCHAR(128)) RETURNS int RETURN LENGTH(a)=0;
Warnings:
Note 1585 This function 'relay' has the same name as a native function
SELECT relay('1');
relay('1')
0
Warnings:
Note 1585 This function 'relay' has the same name as a native function
DROP FUNCTION relay;
CREATE OR REPLACE FUNCTION database() RETURNS int RETURN 333;
Warnings:
Note 1585 This function 'database' has the same name as a native function
SELECT database();
database()
test
DROP FUNCTION database;
DROP TABLE t1;
......@@ -10618,6 +10618,44 @@ BEGIN NOT ATOMIC DECLARE r ROW TYPE OF t1 DEFAULT (SELECT * FROM t1); SELECT r.a
--delimiter ;
SET SESSION log_slow_verbosity= @tmp;
--echo #
--echo # MDEV-31616 Problems with a stored function EMPTY() on upgrade to 10.6.
--echo #
CREATE OR REPLACE FUNCTION empty(a VARCHAR(128)) RETURNS int RETURN LENGTH(a)=0;
SELECT empty('1');
DROP FUNCTION empty;
CREATE OR REPLACE FUNCTION json_table(a VARCHAR(128)) RETURNS int RETURN LENGTH(a)=0;
SELECT json_table('1');
DROP FUNCTION json_table;
CREATE OR REPLACE FUNCTION nested(a VARCHAR(128)) RETURNS int RETURN LENGTH(a)=0;
SELECT nested('1');
DROP FUNCTION nested;
CREATE OR REPLACE FUNCTION ordinality(a VARCHAR(128)) RETURNS int RETURN LENGTH(a)=0;
SELECT ordinality('1');
DROP FUNCTION ordinality;
CREATE OR REPLACE FUNCTION path(a VARCHAR(128)) RETURNS int RETURN LENGTH(a)=0;
SELECT path('1');
DROP FUNCTION path;
CREATE OR REPLACE FUNCTION fast(a VARCHAR(128)) RETURNS int RETURN LENGTH(a)=0;
SELECT fast('1');
DROP FUNCTION fast;
CREATE OR REPLACE FUNCTION relay(a VARCHAR(128)) RETURNS int RETURN LENGTH(a)=0;
SELECT relay('1');
DROP FUNCTION relay;
CREATE OR REPLACE FUNCTION database() RETURNS int RETURN 333;
SELECT database();
DROP FUNCTION database;
# Cleanup
DROP TABLE t1;
......@@ -84,7 +84,7 @@ DECLARE history INT; BEGIN history:=10; SELECT history; END
SELECT history FROM t1
SELECT history 'alias' FROM t1
SELECT history()
Error 1064 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 '()' at line 1
Error 1630 FUNCTION test.history does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT history.history()
Error 1630 FUNCTION history.history does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT history DATE FROM t1
......@@ -106,7 +106,7 @@ DECLARE next INT; BEGIN next:=10; SELECT next; END
SELECT next FROM t1
SELECT next 'alias' FROM t1
SELECT next()
Error 1064 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 '()' at line 1
Error 1630 FUNCTION test.next does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT next.next()
Error 1630 FUNCTION next.next does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT next DATE FROM t1
......@@ -151,7 +151,7 @@ DECLARE previous INT; BEGIN previous:=10; SELECT previous; END
SELECT previous FROM t1
SELECT previous 'alias' FROM t1
SELECT previous()
Error 1064 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 '()' at line 1
Error 1630 FUNCTION test.previous does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT previous.previous()
Error 1630 FUNCTION previous.previous does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT previous DATE FROM t1
......@@ -174,7 +174,7 @@ DECLARE system INT; BEGIN system:=10; SELECT system; END
SELECT system FROM t1
SELECT system 'alias' FROM t1
SELECT system()
Error 1064 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 '()' at line 1
Error 1630 FUNCTION test.system does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT system.system()
Error 1630 FUNCTION system.system does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT system DATE FROM t1
......@@ -196,7 +196,7 @@ DECLARE system_time INT; BEGIN system_time:=10; SELECT system_time; END
SELECT system_time FROM t1
SELECT system_time 'alias' FROM t1
SELECT system_time()
Error 1064 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 '()' at line 1
Error 1630 FUNCTION test.system_time does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT system_time.system_time()
Error 1630 FUNCTION system_time.system_time does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT system_time DATE FROM t1
......@@ -264,7 +264,7 @@ DECLARE transaction INT; BEGIN transaction:=10; SELECT transaction; END
SELECT transaction FROM t1
SELECT transaction 'alias' FROM t1
SELECT transaction()
Error 1064 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 '()' at line 1
Error 1630 FUNCTION test.transaction does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT transaction.transaction()
Error 1630 FUNCTION transaction.transaction does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT transaction DATE FROM t1
......@@ -308,7 +308,7 @@ DECLARE versioning INT; BEGIN versioning:=10; SELECT versioning; END
SELECT versioning FROM t1
SELECT versioning 'alias' FROM t1
SELECT versioning()
Error 1064 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 '()' at line 1
Error 1630 FUNCTION test.versioning does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT versioning.versioning()
Error 1630 FUNCTION versioning.versioning does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT versioning DATE FROM t1
......@@ -330,7 +330,7 @@ DECLARE without INT; BEGIN without:=10; SELECT without; END
SELECT without FROM t1
SELECT without 'alias' FROM t1
SELECT without()
Error 1064 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 '()' at line 1
Error 1630 FUNCTION test.without does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT without.without()
Error 1630 FUNCTION without.without does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual
SELECT without DATE FROM t1
......
......@@ -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;
......@@ -4284,6 +4315,15 @@ delimiter ;//
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()
......@@ -4644,6 +4684,16 @@ delimiter ;//
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()
......@@ -4765,6 +4815,16 @@ delimiter ;//
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()
......@@ -4801,6 +4861,16 @@ delimiter ;//
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()
......@@ -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,11 +9806,20 @@ 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()
......@@ -10101,6 +10180,16 @@ delimiter ;//
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()
......@@ -10220,6 +10309,16 @@ delimiter ;//
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()
......@@ -10256,6 +10355,16 @@ delimiter ;//
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()
......@@ -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';
......@@ -12360,6 +12469,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( )
......@@ -12690,6 +12810,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( )
......@@ -12799,6 +12930,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( )
......@@ -12832,6 +12974,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( )
......@@ -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;
......@@ -14850,6 +15003,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( )
......@@ -15150,6 +15311,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( )
......@@ -15250,6 +15419,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( )
......@@ -15280,6 +15457,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( )
......@@ -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;
......
......@@ -191,17 +191,17 @@ SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR
FROM performance_schema.events_statements_summary_by_digest
ORDER BY DIGEST_TEXT;
SCHEMA_NAME DIGEST DIGEST_TEXT COUNT_STAR
test 6792f631a33c9aa30f74fc4a1ac00d0d EXPLAIN SELECT * FROM `test` . `v1` 1
test 1a904f6e400d36fc3277347dc3dd7e3b EXPLAIN SELECT * FROM `test` . `v1` WHERE `a` = ? 1
test 84b4a595b190b7b2be65930719a5f217 EXPLAIN SELECT * FROM `test` . `v1` WHERE `b` > ? 1
test c2fbbef6771c0d94bc0bda68b083c2ee EXPLAIN SELECT `a` , `b` FROM `test` . `v1` 1
test 89124df2148819b870c1d648f748b1ad EXPLAIN SELECT `b` , `a` FROM `test` . `v1` 1
test 02270358998b539b9b11f709b372eda9 SELECT * FROM `test` . `v1` 1
test e42e0a8f9dd70f815fd3b1323ae4d07d SELECT * FROM `test` . `v1` WHERE `a` = ? 1
test f549d4607e65f96ae2bc4dc4f70965dd SELECT * FROM `test` . `v1` WHERE `b` > ? 1
test d0ca89f87d46b19d6823e9c3d8fcc4f3 SELECT `a` , `b` FROM `test` . `v1` 1
test 3599e7d908d651cd2b3410656f0a9a85 SELECT `b` , `a` FROM `test` . `v1` 1
test 579dc8800f4005f131faf0202bfd383f TRUNCATE TABLE `performance_schema` . `events_statements_summary_by_digest` 1
test 370e7bef18915f6611ac6d260774b983 EXPLAIN SELECT * FROM `test` . `v1` 1
test 234d37a98244d9c8e7ddc95d8d615b67 EXPLAIN SELECT * FROM `test` . `v1` WHERE `a` = ? 1
test 3dbb0324b7aa42191a45415438f0664b EXPLAIN SELECT * FROM `test` . `v1` WHERE `b` > ? 1
test c4a754140ab2b645514868c727428aa0 EXPLAIN SELECT `a` , `b` FROM `test` . `v1` 1
test 534e1e8b3fdd54ac7950a9c0c049d67b EXPLAIN SELECT `b` , `a` FROM `test` . `v1` 1
test 6b928d386834bf77fb56d6917a66b3b3 SELECT * FROM `test` . `v1` 1
test 914e5e0b02604c846266f1941ca5c99c SELECT * FROM `test` . `v1` WHERE `a` = ? 1
test e037e9baeb863981ceed07178b82d85c SELECT * FROM `test` . `v1` WHERE `b` > ? 1
test 1e4dbc9041d1c2c6ef0aee7bb10a9712 SELECT `a` , `b` FROM `test` . `v1` 1
test ce9abb5b3de1de61ca0c7bed9bd8e268 SELECT `b` , `a` FROM `test` . `v1` 1
test 8117308957580606865e284265d48615 TRUNCATE TABLE `performance_schema` . `events_statements_summary_by_digest` 1
DROP TABLE test.v1;
CREATE VIEW test.v1 AS SELECT * FROM test.t1;
EXPLAIN SELECT * from test.v1;
......@@ -248,19 +248,19 @@ SELECT SCHEMA_NAME, DIGEST, DIGEST_TEXT, COUNT_STAR
FROM performance_schema.events_statements_summary_by_digest
ORDER BY DIGEST_TEXT;
SCHEMA_NAME DIGEST DIGEST_TEXT COUNT_STAR
test 1d9b60541940c07a0731da3a7e4b3710 CREATE VIEW `test` . `v1` AS SELECT * FROM `test` . `t1` 1
test c3a18ebfa01b069ce0cbcf1d3c3a28fd DROP TABLE `test` . `v1` 1
test 6792f631a33c9aa30f74fc4a1ac00d0d EXPLAIN SELECT * FROM `test` . `v1` 2
test 1a904f6e400d36fc3277347dc3dd7e3b EXPLAIN SELECT * FROM `test` . `v1` WHERE `a` = ? 2
test 84b4a595b190b7b2be65930719a5f217 EXPLAIN SELECT * FROM `test` . `v1` WHERE `b` > ? 2
test c2fbbef6771c0d94bc0bda68b083c2ee EXPLAIN SELECT `a` , `b` FROM `test` . `v1` 2
test 89124df2148819b870c1d648f748b1ad EXPLAIN SELECT `b` , `a` FROM `test` . `v1` 2
test 02270358998b539b9b11f709b372eda9 SELECT * FROM `test` . `v1` 2
test e42e0a8f9dd70f815fd3b1323ae4d07d SELECT * FROM `test` . `v1` WHERE `a` = ? 2
test f549d4607e65f96ae2bc4dc4f70965dd SELECT * FROM `test` . `v1` WHERE `b` > ? 2
test 279f05780dfbf44c1b9c444c4a3d7f81 SELECT SCHEMA_NAME , `DIGEST` , `DIGEST_TEXT` , `COUNT_STAR` FROM `performance_schema` . `events_statements_summary_by_digest` ORDER BY `DIGEST_TEXT` 1
test d0ca89f87d46b19d6823e9c3d8fcc4f3 SELECT `a` , `b` FROM `test` . `v1` 2
test 3599e7d908d651cd2b3410656f0a9a85 SELECT `b` , `a` FROM `test` . `v1` 2
test 579dc8800f4005f131faf0202bfd383f TRUNCATE TABLE `performance_schema` . `events_statements_summary_by_digest` 1
test aacd39adbd408fe1250208d032ce0bed CREATE VIEW `test` . `v1` AS SELECT * FROM `test` . `t1` 1
test b7905ad078429428effa41db5d58c43e DROP TABLE `test` . `v1` 1
test 370e7bef18915f6611ac6d260774b983 EXPLAIN SELECT * FROM `test` . `v1` 2
test 234d37a98244d9c8e7ddc95d8d615b67 EXPLAIN SELECT * FROM `test` . `v1` WHERE `a` = ? 2
test 3dbb0324b7aa42191a45415438f0664b EXPLAIN SELECT * FROM `test` . `v1` WHERE `b` > ? 2
test c4a754140ab2b645514868c727428aa0 EXPLAIN SELECT `a` , `b` FROM `test` . `v1` 2
test 534e1e8b3fdd54ac7950a9c0c049d67b EXPLAIN SELECT `b` , `a` FROM `test` . `v1` 2
test 6b928d386834bf77fb56d6917a66b3b3 SELECT * FROM `test` . `v1` 2
test 914e5e0b02604c846266f1941ca5c99c SELECT * FROM `test` . `v1` WHERE `a` = ? 2
test e037e9baeb863981ceed07178b82d85c SELECT * FROM `test` . `v1` WHERE `b` > ? 2
test ac0e7e062fb2eecae26f4e432cde3dd3 SELECT SCHEMA_NAME , `DIGEST` , `DIGEST_TEXT` , `COUNT_STAR` FROM `performance_schema` . `events_statements_summary_by_digest` ORDER BY `DIGEST_TEXT` 1
test 1e4dbc9041d1c2c6ef0aee7bb10a9712 SELECT `a` , `b` FROM `test` . `v1` 2
test ce9abb5b3de1de61ca0c7bed9bd8e268 SELECT `b` , `a` FROM `test` . `v1` 2
test 8117308957580606865e284265d48615 TRUNCATE TABLE `performance_schema` . `events_statements_summary_by_digest` 1
DROP VIEW test.v1;
DROP TABLE test.t1;
......@@ -8,5 +8,5 @@ SELECT 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1
####################################
SELECT event_name, digest, digest_text, sql_text FROM events_statements_history_long;
event_name digest digest_text sql_text
statement/sql/select bb82f2829bcdfd9ac1e53f7b27829d36 SELECT ? + ? + SELECT ...
statement/sql/truncate 86a7d96b41a68b8dfb6c94888bd3bb76 TRUNCATE TABLE truncat...
statement/sql/select 3ff8cd05d2991a9ac9b182801987d61e SELECT ? + ? + SELECT ...
statement/sql/truncate eddd22a5c210f96a5160acbb5d7563b3 TRUNCATE TABLE truncat...
This diff is collapsed.
......@@ -81,7 +81,6 @@ SYMBOL symbols[] = {
{ "AUTHORS", SYM(AUTHORS_SYM)},
{ "AUTO_INCREMENT", SYM(AUTO_INC)},
{ "AUTOEXTEND_SIZE", SYM(AUTOEXTEND_SIZE_SYM)},
{ "AUTO", SYM(AUTO_SYM)},
{ "AVG", SYM(AVG_SYM)},
{ "AVG_ROW_LENGTH", SYM(AVG_ROW_LENGTH)},
{ "BACKUP", SYM(BACKUP_SYM)},
......@@ -426,7 +425,6 @@ SYMBOL symbols[] = {
{ "NCHAR", SYM(NCHAR_SYM)},
{ "NESTED", SYM(NESTED_SYM)},
{ "NEVER", SYM(NEVER_SYM)},
{ "NEW", SYM(NEW_SYM)},
{ "NEXT", SYM(NEXT_SYM)},
{ "NEXTVAL", SYM(NEXTVAL_SYM)},
{ "NO", SYM(NO_SYM)},
......@@ -682,7 +680,6 @@ SYMBOL symbols[] = {
{ "TRUE", SYM(TRUE_SYM)},
{ "TRUNCATE", SYM(TRUNCATE_SYM)},
{ "TYPE", SYM(TYPE_SYM)},
{ "TYPES", SYM(TYPES_SYM)},
{ "UNBOUNDED", SYM(UNBOUNDED_SYM)},
{ "UNCOMMITTED", SYM(UNCOMMITTED_SYM)},
{ "UNDEFINED", SYM(UNDEFINED_SYM)},
......@@ -748,7 +745,6 @@ SYMBOL symbols[] = {
SYMBOL sql_functions[] = {
{ "ADDDATE", SYM(ADDDATE_SYM)},
{ "ADD_MONTHS", SYM(ADD_MONTHS_SYM)},
{ "BIT_AND", SYM(BIT_AND)},
{ "BIT_OR", SYM(BIT_OR)},
{ "BIT_XOR", SYM(BIT_XOR)},
......@@ -759,7 +755,6 @@ SYMBOL sql_functions[] = {
{ "CURTIME", SYM(CURTIME)},
{ "DATE_ADD", SYM(DATE_ADD_INTERVAL)},
{ "DATE_SUB", SYM(DATE_SUB_INTERVAL)},
{ "DATE_FORMAT", SYM(DATE_FORMAT_SYM)},
{ "DENSE_RANK", SYM(DENSE_RANK_SYM)},
{ "EXTRACT", SYM(EXTRACT_SYM)},
{ "FIRST_VALUE", SYM(FIRST_VALUE_SYM)},
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment