mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Bug#29223 declare cursor c for SHOW .....
"DECLARE CURSOR FOR SHOW ..." is a syntax that currently appears to work, but is untested for some SHOW commands and does not work for other SHOW commands. Since this is an un-intended feature that leaked as a result of a coding bug (in the parser grammar), the correct fix is to fix the grammar to not accept this construct. In other words, "DECLARE CURSOR FOR SHOW <other commands that don't work>" is not considered a bug, and we will not implement other features to make all the SHOW commands usable inside a cursor just because someone exploited a bug.
This commit is contained in:
@@ -953,7 +953,7 @@ BEGIN
|
||||
DECLARE col1, col2, col3, col4, col6 CHAR(255);
|
||||
DECLARE default_val VARCHAR(65532);
|
||||
DECLARE done INT DEFAULT 0;
|
||||
DECLARE cur1 CURSOR FOR SHOW COLUMNS FROM bug23037;
|
||||
DECLARE cur1 CURSOR FOR SELECT COLUMN_NAME, COLUMN_TYPE, IS_NULLABLE, COLUMN_KEY, COLUMN_DEFAULT, EXTRA FROM INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='bug23037';
|
||||
DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1;
|
||||
OPEN cur1;
|
||||
FETCH cur1 INTO col1, col2, col3, col4, default_val, col6;
|
||||
|
||||
Reference in New Issue
Block a user