Bug #32412 conflict detection exceptions table can only have nullable extra columns
Submitted: 15 Nov 2007 15:15 Modified: 16 Nov 2007 9:24
Reporter: Oli Sennhauser Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Cluster: Replication Severity:S3 (Non-critical)
Version:5.1.22-ndb-6.3.6 OS:Linux
Assigned to: CPU Architecture:Any

[15 Nov 2007 15:15] Oli Sennhauser
Description:
Conflict detection seems only to work, if the attributes in the exception table represent only the pk attributes of the base table. it seems to NOT work if there are additional attributes added!

How to repeat:
CREATE TABLE test.t2  (
    id INT UNSIGNED NOT NULL auto_increment,
    data varCHAR(32) NOT NULL,
    ts INT UNSIGNED NOT NULL,
    PRIMARY KEY pk (id)
)   ENGINE=NDB;

does NOT work:

CREATE TABLE test.`t2$EX`  (
    server_id INT UNSIGNED,
    master_server_id INT UNSIGNED, 
    master_epoch BIGINT UNSIGNED,
    count INT UNSIGNED,
    id INT UNSIGNED NOT NULL,
    data varCHAR(32) NOT NULL,
    PRIMARY KEY(server_id, master_server_id, master_epoch, count)
)   ENGINE=NDB;

does work:

CREATE TABLE test.`t2$EX`  (
    server_id INT UNSIGNED,
    master_server_id INT UNSIGNED, 
    master_epoch BIGINT UNSIGNED,
    count INT UNSIGNED,
    id INT UNSIGNED NOT NULL,
    PRIMARY KEY(server_id, master_server_id, master_epoch, count)
)   ENGINE=NDB;

Suggested fix:
Either it should be made work or the documentation should be adapted!
[16 Nov 2007 8:44] Tomas Ulin
Currently we are limited to columns that are nullable, as default values are not applied to the extra columns.

This will be fixed at some point.

Current workaround: Set all extra columns nullable.
[16 Nov 2007 9:24] Jon Stephens
Set status as To Be Fixed Later and documented as a known limitation after discussing with Tomas.
[13 Mar 2014 13:36] Omer Barnir
This bug is not scheduled to be fixed at this time.