2007-02-06 13:35:54 +01:00
|
|
|
################################################################################
|
2007-11-20 16:04:07 +01:00
|
|
|
# inc/partition_layout_check1.inc #
|
2007-02-06 13:35:54 +01:00
|
|
|
# #
|
|
|
|
# Purpose: #
|
|
|
|
# Store the SHOW CREATE TABLE output and the list of files belonging to #
|
|
|
|
# this table + print this into the protocol #
|
|
|
|
# This script is only usefule when sourced within the partitioning tests. #
|
|
|
|
# #
|
2007-11-20 16:04:07 +01:00
|
|
|
# Attention: The routine inc/partition_layout_check2.inc is very similar #
|
2007-02-06 13:35:54 +01:00
|
|
|
# to this one. So if something has to be changed here it #
|
|
|
|
# might be necessary to do it also there #
|
|
|
|
# #
|
|
|
|
#------------------------------------------------------------------------------#
|
2007-11-20 16:04:07 +01:00
|
|
|
# Original Author: mleich #
|
2007-02-06 13:35:54 +01:00
|
|
|
# Original Date: 2006-03-05 #
|
2008-04-27 01:52:43 +02:00
|
|
|
# Change Author: pcrews #
|
|
|
|
# Change Date: 2008-04-15 #
|
|
|
|
# Change: Added --replace_result to account for Windows' use of '\r' #
|
2007-02-06 13:35:54 +01:00
|
|
|
################################################################################
|
|
|
|
|
|
|
|
if ($no_debug)
|
|
|
|
{
|
|
|
|
--disable_query_log
|
|
|
|
}
|
|
|
|
# Clean the table holding the definition of t1
|
|
|
|
DELETE FROM t0_definition;
|
|
|
|
|
2008-04-04 17:46:48 +02:00
|
|
|
# Get the MySQL Servers datadir without ending slash
|
|
|
|
let $MYSQLD_DATADIR= `select LEFT(@@datadir, LENGTH(@@datadir)-1)`;
|
|
|
|
#echo MYSQLD_DATADIR: $MYSQLD_DATADIR;
|
|
|
|
|
2011-01-18 23:55:39 +01:00
|
|
|
# Save the current definition of the table t1
|
2007-02-06 13:35:54 +01:00
|
|
|
# - SHOW CREATE TABLE t1 is at least currently most probably more reliable than
|
|
|
|
# the corresponding SELECT on the INFORMATION_SCHEMA
|
2011-01-18 23:55:39 +01:00
|
|
|
let $show_create= `SHOW CREATE TABLE t1`;
|
2007-02-06 13:35:54 +01:00
|
|
|
if ($do_file_tests)
|
|
|
|
{
|
2008-08-04 07:04:47 +02:00
|
|
|
# List the files belonging to the table t1
|
|
|
|
let $ls_file= $MYSQLD_DATADIR/test/tmp2;
|
|
|
|
--list_files_write_file $ls_file $MYSQLD_DATADIR/test t1*
|
|
|
|
--chmod 0644 $ls_file
|
|
|
|
if ($with_directories)
|
|
|
|
{
|
|
|
|
--list_files_append_file $ls_file $MYSQLTEST_VARDIR/mysql-test-data-dir t1*
|
|
|
|
--list_files_append_file $ls_file $MYSQLTEST_VARDIR/mysql-test-idx-dir t1*
|
|
|
|
}
|
|
|
|
eval SET @aux = load_file('$ls_file');
|
2011-04-26 11:35:17 +02:00
|
|
|
|
|
|
|
# clean up
|
|
|
|
--remove_file $ls_file
|
2007-02-06 13:35:54 +01:00
|
|
|
}
|
|
|
|
if (!$do_file_tests)
|
|
|
|
{
|
2008-08-04 07:04:47 +02:00
|
|
|
SET @aux = '--- not determined ---';
|
2007-02-06 13:35:54 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
# Insert the current definition of the table t1 into t0_definition
|
|
|
|
eval INSERT INTO t0_definition SET state = 'old',
|
2011-01-18 23:55:39 +01:00
|
|
|
create_command = "$show_create",
|
2008-04-27 01:52:43 +02:00
|
|
|
file_list = @aux;
|
2007-02-06 13:35:54 +01:00
|
|
|
|
|
|
|
# Print the create table statement into the protocol
|
2011-01-18 23:55:39 +01:00
|
|
|
# Added the concat to avoid changing the result files
|
2008-04-27 01:52:43 +02:00
|
|
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR '\r' ''
|
2011-01-18 23:55:39 +01:00
|
|
|
SELECT concat('SHOW CREATE TABLE t1;\nTable\tCreate Table\n',create_command,'\n') as `create_command` FROM t0_definition WHERE state = 'old';
|
2007-02-06 13:35:54 +01:00
|
|
|
if ($do_file_tests)
|
|
|
|
{
|
|
|
|
# We stored the list of files, therefore printing the content makes sense
|
|
|
|
if ($ls)
|
|
|
|
{
|
|
|
|
# Print the list of files into the protocol
|
Bug#56659: Mismatch of CAPITAL vs small letters in "unified filelist" partitioning output
Bug#56657: Test still uses "--exec rm -f ..." which is non-portable
Bug#56601: Test uses Unix path for temporary file, fails, and writes misleading message
Several tests that was written in a non portable way (failed on windows)
Fixed by
1) backporting the fix for replace_result to also apply to list_files
(mysqltest from mysql-trunk)
2) replacing all #p#/#sp#/#tmp# to #P#/#SP#/#TMP#/
(innodb always converts filenames to lower case in windows).
3) replacing '--exec rm -f' with '--remove_files_wildcard'
4) replacing a perl snippet with '--write_file'
client/mysqltest.cc:
backport from mysql-trunk to allow replace_result to apply
also on list_files
mysql-test/suite/parts/inc/partition_check_drop.inc:
Compensate for differences between innodb on windows vs unix.
Using mysqltest command, instead of unix command to remove files.
mysql-test/suite/parts/inc/partition_crash.inc:
compensate for differences between innodb on windows vs unix
mysql-test/suite/parts/inc/partition_fail.inc:
compensate for differences between innodb on windows vs unix
mysql-test/suite/parts/inc/partition_layout.inc:
compensate for differences between innodb on windows vs unix
mysql-test/suite/parts/inc/partition_layout_check1.inc:
compensate for differences between innodb on windows vs unix
mysql-test/suite/parts/inc/partition_layout_check2.inc:
compensate for differences between innodb on windows vs unix
mysql-test/suite/parts/r/partition_recover_myisam.result:
updated result
mysql-test/suite/parts/r/partition_special_myisam.result:
updated result
mysql-test/suite/parts/t/part_supported_sql_func_innodb.test:
Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test:
Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_alter1_2_innodb.test:
Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_alter2_1_1_innodb.test:
Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_alter2_1_2_innodb.test:
Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_alter2_2_2_innodb.test:
Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_alter4_innodb.test:
Test takes very long time, require --big flag
mysql-test/suite/parts/t/partition_debug_sync_innodb.test:
compensate for differences between innodb on windows vs unix
mysql-test/suite/parts/t/partition_recover_myisam.test:
more generic suppression (failed in windows)
mysql-test/suite/parts/t/partition_special_myisam.test:
Using portable mysqltest command 'write_file' instead of perl snippet.
2010-09-15 10:22:12 +02:00
|
|
|
replace_result $MYSQLD_DATADIR MYSQLD_DATADIR $MYSQLTEST_VARDIR MYSQLTEST_VARDIR #p# #P# #sp# #SP# part_n part_N;
|
2008-04-04 17:46:48 +02:00
|
|
|
SELECT file_list AS "unified filelist"
|
|
|
|
FROM t0_definition WHERE state = 'old';
|
2007-02-06 13:35:54 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
--enable_query_log
|