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.