Bug #8627 | When fetching empty string from cursor into variable, server crashes | ||
---|---|---|---|
Submitted: | 19 Feb 2005 17:04 | Modified: | 19 Feb 2005 17:37 |
Reporter: | Gabor Bereczki | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.0.0 | OS: | Linux (linux x86_64) |
Assigned to: | CPU Architecture: | Any |
[19 Feb 2005 17:04]
Gabor Bereczki
[19 Feb 2005 17:26]
Gabor Bereczki
Sorry, now I installed 5.0.1 and now I am getting intelligible compile time error messages. This one was caused by cursor declaration before variable declarations.
[19 Feb 2005 17:37]
MySQL Verification Team
Tested against latest BK source on Slackware 10.0 mysql> CREATE TABLE test_table (col1 VARCHAR(7),col2 TEXT); Query OK, 0 rows affected (0.00 sec) mysql> DELIMITER // mysql> CREATE PROCEDURE testproc() -> BEGIN -> DECLARE v_col1 VARCHAR(7); -> DECLARE v_col2 TEXT; -> DECLARE cur1 CURSOR FOR SELECT col1, col2 FROM test_table; -> DELETE FROM test_table; -> INSERT INTO test_table ( col1, col2 ) values ( '1', ''); -> OPEN cur1; -> FETCH cur1 INTO v_col1, v_col2; -> CLOSE cur1; -> END// Query OK, 0 rows affected (0.00 sec) mysql> DELIMITER ; mysql> CALL testproc(); Query OK, 0 rows affected (0.01 sec) mysql> SELECT * FROM test_table; +------+------+ | col1 | col2 | +------+------+ | 1 | | +------+------+ 1 row in set (0.00 sec) mysql> SELECT version(); +-------------------+ | version() | +-------------------+ | 5.0.3-alpha-debug | +-------------------+ 1 row in set (0.01 sec) mysql>