Crash in EXPLAIN and PROCEDURE ANALYSE() with MySQL-4.1

Crash in EXPLAIN and PROCEDURE ANALYSE() with MySQL-4.1

am 05.12.2002 12:55:36 von Jocelyn Fournier

Hi,

It doesn't really make sense, but a crash is a crash ;)

How-to-repeat :

mysql> EXPLAIN SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE();
ERROR 2013: Lost connection to MySQL server during query

Stack trace :

0x80a3911 handle_segfault + 481
0x8290498 pthread_sighandler + 176
0x8098f48 select_send::send_data(List&) + 40
0x80d7125 select_describe(JOIN*, bool, bool, bool, char const*) + 2949
0x80ce863 JOIN::exec() + 675
0x80cf87b mysql_select(THD*, st_table_list*, List&, Item*, st_order*,
st_order*, Item*, st_order*, unsigned long, select_result*,
st_select_lex_unit*, st_select_lex*) + 123
0x80d21a4 mysql_explain_union(THD*, st_select_lex_unit*, select_result*) +
196
0x80b0a9a mysql_execute_command(THD*) + 858
0x80b57d8 mysql_parse(THD*, char*, unsigned) + 248
0x80af64a dispatch_command(enum_server_command, THD*, char*, unsigned) + 842
0x80af2e6 do_command(THD*) + 118
0x80aebce handle_one_connection + 910
0x828deba pthread_start_thread + 218
0x82c21da thread_start + 4

Regards,
Jocelyn


------------------------------------------------------------ ---------
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-thread13217@lists.mysql.com
To unsubscribe, e-mail

Re: Crash in EXPLAIN and PROCEDURE ANALYSE() with MySQL-4.1

am 05.12.2002 14:44:21 von Jocelyn Fournier

Hi,

It seems to reproduce the crash you have to select a database before.

Regards,
Jocelyn
----- Original Message -----
From: "Jocelyn Fournier"
To:
Sent: Thursday, December 05, 2002 11:55 AM
Subject: Crash in EXPLAIN and PROCEDURE ANALYSE() with MySQL-4.1


> Hi,
>
> It doesn't really make sense, but a crash is a crash ;)
>
> How-to-repeat :
>
> mysql> EXPLAIN SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE();
> ERROR 2013: Lost connection to MySQL server during query
>
> Stack trace :
>
> 0x80a3911 handle_segfault + 481
> 0x8290498 pthread_sighandler + 176
> 0x8098f48 select_send::send_data(List&) + 40
> 0x80d7125 select_describe(JOIN*, bool, bool, bool, char const*) + 2949
> 0x80ce863 JOIN::exec() + 675
> 0x80cf87b mysql_select(THD*, st_table_list*, List&, Item*,
st_order*,
> st_order*, Item*, st_order*, unsigned long, select_result*,
> st_select_lex_unit*, st_select_lex*) + 123
> 0x80d21a4 mysql_explain_union(THD*, st_select_lex_unit*, select_result*) +
> 196
> 0x80b0a9a mysql_execute_command(THD*) + 858
> 0x80b57d8 mysql_parse(THD*, char*, unsigned) + 248
> 0x80af64a dispatch_command(enum_server_command, THD*, char*, unsigned) +
842
> 0x80af2e6 do_command(THD*) + 118
> 0x80aebce handle_one_connection + 910
> 0x828deba pthread_start_thread + 218
> 0x82c21da thread_start + 4
>
> Regards,
> Jocelyn
>
>
> ------------------------------------------------------------ ---------
> 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-thread13217@lists.mysql.com
> To unsubscribe, e-mail
>
>
>
>


------------------------------------------------------------ ---------
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-thread13221@lists.mysql.com
To unsubscribe, e-mail

Re: Crash in EXPLAIN and PROCEDURE ANALYSE() with MySQL-4.1

am 05.12.2002 17:09:01 von Sinisa Milivojevic

Jocelyn Fournier writes:
> Hi,
>
> It seems to reproduce the crash you have to select a database before.
>
> Regards,
> Jocelyn
> ----- Original Message -----
> From: "Jocelyn Fournier"
> To:
> Sent: Thursday, December 05, 2002 11:55 AM
> Subject: Crash in EXPLAIN and PROCEDURE ANALYSE() with MySQL-4.1
>
>
> > Hi,
> >
> > It doesn't really make sense, but a crash is a crash ;)
> >
> > How-to-repeat :
> >
> > mysql> EXPLAIN SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE();
> > ERROR 2013: Lost connection to MySQL server during query
> >
> > Stack trace :
> >
> >
> > Regards,
> > Jocelyn


Thank you for your bug report.

This one is fixed too ...

This is a patch:

===== sql/sql_select.cc 1.195 vs edited =====
*** /tmp/sql_select.cc-1.195-22835 Mon Dec 2 17:52:20 2002
--- edited/sql/sql_select.cc Thu Dec 5 18:02:04 2002
***************
*** 733,738 ****
--- 733,740 ----
HA_POS_ERROR : unit->select_limit_cnt,
0))))
order=0;
+ if (procedure)
+ (void)result->prepare(fields_list, unit);
select_describe(this, need_tmp,
order != 0 && !skip_sort_order,
select_distinct);


--
Regards,
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ 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-thread13225@lists.mysql.com
To unsubscribe, e-mail