crash with do

crash with do

am 02.01.2003 23:29:50 von Georg Richter

Hi,

how-to-repeat:

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

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

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

Stack-Trace:

0x80f0c1b handle_segfault + 447
0x40047bc4 _end + 935319212
0x811269c find_field_in_table__FP3THDP8st_tablePCcUibT4 + 72
0x8112a60
find_field_in_tables__FP3THDP10Item_identP13st_table_listPP1 3st_table_listb +
756
0x80be567 fix_fields__10Item_fieldP3THDP13st_table_listPP4Item + 71
0x8112e9d setup_fields__FP3THDP13st_table_listRt4List1Z4ItembPt4List1Z 4ItemT3
+ 281
0x811746c
prepare__4JOINP13st_table_listP4ItemP8st_orderT3T2T3P13st_se lect_lexP18st_select_lex_unitb
+ 224
0x80dd4db prepare__30subselect_single_select_engine + 115
0x80db53c fix_fields__14Item_subselectP3THDP13st_table_listPP4Item + 112
0x8112e9d setup_fields__FP3THDP13st_table_listRt4List1Z4ItembPt4List1Z 4ItemT3
+ 281
0x8132316 mysql_do__FP3THDRt4List1Z4Item + 102
0x80fc4a0 mysql_execute_command__FP3THD + 1396
0x81006b1 mysql_parse__FP3THDPcUi + 229
0x80fb39c dispatch_command__F19enum_server_commandP3THDPcUi + 1732
0x80faccd do_command__FP3THD + 301
0x80fa3d7 handle_one_connection + 727
0x40044f37 _end + 935307807
0x401a0baa _end + 936732306


Regards

Georg

------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13392@lists.mysql.com
To unsubscribe, e-mail

Re: crash with do

am 03.01.2003 16:06:15 von Sanja Byelkin

Hi!

On Thu, Jan 02, 2003 at 11:29:50PM +0100, Georg Richter wrote:
> Hi,
>
> how-to-repeat:
>
> mysql> create table a (a int);
> Query OK, 0 rows affected (0.01 sec)
>
> mysql> insert into a values (1);
> Query OK, 1 row affected (0.01 sec)
>
> mysql> do (select a from a);
> ERROR 2013: Lost connection to MySQL server during query

thank you for bugreport. Here is patch for bug reported by you:

===== sql/sql_parse.cc 1.279 vs edited =====
*** /tmp/sql_parse.cc-1.279-9324 Mon Dec 30 16:27:53 2002
--- edited/sql/sql_parse.cc Fri Jan 3 16:48:03 2003
***************
*** 1598,1604 ****
break;
}
case SQLCOM_DO:
! res=mysql_do(thd, *lex->insert_list);
break;

case SQLCOM_EMPTY_QUERY:
--- 1598,1611 ----
break;
}
case SQLCOM_DO:
! 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);
! res= mysql_do(thd, *lex->insert_list);
! if (thd->net.report_error)
! res= -1;
break;

case SQLCOM_EMPTY_QUERY:



[skip]

--
For technical support contracts, visit https://order.mysql.com/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Oleksandr Byelkin
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer
/_/ /_/\_, /___/\___\_\___/ Lugansk, Ukraine
<___/ www.mysql.com

------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13395@lists.mysql.com
To unsubscribe, e-mail