Bug #40609 In 32bit sql node with 64bit data node, failed to 4G tablespace file creating.
Submitted: 10 Nov 2008 4:54 Modified: 19 Jan 2016 12:37
Reporter: ws lee Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Disk Data Severity:S3 (Non-critical)
Version:mysql-5.1-telco-6.3 OS:Solaris (5.10)
Assigned to: MySQL Verification Team CPU Architecture:Any
Tags: 5.1.27-ndb6.3.17

[10 Nov 2008 4:54] ws lee
Description:
I have 2 data node in 64bit server(Sun fire X2200).

I failed to 4G tablespace file creating whenver in 32bit sql-node execute tablespace creating command.

In 64bit sql-node, no problem.

How to repeat:
In 32bit sql-node

mysql> status;
--------------
./bin/mysql  Ver 14.14 Distrib 5.1.27-ndb-6.3.17, for pc-solaris2.10 (i386) using readline 5.1

mysql> CREATE TABLESPACE ts_test1
    ->   ADD DATAFILE 'test1.dat'
    ->   USE LOGFILE GROUP lg
    ->   INITIAL_SIZE 4294967296
    ->   ENGINE=ndbcluster;
Query OK, 0 rows affected (0.92 sec)

mysql> select file_name,tablespace_name,logfile_group_name,free_extents,total_extents,initial_size,maximum_size,extra from information_schema.files where file_name='test1.dat';
+-----------+-----------------+--------------------+--------------+---------------+--------------+--------------+----------------+
| file_name | tablespace_name | logfile_group_name | free_extents | total_extents | initial_size | maximum_size | extra          |
+-----------+-----------------+--------------------+--------------+---------------+--------------+--------------+----------------+
| test1.dat | ts_test1        | lg                 |            1 |             0 |            0 |            0 | CLUSTER_NODE=4 | 
| test1.dat | ts_test1        | lg                 |            1 |             0 |            0 |            0 | CLUSTER_NODE=5 | 
+-----------+-----------------+--------------------+--------------+---------------+--------------+--------------+----------------+

total_extents size of test1.dat is 0.

In 64bit sql-node, no problem as below.

mysql> status
--------------
./bin/mysql  Ver 14.14 Distrib 5.1.27-ndb-6.3.17, for pc-solaris2.10 (x86_64) using readline 5.1

mysql> create TABLESPACE ts_test2
    ->   ADD DATAFILE 'test2.dat'
    ->   USE LOGFILE GROUP lg
    ->   INITIAL_SIZE 4294967296
    ->   ENGINE=ndbcluster;
Query OK, 0 rows affected (1 min 56.42 sec)

mysql> select file_name,tablespace_name,logfile_group_name,free_extents,total_extents,initial_size,maximum_size,extra from information_schema.files
    -> where file_name='test2.dat';
+-----------+-----------------+--------------------+--------------+---------------+--------------+--------------+----------------+
| file_name | tablespace_name | logfile_group_name | free_extents | total_extents | initial_size | maximum_size | extra          |
+-----------+-----------------+--------------------+--------------+---------------+--------------+--------------+----------------+
| test2.dat | ts_test2        | lg                 |         4096 |          4096 |   4294967296 |   4294967296 | CLUSTER_NODE=5 | 
| test2.dat | ts_test2        | lg                 |         4096 |          4096 |   4294967296 |   4294967296 | CLUSTER_NODE=4 | 
+-----------+-----------------+--------------------+--------------+---------------+--------------+--------------+----------------+
2 rows in set (0.07 sec)
[19 Jan 2016 12:37] MySQL Verification Team
Hi,

Thanks for your report but the fact that 32bit system won't create 4G+ tablespace for ndbcluster is expected behavior.

I see that you got reply after creating tablespace that it "query ok" and that is a bug that does not exist in the new versions of the mysql cluster (tested with 7.4.9, you will get proper error).

All best
Bogdan Kecman

mysql> CREATE TABLESPACE ts_test2 ADD DATAFILE 'test2.dat' USE LOGFILE GROUP lg INITIAL_SIZE 4294967290 ENGINE=ndbcluster;
ERROR 1528 (HY000): Failed to create DATAFILE

mysql> CREATE TABLESPACE ts_test3 ADD DATAFILE 'test3.dat' USE LOGFILE GROUP lg INITIAL_SIZE 4194967290 ENGINE=ndbcluster;
Query OK, 0 rows affected, 1 warning (1 min 57.47 sec)