diff options
author | msvensson@pilot.blaudden <> | 2007-04-10 14:59:46 +0200 |
---|---|---|
committer | msvensson@pilot.blaudden <> | 2007-04-10 14:59:46 +0200 |
commit | 448a6778cbf848055a858bd361886553d7ff59bf (patch) | |
tree | 29f131ab9d8d43d7d2b2c10d3e6601c0a6bb2525 /mysql-test | |
parent | 26d2908c70a259561d307e54f1b1320bb640bd00 (diff) | |
parent | d4f01284bd8335fa8e6211daf3ad529704dbbddf (diff) | |
download | mariadb-git-448a6778cbf848055a858bd361886553d7ff59bf.tar.gz |
Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.1
into pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/lib/mtr_report.pl | 12 | ||||
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 10 | ||||
-rw-r--r-- | mysql-test/r/mysqltest.result | 19 | ||||
-rw-r--r-- | mysql-test/t/fix_priv_tables.test | 7 | ||||
-rw-r--r-- | mysql-test/t/mysqltest.test | 33 | ||||
-rw-r--r-- | mysql-test/t/system_mysql_db_fix30020.test | 9 | ||||
-rw-r--r-- | mysql-test/t/system_mysql_db_fix40123.test | 7 |
7 files changed, 87 insertions, 10 deletions
diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl index 78986674c62..016caa95889 100644 --- a/mysql-test/lib/mtr_report.pl +++ b/mysql-test/lib/mtr_report.pl @@ -296,6 +296,18 @@ sub mtr_report_stats ($) { } } } + + if ( $::opt_check_testcases ) + { + # Look for warnings produced by mysqltest in testname.warnings + foreach my $test_warning_file + ( glob("$::glob_mysql_test_dir/r/*.warnings") ) + { + $found_problems= 1; + print WARN "Check myqltest warnings in $test_warning_file\n"; + } + } + if ( $found_problems ) { mtr_warning("Got errors/warnings while running tests, please examine", diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 46938ea7cde..382ab605ae6 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -725,8 +725,6 @@ sub command_line_setup () { { $mysqld_variables{'port'}= 3306; $mysqld_variables{'master-port'}= 3306; - $opt_skip_ndbcluster= 1; - $opt_skip_im= 1; } if ( $opt_comment ) @@ -1073,7 +1071,7 @@ sub command_line_setup () { # On some operating systems, there is a limit to the length of a # UNIX domain socket's path far below PATH_MAX, so try to avoid long # socket path names. - $sockdir = tempdir(CLEANUP => 0) if ( length($sockdir) > 80 ); + $sockdir = tempdir(CLEANUP => 0) if ( length($sockdir) >= 80 ); $master->[0]= { @@ -1236,6 +1234,7 @@ sub command_line_setup () { { # Turn off features not supported when running with extern server $opt_skip_rpl= 1; + $opt_skip_ndbcluster= 1; # Setup master->[0] with the settings for the extern server $master->[0]->{'path_sock'}= $opt_socket ? $opt_socket : "/tmp/mysql.sock"; @@ -2031,10 +2030,7 @@ sub environment_setup () { $ENV{'MYSQL_FIX_SYSTEM_TABLES'}= $cmdline_mysql_fix_system_tables; } - if (!$opt_extern) - { - $ENV{'MYSQL_FIX_PRIVILEGE_TABLES'}= $file_mysql_fix_privilege_tables; - } + $ENV{'MYSQL_FIX_PRIVILEGE_TABLES'}= $file_mysql_fix_privilege_tables; # ---------------------------------------------------- # Setup env so childs can execute my_print_defaults diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index 0188fe87bbd..c7552258aeb 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -277,6 +277,9 @@ let $A = changed value of A; # Content of $B is: initial value of B let $B = changed value of B; # Content of $A is: changed value of A +var2: content of variable 1 +var3: content of variable 1 content of variable 1 +length of var3 is longer than 0 mysqltest: At line 1: Missing required argument 'filename' to command 'source' mysqltest: At line 1: Could not open file ./non_existingFile mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql": At line 1: Source directives are nesting too deep @@ -538,4 +541,20 @@ hello hello mysqltest: At line 1: test of die Some output +create table t1( a int, b char(255), c timestamp); +insert into t1 values(1, 'Line 1', '2007-04-05'), (2, "Part 2", '2007-04-05'); +insert into t1 values(1, 'Line 1', '2007-04-05'), (2, "Part 3", '2007-04-05'); +select * from t1; +a b c +1 Line 1 2007-04-05 00:00:00 +2 Part 2 2007-04-05 00:00:00 +1 Line 1 2007-04-05 00:00:00 +2 Part 3 2007-04-05 00:00:00 +select * from t1; +a b c +1 Line 1 2007-04-05 00:00:00 +1 Line 1 2007-04-05 00:00:00 +2 Part 2 2007-04-05 00:00:00 +2 Part 3 2007-04-05 00:00:00 +select * from t1; End of tests diff --git a/mysql-test/t/fix_priv_tables.test b/mysql-test/t/fix_priv_tables.test index 3a91f41dfcc..3051fd88076 100644 --- a/mysql-test/t/fix_priv_tables.test +++ b/mysql-test/t/fix_priv_tables.test @@ -1,6 +1,13 @@ # Embedded server doesn't support external clients --source include/not_embedded.inc +# Don't run this test if $MYSQL_FIX_PRIVILEGE_TABLES isn't set +# to the location of mysql_fix_privilege_tables.sql +if (`SELECT LENGTH("$MYSQL_FIX_PRIVILEGE_TABLES") <= 0`) +{ + skip Test need MYSQL_FIX_PRIVILEGE_TABLES; +} + # # This is the test for mysql_fix_privilege_tables # It checks that a system tables from mysql 4.1.23 diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 1914f2794e2..328206626df 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -719,6 +719,21 @@ let $B = changed value of B; --echo # Content of \$A is: $A # ---------------------------------------------------------------------------- +# Test let from query with $variable +# let $<var_name>=`<query with $variable>`; +# ---------------------------------------------------------------------------- + +let $var1=content of variable 1; +let $var2= `select "$var1"`; +let $var3= `select concat("$var1", " ", "$var2")`; +echo var2: $var2; +echo var3: $var3; +if (`select length("$var3") > 0`) +{ + echo length of var3 is longer than 0; +} + +# ---------------------------------------------------------------------------- # Test to assign let from query # let $<var_name>=`<query>`; # ---------------------------------------------------------------------------- @@ -1725,6 +1740,24 @@ EOF --exec echo "echo Some output; exit; echo Not this;" | $MYSQL_TEST 2>&1 # ---------------------------------------------------------------------------- +# test for query_sorted +# ---------------------------------------------------------------------------- + +create table t1( a int, b char(255), c timestamp); +insert into t1 values(1, 'Line 1', '2007-04-05'), (2, "Part 2", '2007-04-05'); +insert into t1 values(1, 'Line 1', '2007-04-05'), (2, "Part 3", '2007-04-05'); +select * from t1; +query_sorted select * from t1; +disable_result_log; +query_sorted select * from t1; +enable_result_log; +query_sorted select ''; +query_sorted select "h"; +query_sorted select "he"; +query_sorted select "hep"; +query_sorted select "hepp"; + +# ---------------------------------------------------------------------------- # Some coverage tests # ---------------------------------------------------------------------------- diff --git a/mysql-test/t/system_mysql_db_fix30020.test b/mysql-test/t/system_mysql_db_fix30020.test index 8220034b288..dc68f469d3a 100644 --- a/mysql-test/t/system_mysql_db_fix30020.test +++ b/mysql-test/t/system_mysql_db_fix30020.test @@ -1,9 +1,12 @@ # Embedded server doesn't support external clients --source include/not_embedded.inc -# Windows doesn't support execution of shell scripts (to fix!!) ---source include/not_windows.inc - +# Don't run this test if $MYSQL_FIX_SYSTEM_TABLES isn't set +# to the location of mysql_fix_privilege_tables.sql +if (`SELECT LENGTH("$MYSQL_FIX_SYSTEM_TABLES") <= 0`) +{ + skip Test need MYSQL_FIX_SYSTEM_TABLES; +} # check that CSV engine was compiled in, as the test relies on the presence # of the log tables (which are CSV-based) --source include/have_csv.inc diff --git a/mysql-test/t/system_mysql_db_fix40123.test b/mysql-test/t/system_mysql_db_fix40123.test index 7d909754824..419a9cd1827 100644 --- a/mysql-test/t/system_mysql_db_fix40123.test +++ b/mysql-test/t/system_mysql_db_fix40123.test @@ -1,6 +1,13 @@ # Embedded server doesn't support external clients --source include/not_embedded.inc +# Don't run this test if $MYSQL_FIX_PRIVILEGE_TABLES isn't set +# to the location of mysql_fix_privilege_tables.sql +if (`SELECT LENGTH("$MYSQL_FIX_PRIVILEGE_TABLES") <= 0`) +{ + skip Test need MYSQL_FIX_PRIVILEGE_TABLES; +} + # # This is the test for mysql_fix_privilege_tables # It checks that a system tables from mysql 4.1.23 |