mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed BUG#1965: Opening a cursor hangs client when malformed select fails
and BUG#1966: "select 1 into a" on top-level hangs client include/mysql_com.h: Added no_send_eof flag to NET for SP cursors (the simple read-only version). mysql-test/r/sp-error.result: Added tests for BUG#1965 and BUG#1966. mysql-test/t/sp-error.test: Added tests for BUG#1965 and BUG#1966. sql/net_serv.cc: Added no_send_eof flag to NET for SP cursors (the simple read-only version). sql/protocol.cc: Added no_send_eof flag to NET for SP cursors (the simple read-only version). sql/sp_rcontext.cc: Use net->no_send_eof flag to prevent eofs during cursor open (instead of the dirty vio=0 which didn't work). sql/sp_rcontext.h: Use net->no_send_eof flag to prevent eofs during cursor open (instead of the dirty vio=0 which didn't work). sql/sql_yacc.yy: Give error message if doing SELECT ... INTO localvar even if it's outside an SP.
This commit is contained in:
@ -259,4 +259,15 @@ declare c cursor for select * from t1;
|
||||
declare c cursor for select field from t1;
|
||||
end;
|
||||
ERROR 42000: Duplicate cursor: c
|
||||
create procedure bug1965()
|
||||
begin
|
||||
declare c cursor for select val from t1 order by valname;
|
||||
open c;
|
||||
close c;
|
||||
end;
|
||||
call bug1965();
|
||||
ERROR 42S22: Unknown column 'valname' in 'order clause'
|
||||
drop procedure bug1965;
|
||||
select 1 into a;
|
||||
ERROR 42000: Undeclared variable: a
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user