Bug #19384 Incorrect behaviour if data nodes have different MaxNoOfAttributes
Submitted: 26 Apr 2006 19:40 Modified: 3 Oct 2006 13:21
Reporter: Serge Kozlov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:4.1 -> OS:Linux (Linux FC4)
Assigned to: david li CPU Architecture:Any

[26 Apr 2006 19:40] Serge Kozlov
Description:
A data node from a cluster has own value MaxNoOfAttributes and this value is minimal. Other data nodes use default value of MaxNoOfAttributes.
The application will try to create more tables than it is available for minimal MaxNoOfAttributes.
Cluster can't process correctly this case and stops a node with internal error (see below) instead proper error 708. 
Also in this case and for NoOfReplicas = 1  the whole cluster will stopped.

================================
Current byte-offset of file-pointer is: 568

Time: Wednesday 26 April 2006 - 21:08:49
Status: Temporary error, restart node
Message: Internal program error (failed ndbrequire) (Internal error, programming
 error or missing error message, please report a bug)
Error: 2341
Error data: dbdict/Dbdict.cpp
Error object: DBDICT (Line: 5070) 0x0000000e
Program: /home/ndbdev/skozlov/builds/libexec/ndbd
Pid: 2604
Trace: /space/run/ndb_3_trace.log.1
Version: Version 5.1.10 (beta)
***EOM***

How to repeat:
1. Create a configuration for cluster with 2 ndbd, 2 replicas.
2. Add for one data node (section [ndbd]) MaxNoOfAttributes = 32 (min value)
3. Start cluster.
4. Run load_tpcb.pl ndb16 3306 root BLANK ndb
5. Wait while the script will stop (with errno 4009).
6. Look at ndb_X_error.log where X - nodeid with defined MaxNoOfAttributes
[4 Aug 2006 9:07] Jonas Oreland
1) It's not recommened behavior
2) Fix should be in DBDICT
[27 Sep 2006 1:55] david li
I tested on version 5.1.10 and the latest 5.1 source tree, it cannot reproduce.

config.ini
-----------------------------
[ndbd default]
NoOfReplicas= 2

[ndb_mgmd]
Id=1
HostName= 127.0.0.1
DataDir=/usr/local/mysql/data

[ndbd]
Id= 2
HostName= 127.0.0.1
DataDir= /usr/local/mysql/data/node2
MaxNoOfAttributes = 32

[ndbd]
Id= 3
HostName= 127.0.0.1
DataDir= /usr/local/mysql/data/node3

[mysqld]
Id= 4
HostName= 127.0.0.1
-----------------------------

test command:
on the same machine:
./load_tpcb.pl -u root -so --spath=/tmp/mysql.sock -e ndb

on the other machine:
./load_tpcb.pl -ho dev3-76 -u root -so --spath=/tmp/mysql.sock -e ndb

test results were the same:

*********************************************
************ Command-line values ************
*********************************************
Host ..................... dev3-76
User ..................... root
Password ................. BLANK
Port ..................... 3306
Use Socket To Connect .... TRUE
Socket Path .............. /tmp/mysql.sock
Database ................. TPCB
Engine Type .............. ndb
Create Tables Only ....... FALSE
Program Load Data ........ TRUE
Number of rows Account.... 100000
Number of rows Branches... 10000
Number of rows Teller .... 20000
Use Disk Data ............ FALSE
 Connected to MySQLD.
Creating database!
Database Created.
Creating Account Table
Creating Branch Table
Creating Teller Table
DBD::mysql::st execute failed: Can't create table 'TPCB.teller' (errno: 708) at ./load_tpcb.pl line 439.
DBD::mysql::st execute failed: Can't create table 'TPCB.teller' (errno: 708) at ./load_tpcb.pl line 439.
[3 Oct 2006 13:21] Serge Kozlov
Currently the behaviour of a cluster is correct: Errno 708 appears for case described earlier.