@@ -29,14 +29,10 @@ DELETE FROM t0_definition;
2929let $MYSQLD_DATADIR= ` select LEFT(@@datadir, LENGTH(@@datadir)-1)` ;
3030# echo MYSQLD_DATADIR: $MYSQLD_DATADIR;
3131
32- # Dump the current definition of the table t1 to tmp1
33- # This complicated method - let another mysqltest collect the output - is used
34- # because of two reasons
32+ # Save the current definition of the table t1
3533# - SHOW CREATE TABLE t1 is at least currently most probably more reliable than
3634# the corresponding SELECT on the INFORMATION_SCHEMA
37- # - SHOW CREATE TABLE .. cannot write its out put into a file like SELECT
38- let $show_file= $MYSQLD_DATADIR/ test/ tmp1;
39- -- exec echo "SHOW CREATE TABLE t1; exit; " | $MYSQL_TEST > $show_file 2>&1
35+ let $show_create= ` SHOW CREATE TABLE t1` ;
4036if ($do_file_tests)
4137{
4238 # List the files belonging to the table t1
@@ -57,12 +53,13 @@ if (!$do_file_tests)
5753
5854# Insert the current definition of the table t1 into t0_definition
5955eval INSERT INTO t0_definition SET state = ' old' ,
60- create_command = load_file( ' $show_file ' ) ,
56+ create_command = " $show_create " ,
6157 file_list = @aux;
6258
6359# Print the create table statement into the protocol
60+ # Added the concat to avoid changing the result files
6461-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR '\r' ''
65- SELECT create_command FROM t0_definition WHERE state = ' old' ;
62+ SELECT concat( ' SHOW CREATE TABLE t1; \n Table \t Create Table \n ' , create_command, ' \n ' ) as ` create_command ` FROM t0_definition WHERE state = ' old' ;
6663if ($do_file_tests)
6764{
6865 # We stored the list of files, therefore printing the content makes sense
0 commit comments