Bug #51384 Test bug46760 fails on embedded/Windows
Submitted: 22 Feb 2010 11:35 Modified: 21 Jul 2010 19:15
Reporter: Vladislav Vaintroub Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: Vladislav Vaintroub CPU Architecture:Any

[22 Feb 2010 11:35] Vladislav Vaintroub
Description:
In mysql-6.0-codebase-cmake, the only repo that can build embedded on Windows at the moment, test bug46760 fails.

Some info: 
- The test uses innodb-file-per-table. 
- In embedded (only), when creating tables full paths are passed to the handlers.
- ha_innobase:create() checks for full paths on Windows and returns generic error (comment says something about symbolic links on Windows are not supported).

This is how it works in 6.0-codebase based repos.
In next-mr repos the check is slightly different and allows full paths if mysqld_embedded is set. So, this error does not occur in next-mr

How to repeat:
perl mysql-test-run.pl bug46760

Suggested fix:
Do the same check as in mysql-next-mr:

=== modified file 'storage/innobase/handler/ha_innodb.cc'
--- storage/innobase/handler/ha_innodb.cc       2010-02-06 16:22:27 +0000
+++ storage/innobase/handler/ha_innodb.cc       2010-02-22 09:45:29 +0000
@@ -5296,6 +5296,7 @@
        table. Currently InnoDB does not support symbolic link on Windows. */

        if (srv_file_per_table
+           && !mysqld_embedded
            && (!create_info->options & HA_LEX_CREATE_TMP_TABLE)) {

                if ((name[1] == ':')
[22 Feb 2010 11:57] 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/101050

3767 Vladislav Vaintroub	2010-02-22
      Bug #51384 : innodb-file-per-table does not work in embedded
      Reason: embedded server passes full paths to the tables to 
      ha_innobase::create().
      
      ha_innobase::create() contains checks for fullpath/file-per-table
      combinations on Windows, wrongly decides we want to create a 
      symbolic link, returns generic error.
      
      Fix: allow full paths for embedded in ha_innobase::create() 
      as already in place in next-mr based repositories.
     @ storage/innobase/handler/ha_innodb.cc
        Bug #51384 : innodb-file-per-table does not work in embedded
        Reason: embedded server passes full paths to the tables to ha_innobase::create()
        ha_innobase::create contains checks for full paths /file-per-table combinations
        ,wrongly decides we want to create a symbolic link, returns error.
        Fix:  allow full paths for embedded in ha_innobase::create() as already done in 
        next-mr-based repos.
[25 Feb 2010 19:46] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100225194420-p60r4u90tszj8q2x) (version source revid:vvaintroub@mysql.com-20100223141647-0t1a0miwxq8z7kbz) (merge vers: 6.0.14-alpha) (pib:16)
[25 Feb 2010 20:47] Paul DuBois
Noted in 6.0.14 changelog.

In the embedded server with innodb_file_per_table enabled, InnoDB
rejected full path names to tables.

Setting report to Need Merge pending push of Celosia to release tree.
[21 Jul 2010 19:15] Vladislav Vaintroub
Was fixed long ago, available in 5.4+ repos