Bug #52940 ndb_*_count status variables ARE session related in contrary what docu says.
Submitted: 19 Apr 2010 11:11 Modified: 24 Apr 2010 10:50
Reporter: Oli Sennhauser Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-7.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: 7.0.13, ndb_execute_count, ndb_pruned_scan_count, ndb_scan_count, session status variables

[19 Apr 2010 11:11] Oli Sennhauser
Description:
The MySQL Cluster docu claims that the status variables

ndb_scan_count  numeric   GLOBAL
ndb_execute_count   numeric   GLOBAL
ndb_pruned_scan_count   numeric   GLOBAL (estimation)

Are global and not per session.

http://dev.mysql.com/doc/refman/5.1/en/server-status-variables.html

My experiments show something different

How to repeat:
mysql> show global status like 'ndb%count';
+-----------------------+-------+          
| Variable_name         | Value |          
+-----------------------+-------+          
| Ndb_execute_count     | 0     |          
| Ndb_scan_count        | 0     |          
| Ndb_pruned_scan_count | 0     |          
+-----------------------+-------+          

mysql> show session status like 'ndb%count';
+-----------------------+-------+           
| Variable_name         | Value |           
+-----------------------+-------+           
| Ndb_execute_count     | 0     |           
| Ndb_scan_count        | 0     |           
| Ndb_pruned_scan_count | 0     |           
+-----------------------+-------+           

mysql> select * from test limit 1;
mysql> select * from test limit 1;
mysql> select * from test limit 1;

mysql> show global status like 'ndb%count';
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| Ndb_execute_count     | 3     |
| Ndb_scan_count        | 3     |
| Ndb_pruned_scan_count | 0     |
+-----------------------+-------+

mysql> show session status like 'ndb%count';
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| Ndb_execute_count     | 3     |
| Ndb_scan_count        | 3     |
| Ndb_pruned_scan_count | 0     |
+-----------------------+-------+
4 rows in set (0.00 sec)

mysql> exit
Bye
PL_2_3# mysql -uroot test

mysql> show global status like 'ndb%count';
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| Ndb_execute_count     | 0     |
| Ndb_scan_count        | 0     |
| Ndb_pruned_scan_count | 0     |
+-----------------------+-------+

Suggested fix:
It would be nice having those status variables also globally. If not please adapt the docu accodingly.
[24 Apr 2010 10:50] Sveta Smirnova
Thank you for the report.

Verified as described using mysql-5.1-telco-7.1 tree.
[3 Jan 2018 22:14] Abdel-Mawla Gharieb
I'm not sure in which version this bug has been resolved but as of MySQL Cluster 7.5.7 the ndb_*_count status variables are global.
[3 Jan 2018 22:28] Abdel-Mawla Gharieb
Please ignore my previous comment (sad that it's not possible to edit/delete comments/posts here!).
The bug still affects mysql 5.7.19 ndb-7.5.7