From 43b4b044f7a8a47fabc142be280c0a5883826180 Mon Sep 17 00:00:00 2001 From: "tsmith@quadxeon.mysql.com" <> Date: Wed, 25 Apr 2007 20:21:55 +0200 Subject: [PATCH 1/2] Fix for valgrind errors in test: require symlink support for partition_not_windows.test --- mysql-test/include/have_symlink.inc | 10 ++++++++++ mysql-test/t/partition_mgm_err2.test | 11 +++-------- mysql-test/t/partition_not_windows.test | 2 ++ mysql-test/t/symlink.test | 6 +----- sql/mysqld.cc | 10 +++++----- 5 files changed, 21 insertions(+), 18 deletions(-) create mode 100644 mysql-test/include/have_symlink.inc diff --git a/mysql-test/include/have_symlink.inc b/mysql-test/include/have_symlink.inc new file mode 100644 index 00000000000..11060536b0d --- /dev/null +++ b/mysql-test/include/have_symlink.inc @@ -0,0 +1,10 @@ +# Several partition-related tests include this file, because Valgrind/Purify +# builds disable symlink support; some partition functionality depends on +# symlink support, and so does not test correctly under valgrind. See the +# comment in mysqld.cc for the --symbolic-links option. + +-- require r/have_symlink.require + +disable_query_log; +show variables like "have_symlink"; +enable_query_log; diff --git a/mysql-test/t/partition_mgm_err2.test b/mysql-test/t/partition_mgm_err2.test index 925178a720d..f683ec6277e 100644 --- a/mysql-test/t/partition_mgm_err2.test +++ b/mysql-test/t/partition_mgm_err2.test @@ -1,18 +1,13 @@ # # Test of partitions that require symlinks # --- source include/have_partition.inc +--source include/have_partition.inc +--source include/have_symlink.inc # # This test is disabled on windows due to BUG#19107 # --- source include/not_windows.inc --- require r/have_symlink.require - -disable_query_log; -show variables like "have_symlink"; -enable_query_log; - +--source include/not_windows.inc # # BUG: 14354 Partitions: data directory clause fails # diff --git a/mysql-test/t/partition_not_windows.test b/mysql-test/t/partition_not_windows.test index 27f76eb4279..22bede08d54 100644 --- a/mysql-test/t/partition_not_windows.test +++ b/mysql-test/t/partition_not_windows.test @@ -1,6 +1,8 @@ # Non-windows specific partition tests. --source include/not_windows.inc --source include/have_partition.inc +# SUBPARTITION depends on symlink support +--source include/have_symlink.inc # partition.test used to contained the following note: # This test is disabled on Windows due to BUG#19107 diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index d79b6905224..981206ca54c 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -1,8 +1,4 @@ --- require r/have_symlink.require -disable_query_log; -show variables like "have_symlink"; -enable_query_log; - +--source include/have_symlink.inc --source include/not_windows.inc --disable_warnings diff --git a/sql/mysqld.cc b/sql/mysqld.cc index b6b46524d3e..d6efebd32c4 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -5872,6 +5872,11 @@ log and this option does nothing anymore.", #endif {"symbolic-links", 's', "Enable symbolic link support.", (gptr*) &my_use_symdir, (gptr*) &my_use_symdir, 0, GET_BOOL, NO_ARG, + /* + The system call realpath() produces warnings under valgrind and + purify. These are not suppressed: instead we disable symlinks + option if compiled with valgrind support. + */ IF_PURIFY(0,1), 0, 0, 0, 0, 0}, {"sysdate-is-now", OPT_SYSDATE_IS_NOW, "Non-default option to alias SYSDATE() to NOW() to make it safe-replicable. Since 5.0, SYSDATE() returns a `dynamic' value different for different invocations, even within the same statement.", @@ -5904,11 +5909,6 @@ log and this option does nothing anymore.", 0, 0, 0, 0, 0}, {"use-symbolic-links", 's', "Enable symbolic link support. Deprecated option; use --symbolic-links instead.", (gptr*) &my_use_symdir, (gptr*) &my_use_symdir, 0, GET_BOOL, NO_ARG, - /* - The system call realpath() produces warnings under valgrind and - purify. These are not suppressed: instead we disable symlinks - option if compiled with valgrind support. - */ IF_PURIFY(0,1), 0, 0, 0, 0, 0}, {"user", 'u', "Run mysqld daemon as user.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, From c6f625bdbc0936ec9a72b3a5905513a4dea05e9b Mon Sep 17 00:00:00 2001 From: "tsmith@quadxeon.mysql.com" <> Date: Wed, 25 Apr 2007 22:55:19 +0200 Subject: [PATCH 2/2] Add --symbolic-links=1 for partition_not_windows-master.opt. --- mysql-test/t/partition_not_windows-master.opt | 1 + mysql-test/t/partition_not_windows.test | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 mysql-test/t/partition_not_windows-master.opt diff --git a/mysql-test/t/partition_not_windows-master.opt b/mysql-test/t/partition_not_windows-master.opt new file mode 100644 index 00000000000..b1392bfd485 --- /dev/null +++ b/mysql-test/t/partition_not_windows-master.opt @@ -0,0 +1 @@ +--symbolic-links=1 diff --git a/mysql-test/t/partition_not_windows.test b/mysql-test/t/partition_not_windows.test index 22bede08d54..012b8b50dee 100644 --- a/mysql-test/t/partition_not_windows.test +++ b/mysql-test/t/partition_not_windows.test @@ -1,13 +1,11 @@ # Non-windows specific partition tests. --source include/not_windows.inc --source include/have_partition.inc -# SUBPARTITION depends on symlink support +# DATA DIRECTORY/INDEX DIRECTORY require symbolic link support --source include/have_symlink.inc -# partition.test used to contained the following note: -# This test is disabled on Windows due to BUG#19107 -# All tests passed on Windows except the following which should be moved into -# partition.test once the bug has been resolved. +# The test for Bug 20770 is disabled on Windows due to BUG#19107; it +# should be moved into partition.test once the bug has been resolved. # # Bug 20770 Partitions: DATA DIRECTORY clause change in reorganize