Bug #33160 Didn't check data type of conflict_fn column when creating mysql.ndb_replication
Submitted: 12 Dec 2007 8:19 Modified: 3 Apr 2008 7:52
Reporter: li zhou Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: Replication Severity:S3 (Non-critical)
Version:mysql-5.1-telco-6.3 OS:Any
Assigned to: CPU Architecture:Any
Tags: 5.1.22-ndb-6.3.7

[12 Dec 2007 8:19] li zhou
Description:
We CAN create mysql.ndb_replication table with wrong data type of conflict_fn column.

And we also can create mysql.ndb_replication table without conflict_fn column. Is there default value of conflict_fn column? Or conflict_fn column is not requied?

How to repeat:
We can create table with following statement:

# The type of conflict_fn column should be "VARBINARY(128)"
CREATE TABLE mysql.ndb_replication
  (db VARBINARY(63),
   table_name VARBINARY(63),
   server_id INT UNSIGNED,
   binlog_type INT UNSIGNED,
   conflict_fn INT,
   PRIMARY KEY USING HASH (db,table_name,server_id))
  ENGINE=NDB PARTITION BY KEY(db,table_name);

and 
# missing conflict_fn column
CREATE TABLE mysql.ndb_replication
  (db VARBINARY(63),
   table_name VARBINARY(63),
   server_id INT UNSIGNED,
   binlog_type INT UNSIGNED,
   PRIMARY KEY USING HASH (db,table_name,server_id))
  ENGINE=NDB PARTITION BY KEY(db,table_name);

Suggested fix:
We should check data type of conflict_fn column as other columns in mysql.ndb_replication system table.
[3 Apr 2008 7:52] Sveta Smirnova
Thank you for the report.

Second error verified as described.

For first query I get warning "Error   1613    Bad schema for mysql.ndb_replication table. Message: Missing or wrong type for column 'conflict_fn'"