Bug #60484 Crash when renaming tables to other database if it contains BLOBs
Submitted: 16 Mar 2011 1:55 Modified: 13 May 2011 11:42
Reporter: Mikiya Okuno Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:7.1.10 OS:Any
Assigned to: Jonas Oreland CPU Architecture:Any

[16 Mar 2011 1:55] Mikiya Okuno
Description:
If a table contains BLOB/TEXT, it cannot be moved to another database. Renaming within the same database is okay. If we attempt to move it to another database, the SQL node crashes and the table become unaccessible!

How to repeat:
shell> mysql test

mysql> create table t1 (a int primary key, b blob) engine ndb;
Query OK, 0 rows affected (1.47 sec)

mysql> rename table t1 to t2;
Query OK, 0 rows affected (0.74 sec)

mysql> create database test2;
Query OK, 1 row affected (0.10 sec)

mysql> rename table t2 to test2.t2;
ERROR 2013 (HY000): Lost connection to MySQL server during query

Suggested fix:
n/a
[16 Mar 2011 1:58] MySQL Verification Team
The table is unaccessible even after restart of the SQL node or the entire cluster.
[16 Mar 2011 2:20] MySQL Verification Team
BLOB table remains in the original table like below:

ndb_show_tables -c localhost:4000
id    type                 state    logging database     schema   name
1     0                    Online   -                             DEFAULT-HASHMAP-240-2
3     SystemTable          Online   Yes     sys          def      NDB$EVENTS_0
5     UserTable            Online   Yes     mysql        def      NDB$BLOB_4_3
9     OrderedIndex         Online   No      sys          def      PRIMARY
7     UserTable            Online   Yes     test2        def      t
2     SystemTable          Online   Yes     sys          def      SYSTAB_0
4     UserTable            Online   Yes     mysql        def      ndb_schema
6     UserTable            Online   Yes     mysql        def      ndb_apply_status
8     UserTable            Online   Yes     test         def      NDB$BLOB_7_1
0     IndexTrigger         Online   -                             NDB$INDEX_9_CUSTOM
1     TableEvent           Online   -                             REPL$mysql/ndb_schema
2     TableEvent           Online   -                             NDB$BLOBEVENT_REPL$mysql/ndb_schema_3
3     TableEvent           Online   -                             REPL$mysql/ndb_apply_status

NDBT_ProgramExit: 0 - OK
[11 May 2011 11:40] Jonas Oreland
http://lists.mysql.com/commits/137054
[12 May 2011 16:21] Jonas Oreland
pushed to 7.0.25 and 7.1.14
[13 May 2011 11:42] Jon Stephens
Documented bugfix in the NDB-7.0.25 and 7.1.14 changelogs as follows:

        Renaming a table having BLOB or TEXT columns (or both) to
        another database caused the SQL node to crash, and the table to
        become inaccessible afterwards.

Closed.