A bug with innodb and non innodb multi-table delete.

A bug with innodb and non innodb multi-table delete.

am 12.02.2003 23:01:12 von Scott Wong

Version: Mysql 4.0.10-gamma

Description: Mysql client loses connection when doing a multi-table =
delete if one table is innodb and the other is myISAM.

How to Repeat :


drop table parent;
drop table child;

CREATE TABLE parent(id INT NOT NULL,
PRIMARY KEY (id))=20
TYPE=3DINNODB
;

CREATE TABLE child(id INT PRIMARY KEY, parent_id INT,
INDEX par_ind (parent_id),
) ;


insert into parent set id=3D1;
insert into child set id=3D1, parent_id=3D1;
delete parent,child from parent,child where parent.id=3Dchild.parent_id;

fix
?


Thank you for your time

Scott Wong
Meiko America, INC



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

Re: A bug with innodb and non innodb multi-table delete.

am 13.02.2003 17:08:21 von Sinisa Milivojevic

Scott Wong writes:
> Version: Mysql 4.0.10-gamma
>
> Description: Mysql client loses connection when doing a multi-table delete if one table is innodb and the other is myISAM.
>
> How to Repeat :
>
>
> drop table parent;
> drop table child;
>
> CREATE TABLE parent(id INT NOT NULL,
> PRIMARY KEY (id))
> TYPE=INNODB
> ;
>
> CREATE TABLE child(id INT PRIMARY KEY, parent_id INT,
> INDEX par_ind (parent_id),
> ) ;
>
>
> insert into parent set id=1;
> insert into child set id=1, parent_id=1;
> delete parent,child from parent,child where parent.id=child.parent_id;
>
> fix
> ?
>
>
> Thank you for your time
>
> Scott Wong
> Meiko America, INC

Hi!

Thank you for your bug report, it was fixed one week ago in with the
following patch which was committed, but is not yet pushed:


===== sql/sql_parse.cc 1.293 vs 1.294 =====
*** /tmp/sql_parse.cc-1.293-28756 Wed Jan 29 21:33:54 2003
--- 1.294/sql/sql_parse.cc Sat Feb 8 19:25:16 2003
***************
*** 2038,2044 ****
(ORDER *)NULL,(ORDER *)NULL,(Item *)NULL,
(ORDER *)NULL,
select_lex->options | thd->options |
! SELECT_NO_JOIN_CACHE,
result);
delete result;
}
--- 2038,2044 ----
(ORDER *)NULL,(ORDER *)NULL,(Item *)NULL,
(ORDER *)NULL,
select_lex->options | thd->options |
! SELECT_NO_JOIN_CACHE | SELECT_NO_UNLOCK,
result);
delete result;
}

--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com

Join MySQL Users Conference and Expo:
http://www.mysql.com/events/uc2003/


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

Re: A bug with innodb and non innodb multi-table delete.

am 13.02.2003 17:08:21 von Sinisa Milivojevic

Scott Wong writes:
> Version: Mysql 4.0.10-gamma
>
> Description: Mysql client loses connection when doing a multi-table delete if one table is innodb and the other is myISAM.
>
> How to Repeat :
>
>
> drop table parent;
> drop table child;
>
> CREATE TABLE parent(id INT NOT NULL,
> PRIMARY KEY (id))
> TYPE=INNODB
> ;
>
> CREATE TABLE child(id INT PRIMARY KEY, parent_id INT,
> INDEX par_ind (parent_id),
> ) ;
>
>
> insert into parent set id=1;
> insert into child set id=1, parent_id=1;
> delete parent,child from parent,child where parent.id=child.parent_id;
>
> fix
> ?
>
>
> Thank you for your time
>
> Scott Wong
> Meiko America, INC

Hi!

Thank you for your bug report, it was fixed one week ago in with the
following patch which was committed, but is not yet pushed:


===== sql/sql_parse.cc 1.293 vs 1.294 =====
*** /tmp/sql_parse.cc-1.293-28756 Wed Jan 29 21:33:54 2003
--- 1.294/sql/sql_parse.cc Sat Feb 8 19:25:16 2003
***************
*** 2038,2044 ****
(ORDER *)NULL,(ORDER *)NULL,(Item *)NULL,
(ORDER *)NULL,
select_lex->options | thd->options |
! SELECT_NO_JOIN_CACHE,
result);
delete result;
}
--- 2038,2044 ----
(ORDER *)NULL,(ORDER *)NULL,(Item *)NULL,
(ORDER *)NULL,
select_lex->options | thd->options |
! SELECT_NO_JOIN_CACHE | SELECT_NO_UNLOCK,
result);
delete result;
}

--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com

Join MySQL Users Conference and Expo:
http://www.mysql.com/events/uc2003/


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