Bug #28720 Disk data meta information is not visible in mysqld but exists in ndbd
Submitted: 28 May 2007 9:35 Modified: 11 Jul 2007 9:28
Reporter: Johan Andersson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Disk Data Severity:S3 (Non-critical)
Version:mysql-5.1.18 ndb-6.2.3, 5.1.20-BK OS:Any
Assigned to: Jonas Oreland

[28 May 2007 9:35] Johan Andersson
Description:
Disk data files are properly visible from ndb_show_tables, so they seem to exist in cluster:
7     Tablespace           Online   -                             ts_1
8     Datafile             Online   -                             data_1.dat
5     LogfileGroup         Online   -                             lg_1
82    Datafile             Online   -                             data_2.dat
6     Undofile             Online   -                             undo_1.dat
but from mysqld:

mysql> select * from information_schema.files\G
*************************** 1. row ***************************
             FILE_ID: 0
           FILE_NAME: data_1.dat
           FILE_TYPE: DATAFILE
     TABLESPACE_NAME: ts_1
       TABLE_CATALOG: NULL
        TABLE_SCHEMA: NULL
          TABLE_NAME: NULL
  LOGFILE_GROUP_NAME: lg_1
LOGFILE_GROUP_NUMBER: NULL
              ENGINE: ndbcluster
       FULLTEXT_KEYS: NULL
        DELETED_ROWS: NULL
        UPDATE_COUNT: NULL
        FREE_EXTENTS: 1623
       TOTAL_EXTENTS: 12288
         EXTENT_SIZE: 1048576
        INITIAL_SIZE: 12884901888
        MAXIMUM_SIZE: 12884901888
     AUTOEXTEND_SIZE: NULL
       CREATION_TIME: NULL
    LAST_UPDATE_TIME: NULL
    LAST_ACCESS_TIME: NULL
        RECOVER_TIME: NULL
 TRANSACTION_COUNTER: NULL
             VERSION: 1
          ROW_FORMAT: FIXED
          TABLE_ROWS: NULL
      AVG_ROW_LENGTH: NULL
         DATA_LENGTH: NULL
     MAX_DATA_LENGTH: NULL
        INDEX_LENGTH: NULL
           DATA_FREE: NULL
         CREATE_TIME: NULL
         UPDATE_TIME: NULL
          CHECK_TIME: NULL
            CHECKSUM: NULL
              STATUS: NORMAL
               EXTRA: CLUSTER_NODE=2
1 row in set, 1 warning (0.00 sec)

I can only see one data file... 

How to repeat:
No idea yet... :(
Found this after doing a partial start of the cluster using version mysql-5.1.18 ndb-6.2.3.

Suggested fix:
-
[30 May 2007 3:19] Adam Dixon
I have verified this behavior on latest BK of 5.1 - someone with more internals will need to look further as to why. The relevant warning present in Johan's output is as follows;
+-------+------+----------------------------------------------------+
| Level | Code | Message                                            |
+-------+------+----------------------------------------------------+
| Error | 1296 | Got error 4007 'Send to ndbd node failed' from NDB | 
+-------+------+----------------------------------------------------+
1 row in set (0.00 sec)
NDB error code 4007: Send to ndbd node failed: Unknown result: Unknown result error

As soon as you bring up the second node you get; 9 rows in set (0.00 sec) as expected. IS looks to be bombing out when trying to query/process down node. 
Where it should continue to display only running nodes files.

Repeat process;

Start 51 cluster;
CREATE LOGFILE GROUP lg_1 ADD UNDOFILE 'undo_1.dat' INITIAL_SIZE 16M UNDO_BUFFER_SIZE 2M ENGINE NDB;
ALTER LOGFILE GROUP lg_1 ADD UNDOFILE 'undo_2.dat' INITIAL_SIZE 12M ENGINE NDB;
CREATE TABLESPACE ts_1 ADD DATAFILE 'data_1.dat' USE LOGFILE GROUP lg_1 INITIAL_SIZE 32M ENGINE NDB;
ALTER TABLESPACE ts_1 ADD DATAFILE 'data_2.dat' INITIAL_SIZE 48M ENGINE NDB;

ndb_mgm -e 'all stop'

ndbd
(wait for partial start)

mysql> select * from information_schema.FILES
[4 Jul 2007 10:00] Jon Stephens
Documented bugfix for telco-6.2.4 release, left status as PQ.
[10 Jul 2007 13:27] Bugs System
Pushed into 5.1.21-beta
[11 Jul 2007 9:28] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented bugfix in 5.1.21 changelog.
[6 Sep 2007 9:41] Jon Stephens
Fix also documented for mysql-5.1.15-ndb-6.1.18.