Skip to content
  • Terje Rosten's avatar
    ae38a4c7
    Bug#26328958 TEST FAILURE IN MAIN.BASEDIR WITH CUSTOM -DINSTALL_MYSQLSHAREDIR= · ae38a4c7
    Terje Rosten authored
    Background:
    
    Cmake creates ${cmake_binary_dir}/sql/share/ regardless of
    INSTALL_SHAREDIR setting, to "fix" this MTR sets --lc-messages-dir and
    --basedir options.
    
    mysqld in main.basedir runs without --basedir and --lc-messages-dir
    options and breaks due to mismatch between compiled-in install layout
    and sandbox layout.
    
    Solution:
    
    Make both source and build sandbox layout more identical to install
    layout by moving sql/share/ to share/, such that
    runtime_output_directory/ and share/ will have common parent
    (${cmake_binary_dir}) like in install layout.
    
    This make sense since WL#10441 as mysqld will find basedir and
    lc-messages-dir itself, if cmake creates share directory in
    ${cmake_binary_dir}/ according to -DINSTALL_MYSQLSHAREDIR, things
    would work out of box without options specified. This will work in
    build sandbox and after "make install". In other words mysqld basedir
    is moved from ${cmake_binary_dir}/sql/ to ${cmake_binary_dir}/ in
    sandbox.
    
    After change options --basedir and --lc-messages-dir can be removed
    from MTR runs, and special cases in mysqld.cc can be removed too.
    Search path "sql/share" is removed or adjusted.
    
    Tests fragments that don't have stable output any longer have been
    removed.
    
    Basedir option is used by MTR to find "itself" in sandbox mode, hence
    it can't be removed even if not used by mysqld. Variable is renamed
    to #mtr_basedir in generated my.cnf.
    
    Note:
    
    This means errmsg-utf8.txt is moved from sql/share to share/,
    take care when merging from older major versions.
    ae38a4c7
    Bug#26328958 TEST FAILURE IN MAIN.BASEDIR WITH CUSTOM -DINSTALL_MYSQLSHAREDIR=
    Terje Rosten authored
    Background:
    
    Cmake creates ${cmake_binary_dir}/sql/share/ regardless of
    INSTALL_SHAREDIR setting, to "fix" this MTR sets --lc-messages-dir and
    --basedir options.
    
    mysqld in main.basedir runs without --basedir and --lc-messages-dir
    options and breaks due to mismatch between compiled-in install layout
    and sandbox layout.
    
    Solution:
    
    Make both source and build sandbox layout more identical to install
    layout by moving sql/share/ to share/, such that
    runtime_output_directory/ and share/ will have common parent
    (${cmake_binary_dir}) like in install layout.
    
    This make sense since WL#10441 as mysqld will find basedir and
    lc-messages-dir itself, if cmake creates share directory in
    ${cmake_binary_dir}/ according to -DINSTALL_MYSQLSHAREDIR, things
    would work out of box without options specified. This will work in
    build sandbox and after "make install". In other words mysqld basedir
    is moved from ${cmake_binary_dir}/sql/ to ${cmake_binary_dir}/ in
    sandbox.
    
    After change options --basedir and --lc-messages-dir can be removed
    from MTR runs, and special cases in mysqld.cc can be removed too.
    Search path "sql/share" is removed or adjusted.
    
    Tests fragments that don't have stable output any longer have been
    removed.
    
    Basedir option is used by MTR to find "itself" in sandbox mode, hence
    it can't be removed even if not used by mysqld. Variable is renamed
    to #mtr_basedir in generated my.cnf.
    
    Note:
    
    This means errmsg-utf8.txt is moved from sql/share to share/,
    take care when merging from older major versions.
Loading