Bug #42383 main.innodb_bug39438: Can't create table 'test.bug39438'
Submitted: 27 Jan 2009 17:13 Modified: 19 Jun 2010 17:50
Reporter: Luis Manuel Oliveira Soares Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:5.1-rpl, 6.0-rpl, 5.1.31 OS:Microsoft Windows
Assigned to: Satya B CPU Architecture:Any
Tags: CREATE TABLE, disabled, embedded, windows

[27 Jan 2009 17:13] Luis Manuel Oliveira Soares
Description:
This test fails on pushbuild with the following message:

main.innodb_bug39438                     [ fail ]
        Test ended at 2009-01-26 19:10:11

CURRENT_TEST: main.innodb_bug39438
InnoDB: The first specified data file e:\pb\bzr_mysql-6.0-rpl\154\mysql-6.0.10-alpha-pb154\mysql-test\var-embedded-7\mysqld.1\data\ibdata1 did not exist:
InnoDB: a new database to be created!
090126 19:10:08  InnoDB: Setting file e:\pb\bzr_mysql-6.0-rpl\154\mysql-6.0.10-alpha-pb154\mysql-test\var-embedded-7\mysqld.1\data\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
090126 19:10:08  InnoDB: Log file e:\pb\bzr_mysql-6.0-rpl\154\mysql-6.0.10-alpha-pb154\mysql-test\var-embedded-7\mysqld.1\data\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file e:\pb\bzr_mysql-6.0-rpl\154\mysql-6.0.10-alpha-pb154\mysql-test\var-embedded-7\mysqld.1\data\ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
090126 19:10:08  InnoDB: Log file e:\pb\bzr_mysql-6.0-rpl\154\mysql-6.0.10-alpha-pb154\mysql-test\var-embedded-7\mysqld.1\data\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file e:\pb\bzr_mysql-6.0-rpl\154\mysql-6.0.10-alpha-pb154\mysql-test\var-embedded-7\mysqld.1\data\ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
mysqltest: At line 20: query 'CREATE TABLE bug39438 (id INT) ENGINE=INNODB' failed: 1005: Can't create table 'test.bug39438' (errno: 168)

The result from queries just before the failure was:
SET storage_engine=InnoDB;

How to repeat:
5.1-rpl:

https://intranet.mysql.com/secure/pushbuild/showpush.pl?dir=bzr_mysql-5.1-rpl&order=120

'win2003-x86' -max-nt: embedded
'vm-win2003-32-a' Win32 VS2003 -max-nt: embedded

6.0-rpl:

https://intranet.mysql.com/secure/pushbuild/showpush.pl?dir=bzr_mysql-6.0-rpl&order=154

'vm-win2003-32-a' Win32 VS2003 -max-nt:	embedded
'vm-win2003-64-b' Win64 VS2005 -max-nt: embedded

http://tinyurl.com/cguo6w
[28 Jan 2009 10:30] Magnus Blåudd
This problem occurs only with embedded server on windows. The embedded tests are not run on windows in 5.1 nor 5.1-bugteam and thus that problem has not been detected until it made it into 5.1-rpl. Disabling the test until it works also on windows with embedded server.

Not critical since the server does not crash but simple throws an "Can't create table error"
[28 Jan 2009 10:31] Magnus Blåudd
This is obviously somewhat related to bug#39438
[28 Jan 2009 17:28] Mikhail Izioumtchenko
Calvin is working on it at the moment
[28 Jan 2009 17:40] Calvin Sun
Please provide steps on how to reproduce the failure. Why it failed only on rpl trees?

We can not access any info that is inside of MySQL intranet.
[3 Feb 2009 11:09] Sveta Smirnova
Calvin,

this test fails not only wit *-rpl trees, but with current 5.1.31 as well.

How to repeat:

1. Download MySQL-5.1.31 sources, unpack them into a directory name of which does not contain spaces.
2. Follow instructions given in the comment "[17 Aug 2006 5:09] Miguel Solorzano" of the bug #20907 with single exception: add WITH_EMBEDDED_SERVER to the configure line to compile the server
3. cd MySQL-5.1.31-DIRECTORY/mysql-test
4. Run mysql-test-run.pl --embedded innodb_bug39438
[3 Feb 2009 11:14] Sveta Smirnova
C:\MySQL\mysql-5.1.31\mysql-test>cat var\run\master.err
InnoDB: The first specified data file C:\MySQL\mysql-5.1.31\mysql-test\var\maste
r-data\ibdata1 did not exist:
InnoDB: a new database to be created!
090203 14:12:51  InnoDB: Setting file C:\MySQL\mysql-5.1.31\mysql-test\var\maste
r-data\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
090203 14:12:53  InnoDB: Log file C:\MySQL\mysql-5.1.31\mysql-test\var\master-da
ta\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file C:\MySQL\mysql-5.1.31\mysql-test\var\master-data\ib_log
file0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
090203 14:12:53  InnoDB: Log file C:\MySQL\mysql-5.1.31\mysql-test\var\master-da
ta\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file C:\MySQL\mysql-5.1.31\mysql-test\var\master-data\ib_log
file1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
mysqltest: At line 20: query 'CREATE TABLE bug39438 (id INT) ENGINE=INNODB' fail
ed: 1005: Can't create table 'test.bug39438' (errno: 168)

The result from queries just before the failure was:
SET storage_engine=InnoDB;

