Bug #42383 main.innodb_bug39438: Can't create table 'test.bug39438'
Submitted: 27 Jan 18:13 Modified: 12 Nov 4:57
Reporter: Luís Soares
Status: Closed
Category:Server: InnoDB Severity:S2 (Serious)
Version:5.1-rpl, 6.0-rpl, 5.1.31 OS:Microsoft Windows
Assigned to: Satya B Target Version:5.1+
Tags: embedded, windows, CREATE TABLE, disabled
Triage: Triaged: D2 (Serious) / R2 (Low) / E2 (Low)

[27 Jan 18:13] Luís 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 11:30] Magnus Blaudd
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 11:31] Magnus Blaudd
This is obviously somewhat related to bug#39438
[28 Jan 18:28] Michael Izioumtchenko
Calvin is working on it at the moment
[28 Jan 18: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 12: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 12: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 12: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 12: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 10: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 7: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 7: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 4: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.