Bug #9318 drop database does not drop ndb tables
Submitted: 21 Mar 2005 16:27 Modified: 22 Apr 2005 18:38
Reporter: Tomas Ulin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:5.0 (and probably 4.1) OS:Any (any)
Assigned to: Martin Skold CPU Architecture:Any

[21 Mar 2005 16:27] Tomas Ulin
Description:
-- source include/have_ndb.inc
-- source include/have_multi_ndb.inc

--disable_warnings
connection server1;
drop table if exists t1;
drop database if exists mysqltest;
connection server2;
drop table if exists t1;
drop database if exists mysqltest;
--enable_warnings

connection server1;
create database mysqltest;

connection server2;
create database mysqltest;
create table mysqltest.t1 (a int primary key, b int) engine=ndb;

connection server1;
drop database mysqltest;
create table mysqltest.t1 (c int, d int primary key) engine=ndb;

--fails

How to repeat:
-- source include/have_ndb.inc
-- source include/have_multi_ndb.inc

--disable_warnings
connection server1;
drop table if exists t1;
drop database if exists mysqltest;
connection server2;
drop table if exists t1;
drop database if exists mysqltest;
--enable_warnings

connection server1;
create database mysqltest;

connection server2;
create database mysqltest;
create table mysqltest.t1 (a int primary key, b int) engine=ndb;

connection server1;
drop database mysqltest;
create table mysqltest.t1 (c int, d int primary key) engine=ndb;

--fails

Suggested fix:
workaround is to always do 
use mysqltest;
show tables;

before dropping the database, to allow table discovery to trigger
[24 Mar 2005 4:20] Jorge del Conde
Verified w/4.1.11 from bk
[22 Apr 2005 13:30] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/24229