mysqlsqlmysql-clusterdatabase-cluster

Got error 4239 'Trigger with given name already exists' from NDBCLUSTER


We are running a MySQL Cluster Version:

mysql> SELECT VERSION();
+------------------------------+
| VERSION()                    |
+------------------------------+
| 5.6.15-ndb-7.3.4-cluster-gpl |
+------------------------------+

Trying to create a table

CREATE TABLE xy (
  xa VARCHAR(36) NOT NULL DEFAULT '',
  xb VARCHAR(255) NOT NULL,
  xc TIMESTAMP NOT NULL,
  xd VARCHAR(36) DEFAULT NULL,
  xe VARCHAR(36) DEFAULT NULL,
  xf VARCHAR(255) DEFAULT NULL,
  xg VARCHAR(255) DEFAULT NULL,
  xh TEXT,
  xi BIGINT(20) DEFAULT NULL,
  xj VARCHAR(255) DEFAULT NULL,
  xk VARCHAR(255) DEFAULT NULL,
  xl VARCHAR(255) DEFAULT NULL,
  xz VARCHAR(255) DEFAULT NULL,
  xy VARCHAR(255) DEFAULT NULL, 
  PRIMARY KEY (xa)
) engine=ndb;

brings me (using the direct input over command line):

ERROR 1296 (HY000): Got error 4239 'Trigger with given name already exists' from NDBCLUSTER

and via file:

ERROR 1296 (HY000) at line 8: Got error 4239 'Trigger with given name already exists' from NDBCLUSTER

But there are no mysql triggers:

mysql> SHOW triggers;
Empty set (0.00 sec)

and no tables:

mysql> show tables;
Empty set (0.01 sec)

Anyone got an idea?


Solution

  • Ok - We got it!

    The MaxNoOfTriggers in config.ini has been reached.

    From the Official documentation -> MaxNoOfTriggers:

    Internal update, insert, and delete triggers are allocated for each unique hash index. (This means that three triggers are created for each unique hash index.) However, an ordered index requires only a single trigger object. Backups also use three trigger objects for each normal table in the cluster.

    Replication between clusters also makes use of internal triggers.

    This parameter sets the maximum number of trigger objects in the cluster.

    The default value is 768.