More results from queries before failure can be found in C:\MySQL\mysql-5.1.31\m
ysql-test\var\log\innodb_bug39438.log
[3 Feb 2009 11:20] Sveta Smirnova
$cat -n t/innodb_bug39438.test 
     1  #
     2  # Bug#39438 Testcase for Bug#39436 crashes on 5.1 in fil_space_get_latch
     3  # http://bugs.mysql.com/39438
     4  #
     5  # This test must be run with innodb_file_per_table=1 because the crash
     6  # only occurs if that option is turned on and DISCARD TABLESPACE only
     7  # works with innodb_file_per_table.
     8  #
     9
    10  -- source include/have_innodb.inc
    11
    12  SET storage_engine=InnoDB;
    13
    14  # we care only that the following SQL commands do not crash the server
    15  -- disable_query_log
    16  -- disable_result_log
    17
    18  DROP TABLE IF EXISTS bug39438;
    19
    20  CREATE TABLE bug39438 (id INT) ENGINE=INNODB;
    21
    22  ALTER TABLE bug39438 DISCARD TABLESPACE;
    23
    24  # this crashes the server if the bug is present
    25  SHOW TABLE STATUS;
    26
    27  DROP TABLE bug39438;

So bug is about just CREATE TABLE fails in embedded mode.
[3 Feb 2009 11:21] Sveta Smirnova
Options file contains:

$cat t/innodb_bug39438-master.opt 
--innodb-file-per-table=1

If remove this option test fails at the next line:  ALTER TABLE bug39438 DISCARD TABLESPACE;
[4 Nov 2009 9:24] Bugs System
Pushed into 5.1.41 (revid:joro@sun.com-20091104092152-qz96bzlf2o1japwc) (version source revid:kristofer.pettersson@sun.com-20091103162305-08l4gkeuif2ozsoj) (merge vers: 5.1.41) (pib:13)
[11 Nov 2009 6:48] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20091110093407-rw5g8dys2baqkt67) (version source revid:alik@sun.com-20091109080109-7dxapd5y5pxlu08w) (merge vers: 6.0.14-alpha) (pib:13)
[11 Nov 2009 6:56] Bugs System
Pushed into 5.5.0-beta (revid:alik@sun.com-20091109115615-nuohp02h8mdrz8m2) (version source revid:svoj@sun.com-20091105122958-jyqjx9xus8v4e0yd) (merge vers: 5.5.0-beta) (pib:13)
[12 Nov 2009 3:57] Paul Dubois
Noted in 5.1.41, 5.5.0, 6.0.14 changelogs.

For the embedded server on Windows, InnoDB crashed when
innodb_file_per_table was enabled and a table name was in full path
format.
[18 Dec 2009 10:37] Bugs System
Pushed into 5.1.41-ndb-7.1.0 (revid:jonas@mysql.com-20091218102229-64tk47xonu3dv6r6) (version source revid:jonas@mysql.com-20091218095730-26gwjidfsdw45dto) (merge vers: 5.1.41-ndb-7.1.0) (pib:15)
[18 Dec 2009 10:53] Bugs System
Pushed into 5.1.41-ndb-6.2.19 (revid:jonas@mysql.com-20091218100224-vtzr0fahhsuhjsmt) (version source revid:jonas@mysql.com-20091217101452-qwzyaig50w74xmye) (merge vers: 5.1.41-ndb-6.2.19) (pib:15)
[18 Dec 2009 11:08] Bugs System
Pushed into 5.1.41-ndb-6.3.31 (revid:jonas@mysql.com-20091218100616-75d9tek96o6ob6k0) (version source revid:jonas@mysql.com-20091217154335-290no45qdins5bwo) (merge vers: 5.1.41-ndb-6.3.31) (pib:15)
[18 Dec 2009 11:22] Bugs System
Pushed into 5.1.41-ndb-7.0.11 (revid:jonas@mysql.com-20091218101303-ga32mrnr15jsa606) (version source revid:jonas@mysql.com-20091218064304-ezreonykd9f4kelk) (merge vers: 5.1.41-ndb-7.0.11) (pib:15)
[5 May 2010 15:22] Bugs System
Pushed into 5.1.47 (revid:joro@sun.com-20100505145753-ivlt4hclbrjy8eye) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[6 May 2010 16:58] Paul Dubois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug.
Re-closing.
[28 May 2010 6:13] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100524190136-egaq7e8zgkwb9aqi) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (pib:16)
[28 May 2010 6:41] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100524190941-nuudpx60if25wsvx) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[28 May 2010 7:09] Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100524185725-c8k5q7v60i5nix3t) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[29 May 2010 22:36] Paul Dubois
Push resulted from incorporation of InnoDB tree. No changes pertinent to this bug.
Re-closing.
[15 Jun 2010 8:18] Bugs System
Pushed into 5.5.5-m3 (revid:alik@sun.com-20100615080459-smuswd9ooeywcxuc) (version source revid:mmakela@bk-internal.mysql.com-20100415070122-1nxji8ym4mao13ao) (merge vers: 5.1.47) (pib:16)
[15 Jun 2010 8:35] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100615080558-cw01bzdqr1bdmmec) (version source revid:mmakela@bk-internal.mysql.com-20100415070122-1nxji8ym4mao13ao) (pib:16)
[17 Jun 2010 12:19] Bugs System
Pushed into 5.1.47-ndb-7.0.16 (revid:martin.skold@mysql.com-20100617114014-bva0dy24yyd67697) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 13:07] Bugs System
Pushed into 5.1.47-ndb-6.2.19 (revid:martin.skold@mysql.com-20100617115448-idrbic6gbki37h1c) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 13:47] Bugs System
Pushed into 5.1.47-ndb-6.3.35 (revid:martin.skold@mysql.com-20100617114611-61aqbb52j752y116) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)