• Magne Mahre's avatar
    Bug#39277 - symlink.test fails on Debian · a94150cd
    Magne Mahre authored
          
    When the data directory contained a symbolic link to another
    file system, and the DATA or INDEX DIRECTORY clause of a
    CREATE TABLE statement referred to a subdirectory of the data
    directory, this was accepted.
          
    The problem was the use of a table file path name, which included
    the table name without an extension, for the comparison against
    the data directory path name. This was almost always a
    non-existent file. The internal algorithm failed to resolve
    symbolic links for non-existent files. So we compared unrelated
    path names.
          
    Fixed by truncating the table name from the path before resolving
    symlinks. If this is also a non-existent path, the creation of
    the table will fail anyway.
    
    Backport to 5.6.0.    6.0-codebase revid: 2599.60.1
    a94150cd
sql_table.cc 253 KB