3 messages in com.mysql.lists.bugsRe: Crash in 4.1 with set variable
FromSent OnAttachments
Georg Richter03 Jan 2003 15:13 
Georg Richter03 Jan 2003 15:44 
Sanja Byelkin04 Jan 2003 06:31 
Subject:Re: Crash in 4.1 with set variable
From:Sanja Byelkin (san@mysql.com)
Date:01/04/2003 06:31:11 AM
List:com.mysql.lists.bugs

Hi!

On Sat, Jan 04, 2003 at 12:13:51AM +0100, Georg Richter wrote:

Hi,

how-to-repeat:

mysql> create table a (a int); Query OK, 0 rows affected (0.00 sec)

mysql> insert into a values (1); Query OK, 1 row affected (0.02 sec)

mysql> set @a:=(select a from a); ERROR 2013: Lost connection to MySQL server during query

Thank you for bugreport. Here is fix of this bug:

===== sql/sql_parse.cc 1.281 vs edited ===== *** /tmp/sql_parse.cc-1.281-8908 Fri Jan 3 19:35:12 2003 --- edited/sql/sql_parse.cc Sat Jan 4 16:00:47 2003 *************** *** 2470,2478 **** break; } case SQLCOM_SET_OPTION: ! if (!(res=sql_set_variables(thd, &lex->var_list))) send_ok(thd); break; case SQLCOM_UNLOCK_TABLES: unlock_locked_tables(thd); if (thd->options & OPTION_TABLE_LOCK) --- 2470,2485 ---- break; } case SQLCOM_SET_OPTION: ! if (tables && ((res= check_table_access(thd, SELECT_ACL, tables)) || ! (res= open_and_lock_tables(thd,tables)))) ! break; ! fix_tables_pointers(lex->all_selects_list); ! if (!(res= sql_set_variables(thd, &lex->var_list))) send_ok(thd); + if (thd->net.report_error) + res= -1; break; + case SQLCOM_UNLOCK_TABLES: unlock_locked_tables(thd); if (thd->options & OPTION_TABLE_LOCK)

[skip]