9 messages in com.mysql.lists.bugsNDB tables with character primary key...
FromSent OnAttachments
Giuseppe Maxia13 Oct 2004 05:07 
Jonas Oreland13 Oct 2004 12:14 
Giuseppe Maxia13 Oct 2004 12:45 
Giuseppe Maxia13 Oct 2004 22:02 
Jonas Oreland14 Oct 2004 00:29 
Giuseppe Maxia14 Oct 2004 01:59 
Jonas Oreland14 Oct 2004 02:11 
Giuseppe Maxia14 Oct 2004 03:15 
Giuseppe Maxia17 Oct 2004 03:35 
Subject:NDB tables with character primary key replicate only partially
From:Giuseppe Maxia (g.ma@stardata.it)
Date:10/13/2004 05:07:09 AM
List:com.mysql.lists.bugs

I was testing transactions in NDB tables, and I came across this problem.

Bug observed using MySQL 4.1.4-max, with the simple configuration shown in MySQL
manual (http://dev.mysql.com/doc/mysql/en/MySQL_Cluster_quick.html)

Summary: With two MySQL nodes open, create one table in the first node, giving
it a primary key of type CHAR. In the second node, the table is replicated. Then open a transaction, and insert two records in the table. When the transaction is committed, the second node will only see one record.

If you close the second session and reopen it, then all the records are shown.

To repeat, follow this timeline, issuing the commands in node1 and node2 in the same order they are shown.

(NODE 1) (NODE 2)

mysql1> set autocommit = 0; mysql2> set autocommit = 0; Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec)

mysql1> create table uno (c char(10) -> not null primary key) -> engine=ndb; Query OK, 0 rows affected (0.55 sec) mysql2> show create table uno\G ************* 1. row ************* Table: uno Create Table: CREATE TABLE `uno` ( `c` char(10) NOT NULL default '', PRIMARY KEY (`c`) ) ENGINE=ndbcluster DEFAULT CHARSET=latin1 1 row in set (0.01 sec)

mysql1> begin; Query OK, 0 rows affected (0.00 sec)

mysql1> insert into uno values -> ('aaa'), ('bbb'); Query OK, 2 rows affected (0.00 sec) Records: 2 Duplicates: 0 Warnings: 0

mysql2> select * from uno; Empty set (0.00 sec) mysql1> commit; Query OK, 0 rows affected (0.00 sec)

mysql1> select * from uno; mysql2> select * from uno; +-----+ +-----+ | c | | c | +-----+ +-----+ | bbb | | bbb | | aaa | +-----+ +-----+ 1 row in set (0.01 sec) 2 rows in set (0.00 sec)