Bug #18853 Dropping a Mixed (Memory & DD) database causes MYSQLD to crash
Submitted: 6 Apr 2006 15:33 Modified: 17 Jul 2006 19:52
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:5.1.9 OS:Linux (Linux 32 Bit OS)
Assigned to: Tomas Ulin CPU Architecture:Any

[6 Apr 2006 15:33] Jonathan Miller
Description:
I had created a mixed database using the myswl_load_db.sh that I have updated for DBT2. Using mysql to drop the dbt2 database, the mysqld process crashed:

0x81cfd98 handle_segfault + 438
0xd1e420 (?)
0x2 (?)
0x838d9dd _ZN15GlobalDictCache4dropEP12NdbTableImpl + 117
0x83875a9 _ZN17NdbDictionaryImpl9dropTableER12NdbTableImpl + 481
0x83872fb _ZN17NdbDictionaryImpl9dropTableEPKc + 73
0x8371d3e _ZN13NdbDictionary10Dictionary9dropTableEPKc + 36
0x83266c8 _ZN13ha_ndbcluster12delete_tableEPS_P3NdbPKcS4_S4_ + 102
0x8326b30 _Z29ndbcluster_drop_database_implPKc + 492
0x8326be6 _Z24ndbcluster_drop_databasePc + 22
0x829e769 _Z17dropdb_handlertonP3THDP13st_plugin_intPv + 53
0x831b507 _Z14plugin_foreachP3THDPFcS0_P13st_plugin_intPvEiS3_ + 235
0x829e78b _Z16ha_drop_databasePc + 23
0x82acf5a _Z11mysql_rm_dbP3THDPcbb + 434
0x81ec3e4 _Z21mysql_execute_commandP3THD + 14504
0x81f0aef _Z11mysql_parseP3THDPcj + 535
0x81f134c _Z16dispatch_command19enum_server_commandP3THDPcj + 1862
0x81f248e _Z10do_commandP3THD + 260
0x81f2845 handle_one_connection + 725
0xa25b80 (?)
0x97d9ce (?)

mysql> drop database dbt2;
ERROR 2013 (HY000): Lost connection to MySQL server during query

How to repeat:
./mysql_load_db.sh -d dbt2 -f . -m ORIG -s /tmp/mysql.sock -h ndb08 -u root  -e NDBMIX -g LOG -t ts2 -j 5 -b 5

./mysql_load_db.sh -d dbt2 -f . -m ORIG -s /tmp/mysql.sock -h ndb08 -u root  -e NDBMIX -g LOG -t ts2 -n -x 

mysql> drop database dbt2;
ERROR 2013 (HY000): Lost connection to MySQL server during query
[6 Apr 2006 15:36] Jonathan Miller
Note: This corrupts the database:
mysql> drop database dbt2;
ERROR 1008 (HY000): Can't drop database 'dbt2'; database doesn't exist

./mysql_load_db.sh -d dbt2 -f . -m ORIG -s /tmp/mysql.sock -h ndb08 -u root  -e NDBMIX -g LOG -t ts2 -n -x

Loading of DBT2 dataset located in . to database dbt2.

DB_ENGINE:      NDBMIX
DB_SCHEME:      ORIG
DB_HOST:        ndb08
DB_USER:        root
DB_SOCKET:      /tmp/mysql.sock

Creating table
Creating table
ERROR 1050 (42S01) at line 1: Table 'customer' already exists
ERROR: rc=1
SCRIPT INTERRUPTED
[6 Apr 2006 15:41] Jonathan Miller
I have not been able to reproduced
[7 Apr 2006 7:05] Jonas Oreland
Hi,

I changed title, as this 99% sure does not have anything to do with DD.
Rather with replication...
Did you have multiple mysqld ?
Did you use binlog/cluster replication?
[7 Apr 2006 11:34] Jonathan Miller
Hi,

Did you have multiple mysqld ? No, only one

Did you use binlog/cluster replication? No

[mysqld]
server-id=1
#log-bin    = /space/var/master1
log        = /space/var/master1.log
log-error  = /space/var/master1.err
socket     = /tmp/mysql.sock
port       = 3306
pid-file   = /space/var/hostname.pid1
datadir    = /space/var/
language   = /home/ndbdev/jmiller/builds/share/mysql/english/
#user      = root
ndbcluster                      # run NDB engine
ndb-connectstring=HOST08:14000  # location of MGM node

[DB DEFAULT]
NoOfReplicas: 2
IndexMemory: 500M
DataMemory: 1300M
BackupMemory: 64M
MaxNoOfLocalOperations: 30000
MaxNoOfTables: 200
StopOnError: 1
MaxNoOfConcurrentScans: 100
DataDir: /space/run
#DiskPageBufferMemory: 500M
DiskPageBufferMemory: 4M
MaxNoOfConcurrentOperations: 30000
NoOfFragmentLogFiles: 50

[MGM DEFAULT]
PortNumber: 14000
DataDir: /space/run

[TCP DEFAULT]
SendBufferMemory: 10485760

[ndb_mgmd]
Id: 1
HostName: ndb08
ArbitrationRank: 1

[ndbd]
Id: 2
HostName: ndb08
FileSystemPath: /space/run

[ndbd]
Id: 3
HostName: ndb08
FileSystemPath: /space/run

[mysqld]
Id: 6
HostName: ndb08

[mysqld]
Id: 7

[mysqld]
Id: 8

[mysqld]
Id: 9

[mysqld]
Id: 10

[mysqld]
Id: 11

[mysqld]
Id: 12

[mysqld]
Id: 13

[mysqld]
Id: 14
[19 May 2006 8:17] Jonas Oreland
This has most likely been fixed with tomas changes to handler dictionary handling.
please retest
[19 Jun 2006 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[13 Jul 2006 23:33] Jonathan Miller
I have retested this. No longer an issues.