summaryrefslogtreecommitdiff
path: root/mysql-test/suite/parts/inc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-05-02 20:58:45 +0300
committerMichael Widenius <monty@askmonty.org>2011-05-02 20:58:45 +0300
commite415ba0fb2c57eaf370e84a3a9c8d831f820a560 (patch)
treef113a8024de4ee4f1bc19aae98c19a2835f5b4e7 /mysql-test/suite/parts/inc
parent046418ad956c98c3788d79650fcb50479844df3b (diff)
parenta1f7ceb281f9d87c9baea125ebab26f99a0370f8 (diff)
downloadmariadb-git-e415ba0fb2c57eaf370e84a3a9c8d831f820a560.tar.gz
Merge with MySQL 5.1.57/58
Moved some BSD string functions from Unireg
Diffstat (limited to 'mysql-test/suite/parts/inc')
-rw-r--r--mysql-test/suite/parts/inc/partition_check_drop.inc2
-rw-r--r--mysql-test/suite/parts/inc/partition_layout_check1.inc13
-rw-r--r--mysql-test/suite/parts/inc/partition_layout_check2.inc7
3 files changed, 9 insertions, 13 deletions
diff --git a/mysql-test/suite/parts/inc/partition_check_drop.inc b/mysql-test/suite/parts/inc/partition_check_drop.inc
index cd4a4cfe2f5..517e13bb1c3 100644
--- a/mysql-test/suite/parts/inc/partition_check_drop.inc
+++ b/mysql-test/suite/parts/inc/partition_check_drop.inc
@@ -69,7 +69,7 @@ if ($found_garbage)
--remove_files_wildcard $MYSQLD_DATADIR/test t1*
if ($with_directories)
{
- --remove_files_wildcard $MYSQLD_DATADIR/test/tmp t1*
+ --remove_files_wildcard $MYSQLTEST_VARDIR/tmp t1*
}
}
--enable_query_log
diff --git a/mysql-test/suite/parts/inc/partition_layout_check1.inc b/mysql-test/suite/parts/inc/partition_layout_check1.inc
index bca41b6f9c7..66a93d5d8d7 100644
--- a/mysql-test/suite/parts/inc/partition_layout_check1.inc
+++ b/mysql-test/suite/parts/inc/partition_layout_check1.inc
@@ -29,14 +29,10 @@ DELETE FROM t0_definition;
let $MYSQLD_DATADIR= `select LEFT(@@datadir, LENGTH(@@datadir)-1)`;
#echo MYSQLD_DATADIR: $MYSQLD_DATADIR;
-# Dump the current definition of the table t1 to tmp1
-# This complicated method - let another mysqltest collect the output - is used
-# because of two reasons
+# Save the current definition of the table t1
# - SHOW CREATE TABLE t1 is at least currently most probably more reliable than
# the corresponding SELECT on the INFORMATION_SCHEMA
-# - SHOW CREATE TABLE .. cannot write its out put into a file like SELECT
-let $show_file= $MYSQLD_DATADIR/test/tmp1;
---exec echo "SHOW CREATE TABLE t1; exit; " | $MYSQL_TEST > $show_file 2>&1
+let $show_create= `SHOW CREATE TABLE t1`;
if ($do_file_tests)
{
# List the files belonging to the table t1
@@ -57,12 +53,13 @@ if (!$do_file_tests)
# Insert the current definition of the table t1 into t0_definition
eval INSERT INTO t0_definition SET state = 'old',
- create_command = load_file('$show_file'),
+ create_command = "$show_create",
file_list = @aux;
# Print the create table statement into the protocol
+# Added the concat to avoid changing the result files
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR '\r' ''
-SELECT create_command FROM t0_definition WHERE state = 'old';
+SELECT concat('SHOW CREATE TABLE t1;\nTable\tCreate Table\n',create_command,'\n') as `create_command` FROM t0_definition WHERE state = 'old';
if ($do_file_tests)
{
# We stored the list of files, therefore printing the content makes sense
diff --git a/mysql-test/suite/parts/inc/partition_layout_check2.inc b/mysql-test/suite/parts/inc/partition_layout_check2.inc
index 7ff871a4c45..2f74455a811 100644
--- a/mysql-test/suite/parts/inc/partition_layout_check2.inc
+++ b/mysql-test/suite/parts/inc/partition_layout_check2.inc
@@ -28,9 +28,8 @@ DELETE FROM t0_definition WHERE state = 'new';
let $MYSQLD_DATADIR= `select LEFT(@@datadir, LENGTH(@@datadir)-1)`;
#echo MYSQLD_DATADIR: $MYSQLD_DATADIR;
-# Dump the current definition of the table t1 to tmp1
-let $show_file= $MYSQLD_DATADIR/test/tmp1;
---exec echo "SHOW CREATE TABLE t1; exit; " | $MYSQL_TEST > $show_file 2>&1
+# Save the current definition of the table t1
+let $show_create= `SHOW CREATE TABLE t1`;
if ($do_file_tests)
{
@@ -52,7 +51,7 @@ if (!$do_file_tests)
# Insert the current definition of the table t1 into t0_definition
eval INSERT INTO t0_definition SET state = 'new',
- create_command = load_file('$show_file'),
+ create_command = "$show_create",
file_list = @aux;
# Print the old and new table layout, if they differ