Re: Bug in IN subselect without FROM and WHERE clause in MySQL-4.1

Re: Bug in IN subselect without FROM and WHERE clause in MySQL-4.1

am 29.11.2002 10:00:26 von Sanja Byelkin

On Fri, Nov 29, 2002 at 11:52:33PM -0000, Jocelyn Fournier wrote:
> Hi,
>
> How-to-repeat :
>
> SELECT 1 IN (SELECT 1);
> ERROR 2013: Lost connection to MySQL server during query

Thank you for bug report. I fixed it (patch is committed & pushed).

> (BTW, is this a valid SQL query ??)

Yes. It is boolean expression.

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

Re: Bug in IN subselect without FROM and WHERE clause in MySQL-4.1

am 29.11.2002 13:37:39 von Sinisa Milivojevic

Jocelyn Fournier writes:
> Hi,
>
> How-to-repeat :
>
> SELECT 1 IN (SELECT 1);
> ERROR 2013: Lost connection to MySQL server during query
>
> (BTW, is this a valid SQL query ??)

I think it is ...

>
> Regards,
> Jocelyn
>

Thanks for the bug report.

It works fine with latest, yet unpushed changes. This patch, which
fixes lot's of problems will be pushed soon:


===== sql/sql_base.cc 1.134 vs edited =====
*** /tmp/sql_base.cc-1.134-12756 Wed Nov 27 17:04:41 2002
--- edited/sql/sql_base.cc Thu Nov 28 21:41:23 2002
***************
*** 1894,1906 ****
const char *name=item->field_name;
uint length=(uint) strlen(name);

! if (table_name)
{ /* Qualified field */
bool found_table=0;
for (; tables ; tables=tables->next)
{
if (!strcmp(tables->alias,table_name) &&
! (!db || !strcmp(db,tables->db)))
{
found_table=1;
Field *find=find_field_in_table(thd,tables->table,name,length,
--- 1894,1906 ----
const char *name=item->field_name;
uint length=(uint) strlen(name);

! if (table_name && table_name[0])
{ /* Qualified field */
bool found_table=0;
for (; tables ; tables=tables->next)
{
if (!strcmp(tables->alias,table_name) &&
! (!db || !tables->db || !tables->db[0] || !strcmp(db,tables->db)))
{
found_table=1;
Field *find=find_field_in_table(thd,tables->table,name,length,


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

Bug in IN subselect without FROM and WHERE clause in MySQL-4.1

am 30.11.2002 00:52:33 von Jocelyn Fournier

Hi,

How-to-repeat :

SELECT 1 IN (SELECT 1);
ERROR 2013: Lost connection to MySQL server during query

(BTW, is this a valid SQL query ??)

Stack trace :

0x80a2c91 handle_segfault + 481
0x828d798 pthread_sighandler + 176
0x82b801f strlen + 15
0x809e4cd net_store_data(String*, char const*) + 29
0x80c3a7e send_non_convert_fields(THD*, List&, unsigned) + 238
0x80c3d63 send_fields(THD*, List&, unsigned) + 179
0x8098292 select_send::send_fields(List&, unsigned) + 34
0x80cc5a6 JOIN::exec() + 166
0x80cd7bb 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
0x80cb57c handle_select(THD*, st_lex*, select_result*) + 252
0x80af3b9 mysql_execute_command(THD*) + 633
0x80b40a8 mysql_parse(THD*, char*, unsigned) + 248
0x80ae294 dispatch_command(enum_server_command, THD*, char*, unsigned) + 852
0x80adf26 do_command(THD*) + 118
0x80ad80e handle_one_connection + 910
0x828b1ba pthread_start_thread + 218
0x82bf4da 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-thread13151@lists.mysql.com
To unsubscribe, e-mail