Bug #61706 all data node shutdowned by any rollback of update query
Submitted: 30 Jun 2011 10:15 Modified: 30 Jun 2011 15:39
Reporter: ws lee Email Updates:
Status: Analyzing Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:mysql5.1.56-ndb7.1.14 OS:Linux (CentOS 5.5)
Assigned to: Assigned Account CPU Architecture:Any

[30 Jun 2011 10:15] ws lee
Description:
I am 2 data node, 2 sql node.
and use ndbmtd.

all data node easily shutdowned by rollback of any update query.

How to repeat:
1. run query below.

CREATE TABLE `a` (
  `id` int(11) NOT NULL,
  `no` int(11) NOT NULL DEFAULT '0',
  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `modified` timestamp NULL DEFAULT NULL,
  `id2` smallint(6) NOT NULL,
  `id3` int(11) NOT NULL,
  `quota` int(11) NOT NULL,
  `mail` varchar(512) NOT NULL,
  `log` varchar(512) NOT NULL,
  `pass` varchar(64) NOT NULL,
  `cls` int(11) NOT NULL DEFAULT '0',
  `copy` tinyint(4) DEFAULT '1',
  UNIQUE KEY `id` (`id`),
  KEY `idx_created` (`created`),
  KEY `idx_id2` (`id2`),
  KEY `idx_id3` (`id3`),
  KEY `mail` (`mail`)
) ENGINE=ndbcluster DEFAULT CHARSET=utf8;

CREATE TABLE `a2` (
  `a2_id` int(11) NOT NULL AUTO_INCREMENT,
  `inserted` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `id` int(11) DEFAULT NULL,
  `no` int(11) DEFAULT NULL,
  `created` timestamp NULL DEFAULT NULL,
  `modified` timestamp NULL DEFAULT NULL,
  `id2` smallint(6) DEFAULT NULL,
  `id3` int(11) DEFAULT NULL,
  `quota` int(11) DEFAULT NULL,
  `mail` varchar(512) DEFAULT NULL,
  `log` varchar(512) DEFAULT NULL,
  `pass` varchar(64) DEFAULT NULL,
  `cls` int(11) DEFAULT NULL,
  `copy` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`a2_id`),
  KEY `idx_id2` (`id2`),
  KEY `idx_mail` (`mail`)
) ENGINE=ndbcluster DEFAULT CHARSET=utf8;

delimiter //
CREATE TRIGGER trg1 AFTER UPDATE ON a
FOR EACH ROW
BEGIN
   INSERT INTO a2( id, no, created, modified, id2, id3, quota, mail, log, pass, cls, copy )
   VALUES( old.id, old.no, old.created, old.modified, old.id2, old.id3, old.quota, old.mail, old.log, old.pass, old.cls, old.copy );
END 
//
delimiter ;

CREATE TABLE `b` (
  `id` int(11) NOT NULL,
  `id3` int(11) NOT NULL,
  `log` varchar(512) NOT NULL,
  UNIQUE KEY `idx_id` (`id`),
  KEY `idx_id3` (`id3`)
) ENGINE=ndbcluster DEFAULT CHARSET=utf8;

INSERT INTO `a` VALUES (1,0,'2011-06-30 07:31:59',NULL,1001,10,50,'a1@bug.com','a1@bug.com','abcd',0,1);
INSERT INTO `b` VALUES (2,10,'a1@bug.com');

2. run update query with transaction of problem.

mysql> begin;
Query OK, 0 rows affected (0.00 sec)

mysql> 
UPDATE a, b 
SET a.log = 'a1@bug.com', a.mail = 'a1@bug.com', b.log = 'a1@bug.com' 
WHERE a.id3 = 10 AND a.id = 1 AND b.log = 'a1@bug.com' 
AND b.id3 = a.id3 AND a.log = b.log; 

Query OK, 1 row affected (0.00 sec)
Rows matched: 2  Changed: 1  Warnings: 0

mysql> rollback;
ERROR 1296 (HY000): Got error 0 'No error' from NDBCLUSTER

when run rollback, error occoured like uppper.
and then data node shutdowned.

ndb_mgm> Node 5: Forced node shutdown completed. Caused by error 2341: 'Internal program error (failed ndbrequire)(Internal error, programming error or missing error message, please report a bug). Temporary error, restart node'.
Node 4: Forced node shutdown completed. Caused by error 2341: 'Internal program error (failed ndbrequire)(Internal error, programming error or missing error message, please report a bug). Temporary error, restart node'.

Suggested fix:
i doube improber work when rollback of update query using 2 table join.
[30 Jun 2011 14:50] MySQL Verification Team
I have not been able to reproduce the crash on my 7.1.15 or 7.2.0 builds.  Can you send the ndb_error_reporter collection of cluster logs and trances?

http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-programs-ndb-error-reporter.html
[30 Jun 2011 14:59] ws lee
To. Matthew Montgomery
thanks your fast reply.

where i can download 7.1.15?
why you test 7.2(developement version)?

please analyze at production release 7.1.14.