Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions mysql-test/suite/funcs_1/r/storedproc.result
Original file line number Diff line number Diff line change
Expand Up @@ -2434,10 +2434,6 @@ CREATE PROCEDURE low_priority()
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 'low_priority()
SELECT * from t1 where f2=f1' at line 1
CREATE PROCEDURE master_ssl_verify_server_cert()
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 'master_ssl_verify_server_cert()
SELECT * from t1 where f2=f1' at line 1
CREATE PROCEDURE match()
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 'match()
Expand Down Expand Up @@ -4918,13 +4914,6 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
SELECT @x;
END' at line 2
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
master_ssl_verify_server_cert: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 'master_ssl_verify_server_cert:BEGIN
SELECT @x;
END' at line 2
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
match:BEGIN
Expand Down Expand Up @@ -8454,12 +8443,6 @@ 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 'low_priority char;
END' at line 3
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
BEGIN
declare master_ssl_verify_server_cert 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 'master_ssl_verify_server_cert char;
END' at line 3
DROP PROCEDURE IF EXISTS sp1;
CREATE PROCEDURE sp1()
BEGIN
Expand Down Expand Up @@ -10620,16 +10603,6 @@ Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
CREATE PROCEDURE sp1( )
BEGIN
declare master_ssl_verify_server_cert condition for sqlstate '02000';
declare exit handler for int 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 'master_ssl_verify_server_cert condition for sqlstate '02000';
declare exit ha...' at line 3
DROP PROCEDURE IF EXISTS sp1;
Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
CREATE PROCEDURE sp1( )
BEGIN
declare match condition for sqlstate '02000';
declare exit handler for match set @var2 = 1;
END//
Expand Down Expand Up @@ -12818,15 +12791,6 @@ Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
CREATE PROCEDURE sp1( )
BEGIN
declare master_ssl_verify_server_cert 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 'master_ssl_verify_server_cert handler for sqlstate '02000' set @var2 = 1;
END' at line 3
DROP PROCEDURE IF EXISTS sp1;
Warnings:
Note 1305 PROCEDURE db_storedproc.sp1 does not exist
CREATE PROCEDURE sp1( )
BEGIN
declare match 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 'match handler for sqlstate '02000' set @var2 = 1;
Expand Down
41 changes: 0 additions & 41 deletions mysql-test/suite/funcs_1/t/storedproc.test
Original file line number Diff line number Diff line change
Expand Up @@ -1454,10 +1454,6 @@ CREATE PROCEDURE loop()
CREATE PROCEDURE low_priority()
SELECT * from t1 where f2=f1;

--error ER_PARSE_ERROR
CREATE PROCEDURE master_ssl_verify_server_cert()
SELECT * from t1 where f2=f1;

--error ER_PARSE_ERROR
CREATE PROCEDURE match()
SELECT * from t1 where f2=f1;
Expand Down Expand Up @@ -4555,14 +4551,6 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
--enable_warnings

delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1()
master_ssl_verify_server_cert:BEGIN
SELECT @x;
END//
delimiter ;//

--disable_warnings
DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
Expand Down Expand Up @@ -10051,14 +10039,6 @@ delimiter ;//
DROP PROCEDURE IF EXISTS sp1;
--enable_warnings

delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1()
BEGIN
declare master_ssl_verify_server_cert char;
END//
delimiter ;//

--disable_warnings
DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
Expand Down Expand Up @@ -12692,17 +12672,6 @@ delimiter ;//

DROP PROCEDURE IF EXISTS sp1;

delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1( )
BEGIN
declare master_ssl_verify_server_cert condition for sqlstate '02000';
declare exit handler for int set @var2 = 1;
END//
delimiter ;//

DROP PROCEDURE IF EXISTS sp1;

delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1( )
Expand Down Expand Up @@ -15204,16 +15173,6 @@ delimiter ;//

DROP PROCEDURE IF EXISTS sp1;

delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1( )
BEGIN
declare master_ssl_verify_server_cert handler for sqlstate '02000' set @var2 = 1;
END//
delimiter ;//

DROP PROCEDURE IF EXISTS sp1;

