Bug #44022 CREATE TABLE sometimes fails silently for IBMDB2I engine
Submitted: 1 Apr 2009 19:52 Modified: 14 Jul 2009 15:05
Reporter: Tim Clark Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DB2SE for IBM i Severity:S3 (Non-critical)
Version:5.1 OS:Other (IBM i)
Assigned to: Tim Clark CPU Architecture:Any
Tags: CREATE TABLE, fails

[1 Apr 2009 19:52] Tim Clark
Description:
In some circumstances, when a table is created with the IBMDB2I engine, the CREATE TABLE statement will return successfully but the table will not exist.

How to repeat:
This recreate requires a system which has its DB2 catalogs in CCSID 297. (The CREATE fails because of a different problem involving the OS support and CCSID 297.)

CREATE TABLE `#t1` (i int) engine=ibmdb2i;
Query OK, 0 rows affected (0 min 0.24 sec)

select * from `#t1`;                                   
ERROR 1146 (42S02): Table 'DB2IMYSQL.#t1' doesn't exist

Suggested fix:
The CREATE should fail and report an error to the user.
[10 Apr 2009 7:31] 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/commits/71849

2868 Narayanan V	2009-04-10
      Bug#44022 CREATE TABLE sometimes fails silently for IBMDB2I engine
      
      In some circumstances, when a table is created with
      the IBMDB2I engine, the CREATE TABLE statement will
      return successfully but the table will not exist.
      
      The current patch addresses the above issue and causes
      CREATE to fail and report and error to the user.
     @ storage/ibmdb2i/ha_ibmdb2i.cc
        Locally declared return code hid function-
        scoped declaration and went out of scope
        before being returned. Removed inner
        declaration.
[5 May 2009 19:40] Bugs System
Pushed into 5.1.35 (revid:davi.arnaut@sun.com-20090505190206-9xmh7dlc6kom8exp) (version source revid:davi.arnaut@sun.com-20090505190206-9xmh7dlc6kom8exp) (merge vers: 5.1.35) (pib:6)
[6 May 2009 14:11] Bugs System
Pushed into 6.0.12-alpha (revid:svoj@sun.com-20090506125450-yokcmvqf2g7jhujq) (version source revid:chad@mysql.com-20090413143011-ln9yuyfzrrwzh4vg) (merge vers: 6.0.11-alpha) (pib:6)
[15 Jun 2009 8:26] Bugs System
Pushed into 5.1.35-ndb-6.3.26 (revid:jonas@mysql.com-20090615074202-0r5r2jmi83tww6sf) (version source revid:jonas@mysql.com-20090615070837-9pccutgc7repvb4d) (merge vers: 5.1.35-ndb-6.3.26) (pib:6)
[15 Jun 2009 9:06] Bugs System
Pushed into 5.1.35-ndb-7.0.7 (revid:jonas@mysql.com-20090615074335-9hcltksp5cu5fucn) (version source revid:jonas@mysql.com-20090615072714-rmfkvrbbipd9r32c) (merge vers: 5.1.35-ndb-7.0.7) (pib:6)
[15 Jun 2009 9:46] Bugs System
Pushed into 5.1.35-ndb-6.2.19 (revid:jonas@mysql.com-20090615061520-sq7ds4yw299ggugm) (version source revid:jonas@mysql.com-20090615054654-ebgpz7elwu1xj36j) (merge vers: 5.1.35-ndb-6.2.19) (pib:6)
[14 Jul 2009 15:05] MC Brown
A note has been added to the 5.1.35, 6.0.12, 5.1.35-ndb-6.3.26, 5.1.35-ndb-7.0.7, 5/1/35-ndb-6.2.19 and 5.4.4 changelogs: 

In some circumstances, when a table is created with the IBMDB2I engine, the CREATE TABLE statement will return successfully but the table will not exist.
[12 Aug 2009 22:36] Paul DuBois
Noted in 5.4.2 changelog because next 5.4 version will be 5.4.2 and not 5.4.4.
[15 Aug 2009 1:54] Paul DuBois
Ignore previous comment about 5.4.2.
[7 Oct 2009 20:26] Paul DuBois
The 5.4 fix has been pushed to 5.4.2.