Bug #74217 ERROR 1296 (HY000): Got error 4350 'Transaction already aborted' from NDBCLUSTER
Submitted: 3 Oct 2014 22:52 Modified: 5 Oct 2014 6:30
Reporter: Slava C Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:5.6.19-ndb-7.3.6 OS:Any
Assigned to: CPU Architecture:Any
Tags: 4350, Transaction already aborted, Update Ignore

[3 Oct 2014 22:52] Slava C
Description:
"update ignore" ends with
ERROR 1296 (HY000): Got error 4350 'Transaction already aborted' from NDBCLUSTER
on duplicate value in unique non-primary compound index.

> show warnings;
Warning │ 1296 │ Got error 893 'Constraint violation e.g. duplicate value in unique index' from NDB
Warning │ 1296 │ Got error 4350 'Transaction already aborted' from NDB
Error   │ 1296 │ Got error 4350 'Transaction already aborted' from NDBCLUSTER
Error   │ 1180 │ Got error 4350 during COMMIT

How to repeat:
drop table if exists foo;
create table foo(
  id int primary key,
  A int,
  B int,
  unique key(A, B)
) engine=ndbcluster;

insert foo set id=1, A=0, B=1;
insert foo set id=2, A=0, B=2;
update ignore foo set B=1 where id=2;
[5 Oct 2014 6:30] MySQL Verification Team
Hello Slava C,

Thank you for the bug report and test case.

Thanks,
Umesh
[5 Oct 2014 6:40] MySQL Verification Team
//

mysql> show variables like '%version%';
+-------------------------+------------------------------------------------------+
| Variable_name           | Value                                                |
+-------------------------+------------------------------------------------------+
| innodb_version          | 5.6.19                                               |
| ndb_version             | 459526                                               |
| ndb_version_string      | ndb-7.3.6                                            |
| ndbinfo_version         | 459526                                               |
| protocol_version        | 10                                                   |
| slave_type_conversions  |                                                      |
| version                 | 5.6.19-ndb-7.3.6-cluster-commercial-advanced-log     |
| version_comment         | MySQL Cluster Server - Advanced Edition (Commercial) |
| version_compile_machine | x86_64                                               |
| version_compile_os      | linux-glibc2.5                                       |
+-------------------------+------------------------------------------------------+
10 rows in set (0.00 sec)

mysql> drop table if exists foo;
create table foo(
  id int primary key,
  A int,
  B int,
  unique key(A, B)
) engine=ndbcluster;

insert foo set id=1, A=0, B=1;
insert foo set id=2, A=0, B=2;
select * from foo;
update ignore foo set B=1 where id=2;
SHOW WARNINGS;
Query OK, 0 rows affected (0.19 sec)

mysql> create table foo(
    ->   id int primary key,
    ->   A int,
    ->   B int,
    ->   unique key(A, B)
    -> ) engine=ndbcluster;
SHOW ERRORS;
select * from foo;Query OK, 0 rows affected (0.63 sec)

mysql>
mysql> insert foo set id=1, A=0, B=1;
Query OK, 1 row affected (0.01 sec)

mysql> insert foo set id=2, A=0, B=2;
Query OK, 1 row affected (0.00 sec)

mysql> select * from foo;
+----+------+------+
| id | A    | B    |
+----+------+------+
|  1 |    0 |    1 |
|  2 |    0 |    2 |
+----+------+------+
2 rows in set (0.00 sec)

mysql> update ignore foo set B=1 where id=2;
ERROR 1296 (HY000): Got error 4350 'Transaction already aborted' from NDBCLUSTER
mysql> SHOW WARNINGS;
+---------+------+------------------------------------------------------------------------------------+
| Level   | Code | Message                                                                            |
+---------+------+------------------------------------------------------------------------------------+
| Warning | 1296 | Got error 893 'Constraint violation e.g. duplicate value in unique index' from NDB |
| Warning | 1296 | Got error 4350 'Transaction already aborted' from NDB                              |
| Error   | 1296 | Got error 4350 'Transaction already aborted' from NDBCLUSTER                       |
| Error   | 1180 | Got error 4350 during COMMIT                                                       |
+---------+------+------------------------------------------------------------------------------------+
4 rows in set (0.00 sec)

mysql> SHOW ERRORS;
+-------+------+--------------------------------------------------------------+
| Level | Code | Message                                                      |
+-------+------+--------------------------------------------------------------+
| Error | 1296 | Got error 4350 'Transaction already aborted' from NDBCLUSTER |
| Error | 1180 | Got error 4350 during COMMIT                                 |
+-------+------+--------------------------------------------------------------+
2 rows in set (0.00 sec)

mysql> select * from foo;
+----+------+------+
| id | A    | B    |
+----+------+------+
|  1 |    0 |    1 |
|  2 |    0 |    2 |
+----+------+------+
2 rows in set (0.00 sec)