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.