Bug #30694 mysqld crashes after update of NDB table joined to another table, by PK indexed
Submitted: 29 Aug 2007 14:54 Modified: 4 Oct 2007 6:27
Reporter: Mark Malakanov Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:5.1.23 OS:Linux (FC6 i386)
Assigned to: CPU Architecture:Any
Tags: ndb update join PK crash

[29 Aug 2007 14:54] Mark Malakanov
Description:
mysqld crashes after update of NDB table joined to another table, by PK indexed varchar column

------
UPDATE A a /*NDB table*/
  INNER JOIN B b /*MyISAM table*/
   ON a.id=b.id
SET a.name=b.name
WHERE a.name!=b.name;

ERROR 2013 (HY000): Lost connection to MySQL server during query
------

MySQL compiled by BUILD/compile-pentium-debug-max from 5.1.23 source tree
Two computers run ndb_mgmd, ndbd and mysqld on each.

How to repeat:
use test;

drop table A;
set @id:=0;
create table A as
select left(hex(@id:=@id+1),4) id, table_name name from information_schema.tables;
alter table A add primary key (id);
alter table A engine=NDB;

drop table B;
set @id:=0;
create table B engine=MyISAM as
select left(hex(@id:=@id+1),4) id, table_name name from information_schema.tables;

UPDATE A a
  INNER JOIN B b
   ON a.id=b.id
SET a.name=b.name
WHERE a.name!=b.name;

Suggested fix:
it worked well in v5.1.20 beta installed from generic i386 rpm.
[30 Aug 2007 8:16] Hartmut Holzgraefe
i couldn't reproduce it with a build from the internal 
5.1 bk source tree fetched and compiled this morning ...
[30 Aug 2007 8:18] Hartmut Holzgraefe
could you provide a core dump and your mysqld binary
for us to analyze?
[30 Aug 2007 14:43] Mark Malakanov
Core dump has not been created.

I'll send mysqld binary.
[4 Sep 2007 6:27] Hartmut Holzgraefe
the mysqld binary alone is of no use without the core file, it is just needed to resolve symbols in the core dump 

to have mysqld create a core file when it crashes you need to:

- enable core files in the environment mysqld is to run in
- start mysqld with the --core-file option
- start mysqld as user "mysql" right away, if started as
  "root" and requested to change its user id to "mysql" in
  the my.cnf file only the operating system will usually
  not allow it to write core dumps
[4 Oct 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".