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;
|
||||
SELECT @count;
|
||||
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 ';
|
||||
set @count = cnt;
|
||||
SELECT @count;
|
||||
END' at line 2
|
||||
ERROR 42S22: Unknown column 'cnt' in 'field list'
|
||||
CALL sp1( 10 );
|
||||
ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
DROP PROCEDURE sp1;
|
||||
CREATE PROCEDURE sp1( cnt int(20) )
|
||||
END
|
||||
SELECT count(*) into cnt from t2;
|
||||
|
@ -3636,13 +3636,9 @@ SELECT count(*) into cnt from t2;
|
||||
set @count = cnt;
|
||||
SELECT @count;
|
||||
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 ';
|
||||
set @count = cnt;
|
||||
SELECT @count;
|
||||
END' at line 2
|
||||
ERROR 42S22: Unknown column 'cnt' in 'field list'
|
||||
CALL sp1( 10 );
|
||||
ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
DROP PROCEDURE sp1;
|
||||
CREATE PROCEDURE sp1( cnt int(20) )
|
||||
END
|
||||
SELECT count(*) into cnt from t2;
|
||||
|
@ -3636,13 +3636,9 @@ SELECT count(*) into cnt from t2;
|
||||
set @count = cnt;
|
||||
SELECT @count;
|
||||
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 ';
|
||||
set @count = cnt;
|
||||
SELECT @count;
|
||||
END' at line 2
|
||||
ERROR 42S22: Unknown column 'cnt' in 'field list'
|
||||
CALL sp1( 10 );
|
||||
ERROR 42000: PROCEDURE db_storedproc.sp1 does not exist
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
DROP PROCEDURE sp1;
|
||||
CREATE PROCEDURE sp1( cnt int(20) )
|
||||
END
|
||||
SELECT count(*) into cnt from t2;
|
||||
|
@ -2862,8 +2862,20 @@ DROP PROCEDURE IF EXISTS sp1;
|
||||
--enable_warnings
|
||||
|
||||
# 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 //;
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
CREATE PROCEDURE sp1( cnt int(20) )
|
||||
SELECT count(*) into cnt from t2;
|
||||
set @count = cnt;
|
||||
@ -2871,11 +2883,10 @@ CREATE PROCEDURE sp1( cnt int(20) )
|
||||
END//
|
||||
delimiter ;//
|
||||
|
||||
--error ER_SP_DOES_NOT_EXIST
|
||||
CALL sp1( 10 );
|
||||
|
||||
--disable_warnings
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
DROP PROCEDURE sp1;
|
||||
--enable_warnings
|
||||
|
||||
# wrong order of BEGIN and END
|
||||
|
Loading…
x
Reference in New Issue
Block a user