Bug#37525 funcs_1: <engine>_storedproc.test fail
Fixed the test to expect the correct result. The previous test script was in fact affected by 26030, and wrongly expected a ER_PARSE_ERROR error.
This commit is contained in:
parent
e8e7fdb786
commit
d61bc87c58
@ -3635,13 +3635,9 @@ SELECT count(*) into cnt from t2;
|
|||||||
set @count = cnt;
|
set @count = cnt;
|
||||||
SELECT @count;
|
SELECT @count;
|
||||||
END//
|
END//
|
||||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';
|
ERROR 42S22: Unknown column 'cnt' in 'field list'
|
||||||
set @count = cnt;
|
|
||||||
SELECT @count;
|
|
||||||
END' at line 2
|
|
||||||
CALL sp1( 10 );
|
CALL sp1( 10 );
|
||||||
ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist
|
DROP PROCEDURE sp1;
|
||||||
DROP PROCEDURE IF EXISTS sp1;
|
|
||||||
CREATE PROCEDURE sp1( cnt int(20) )
|
CREATE PROCEDURE sp1( cnt int(20) )
|
||||||
END
|
END
|
||||||
SELECT count(*) into cnt from t2;
|
SELECT count(*) into cnt from t2;
|
||||||
|
@ -3636,13 +3636,9 @@ SELECT count(*) into cnt from t2;
|
|||||||
set @count = cnt;
|
set @count = cnt;
|
||||||
SELECT @count;
|
SELECT @count;
|
||||||
END//
|
END//
|
||||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';
|
ERROR 42S22: Unknown column 'cnt' in 'field list'
|
||||||
set @count = cnt;
|
|
||||||
SELECT @count;
|
|
||||||
END' at line 2
|
|
||||||
CALL sp1( 10 );
|
CALL sp1( 10 );
|
||||||
ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist
|
DROP PROCEDURE sp1;
|
||||||
DROP PROCEDURE IF EXISTS sp1;
|
|
||||||
CREATE PROCEDURE sp1( cnt int(20) )
|
CREATE PROCEDURE sp1( cnt int(20) )
|
||||||
END
|
END
|
||||||
SELECT count(*) into cnt from t2;
|
SELECT count(*) into cnt from t2;
|
||||||
|
@ -3636,13 +3636,9 @@ SELECT count(*) into cnt from t2;
|
|||||||
set @count = cnt;
|
set @count = cnt;
|
||||||
SELECT @count;
|
SELECT @count;
|
||||||
END//
|
END//
|
||||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ';
|
ERROR 42S22: Unknown column 'cnt' in 'field list'
|
||||||
set @count = cnt;
|
|
||||||
SELECT @count;
|
|
||||||
END' at line 2
|
|
||||||
CALL sp1( 10 );
|
CALL sp1( 10 );
|
||||||
ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist
|
DROP PROCEDURE sp1;
|
||||||
DROP PROCEDURE IF EXISTS sp1;
|
|
||||||
CREATE PROCEDURE sp1( cnt int(20) )
|
CREATE PROCEDURE sp1( cnt int(20) )
|
||||||
END
|
END
|
||||||
SELECT count(*) into cnt from t2;
|
SELECT count(*) into cnt from t2;
|
||||||
|
@ -2862,8 +2862,20 @@ DROP PROCEDURE IF EXISTS sp1;
|
|||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
|
||||||
# missing BEGIN
|
# missing BEGIN
|
||||||
|
# PLEASE NOTE:
|
||||||
|
# this test client has the MULTI_QUERY capability,
|
||||||
|
# so that the following request (starting at 'CREATE' and ending at the //
|
||||||
|
# delimiter) is interpreted as follows:
|
||||||
|
# 1) it's a multi query
|
||||||
|
# 2) the first query is a valid CREATE PROCEDURE statement, and the
|
||||||
|
# procedure consist of only one SELECT statement
|
||||||
|
# 3) the second query is a SET statement, which is broken since it's
|
||||||
|
# referencing an unknown column 'cnt'
|
||||||
|
# 4) the next query (SELECT @count) is not parsed or executed, since 3)
|
||||||
|
# failed
|
||||||
|
|
||||||
delimiter //;
|
delimiter //;
|
||||||
--error ER_PARSE_ERROR
|
--error ER_BAD_FIELD_ERROR
|
||||||
CREATE PROCEDURE sp1( cnt int(20) )
|
CREATE PROCEDURE sp1( cnt int(20) )
|
||||||
SELECT count(*) into cnt from t2;
|
SELECT count(*) into cnt from t2;
|
||||||
set @count = cnt;
|
set @count = cnt;
|
||||||
@ -2871,11 +2883,10 @@ CREATE PROCEDURE sp1( cnt int(20) )
|
|||||||
END//
|
END//
|
||||||
delimiter ;//
|
delimiter ;//
|
||||||
|
|
||||||
--error ER_SP_DOES_NOT_EXIST
|
|
||||||
CALL sp1( 10 );
|
CALL sp1( 10 );
|
||||||
|
|
||||||
--disable_warnings
|
--disable_warnings
|
||||||
DROP PROCEDURE IF EXISTS sp1;
|
DROP PROCEDURE sp1;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
|
||||||
# wrong order of BEGIN and END
|
# wrong order of BEGIN and END
|
||||||
|
Loading…
x
Reference in New Issue
Block a user