Bug #12221 wierd data results from restarting cluster
Submitted: 27 Jul 2005 18:10 Modified: 13 Aug 2005 6:00
Reporter: Jonathan Miller Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:5.1 OS:Linux (Linux)
Assigned to: Assigned Account CPU Architecture:Any

[27 Jul 2005 18:10] Jonathan Miller
Description:
mysql> delete from trans where scriptId = 'ndb09_1';
Query OK, 0 rows affected (0.04 sec)

Started one instance of TPC-B
mysql> select * from trans;
+----------+-------+---------+---------------------+---------------------+
| scriptId | count | tps     | lastTransTime       | startTime           |
+----------+-------+---------+---------------------+---------------------+
| ndb09_1  |   372 |    37.2 | 2005-07-27 19:57:29 | 2005-07-27 19:57:19 |
| ndb09_1  | 25211 | 35.7096 | 2005-07-27 19:19:17 | 2005-07-27 19:07:31 |
+----------+-------+---------+---------------------+---------------------+
2 rows in set (0.04 sec)

The second one should not be there! See the table create show below.

Now you see it

mysql> select * from trans where scriptId = 'ndb09_1';
+----------+-------+-------+---------------------+---------------------+
| scriptId | count | tps   | lastTransTime       | startTime           |
+----------+-------+-------+---------------------+---------------------+
| ndb09_1  |  2829 | 37.72 | 2005-07-27 19:58:34 | 2005-07-27 19:57:19 |
+----------+-------+-------+---------------------+---------------------+
1 row in set (0.04 sec)

Now you don't.

mysql> select * from trans;
+----------+-------+---------+---------------------+---------------------+
| scriptId | count | tps     | lastTransTime       | startTime           |
+----------+-------+---------+---------------------+---------------------+
| ndb09_1  |  2966 | 37.5443 | 2005-07-27 19:58:38 | 2005-07-27 19:57:19 |
| ndb09_1  | 25211 | 35.7096 | 2005-07-27 19:19:17 | 2005-07-27 19:07:31 |
+----------+-------+---------+---------------------+---------------------+
2 rows in set (0.04 sec)

It is back again!

mysql> select count(*) from trans;
+----------+
| count(*) |
+----------+
|        2 |
+----------+
1 row in set (0.04 sec)

Count is wrong as well.

mysql> show create table trans\G;
*************************** 1. row ***************************
       Table: trans
Create Table: CREATE TABLE `trans` (
  `scriptId` char(10) NOT NULL,
  `count` int(11) default NULL,
  `tps` float default NULL,
  `lastTransTime` datetime default NULL,
  `startTime` datetime default NULL,
  PRIMARY KEY  (`scriptId`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1
1 row in set (0.04 sec)

ERROR:
No query specified

How to repeat:
SEE :MySQL Bugs: #12220 and follow steps above.
[27 Jul 2005 18:11] Jonathan Miller
Click the button before I had gone back to finish the title. Sorry!
[13 Aug 2005 6:00] Jonas Oreland
duplicate: #12220