Bug #20725 MySQLD cluster use "fast count" is broken
Submitted: 27 Jun 2006 14:05 Modified: 29 Jun 2006 9:47
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:5.1.12 OS:Linux (Linux 32 bit OS)
Assigned to: Stewart Smith CPU Architecture:Any

[27 Jun 2006 14:05] Jonathan Miller
Description:
mysql> set  ndb_use_exact_count = off;
Query OK, 0 rows affected (0.00 sec)

mysql> select count(*) from account;
ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
mysql> select count(*) from account;
+----------+
| count(*) |
+----------+
|   100000 |
+----------+
1 row in set (7.03 sec)

mysql> select count(*) from account;
+----------+
| count(*) |
+----------+
|   100000 |
+----------+
1 row in set (8.13 sec)

mysql> set  ndb_use_exact_count=on;
Query OK, 0 rows affected (0.00 sec)

mysql> select count(*) from account;
+----------+
| count(*) |
+----------+
|   100000 |
+----------+
1 row in set (7.43 sec)

mysql> select count(*) from account;
+----------+
| count(*) |
+----------+
|   100000 |
+----------+
1 row in set (7.83 sec)

When running from API, the API returns in less then one second.
./ndb_select_count  -c ndb08:14000 -d TPCB  account 100000 records in table account

This is causing performance test execution issues.

DBD::mysql::st execute failed: Lock wait timeout exceeded; try restarting transaction at ./tpcb.pl line 592.
DBD::mysql::st execute failed: Lock wait timeout exceeded; try restarting transaction at ./tpcb.pl line 592.
.
.
.

Line 592 is select count(*) from account;

How to repeat:
see above
[27 Jun 2006 15:07] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/8324
[27 Jun 2006 15:28] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/8325
[28 Jun 2006 12:54] Stewart Smith
pushed to 5.1 team tree
[29 Jun 2006 9:47] Tomas Ulin
no need to document, bug never released