delimiter //;
--error ER_PARSE_ERROR
CREATE PROCEDURE sp1( )
Expand Down
40 changes: 40 additions & 0 deletions mysql-test/suite/rpl/r/rpl_is_slave_status.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
SELECT Master_SSL_Verify_Server_Cert FROM information_schema.slave_status LIMIT 1;
Master_SSL_Verify_Server_Cert
SELECT `Master_SSL_Verify_Server_Cert` FROM information_schema.slave_status LIMIT 1;
Master_SSL_Verify_Server_Cert
CREATE DATABASE db_is_slave_status;
USE db_is_slave_status;
CREATE TABLE t1 (
Master_SSL_Verify_Server_Cert INT
);
INSERT INTO t1 VALUES (123);
SELECT Master_SSL_Verify_Server_Cert FROM t1;
Master_SSL_Verify_Server_Cert
123
DROP TABLE t1;
CREATE PROCEDURE master_ssl_verify_server_cert()
BEGIN
SELECT 1;
END//
DROP PROCEDURE IF EXISTS master_ssl_verify_server_cert;
CREATE FUNCTION master_ssl_verify_server_cert()
RETURNS INT
RETURN 1;
DROP FUNCTION IF EXISTS master_ssl_verify_server_cert;
CREATE PROCEDURE sp()
master_ssl_verify_server_cert:BEGIN
SELECT 1;
END//
DROP PROCEDURE IF EXISTS sp;
CREATE PROCEDURE sp()
BEGIN
DECLARE master_ssl_verify_server_cert CHAR;
END//
DROP PROCEDURE IF EXISTS sp;
CREATE PROCEDURE sp()
BEGIN
DECLARE master_ssl_verify_server_cert CONDITION FOR SQLSTATE '02000';
DECLARE EXIT HANDLER FOR master_ssl_verify_server_cert SET @var2 = 1;
END//
DROP PROCEDURE IF EXISTS sp;
DROP DATABASE IF EXISTS db_is_slave_status;
77 changes: 77 additions & 0 deletions mysql-test/suite/rpl/t/rpl_is_slave_status.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#
# Test for MDEV-38194: Master_SSL_Verify_Server_Cert should not require identifier quoting
#

--source include/not_embedded.inc

# Select the column unquoted
SELECT Master_SSL_Verify_Server_Cert FROM information_schema.slave_status LIMIT 1;

# Select the column quoted
SELECT `Master_SSL_Verify_Server_Cert` FROM information_schema.slave_status LIMIT 1;


# Verify that stored procedures, variables, labels, and functions using the name
# Master_SSL_Verify_Server_Cert can be successfully created

CREATE DATABASE db_is_slave_status;

USE db_is_slave_status;

CREATE TABLE t1 (
Master_SSL_Verify_Server_Cert INT
);
INSERT INTO t1 VALUES (123);
SELECT Master_SSL_Verify_Server_Cert FROM t1;
DROP TABLE t1;


DELIMITER //;
CREATE PROCEDURE master_ssl_verify_server_cert()
BEGIN
SELECT 1;
END//
DELIMITER ;//

DROP PROCEDURE IF EXISTS master_ssl_verify_server_cert;

--disable_warnings
CREATE FUNCTION master_ssl_verify_server_cert()
RETURNS INT
RETURN 1;
--enable_warnings

DROP FUNCTION IF EXISTS master_ssl_verify_server_cert;


DELIMITER //;
CREATE PROCEDURE sp()
master_ssl_verify_server_cert:BEGIN
SELECT 1;
END//
DELIMITER ;//

DROP PROCEDURE IF EXISTS sp;


DELIMITER //;
CREATE PROCEDURE sp()
BEGIN
DECLARE master_ssl_verify_server_cert CHAR;
END//
DELIMITER ;//

DROP PROCEDURE IF EXISTS sp;


DELIMITER //;
CREATE PROCEDURE sp()
BEGIN
DECLARE master_ssl_verify_server_cert CONDITION FOR SQLSTATE '02000';
DECLARE EXIT HANDLER FOR master_ssl_verify_server_cert SET @var2 = 1;
END//
DELIMITER ;//

DROP PROCEDURE IF EXISTS sp;

DROP DATABASE IF EXISTS db_is_slave_status;
2 changes: 1 addition & 1 deletion sql/sql_yacc.yy
Original file line number Diff line number Diff line change
Expand Up @@ -16538,6 +16538,7 @@ keyword_func_sp_var_and_label:
| MASTER_SSL_CRL_SYM
| MASTER_SSL_CRLPATH_SYM
| MASTER_SSL_KEY_SYM
| MASTER_SSL_VERIFY_SERVER_CERT_SYM
| MAX_CONNECTIONS_PER_HOUR
| MAX_QUERIES_PER_HOUR
| MAX_SIZE_SYM
Expand Down Expand Up @@ -16861,7 +16862,6 @@ reserved_keyword_udt_not_param_type:
| LOCK_SYM
| LOOP_SYM
| LOW_PRIORITY
| MASTER_SSL_VERIFY_SERVER_CERT_SYM
| MATCH
| MAX_SYM
| MAXVALUE_SYM
Expand Down