Description:
Mysqld will crash after drop a table with constraint violation.
How to repeat:
mysql> create table t (a int primary key ,b int) engine=ndb;
Query OK, 0 rows affected (0.76 sec)
mysql> insert into t values(1,12);
Query OK, 1 row affected (0.02 sec)
mysql> insert into t values(2,12);
Query OK, 1 row affected (0.00 sec)
mysql> alter table t add unique key ui_t(b);
ERROR 1169 (23000): Can't write, because of unique constraint, to table 't'
mysql>
mysql> drop table t;
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
[bug26043]$ ./storage/ndb/src/mgmclient/ndb_mgm -c localhost:9311 -e show
Connected to Management Server at: localhost:9311
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=1 @127.0.0.1 (mysql-5.1.23 ndb-6.4.0, Nodegroup: 0, Master)
id=2 @127.0.0.1 (mysql-5.1.23 ndb-6.4.0, Nodegroup: 0)
[ndb_mgmd(MGM)] 1 node(s)
id=3 @127.0.0.1 (mysql-5.1.23 ndb-6.4.0)
[mysqld(API)] 12 node(s)
id=4 @127.0.0.1 (mysql-5.1.23 ndb-6.4.0)
id=5 @127.0.0.1 (mysql-5.1.23 ndb-6.4.0)
id=6 @127.0.0.1 (mysql-5.1.23 ndb-6.4.0)
id=7 @127.0.0.1 (mysql-5.1.23 ndb-6.4.0)
id=8 @127.0.0.1 (mysql-5.1.23 ndb-6.4.0)
id=9 @127.0.0.1 (mysql-5.1.23 ndb-6.4.0)
id=10 (not connected, accepting connect from any host)
id=63 (not connected, accepting connect from any host)
id=127 (not connected, accepting connect from any host)
id=192 (not connected, accepting connect from any host)
id=228 (not connected, accepting connect from any host)
id=255 (not connected, accepting connect from any host)
[bug26043]$ ./storage/ndb/src/mgmclient/ndb_mgm -c localhost:9311 -e show
Connected to Management Server at: localhost:9311
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=1 @127.0.0.1 (mysql-5.1.23 ndb-6.4.0, Nodegroup: 0, Master)
id=2 @127.0.0.1 (mysql-5.1.23 ndb-6.4.0, Nodegroup: 0)
[ndb_mgmd(MGM)] 1 node(s)
id=3 @127.0.0.1 (mysql-5.1.23 ndb-6.4.0)
[mysqld(API)] 12 node(s)
id=4 (not connected, accepting connect from any host)
id=5 (not connected, accepting connect from any host)
id=6 (not connected, accepting connect from any host)
id=7 @127.0.0.1 (mysql-5.1.23 ndb-6.4.0)
id=8 @127.0.0.1 (mysql-5.1.23 ndb-6.4.0)
id=9 @127.0.0.1 (mysql-5.1.23 ndb-6.4.0)
id=10 (not connected, accepting connect from any host)
id=63 (not connected, accepting connect from any host)
id=127 (not connected, accepting connect from any host)
id=192 (not connected, accepting connect from any host)
id=228 (not connected, accepting connect from any host)
id=255 (not connected, accepting connect from any host)