From 919b5ba6b5c04bbad477a7722d67213953223cf8 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 Nov 2003 16:48:21 +0100 Subject: 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. --- sql/sp_rcontext.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sql/sp_rcontext.cc') diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc index 07fd08b0074..a25cd9ee63e 100644 --- a/sql/sp_rcontext.cc +++ b/sql/sp_rcontext.cc @@ -149,15 +149,15 @@ sp_cursor::pre_open(THD *thd) m_oprot= thd->protocol; // Save the original protocol thd->protocol= m_prot; - m_ovio= thd->net.vio; // Prevent send_eof() - thd->net.vio= 0; + m_nseof= thd->net.no_send_eof; + thd->net.no_send_eof= TRUE; return m_lex; } void sp_cursor::post_open(THD *thd, my_bool isopen) { - thd->net.vio= m_ovio; // Restore the originals + thd->net.no_send_eof= m_nseof; // Restore the originals thd->protocol= m_oprot; m_isopen= isopen; m_current_row= m_prot->data; -- cgit v1.2.1