Crash in UPDATE with subqueries with MySQL-4.1

Crash in UPDATE with subqueries with MySQL-4.1

am 29.11.2002 01:34:29 von Jocelyn Fournier

Hi,

How-to-repeat :

CREATE TABLE `t` (
`id` int(11) default NULL,
KEY `id` (`id`)
) TYPE=MyISAM CHARSET=latin1

INSERT INTO t VALUES (1);

mysql> UPDATE t SET id=(SELECT id FROM (SELECT 1) HAVING id=2);
ERROR 2013: Lost connection to MySQL server during query

0x80a1dd1 handle_segfault + 481
0x828c758 pthread_sighandler + 176
0x826ec7d hashcmp + 93
0x826eb70 hash_search + 112
0x812d5ac Query_cache::invalidate(THD*, st_table_list*, char) + 172
0x80e147f mysql_update(THD*, st_table_list*, List&, List&,
Item*, st_order*, unsigned long, enum_duplicates) + 3199
0x80af3d3 mysql_execute_command(THD*) + 4435
0x80b3248 mysql_parse(THD*, char*, unsigned) + 152
0x80ad3d4 dispatch_command(enum_server_command, THD*, char*, unsigned) + 852
0x80ad066 do_command(THD*) + 118
0x80ac94e handle_one_connection + 910
0x828a17a pthread_start_thread + 218
0x82be49a 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-thread13136@lists.mysql.com
To unsubscribe, e-mail

Re: Crash in UPDATE with subqueries with MySQL-4.1

am 01.12.2002 10:46:46 von Sanja Byelkin

Hi!

On Fri, Nov 29, 2002 at 12:34:29AM -0000, Jocelyn Fournier wrote:
> Hi,
>=20
> How-to-repeat :
>=20
> CREATE TABLE `t` (
> `id` int(11) default NULL,
> KEY `id` (`id`)
> ) TYPE=3DMyISAM CHARSET=3Dlatin1
>=20
> INSERT INTO t VALUES (1);
>=20
> mysql> UPDATE t SET id=3D(SELECT id FROM (SELECT 1) HAVING id=3D2);
> ERROR 2013: Lost connection to MySQL server during query

This bug is gone:
+ drop table if exists t;
+ CREATE TABLE =14 (
+ d int(11) default NULL,
+ KEY d ( d)
+ ) TYPE=3DMyISAM CHARSET=3Dlatin1;
+ INSERT INTO t VALUES (1);
+ select * from t;
+ id
+ 1
+ UPDATE t SET id=3D(SELECT id FROM (SELECT 1) s HAVING id=3D2);
+ select * from t;
+ id
+ NULL
+ drop table t;


[skip]

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

Re: Crash in UPDATE with subqueries with MySQL-4.1

am 01.12.2002 18:14:10 von Jocelyn Fournier

Hi,

That's odd, this query is still crashing for me. (with latest changeset
1.1409)

mysql> CREATE TABLE `t10` (
-> `id` int(11) default NULL,
-> KEY `id` (`id`)
-> ) TYPE=MyISAM CHARSET=latin1;
Query OK, 0 rows affected (0.00 sec)


mysql> INSERT INTO t10 VALUES (1);
Query OK, 1 row affected (0.01 sec)

mysql> UPDATE t10 SET id=(SELECT id FROM (SELECT 1) a HAVING id=2);
ERROR 2013: Lost connection to MySQL server during query

Stack trace :

0x80a2d11 handle_segfault + 481
0x828de98 pthread_sighandler + 176
0x82703fd hashcmp + 93
0x82702f0 hash_search + 112
0x812e8ac Query_cache::invalidate(THD*, st_table_list*, char) + 172
0x80e2662 mysql_update(THD*, st_table_list*, List&, List&,
Item*, st_order*, unsigned long, enum_duplicates) + 3234
0x80aff51 mysql_execute_command(THD*) + 3473
0x80b41d8 mysql_parse(THD*, char*, unsigned) + 248
0x80ae314 dispatch_command(enum_server_command, THD*, char*, unsigned) + 852
0x80adfa6 do_command(THD*) + 118
0x80ad88e handle_one_connection + 910
0x828b8ba pthread_start_thread + 218
0x82bfbda thread_start + 4

Seems to be linked with the query cache according to the stack trace ?

Regards,
Jocelyn

----- Original Message -----
From: "Sanja Byelkin"
To: "Jocelyn Fournier"
Cc:
Sent: Sunday, December 01, 2002 10:46 AM
Subject: Re: Crash in UPDATE with subqueries with MySQL-4.1


Hi!

On Fri, Nov 29, 2002 at 12:34:29AM -0000, Jocelyn Fournier wrote:
> Hi,
>
> How-to-repeat :
>
> CREATE TABLE `t` (
> `id` int(11) default NULL,
> KEY `id` (`id`)
> ) TYPE=MyISAM CHARSET=latin1
>
> INSERT INTO t VALUES (1);
>
> mysql> UPDATE t SET id=(SELECT id FROM (SELECT 1) HAVING id=2);
> ERROR 2013: Lost connection to MySQL server during query

This bug is gone:
+ drop table if exists t;
+ CREATE TABLE  (
+ d int(11) default NULL,
+ KEY d ( d)
+ ) TYPE=MyISAM CHARSET=latin1;
+ INSERT INTO t VALUES (1);
+ select * from t;
+ id
+ 1
+ UPDATE t SET id=(SELECT id FROM (SELECT 1) s HAVING id=2);
+ select * from t;
+ id
+ NULL
+ drop table t;


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