[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.135.186.233: ~ $
# ----------------------------------------------------------------------------
# $mysql_errno contains the return code of the last command
# sent to the server.
# ----------------------------------------------------------------------------
# get $mysql_errno before the first statement
#     $mysql_errno should be -1
# get $mysql_errname as well

echo $mysql_errno before test;
echo $mysql_errname before test;

-- source include/have_log_bin.inc

# This test should work in embedded server after mysqltest is fixed
-- source include/not_embedded.inc

# This test uses chmod, can't be run with root permissions
-- source include/not_as_root.inc

# Save the initial number of concurrent sessions
--source include/count_sessions.inc

# ============================================================================
#
# Test of mysqltest itself
#
# There are three rules that determines what belong to each command
# 1. A normal command is delimited by the <delimiter> which by default is
#    set to ';'
#
#   ex: | select *
#       |   from t1;
#       |
#   Command: "select * from t1"
#
# 2. Special case is a line that starts with "--", this is a comment
#    ended when the new line character is reached. But the first word
#    in the comment may contain a valid command, which then will be
#    executed. This can be useful when sending commands that
#    contains <delimiter>
#
# 3. Special case is also a line that starts with '#' which is treated
#     as a comment and will be ended by new line character
#
# ============================================================================

# ----------------------------------------------------------------------------
# Positive case(statement)
# ----------------------------------------------------------------------------

select otto from (select 1 as otto) as t1;
# expectation = response
--error 0
select otto from (select 1 as otto) as t1;

# ----------------------------------------------------------------------------
# Negative case(statement):
# The derived table t1 does not contain a column named 'friedrich' .
# --> ERROR 42S22: Unknown column 'friedrich' in 'field list and
# --> 1054: Unknown column 'friedrich' in 'field list'
# ----------------------------------------------------------------------------

# expectation <> response
#--error 0
#select friedrich from (select 1 as otto) as t1
--error 1
--exec echo "select friedrich from (select 1 as otto) as t1;" | $MYSQL_TEST  2>&1

# expectation = response
--error ER_BAD_FIELD_ERROR

select friedrich from (select 1 as otto) as t1;

# The following unmasked unsuccessful statement must give
# 1. mysqltest gives a 'failed'
# 2. does not produce a r/<test case>.reject file !!!
# PLEASE uncomment it and check its effect
#select friedrich from (select 1 as otto) as t1;


# ----------------------------------------------------------------------------
# Tests for the new feature - SQLSTATE error code matching
# Positive case(statement)
# ----------------------------------------------------------------------------

# This syntax not allowed anymore, use --error S00000, see below
# expectation = response
#!S00000 select otto from (select 1 as otto) as t1;

--error S00000
select otto from (select 1 as otto) as t1;

# expectation <> response
#!S42S22 select otto from (select 1 as otto) as t1;
#--error S42S22
#select otto from (select 1 as otto) as t1;
--error 1
--exec echo "error S42S22; select otto from (select 1 as otto) as t1;" | $MYSQL_TEST  2>&1

# expecting a SQL-state for a command that can't give one should fail
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1
--exec echo "error S00000; remove_file $MYSQLTEST_VARDIR/tmp/test_nonexistent.tmp;" | $MYSQL_TEST  2>&1


# ----------------------------------------------------------------------------
# Negative case(statement)
# ----------------------------------------------------------------------------

# This syntax not allowed anymore, use --error S42S22, see below
# expectation = response
#!S42S22 select friedrich from (select 1 as otto) as t1;
--error S42S22
select friedrich from (select 1 as otto) as t1;

# expectation !=response
#!S00000 select friedrich from (select 1 as otto) as t1;
#--error S00000
#select friedrich from (select 1 as otto) as t1;
--error 1
--exec echo "error S00000; select friedrich from (select 1 as otto) as t1;" | $MYSQL_TEST  2>&1

# ----------------------------------------------------------------------------
# test cases for $mysql_errno
#
# $mysql_errno is a builtin variable of mysqltest and contains the return code
# of the last command sent to the server.
#
#      The following test cases often initialize $mysql_errno to 1064 by
#      a command with wrong syntax.
#      Example: --error 1064      To prevent the abort after the error.
#               garbage ;
# ----------------------------------------------------------------------------

# ----------------------------------------------------------------------------
# check mysql_errno = 0 after successful statement
# ----------------------------------------------------------------------------
select otto from (select 1 as otto) as t1;
echo $mysql_errname;
eval select $mysql_errno as "after_successful_stmt_errno" ;

#----------------------------------------------------------------------------
# check mysql_errno = 1064 after statement with wrong syntax
# ----------------------------------------------------------------------------
--error ER_PARSE_ERROR

garbage ;
echo $mysql_errname;
eval select $mysql_errno as "after_wrong_syntax_errno" ;

# ----------------------------------------------------------------------------
# check if let $my_var= 'abc' ; affects $mysql_errno
# ----------------------------------------------------------------------------
--error ER_PARSE_ERROR

garbage ;
let $my_var= 'abc' ;
echo $mysql_errname;
eval select $mysql_errno as "after_let_var_equal_value" ;

# ----------------------------------------------------------------------------
# check if set @my_var= 'abc' ; affects $mysql_errno
# ----------------------------------------------------------------------------
--error ER_PARSE_ERROR

garbage ;
set @my_var= 'abc' ;
echo $mysql_errname;
eval select $mysql_errno as "after_set_var_equal_value" ;

# ----------------------------------------------------------------------------
#  check if the setting of --disable-warnings itself affects $mysql_errno
#  (May be --<whatever> modifies $mysql_errno.)
# ----------------------------------------------------------------------------
--error ER_PARSE_ERROR

garbage ;
--disable_warnings
echo $mysql_errname;
eval select $mysql_errno as "after_disable_warnings_command" ;

# ----------------------------------------------------------------------------
# check if --disable-warnings + command with warning affects the errno
# stored within $mysql_errno
# (May be disabled warnings affect $mysql_errno.)
# ----------------------------------------------------------------------------
drop table if exists t1 ;
--error ER_PARSE_ERROR

garbage ;
drop table if exists t1 ;
echo $mysql_errname;
eval select $mysql_errno as "after_disable_warnings" ;
--enable_warnings

# ----------------------------------------------------------------------------
# check if masked errors affect $mysql_errno
# ----------------------------------------------------------------------------
--error ER_PARSE_ERROR

garbage ;
--error ER_NO_SUCH_TABLE

select 3 from t1 ;
echo $mysql_errname;
eval select $mysql_errno as "after_minus_masked" ;
--error ER_PARSE_ERROR

garbage ;
--error ER_NO_SUCH_TABLE

select 3 from t1 ;
echo $mysql_errname;
eval select $mysql_errno as "after_!_masked" ;

# ----------------------------------------------------------------------------
# Will manipulations of $mysql_errno be possible and visible ?
# ----------------------------------------------------------------------------
--error ER_PARSE_ERROR

garbage ;
let $mysql_errno= -1;
eval select $mysql_errno as "after_let_errno_equal_value" ;

# ----------------------------------------------------------------------------
# How affect actions on prepared statements $mysql_errno ?
# ----------------------------------------------------------------------------
# failing prepare
--error ER_PARSE_ERROR

garbage ;
--error ER_NO_SUCH_TABLE

prepare stmt from "select 3 from t1" ;
echo $mysql_errname;
eval select $mysql_errno as "after_failing_prepare" ;
create table t1 ( f1 char(10));

# successful prepare
--error ER_PARSE_ERROR

garbage ;
prepare stmt from "select 3 from t1" ;
echo $mysql_errname;
eval select $mysql_errno as "after_successful_prepare" ;

# successful execute
--error ER_PARSE_ERROR

garbage ;
execute stmt;
echo $mysql_errname;
eval select $mysql_errno as "after_successful_execute" ;

# failing execute (table has been dropped)
drop table t1;
--error ER_PARSE_ERROR

garbage ;
--error ER_NO_SUCH_TABLE

execute stmt;
echo $mysql_errname;
eval select $mysql_errno as "after_failing_execute" ;

# failing execute (unknown statement)
--error ER_PARSE_ERROR

garbage ;
--error ER_UNKNOWN_STMT_HANDLER

execute __stmt_;
echo $mysql_errname;
eval select $mysql_errno as "after_failing_execute" ;

# successful deallocate
--error ER_PARSE_ERROR

garbage ;
deallocate prepare stmt;
echo $mysql_errname;
eval select $mysql_errno as "after_successful_deallocate" ;

# failing deallocate ( statement handle does not exist )
--error ER_PARSE_ERROR

garbage ;
--error ER_UNKNOWN_STMT_HANDLER

deallocate prepare __stmt_;
echo $mysql_errname;
eval select $mysql_errno as "after_failing_deallocate" ;


# ----------------------------------------------------------------------------
# test cases for "--disable_abort_on_error"
#
# "--disable_abort_on_error" switches off the abort of mysqltest
# after "unmasked" failing statements.
#
# The default is "--enable_abort_on_error".
#
# "Maskings" are
#   --error <error number>  and  --error <error number>
# in the line before the failing statement.
#
# There are some additional test cases for $mysql_errno
# because "--disable_abort_on_error" enables a new situation.
# Example: "unmasked" statement fails + analysis of $mysql_errno
# ----------------------------------------------------------------------------

# ----------------------------------------------------------------------------
# Switch off the abort on error and check the effect on $mysql_errno
# ----------------------------------------------------------------------------
--error ER_PARSE_ERROR

garbage ;
--disable_abort_on_error
echo $mysql_errname;
eval select $mysql_errno as "after_--disable_abort_on_error" ;

# ----------------------------------------------------------------------------
# "unmasked" failing statement should not cause an abort
# ----------------------------------------------------------------------------
select 3 from t1 ;

# ----------------------------------------------------------------------------
# masked failing statements
# ----------------------------------------------------------------------------
# expected error = response
--error ER_NO_SUCH_TABLE

select 3 from t1 ;
--error ER_NO_SUCH_TABLE

select 3 from t1 ;
echo $mysql_errname;
eval select $mysql_errno as "after_!errno_masked_error" ;
# expected error <> response
# --error 1000
# select 3 from t1 ;
# --error 1000
# select 3 from t1 ;
--error 1
--exec echo "disable_abort_on_error; error 1000; select 3 from t1; error 1000; select 3 from t1;" | $MYSQL_TEST  2>&1

# ----------------------------------------------------------------------------
# Check some non-query statements that would fail
# ----------------------------------------------------------------------------
--exec illegal_command
--cat_file does_not_exist
--perl
  exit(2);
EOF

# ----------------------------------------------------------------------------
# Check backtick and query_get_value, result should be empty
# ----------------------------------------------------------------------------
let $empty= `garbage`;
echo $empty is empty;
let $empty= query_get_value(nonsense, blabla, 1);
echo $empty is empty;

# ----------------------------------------------------------------------------
# Switch the abort on error on and check the effect on $mysql_errno
# ----------------------------------------------------------------------------
--error ER_PARSE_ERROR

garbage ;
--enable_abort_on_error
echo $mysql_errname;
eval select $mysql_errno as "after_--enable_abort_on_error" ;

# ----------------------------------------------------------------------------
# masked failing statements
# ----------------------------------------------------------------------------
# expected error = response
--error ER_NO_SUCH_TABLE

select 3 from t1 ;

# ----------------------------------------------------------------------------
# check that the old default behaviour is not changed
# Please remove the '#' to get the abort on error
# ----------------------------------------------------------------------------
#--error 1064
#select 3 from t1 ;
#
#select 3 from t1 ;

--error 1
--exec echo "disable_abort_on_error; enable_abort_on_error; error 1064; select 3 from t1; select 3 from t1;" | $MYSQL_TEST  2>&1

# ----------------------------------------------------------------------------
# Test --enable and --disable with ONCE
# ----------------------------------------------------------------------------

--disable_abort_on_error ONCE
garbage;
--disable_abort_on_error ONCE
--remove_file DoesNotExist

--disable_result_log
select 2;
--enable_result_log ONCE
select 3;
select 5;
--enable_result_log

# ----------------------------------------------------------------------------
# Test cumulative ONCE
# ----------------------------------------------------------------------------

--disable_abort_on_error ONCE
--disable_query_log ONCE
select 3 from t1;
select 7;

--error 1
--exec echo "--disable_info OCNE" | $MYSQL_TEST 2>&1

--enable_connect_log ONCE
connect (con1,localhost,root,,);
connection default;
disconnect con1;

# ----------------------------------------------------------------------------
# Test ONCE can be combined with --error or modifiers like lowercase
# ----------------------------------------------------------------------------

--disable_result_log ONCE
--error ER_NO_SUCH_TABLE
select 5 from t1;

--disable_query_log ONCE
--lowercase_result
select "CASE" as "LOWER";

--sorted_result
--disable_query_log ONCE
select "xyz" as name union select "abc" as name order by name desc;

# ----------------------------------------------------------------------------
# Test --error with backtick operator or query_get_value
# ----------------------------------------------------------------------------

--error 0,ER_NO_SUCH_TABLE
let $empty= `SELECT foo from bar`;
echo $empty is empty;

--error 0,ER_BAD_FIELD_ERROR
let $empty= query_get_value(SELECT bar as foo, baz, 1);
echo $empty is empty;

--error 0,ER_NO_SUCH_TABLE
if (!`SELECT foo from bar`) {
  echo "Yes it's empty";
}

# ----------------------------------------------------------------------------
#test to check conversion between error numbers and error strings
# ----------------------------------------------------------------------------
let $var=convert_error(1450);
let $var1=convert_error($var);
let $var2=convert_error($var1);
echo $var2;

let $var=convert_error(ER_UNKNOWN_ERROR);
let $var1=convert_error($var);
let $var2=convert_error($var1);
echo $var2;

--error 1
--exec echo "let \$var= convert_error(NOT_A_VALID_ERROR);" | $MYSQL_TEST 2>&1

let $var=convert_error(9999999);
echo $var;

let $var=convert_error(9ABC9);
echo $var;

let $var=convert_error(0);
echo $var;

let $var=convert_error();
echo $var;

let $var=;
let $var1=convert_error($var);
echo $var1;
# ----------------------------------------------------------------------------
# Test comments
# ----------------------------------------------------------------------------

# This is a comment
# This is a ;  comment
# This is a -- comment
# -- This is also a comment
# -- # This is also a comment
# -- This is also a ; comment

# ----------------------------------------------------------------------------
# Test comments with embedded command
# ----------------------------------------------------------------------------

--echo hello
--     echo hello
--    echo ;;;;;;;;

--echo # MySQL: -- The

# ----------------------------------------------------------------------------
# Test detect end of line "junk"
# Most likely caused by a missing delimiter
# ----------------------------------------------------------------------------

# Too many parameters to function
--error 1
--exec echo "sleep 5 6;" | $MYSQL_TEST 2>&1

# Too many parameters to function
--error 1
--exec echo "--sleep 5 6" | $MYSQL_TEST 2>&1

#
# Missing delimiter
# The comment will be "sucked into" the sleep command since
# delimiter is missing until after "show status"
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
sleep 4
# A comment
show status;
EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;

#
# Missing delimiter until eof
# The comment will be "sucked into" the sleep command since
# delimiter is missing
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
sleep 7
# Another comment
EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;

#
# Missing delimiter until "disable_query_log"
#
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
disconnect default

#
# comment
# comment 3
disable_query_log;
EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;

#
# Missing delimiter until "disable_query_log"
#
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
disconnect default

#
# comment

# comment 3
disable_query_log;
EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;

#
# Missing delimiter until eof
#
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
disconnect default

#
# comment
# comment2

# comment 3
--disable_query_log
EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;

#
# Missing delimiter until eof
#
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
disconnect default # comment
# comment part2

# comment 3
--disable_query_log
EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1

remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;

#
# Extra delimiter
#
--error 1
--exec echo "--sleep 4;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "--disable_query_log;" | $MYSQL_TEST 2>&1

#
# Extra text after ``
#
# Cannot use exec echo here as ` may or may not need to be escaped
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
let $x= `select 1` BOO ;
EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
--let $x= `select 1`;
EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
# Missing ; in next line should be detected and cause failure
let $x= `select 1`
let $x= 2;
echo $x;
EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;


# Allow trailing # comment
--sleep 1 # Wait for insert delayed to be executed.
--sleep 1        # Wait for insert delayed to be executed.

# ----------------------------------------------------------------------------
# Test error
# ----------------------------------------------------------------------------

# Missing argument
--error 1
--exec echo "error;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "--error" | $MYSQL_TEST 2>&1

# First char must be uppercase 'S' or 'E' or [0-9]
--error 1
--exec echo "--error s99999" | $MYSQL_TEST 2>&1
--error 1
--exec echo "--error e99999" | $MYSQL_TEST 2>&1
--error 1
--exec echo "--error 9eeeee" | $MYSQL_TEST 2>&1
--error 1
--exec echo "--error 1sssss" | $MYSQL_TEST 2>&1

# First char 'S' but too long
--error 1
--exec echo "--error S999999" | $MYSQL_TEST 2>&1

# First char 'S' but lowercase char found
--error 1
--exec echo "--error S99a99" | $MYSQL_TEST 2>&1

# First char 'S' but too short
--error 1
--exec echo "--error S9999" | $MYSQL_TEST 2>&1

# First char 'E' but not found in error array
--error 1
--exec echo "--error E9999" | $MYSQL_TEST 2>&1

# First char [0-9] but contains chars
--error 1
--exec echo "--error 999e9" | $MYSQL_TEST 2>&1
--error 1
--exec echo "--error 9b" | $MYSQL_TEST 2>&1

# Multiple errorcodes separated by ','
--error 1,1,1,1
#--error 9,ER_PARSE_ERROR
#--error ER_PARSE_ERROR
#--error 9,ER_PARSE_ERROR,9,ER_PARSE_ERROR
#--error 9, ER_PARSE_ERROR,  9,   ER_PARSE_ERROR
#--error 9,S00000,9,ER_PARSE_ERROR
#--error 9,S00000,9,ER_PARSE_ERROR,ER_PARSE_ERROR,ER_PARSE_ERROR,9,10,11,12
--error 9,S00000,9
--error 9,S00000,9,9,10,11,12
--error 9 ,10
--error 9 , 10
--error    9   ,   10
--error    9   ,   10

# Too many errorcodes specified
--error 1
--exec echo "--error 1,2,3,4,5,6,7,8,9,10,11" | $MYSQL_TEST 2>&1

# BUG#13687542 MTR BEHAVES WRONG WHEN EXECUTING 'ERROR $VAR' IN A LOOP
--let $i= 0
--let $error= 0
while ($i < 3)
{
  --error $error
  CREATE TABLE t1 (a INT);
  --let $error= 1050
  --inc $i
}

DROP TABLE t1;

# ----------------------------------------------------------------------------
# Test echo command
# ----------------------------------------------------------------------------

echo MySQL;
echo "MySQL";
echo MySQL: The world''s most popular open source database;
echo "MySQL: The world's most popular open source database";

echo MySQL: The world''s
     most popular open
     source database;

echo # MySQL: The world''s
# most popular open
# source database;

echo - MySQL: The world''s
- most popular open
- source database;

echo - MySQL: The world''s
-- most popular
-- open source database;

echo # MySQL: The
--world''s
# most popular
-- open
- source database;

echo "MySQL: The world's most popular; open source database";
echo "MySQL: The world's most popular ; open source database";
echo "MySQL: The world's most popular ;open source database";
echo echo message echo message;


echo ;

# Illegal use of echo

#--error 1
#--exec echo "echo \$;" | $MYSQL_TEST 2>&1


# ----------------------------------------------------------------------------
# Test exec command
# ----------------------------------------------------------------------------

# Illegal use of exec
--error 1
--exec echo "--exec " | $MYSQL_TEST 2>&1

# Multi-line exec
exec $MYSQL
    test -e "select 1";
exec $MYSQL test -e "select
    2";
let $query = select 3
    as X;
exec $MYSQL test -e "$query";

# ----------------------------------------------------------------------------
# Test let command
# ----------------------------------------------------------------------------

let $message=MySQL;
echo $message;

let $message="MySQL";
echo $message;

let $message= MySQL: The
 world''s most
 popular open
 source database;
echo $message;

let $message= # MySQL: The
# world''s most
# popular open
# source database;
echo $message;

let $message=  -- MySQL: The
-- world''s most
-- popular
-- open source database;
echo $message;

let $message=  # MySQL: The
- world''s most
-- popular open
# source database;
echo $message;

echo '$message';
echo "$message";

let $1=hej;
echo $1;

let   $1   =hej ;
echo $1;

let $1 = hej;
echo $1;

let $1=1;
let $2=$1;
echo $2;
let $5=$6;
echo $5;
echo $6;

let $where=a long variable content;
echo $where;

let $where2= $where;
echo $where2;

let $where3=a long $where variable content;
echo $where3;

let $where3=a long \\\$where variable content;
echo $where3;

let $novar1= $novar2;
echo $novar1;

let $cat=na;
let $cat=ba$cat$cat;
echo banana = $cat;

# ba\$cat\$cat should have been sufficient.
# ba\\\$cat\\\$cat -> ba\$cat\$cat -> ba$cat$cat -> banana
# Magnus' upcoming patch will fix the missing second interpretation.
let $cat=ba\\\$cat\\\$cat;
echo Not a banana: $cat;

# Bug #55413 would cause this to fail
let $escape= with\`some\"escaped\'quotes;
echo $escape;

--let $escape= with\`some\"escaped\'quotes
echo $escape;

# This only works with "--let" syntax
--let $tick= single'tick`backtick
echo $tick;

# Test illegal uses of let

--error 1
--exec echo "let ;" | $MYSQL_TEST 2>&1

--error 1
--exec echo "let \$=hi;" | $MYSQL_TEST  2>&1

--error 1
--exec echo "let \$1 hi;" | $MYSQL_TEST  2>&1

--error 1
--exec echo "let \$m hi;" | $MYSQL_TEST  2>&1

--error 1
--exec echo "let \$hi;" | $MYSQL_TEST  2>&1

--error 1
--exec echo "let \$ hi;" | $MYSQL_TEST  2>&1

--error 1
--exec echo "let =hi;" | $MYSQL_TEST  2>&1

--error 1
--exec echo "let hi;" | $MYSQL_TEST  2>&1

# More advanced test for Bug#17280
let $success= 1;
--echo # Execute: --echo # <whatever> success: \$success
--echo # <whatever> success: $success
--echo # Execute: echo # <whatever> success: \$success ;
echo # <whatever> success: $success ;

--echo # The next two variants work fine and expand the content of \$success
--echo # Execute: --echo \$success
--echo $success
--echo # Execute: echo \$success ;
echo $success ;


# ----------------------------------------------------------------------------
# Test to assign let from variable
# let $<var_name>=$<var_name>;
# ----------------------------------------------------------------------------

--echo # Check if let \$B = \$A is an assignment per value.

# Basic preparations:
--echo let \$A = initial value of A;
let $A = initial value of A;
# --echo # Content of \$A is: $A
--echo let \$B = initial value of B;
let $B = initial value of B;
# --echo # Content of \$B is: $B

# Assign $B to $A:
--echo let \$B = \$A
let $A = $B;
--echo # Content of \$A is: $A

# Changes of $B must NOT affect $A and Changes of $A must NOT affect $B !
--echo let \$A = changed value of A;
let $A = changed value of A;
--echo # Content of \$B is: $B

--echo let \$B = changed value of B;
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>`;
# ----------------------------------------------------------------------------
echo var1;
let $var1= `select "hi" as "Col", 1 as "Column1", "hi there" as Col3`;
echo $var1;

echo var2;
let $var2= `select 2 as "Column num 2"`;
echo $var2;

echo var2 again;
let $var2= `select 2 as "Column num 2"`;
echo $var2;

echo var3 two columns with same name;
let $var3= `select 1 as "Col", 2 as "Col", 3 as "var3"`;
echo $var3;

echo var4 from query that returns NULL;
let $var4= `select NULL`;

echo var5 from query that returns no row;
let $var5= `SHOW VARIABLES LIKE "nonexisting_variable"`;

echo failing query in let;
--write_file $MYSQLTEST_VARDIR/tmp/let.sql
let $var2= `failing query`;
echo $var2;
EOF

create table t1 (a varchar(100));
insert into t1 values ('`select 42`');
let $a= `select * from t1`;
# This should output `select 42`, not evaluate it again to 42
echo $a;
insert into t1 values ('$dollar');
# These should also output the string without evaluating it.
let $a= query_get_value(select * from t1 order by a, a, 1);
echo $a;
let $a= query_get_value(select * from t1 order by a, a, 2);
echo $a;
drop table t1;

--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/let.sql 2>&1

remove_file $MYSQLTEST_VARDIR/tmp/let.sql;


# ----------------------------------------------------------------------------
# Test source command
# ----------------------------------------------------------------------------

# Test illegal uses of source

--error 1
--exec echo "source ;" | $MYSQL_TEST 2>&1

# Fix win paths
--replace_result \\ /
# Source a nonexisting file
--error 1
--exec echo "source non_existingFile;" | $MYSQL_TEST 2>&1

# Too many source
--exec echo "source $MYSQLTEST_VARDIR/tmp/recursive.sql;" > $MYSQLTEST_VARDIR/tmp/recursive.sql
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1
--exec echo "source $MYSQLTEST_VARDIR/tmp/recursive.sql;" | $MYSQL_TEST 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/recursive.sql;

# Source a file with error
--exec echo "garbage ;" > $MYSQLTEST_VARDIR/tmp/error.sql
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1
--exec echo "source $MYSQLTEST_VARDIR/tmp/error.sql;" | $MYSQL_TEST 2>&1

remove_file $MYSQLTEST_VARDIR/tmp/error.sql;

# Test execution of source in a while loop
--write_file $MYSQLTEST_VARDIR/tmp/sourced.inc
echo here is the sourced script;
EOF
--disable_query_log
let $outer= 2; # Number of outer loops
while ($outer)
{
  eval SELECT '$outer = outer loop variable after while' AS "";

  --source $MYSQLTEST_VARDIR/tmp/sourced.inc

  eval SELECT '$outer = outer loop variable before dec' AS "";
  dec $outer;
  eval SELECT '$outer = outer loop variable after dec' AS "";
}

# Test source in an if in a while which is false on 1st iteration
# Also test --error and --disable_abort_on_error in same context
let $outer= 2; # Number of outer loops
let $ifval= 0; # false 1st time
while ($outer)
{
  echo outer=$outer ifval=$ifval;

  if ($ifval) {
    --source $MYSQLTEST_VARDIR/tmp/sourced.inc
    --error ER_NO_SUCH_TABLE
    SELECT * from nowhere;
    --disable_abort_on_error ONCE
# Statement giving a different error, to make sure we don't mask it
    SELECT * FROM nowhere else;
  }
  dec $outer;
  inc $ifval;
}


# Test execution of source in a while loop
--disable_abort_on_error
# Sourcing of a file within while loop, sourced file will
# source other file
let $num= 9;
while ($num)
{
   SELECT 'In loop' AS "";
   --source $MYSQLTEST_VARDIR/tmp/sourced.inc
   dec $num;
}
--enable_abort_on_error
--enable_query_log

# Test source $variable/<filename>
--source $MYSQLTEST_VARDIR/tmp/sourced.inc

--remove_file $MYSQLTEST_VARDIR/tmp/sourced.inc

--write_file $MYSQLTEST_VARDIR/tmp/sourced.inc
echo "hello";
EOF

let $x= sourced;
source $MYSQLTEST_VARDIR/tmp/$x.inc;

let $x= $MYSQLTEST_VARDIR;
source $x/tmp/sourced.inc;

--remove_file $MYSQLTEST_VARDIR/tmp/sourced.inc


# ----------------------------------------------------------------------------
# Test sleep command
# ----------------------------------------------------------------------------

sleep 0.5;
sleep 1;
real_sleep 1;

# Parameter from variable, legal and illegal
let $sleep_var= 0.1;
sleep $sleep_var;
let $sleep_var= 1;
--real_sleep $sleep_var

--write_file $MYSQL_TMP_DIR/sleep.inc
let $sleep_var= xyz;
--sleep $sleep_var
EOF
--error 1
--exec $MYSQL_TEST < $MYSQL_TMP_DIR/sleep.inc 2>&1
--remove_file $MYSQL_TMP_DIR/sleep.inc

--write_file $MYSQL_TMP_DIR/sleep.inc
let $sleep_var= xyz;
real_sleep $sleep_var;
EOF
--error 1
--exec $MYSQL_TEST < $MYSQL_TMP_DIR/sleep.inc 2>&1
--remove_file $MYSQL_TMP_DIR/sleep.inc

# Missing parameter
--error 1
--exec echo "sleep ;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "real_sleep ;" | $MYSQL_TEST 2>&1

# Illegal parameter
--error 1
--exec echo "sleep abc;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "real_sleep abc;" | $MYSQL_TEST 2>&1

# ----------------------------------------------------------------------------
# Test inc
# ----------------------------------------------------------------------------
let $i= 0;
inc $i;
echo $i;
let $i=100;
inc $i;
echo $i;
let $i= -100;
inc $i;
echo $i;

--error 1
--exec echo "inc;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "inc i;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "inc \$i;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "let \$i=100; inc \$i 1000; echo \$i;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "let \$i=text; inc \$i; echo \$i;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "let \$i=10cc; inc \$i; echo \$i;" | $MYSQL_TEST 2>&1

inc $i; inc $i; inc $i; --echo $i
echo $i;


# ----------------------------------------------------------------------------
# Test dec
# ----------------------------------------------------------------------------

let $d= 0;
dec $d;
echo $d;
let $d=100;
dec $d;
echo $d;

--error 1
--exec echo "dec;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "dec i;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "dec \$i;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "let \$i=100; dec \$i 1000; echo \$i;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "let \$i=text; dec \$i; echo \$i;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "let \$i=10cc; dec \$i; echo \$i;" | $MYSQL_TEST 2>&1


# ----------------------------------------------------------------------------
# Test system (which is now deprecated)
# ----------------------------------------------------------------------------

--error 1
--exec echo "system something;" | $MYSQL_TEST 2>&1

# ----------------------------------------------------------------------------
# Test delimiter
# ----------------------------------------------------------------------------

delimiter stop;
echo teststop
delimiter ;stop
echo test2;
--delimiter stop
echo test3stop
--delimiter ;
echo test4;

# ----------------------------------------------------------------------------
# Test that delimiter within if() works in in various combinations
# ----------------------------------------------------------------------------

if (0)
{
  delimiter ||;
  echo false-inner||
  if (0)
  {
    delimiter *||
    echo false-innerer*
    delimiter ||*
  }
  echo false-inner again||
}
echo outer;
if (1)
{
  delimiter /;
  echo true-inner/
  if (0)
  {
    delimiter %/
    echo true-innerer%
  }
  echo true-inner again/
}
echo true-outer/
delimiter ;/


# ----------------------------------------------------------------------------
# Test if
# ----------------------------------------------------------------------------

let $counter=10;
if ($counter)
{
  echo Counter is greater than 0, (counter=10);
}
if (!$counter)
{
  echo Counter is not 0, (counter=10);
}
if (! $counter)
{
  let $counter=5;
}
echo Counter should still be 10, is $counter;
let $counter=0;
if($counter)
{
  echo Counter is greater than 0, (counter=0);
}
if (!$counter)
{
  echo Counter is not 0, (counter=0);
}
if (! $counter)
{
  echo Not space var works;
}

# ----------------------------------------------------------------------------
# Test if with some non-numerics
# ----------------------------------------------------------------------------

let $counter=alpha;
if ($counter)
{
  echo Counter is true, (counter=alpha);
}
let $counter=   ;
if ($counter)
{
  echo oops, space is true;
}
let $counter=-0;
if ($counter)
{
  echo oops, -0 is true;
}
# This is no longer allowed, as a precaution against mistyped conditionals
# if (beta)
# {
#   echo Beta is true;
# }
let $counter=gamma;
while ($counter)
{
  echo while with string, only once;
  let $counter=000;
}

# ----------------------------------------------------------------------------
# Test if with compare conditions
# ----------------------------------------------------------------------------

let $ifvar= 5;
let $ifvar2= 6;

if ($ifvar < 7)
{
  echo 5<7;
}
if ($ifvar< 7)
{
  echo 5<7 again;
}
if ($ifvar<7)
{
  echo 5<7 still;
}
if ($ifvar < $ifvar2)
{
  echo 5<6;
}
if ($ifvar <= 4)
{
  echo 5<=4;
}
if ($ifvar >= 5)
{
  echo 5>=5;
}
if ($ifvar>=5)
{
  echo 5>=5 again;
}
if ($ifvar > 3)
{
  echo 5>3;
}
if ($ifvar == 4)
{
  echo 5==4;
}
if ($ifvar == 5)
{
  echo 5==5;
}
if ($ifvar != 8)
{
  echo 5!=8;
}
# Any number should compare unequal to any string
if ($ifvar != five)
{
  echo 5!=five;
}
if ($ifvar == `SELECT 3+2`)
{
  echo 5==3+2;
}
if ($ifvar    ==       5)
{
  echo 5   ==   5;
}
let $ifvar= hello;
if ($ifvar == hello there)
{
  echo hello == hello there;
}
if ($ifvar == hello)
{
  echo hello == hello;
}
if ($ifvar == hell)
{
  echo hello == hell;
}
if ($ifvar    ==    hello)
{
  echo hello   ==   hello;
}
if ($ifvar != goodbye)
{
  echo hello != goodbye;
}
let $ifvar= 'quoted';
if ($ifvar == ''quoted'')
{
  echo 'quoted' == ''quoted'';
}
let $ifvar= two words;
if ($ifvar == two words)
{
  echo two words;
}
if ($ifvar == 'two words')
{
  echo 'two words';
}
if ($ifvar == "two words")
{
  echo "two words";
}
if ($ifvar == `SELECT 'two words'`)
{
  echo two words are two words;
}
if (42)
{
  echo right answer;
}
if (0)
{
  echo wrong answer;
}
# Non-empty string treated as 'true'
if (`SELECT 'something'`)
{
  echo anything goes;
}
# Make sure 0 and string compare right
let $ifvar= 0;
if ($ifvar == string)
{
  echo 0 == string;
}
if ($ifvar != string)
{
  echo 0 != string;
}
--write_file $MYSQL_TMP_DIR/mysqltest.sql
let $var= 5;
if ($var >= four)
{
 echo 5>=four;
}
EOF
--error 1
--exec $MYSQL_TEST < $MYSQL_TMP_DIR/mysqltest.sql 2>&1
remove_file $MYSQL_TMP_DIR/mysqltest.sql;

--write_file $MYSQL_TMP_DIR/mysqltest.sql
let $var= 5;
if ($var ~= 6)
{
 echo 5~=6;
}
EOF
--error 1
--exec $MYSQL_TEST < $MYSQL_TMP_DIR/mysqltest.sql 2>&1
remove_file $MYSQL_TMP_DIR/mysqltest.sql;

--write_file $MYSQL_TMP_DIR/mysqltest.sql
let $var= text;
if (var == text)
{
 echo Oops I forgot the $;
}
EOF
--error 1
--exec $MYSQL_TEST < $MYSQL_TMP_DIR/mysqltest.sql 2>&1
remove_file $MYSQL_TMP_DIR/mysqltest.sql;

--error 1
--exec echo "if (\$var ==) {" | $MYSQL_TEST  2>&1
--error 1
--exec echo "if (\$var > ) {" | $MYSQL_TEST  2>&1

# ----------------------------------------------------------------------------
# Test while with compare conditions
# ----------------------------------------------------------------------------

let $counter= 2;

while ($counter < 5)
{
  echo counter is $counter;
  inc $counter;
}
let $ifvar=;
while ($ifvar != stop)
{
  if ($counter >= 7)
  {
    let $ifvar= stop;
  }
  echo counter is $counter;
  inc $counter;
}

# ----------------------------------------------------------------------------
# Test while, { and }
# ----------------------------------------------------------------------------

let $i=1;
while ($i)
{
  echo $i;
  dec $i;
}
# One liner
#let $i=1;while ($i){echo $i;dec $i;}

let $i=0;
while (!$i)
{
  echo Testing while with not;
  inc $i;
}

# Exceed max nesting level
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest_while.inc
let $1 = 10;
while ($1)
{
while ($1)
{
while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
 while ($1)
{
  echo $1;
  dec $1;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
EOF
# Fix win path
--replace_result \\ / $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1
--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest_while.inc;" | $MYSQL_TEST 2>&1
--remove_file $MYSQLTEST_VARDIR/tmp/mysqltest_while.inc
--error 1
--exec echo "while \$i;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "while (\$i;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "let \$i=1; while (\$i) dec \$i;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "};" | $MYSQL_TEST 2>&1
--error 1
--exec echo "end;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "{;" | $MYSQL_TEST 2>&1

--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
while (0)
echo hej;
EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;

--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
while (0)
{echo hej;
EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;

--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
while (0){
 echo hej;
EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1

remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;

# ----------------------------------------------------------------------------
# Test error messages returned from comments starting with a command
# ----------------------------------------------------------------------------
--error 1
--exec echo "--if the other server is down" | $MYSQL_TEST 2>&1

--error 1
--exec echo "-- end when ..." | $MYSQL_TEST 2>&1

# ----------------------------------------------------------------------------
# Test replace
# ----------------------------------------------------------------------------
--replace_result a b
select "a" as col1, "c" as col2;

--replace_result a b c d
select "a" as col1, "c" as col2;

--error 1
--exec echo "--replace_result a" | $MYSQL_TEST 2>&1
--error 1
--exec echo "--replace_result a;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "replace_result a;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "replace_result a ;" | $MYSQL_TEST 2>&1
--exec echo "replace_result a b; echo OK; exit;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "--replace_result a b c" | $MYSQL_TEST 2>&1
--error 1
--exec echo "replace_result a b c ;" | $MYSQL_TEST 2>&1


--replace_column 1 b
select "a" as col1, "c" as col2;

--replace_column 1 b 2 d
select "a" as col1, "c" as col2;

--error 1
--exec echo "--replace_column a" | $MYSQL_TEST 2>&1

--error 1
--exec echo "--replace_column 1" | $MYSQL_TEST 2>&1

--error 1
--exec echo "--replace_column a b" | $MYSQL_TEST 2>&1
--error 1
--exec echo "--replace_column a 1" | $MYSQL_TEST 2>&1
--error 1
--exec echo "--replace_column 1 b c " | $MYSQL_TEST 2>&1

let $long_rep= 1234567890123456789012345678901234567890;
let $long_rep= $long_rep,$long_rep;
let $long_rep= $long_rep,$long_rep;
let $long_rep= $long_rep,$long_rep;
let $long_rep= $long_rep,$long_rep;
let $long_rep= $long_rep,$long_rep;

# This tests from strings > 1024 (here 1311)

--replace_result $long_rep LONG_STRING
eval select "$long_rep" as x;

# Test replace within ``

--replace_result cat dog
--let $animal= `select "cat" as pet`
--echo $animal

# ----------------------------------------------------------------------------
# Test sync_with_master
# ----------------------------------------------------------------------------
--error 1
--exec echo "sync_with_master 10!;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "sync_with_master a;" | $MYSQL_TEST 2>&1

# ----------------------------------------------------------------------------
# Test connect
# ----------------------------------------------------------------------------

--error 1
--exec echo "connect;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "connect ();" | $MYSQL_TEST 2>&1
--error 1
--exec echo "connect (con2);" | $MYSQL_TEST 2>&1
--error 1
--exec echo "connect (con2,);" | $MYSQL_TEST 2>&1
--error 1
--exec echo "connect (con2,localhost,root,,illegal_db);" | $MYSQL_TEST 2>&1
--error 1
--exec echo "connect (con1,localhost,root,,,illegal_port,);" | $MYSQL_TEST 2>&1
--error 1
--exec echo "connect (con1,localhost,root,,,,,SMTP POP);" | $MYSQL_TEST 2>&1

# Repeat connect/disconnect
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
let $i=200;
while ($i)
{
 connect (test_con1,localhost,root,,);
 disconnect test_con1;
 dec $i;
}
echo 200 connects succeeded;
EOF
--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql;" | $MYSQL_TEST 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;

# Select disconnected connection
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
connect (test_con1,localhost,root,,);
disconnect test_con1;
connection test_con1;
EOF
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1
--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql;" | $MYSQL_TEST 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;

# Connection name already used
--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
connect (test_con1,localhost,root,,);
connect (test_con1,localhost,root,,);
EOF
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1
--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql;" | $MYSQL_TEST 2>&1

remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql;

# connect when "disable_abort_on_error" caused "connection not found"
--disable_abort_on_error
connect (con1,localhost,root,,);
connection default;
connection con1;
disconnect con1;
--enable_abort_on_error

# Test connect without a database
connect (con2,localhost,root,,*NO-ONE*);
--error ER_NO_DB_ERROR
show tables;
disconnect con2;
connection default;

# Test enable_connect_log
--enable_connect_log
connect (con1,localhost,root,,);
connection default;
connection con1;
--disable_query_log
# These should not be logged
connect (con2,localhost,root,,*NO-ONE*);
connection con2;
disconnect con2;
connection con1;
--enable_query_log
disconnect con1;
connection default;
--disable_connect_log

# ----------------------------------------------------------------------------
# Test mysqltest arguments
# ----------------------------------------------------------------------------

# -x <file_name>, use the file specified after -x as the test file
--exec $MYSQL_TEST < $MYSQL_TEST_DIR/include/mysqltest-x.inc
--exec $MYSQL_TEST -x $MYSQL_TEST_DIR/include/mysqltest-x.inc
--exec $MYSQL_TEST --test_file=$MYSQL_TEST_DIR/include/mysqltest-x.inc
# Fix Win paths
--replace_result \\ /
--error 1
--exec $MYSQL_TEST -x non_existing_file.inc 2>&1


# ----------------------------------------------------------------------------
# TODO Test queries, especially their errormessages... so it's easy to debug
# new scripts and diagnose errors
# ----------------------------------------------------------------------------

# ----------------------------------------------------------------------------
# Test Bug#12386
# ----------------------------------------------------------------------------
let $num= 2;
while ($num)
{
   --error ER_PARSE_ERROR

   failing_statement;

   dec $num;
}

SELECT 1 as a;


#
# Bug#10251 Identifiers containing quotes not handled correctly
#
select 1 as `a'b`, 2 as `a"b`;

# Test escaping of quotes
select 'aaa\\','aa''a',"aa""a";

#
# Check of include/show_msg.inc and include/show_msg80.inc
#

# The message contains in most cases a string with the default character set
let $message= Here comes a message;
--source include/show_msg.inc

# The message could also contain a string with character set utf8
let $message= `SELECT USER()`;
--source include/show_msg.inc

# The message contains more then 80 characters on multiple lines
# and is kept between double quotes.
let $message=
"Here comes a very very long message that
    - is longer then 80 characters    and
    - consists of several lines";
--source include/show_msg80.inc

# The message contains more then 80 characters on multiple lines
# and uses the auxiliary character "." at the beginning of the message lines.
let $message= . Here comes a very very long message that
              .      - is longer then 80 characters    and
              .      - consists of several lines;
--source include/show_msg80.inc

#
# Test --enable_parsing / disable_parsing
#
--disable_query_log
--disable_parsing
# The following will not enable query logging
--enable_query_log
select "this will not be executed";
--enable_parsing
select "this will be executed";
--enable_query_log

#
# Test zero length result file. Should not pass
#
--exec echo '' > $MYSQLTEST_VARDIR/tmp/zero_length_file.result
--exec echo "echo ok;" > $MYSQLTEST_VARDIR/tmp/query.sql
--error 1
--exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/query.sql -R $MYSQLTEST_VARDIR/tmp/zero_length_file.result  > /dev/null 2>&1

remove_file $MYSQLTEST_VARDIR/tmp/zero_length_file.result;
--error 0,1
remove_file $MYSQLTEST_VARDIR/tmp/zero_length_file.reject;
--error 0,1
remove_file $MYSQLTEST_VARDIR/tmp/zero_length_file.log;
--error 0,1
remove_file $MYSQL_TEST_DIR/r/zero_length_file.reject;

#
# Test that a test file that does not generate any output fails.
#
--exec echo "let \$i= 1;" > $MYSQLTEST_VARDIR/tmp/query.sql
--error 1
--exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/query.sql  2>&1

remove_file $MYSQLTEST_VARDIR/tmp/query.sql;

#
# Test that mysqltest fails when there are no queries executed
# but a result file exists
# NOTE! This will never happen as long as it's not allowed to have
# test files that produce no output
#--exec echo "something" > $MYSQLTEST_VARDIR/tmp/result_file.result
#--exec echo "let \$i= 1;" > $MYSQLTEST_VARDIR/tmp/query.sql
#--error 1
#--exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/query.sql -R $MYSQLTEST_VARDIR/tmp/result_file.result 2>&1

#
# Bug#11731 mysqltest in multi-statement queries ignores errors in
#           non-1st queries
#

echo Failing multi statement query;
# PS does not support multi statement
--exec echo "--disable_ps_protocol"                    > $MYSQLTEST_VARDIR/tmp/bug11731.sql
--exec echo "delimiter ||||;"                         >> $MYSQLTEST_VARDIR/tmp/bug11731.sql
--exec echo "create table t1 (a int primary key);"    >> $MYSQLTEST_VARDIR/tmp/bug11731.sql
--exec echo "insert into t1 values (1);"              >> $MYSQLTEST_VARDIR/tmp/bug11731.sql
--exec echo "select 'select-me';"                     >> $MYSQLTEST_VARDIR/tmp/bug11731.sql
--exec echo "insertz 'error query'||||"               >> $MYSQLTEST_VARDIR/tmp/bug11731.sql
--exec echo "delimiter ;||||"                         >> $MYSQLTEST_VARDIR/tmp/bug11731.sql

--error 1
--exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/bug11731.sql 2>&1
drop table t1;

--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1
--exec $MYSQL_TEST --record -x $MYSQLTEST_VARDIR/tmp/bug11731.sql -R $MYSQLTEST_VARDIR/tmp/bug11731.out 2>&1
# The .out file should be non existent
--error 1
--file_exists $MYSQLTEST_VARDIR/tmp/bug11731.out
drop table t1;


echo Multi statement using expected error;
# PS does not support multi statement
--exec echo "--disable_ps_protocol"                    > $MYSQLTEST_VARDIR/tmp/bug11731.sql
--exec echo "delimiter ||||;"                         >> $MYSQLTEST_VARDIR/tmp/bug11731.sql
--exec echo "--error 1064"                            >> $MYSQLTEST_VARDIR/tmp/bug11731.sql
--exec echo "create table t1 (a int primary key);"    >> $MYSQLTEST_VARDIR/tmp/bug11731.sql
--exec echo "insert into t1 values (1);"              >> $MYSQLTEST_VARDIR/tmp/bug11731.sql
--exec echo "select 'select-me';"                     >> $MYSQLTEST_VARDIR/tmp/bug11731.sql
--exec echo "insertz "error query"||||"               >> $MYSQLTEST_VARDIR/tmp/bug11731.sql
--exec echo "delimiter ;||||"                         >> $MYSQLTEST_VARDIR/tmp/bug11731.sql
--exec echo "exit;"                                   >> $MYSQLTEST_VARDIR/tmp/bug11731.sql

# These two should work since the error is expected
--exec $MYSQL_TEST -x $MYSQLTEST_VARDIR/tmp/bug11731.sql  2>&1
drop table t1;

--exec $MYSQL_TEST --record -x $MYSQLTEST_VARDIR/tmp/bug11731.sql -R $MYSQLTEST_VARDIR/tmp/bug11731.out 2>&1
# The .out file should exist
--file_exists $MYSQLTEST_VARDIR/tmp/bug11731.out
drop table t1;
remove_file $MYSQLTEST_VARDIR/tmp/bug11731.out;
remove_file $MYSQLTEST_VARDIR/log/bug11731.log;
remove_file $MYSQLTEST_VARDIR/tmp/bug11731.sql;

#
# Bug#19890 mysqltest "query" command is broken
#

# It should be possible to use the command "query" to force mysqltest to
# send the command to the server although it's a builtin mysqltest command.
--error ER_PARSE_ERROR

query sleep;

--error ER_PARSE_ERROR

--query sleep

# Just an empty query command
--error ER_EMPTY_QUERY

query ;

# test for replace_regex
--replace_regex /at/b/
select "at" as col1, "c" as col2;

--replace_regex /at/b/i
select "at" as col1, "AT" as col2, "c" as col3;

--replace_regex /a/b/ /ct/d/
select "a" as col1, "ct" as col2;

--replace_regex /(strawberry)/raspberry and \1/ /blueberry/blackberry/ /potato/tomato/;
select "strawberry","blueberry","potato";

--error 1
--exec echo "--replace_regex a" | $MYSQL_TEST 2>&1
--error 1
--exec echo "--replace_regex a;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "replace_regex a;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "replace_regex a ;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "replace_regex a b; echo OK;" | $MYSQL_TEST 2>&1
--error 1
--exec echo "--replace_regex /a b c" | $MYSQL_TEST 2>&1
--error 1
--exec echo "replace_regex /a /b c ;" | $MYSQL_TEST 2>&1

# REQUIREMENT
#   replace_regex should replace substitutions from left to right in output

create table t1 (a int, b int);
insert into t1 values (1,3);
insert into t1 values (2,4);
--replace_regex /A/C/ /B/D/i /3/2/ /2/1/
select * from t1;
drop table t1;

# Test usage with ``

--replace_regex /x/y/
--let $result= `select "x" as col`
--echo $result

# Test usage with a variable as pattern list

--disable_query_log
--let $patt= /a /b / /less/more/
--replace_regex $patt
select "a is a and less is more" as txt;
--let $patt=
--replace_regex $patt
select "a is a and less is more" as txt;
--enable_query_log

#-------------------------------------------------------------------------
# BUG #11754855 : Passing variable to --error  
#-------------------------------------------------------------------------
create table t2 ( a char(10));
let $errno1=0;
let $errno2=ER_PARSE_ERROR;
let $errno3=ER_NO_SUCH_TABLE;
--error $errno2 
garbage;

--error $errno2,$errno3
garbage;

--error $errno2,ER_NO_SUCH_TABLE
garbage;

--error ER_NO_SUCH_TABLE,$errno2
insert into t1 values ("Abcd");

--error $errno1,ER_PARSE_ERROR
garbage;

drop table t2;


# ----------------------------------------------------------------------------
# Tests of send
# ----------------------------------------------------------------------------

create table t1 ( f1 char(10));
insert into t1 values ("Abcd");

# 1. Basic test

send select * from t1;
reap;

# 2. Test with error

--send select * from t2;
--error ER_NO_SUCH_TABLE
--reap

# 3. test send of next stmt

--send
select * from t1;
--reap

# 4. Non-query stmt betwen send and reap allowed

--send select * from t1;
--sleep 0.05
--echo Result coming up
--reap

# 5. Test of send_eval

--let $my_stmt= select * from t1;
--send_eval $my_stmt
--reap

# 6. Test that mysqltest does not allow query stmt between send and reap
# Untestable directly as it causes mysqltest to fail

--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.in
--send select * from t1;
select 1;
--reap
EOF
--error 1
# Must filter unpredictable extra warning from output
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.in > $MYSQL_TMP_DIR/mysqltest.out 2>&1
--perl
  my $dir= $ENV{'MYSQL_TMP_DIR'};
  open (FILE, "$dir/mysqltest.out");
  while (<FILE>) {
    print unless /Note: net_clear/; # This shows up on rare occations
  }
EOF
remove_file $MYSQL_TMP_DIR/mysqltest.out;
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.in;

drop table t1;

# ----------------------------------------------------------------------------
# test for remove_file
# ----------------------------------------------------------------------------

--error 1
--exec echo "remove_file ;" | $MYSQL_TEST 2>&1

--error 1
remove_file non_existing_file;

# ----------------------------------------------------------------------------
# test for remove_files_wildcard
# ----------------------------------------------------------------------------

--error 1
--exec echo "remove_files_wildcard ;" | $MYSQL_TEST 2>&1

--error 1
remove_files_wildcard non_existing_dir;

--error 1
remove_files_wildcard non_existing_dir non_existing_file;

# ----------------------------------------------------------------------------
# test for write_file
# ----------------------------------------------------------------------------
--error 1
--exec echo "write_file ;" | $MYSQL_TEST 2>&1

--error 1
--exec echo "write_file filename ;" | $MYSQL_TEST 2>&1

# Comment out this test as it confuses cmd.exe with unmatched "
#--error 1
#--exec echo "write_file filename \";" | $MYSQL_TEST 2>&1

write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
Content for test_file1
EOF
file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
cat_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;

write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp END_DELIMITER;
Content for test_file1 contains EOF
END_DELIMITER
file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;

# write to already exisiting file
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1
--exec echo "write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;" | $MYSQL_TEST 2>&1

remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;

# ----------------------------------------------------------------------------
# test for append_file
# ----------------------------------------------------------------------------

write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
Content for test_file1
EOF
file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;

append_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
Appended text
EOF
file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;

remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
append_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
Appended text on nonexisting file
EOF

remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;

# Test append_file within while
let $outer= 2; # Number of outer loops
while ($outer)
{
  append_file $MYSQLTEST_VARDIR/tmp/app_while.tmp;
These lines should be repeated,
if things work as expected
EOF
  dec $outer;
}

cat_file $MYSQLTEST_VARDIR/tmp/app_while.tmp;
remove_file $MYSQLTEST_VARDIR/tmp/app_while.tmp;

# ----------------------------------------------------------------------------
# test for cat_file
# ----------------------------------------------------------------------------

--write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp
Some data
for cat_file command
of mysqltest
EOF
cat_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;

--replace_regex /my_errno=[0-9]*/(my_errno)/
--error 1
--exec echo "cat_file non_existing_file;" | $MYSQL_TEST 2>&1

# ----------------------------------------------------------------------------
# test for diff_files
# ----------------------------------------------------------------------------

--write_file $MYSQLTEST_VARDIR/tmp/diff1.tmp
Some data
for diff_file command
of mysqltest
EOF

--write_file $MYSQLTEST_VARDIR/tmp/diff2.tmp
Some data
for diff_file command
of mysqltest
EOF

--write_file $MYSQLTEST_VARDIR/tmp/diff3.tmp
Some other data
for diff_file command
of mysqltest
EOF

--write_file $MYSQLTEST_VARDIR/tmp/diff4.tmp
Some data
for diff_file command
of musqltest
EOF

# Compare equal files
--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff2.tmp
--diff_files $MYSQLTEST_VARDIR/tmp/diff2.tmp $MYSQLTEST_VARDIR/tmp/diff1.tmp

# Compare files that differ in size
--error 2
--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff3.tmp
--error 2
--diff_files $MYSQLTEST_VARDIR/tmp/diff3.tmp $MYSQLTEST_VARDIR/tmp/diff1.tmp

# Compare files that differ only in content
--error 1
--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff4.tmp
--error 1
--diff_files $MYSQLTEST_VARDIR/tmp/diff4.tmp $MYSQLTEST_VARDIR/tmp/diff1.tmp

# Compare equal files, again...
--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff2.tmp

--remove_file $MYSQLTEST_VARDIR/tmp/diff1.tmp
--remove_file $MYSQLTEST_VARDIR/tmp/diff2.tmp
--remove_file $MYSQLTEST_VARDIR/tmp/diff3.tmp
--remove_file $MYSQLTEST_VARDIR/tmp/diff4.tmp


# ----------------------------------------------------------------------------
# test for file_exist
# ----------------------------------------------------------------------------
--error 1
--exec echo "file_exists ;" | $MYSQL_TEST 2>&1

--error 0,1
remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
--error 1
file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
Content for test_file1
EOF
file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
--error 1
file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;


# ----------------------------------------------------------------------------
# test for copy_file
# ----------------------------------------------------------------------------
--write_file $MYSQLTEST_VARDIR/tmp/file1.tmp
file1
EOF

copy_file $MYSQLTEST_VARDIR/tmp/file1.tmp $MYSQLTEST_VARDIR/tmp/file2.tmp;
file_exists $MYSQLTEST_VARDIR/tmp/file2.tmp;
remove_file $MYSQLTEST_VARDIR/tmp/file1.tmp;
remove_file $MYSQLTEST_VARDIR/tmp/file2.tmp;

--error 1
--exec echo "copy_file ;" | $MYSQL_TEST 2>&1

--error 1
--exec echo "copy_file from_file;" | $MYSQL_TEST 2>&1


# ----------------------------------------------------------------------------
# test for move_file
# ----------------------------------------------------------------------------

# - Check that if source file does not exist, nothing will be created.

--error 1
file_exists $MYSQLTEST_VARDIR/tmp/file1.tmp;
--error 1
file_exists $MYSQLTEST_VARDIR/tmp/file2.tmp;
--error 1
move_file $MYSQLTEST_VARDIR/tmp/file1.tmp $MYSQLTEST_VARDIR/tmp/file2.tmp;
--error 1
file_exists $MYSQLTEST_VARDIR/tmp/file1.tmp;
--error 1
file_exists $MYSQLTEST_VARDIR/tmp/file2.tmp;

# - Check that if source file exists, everything works properly.

--write_file $MYSQLTEST_VARDIR/tmp/file1.tmp
file1
EOF

move_file $MYSQLTEST_VARDIR/tmp/file1.tmp $MYSQLTEST_VARDIR/tmp/file2.tmp;
--error 1
file_exists $MYSQLTEST_VARDIR/tmp/file1.tmp;
file_exists $MYSQLTEST_VARDIR/tmp/file2.tmp;

# - Check that if destination file exists, everything works properly.
#   (file2.tmp exists from the previous check; file1.tmp needs to be created)

--write_file $MYSQLTEST_VARDIR/tmp/file1.tmp
file1
EOF

move_file $MYSQLTEST_VARDIR/tmp/file1.tmp $MYSQLTEST_VARDIR/tmp/file2.tmp;
--error 1
file_exists $MYSQLTEST_VARDIR/tmp/file1.tmp;
file_exists $MYSQLTEST_VARDIR/tmp/file2.tmp;
remove_file $MYSQLTEST_VARDIR/tmp/file2.tmp;

# - Check usage.

--error 1
--exec echo "move_file ;" | $MYSQL_TEST 2>&1

--error 1
--exec echo "move_file from_file;" | $MYSQL_TEST 2>&1

# ----------------------------------------------------------------------------
# test for chmod
# ----------------------------------------------------------------------------
--write_file $MYSQLTEST_VARDIR/tmp/file1.tmp
file1
EOF

chmod 0000 $MYSQLTEST_VARDIR/tmp/file1.tmp;
# The below write fails, but --error is not implemented
# for write_file
#--write_file $MYSQLTEST_VARDIR/tmp/file1.tmp
#test should fail
#EOF

chmod 0777 $MYSQLTEST_VARDIR/tmp/file1.tmp;
remove_file $MYSQLTEST_VARDIR/tmp/file1.tmp;
--write_file $MYSQLTEST_VARDIR/tmp/file1.tmp
test2
EOF

remove_file $MYSQLTEST_VARDIR/tmp/file1.tmp;

--error 1
--exec echo "chmod ;" | $MYSQL_TEST 2>&1

--error 1
--exec echo "chmod 0 from_file;" | $MYSQL_TEST 2>&1

--error 1
--exec echo "chmod 08 from_file;" | $MYSQL_TEST 2>&1

--error 1
--exec echo "chmod from_file;" | $MYSQL_TEST 2>&1

--error 1
--exec echo "chmod ABZD from_file;" | $MYSQL_TEST 2>&1

--error 1
--exec echo "chmod 06789 from_file;" | $MYSQL_TEST 2>&1


# ----------------------------------------------------------------------------
# test for perl
# ----------------------------------------------------------------------------
--perl
print "hello\n";
EOF

--perl EOF
print "hello\n";
EOF

--perl DELIMITER
print "hello\n";
DELIMITER

--error 1
--exec echo "perl TOO_LONG_DELIMITER ;" | $MYSQL_TEST 2>&1

perl;
print "hello\n";
EOF

perl;
  # Print "hello"
  print "hello\n";
EOF

# Test perl within while, also with if being false first iteration
let $outer= 3;
let $ifval= 0;
while ($outer) {
  if ($ifval) {
    perl UNTIL;
      my $val= 5;
      print "val is $val\n";
UNTIL
  }
  inc $ifval;
  dec $outer;
}

# ----------------------------------------------------------------------------
# test for die
# ----------------------------------------------------------------------------

--error 1
--exec echo "die test of die;" | $MYSQL_TEST 2>&1


# ----------------------------------------------------------------------------
# test for exit
# ----------------------------------------------------------------------------

--exec echo "echo Some output; exit; echo Not this;" | $MYSQL_TEST 2>&1

# ----------------------------------------------------------------------------
# test for sorted_result
# ----------------------------------------------------------------------------

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;
--sorted_result
select * from t1;
# Should not be sorted
select * from t1;
disable_result_log;
sorted_result;
select * from t1;
enable_result_log;
--sorted_result
select '';
sorted_result;
select "h";
--sorted_result
select "he";
--sorted_result
select "hep";
--sorted_result
select "hepp";

drop table t1;

# 1. Assignment of result set sorting
sorted_result;
 SELECT 2 as "my_col"
UNION
SELECT 1;
#
--sorted_result
SELECT 2 as "my_col" UNION SELECT 1;
--sorted_result
SELECT 2 as "my_col"
UNION
SELECT 1;

# 2. Ensure that the table header will be not sorted into the result
--sorted_result
SELECT '2' as "3"
UNION
SELECT '1';

# 3. Ensure that an empty result set does not cause problems
CREATE TABLE t1( a CHAR);
--sorted_result
SELECT * FROM t1;
DROP TABLE t1;

# 4. Ensure that NULL values within the result set do not cause problems
SELECT NULL as "my_col1",2 AS "my_col2"
UNION
SELECT NULL,1;
--sorted_result
SELECT NULL as "my_col1",2 AS "my_col2"
UNION
SELECT NULL,1;
#
SELECT 2 as "my_col1",NULL AS "my_col2"
UNION
SELECT 1,NULL;
--sorted_result
SELECT 2 as "my_col1",NULL AS "my_col2"
UNION
SELECT 1,NULL;

# 5. "sorted_result" changes nothing when applied to a non query statement.
sorted_result;
 SET @a = 17;
#
# 6. Show that "sorted_result;" before the "SET @a = 17;" above does not affect
# the now following query.
SELECT 2 as "my_col"
UNION
SELECT 1;

# 7. Ensure that "sorted_result" in combination with $variables works
let $my_stmt=SELECT 2 as "my_col"
UNION
SELECT 1;
--sorted_result
eval $my_stmt;

# 8. Ensure that "sorted_result " does not change the semantics of
#    "--error ...." or the protocol output after such an expected failure
--sorted_result
--error ER_NO_SUCH_TABLE

SELECT '2' as "my_col1",2 as "my_col2"
UNION
SELECT '1',1 from t2;

# 9. Ensure that several result formatting options including "sorted_result"
#    - have all an effect
#    - "--sorted_result" does not need to be direct before the statement
#    - Row sorting is applied after modification of the column content
--sorted_result
--replace_column 1 #
SELECT '1' as "my_col1",2 as "my_col2"
UNION
SELECT '2',1;

# 10. Ensure that at least 1024 rows within a result set do not cause problems
#
CREATE TABLE t1 (f1 INT);
INSERT INTO t1 SET f1 = 1024;
INSERT INTO t1 SELECT f1 - 1 FROM t1;
INSERT INTO t1 SELECT f1 - 2 FROM t1;
INSERT INTO t1 SELECT f1 - 4 FROM t1;
INSERT INTO t1 SELECT f1 - 8 FROM t1;
INSERT INTO t1 SELECT f1 - 16 FROM t1;
INSERT INTO t1 SELECT f1 - 32 FROM t1;
INSERT INTO t1 SELECT f1 - 64 FROM t1;
INSERT INTO t1 SELECT f1 - 128 FROM t1;
INSERT INTO t1 SELECT f1 - 256 FROM t1;
INSERT INTO t1 SELECT f1 - 512 FROM t1;
--disable_result_log ONCE
--sorted_result
SELECT * FROM t1;
DROP TABLE t1;

# ----------------------------------------------------------------------------
# test for lowercase_result
# ----------------------------------------------------------------------------

# 1. Basic test
--lowercase_result
SELECT "500g BL�B�RSYLTET�Y" AS "WILL BE lower cased";

# 2. test that it does not apply to next statement
SELECT "UPPER" AS "WILL NOT BE lower cased";

# 3. test that it does not affect non-SQL or the following statement
--lowercase_result
--echo UP
SELECT 0 as "UP AGAIN";

# 4. test that it works with eval and variables
let $lower_stmt=SELECT "ABCdef" AS "uvwXYZ";
--lowercase_result
eval $lower_stmt;

# 5. test that it works in combination with sort
sorted_result;
lowercase_result;
SELECT "Xyz" AS Name UNION SELECT "Abc" as Name ORDER BY Name DESC;

# 6. Test combination with replace, and that lower casing is done first
--lowercase_result
--replace_result old new
SELECT 1 as "SOME OLD TEXT";

# 7. Test missing lower casing of "unknown" characters
--character_set utf8
--lowercase_result
SELECT 0 as "WILL NOT lower case ���";
--character_set latin1

# ----------------------------------------------------------------------------
# Some coverage tests
# ----------------------------------------------------------------------------

--disable_query_log
--exec $MYSQL_TEST --help 2>&1 > /dev/null
--exec $MYSQL_TEST --version 2>&1 > /dev/null
--enable_query_log
--disable_abort_on_error ONCE
--error 1
--exec $MYSQL_TEST a b c 2>&1 > /dev/null

# ----------------------------------------------------------------------------
# test for query_get_value
# ----------------------------------------------------------------------------

CREATE TABLE t1(
 a int, b varchar(255), c datetime
);
SHOW COLUMNS FROM t1;

#------------ Positive tests ------------
# 1. constant parameters
#    value is simple string without spaces
let $value= query_get_value(SHOW COLUMNS FROM t1, Type, 1);
--echo statement=SHOW COLUMNS FROM t1 row_number=1, column_name="Type", Value=$value
let $value= query_get_value("SHOW COLUMNS FROM t1", Type, 1);
--echo statement="SHOW COLUMNS FROM t1" row_number=1, column_name="Type", Value=$value
#
# 2. $variables as parameters
#    value IS NULL
let $my_show= SHOW COLUMNS FROM t1;
let $column_name= Default;
let $row_number= 1;
let $value= query_get_value($my_show, $column_name, $row_number);
--echo statement=$my_show row_number=$row_number, column_name=$column_name, Value=$value
#
# 3. result set of a SELECT (not recommended, because projection and
#         selection could be done much better by pure SELECT functionality)
#    value is string with space in the middle
let $value= query_get_value(SELECT 'A B' AS "MyColumn", MyColumn, 1);
--echo value= ->$value<-
#
# 4. column name with space
let $value= query_get_value(SELECT 1 AS "My Column", My Column, 1);
--echo value= $value
#
# 4.1 Query containing , protected by quotes, quotes also on column
let $value= query_get_value('SELECT 1 as a, 2 as b', "b", 1);
--echo value= $value
#
#------------ Negative tests ------------
# 5. Incomplete statement including missing parameters
# 5.1 incomplete statement
--error 1
--exec echo "let \$value= query_get_value(SHOW;" | $MYSQL_TEST 2>&1
# 5.2 missing query
--error 1
--exec echo "let \$value= query_get_value;" | $MYSQL_TEST 2>&1
# 5.3 missing column name
--error 1
--exec echo "let \$value= query_get_value(SHOW COLUMNS FROM t1);" | $MYSQL_TEST 2>&1
# 5.4 missing row number
--error 1
--exec echo "let \$value= query_get_value(SHOW COLUMNS FROM t1, Field);" | $MYSQL_TEST 2>&1
#
# 6. Somehow "wrong" value of parameters
# 6.1 row parameter
# 6.1.1 non sense number 0
let $value= initialized;
let $value= query_get_value(SHOW COLUMNS FROM t1, Field, 0);
--echo value= $value
# 6.1.2 after the last row
let $value= initialized;
let $value= query_get_value(SHOW COLUMNS FROM t1, Field, 10);
--echo value= $value
# 6.1.3 invalid row number
--error 1
--exec echo "let \$value= query_get_value(SHOW COLUMNS FROM t1, Field, notnumber);" | $MYSQL_TEST 2>&1
# 6.2 column name parameter, name of not existing column
--error 1
--exec echo "let \$value= query_get_value(SHOW COLUMNS FROM t1, column_not_exists, 1);" | $MYSQL_TEST 2>&1
# 6.3. statement which never gives a result set
--error 1
--exec echo "let \$value= query_get_value(SET @A = 1, Field, 1);" | $MYSQL_TEST 2>&1
# 6.4. statement contains a ","
#      Note: There is no need to improve this, because we need query_get_value
#            for SHOW commands only.
--error 1
--exec echo "let \$value= query_get_value(SELECT 1 AS "A", 1 AS "B", 1);" | $MYSQL_TEST 2>&1
#
# 7. empty result set
let $value= initialized;
let $value= query_get_value(SELECT a FROM t1, a, 1);
--echo value= $value
#
# 9. failing statement
--error 1
--exec echo "let \$value= query_get_value(SHOW COLNS FROM t1, Field, 1);" | $MYSQL_TEST 2>&1
#
# 10. Artificial example how to process a complete SHOW result set:
let $show_statement= SHOW COLUMNS FROM t1;
let $rowno= 1;
let $run=1;
let $count= 0;
--echo
--echo Field Type Null Key Default Extra
while ($run)
{
   let $Field=   query_get_value($show_statement, Field,   $rowno);
   if ($Field == No such row)
   {
      let $run= 0;
   }
   if ($Field != No such row)
   {
      let $Type=    query_get_value($show_statement, Type,    $rowno);
      let $Null=    query_get_value($show_statement, Null,    $rowno);
      if ($Null == YES)
      {
         inc $count;
      }
      let $Key=     query_get_value($show_statement, Key,     $rowno);
      let $Default= query_get_value($show_statement, Default, $rowno);
      let $Extra=   query_get_value($show_statement, Extra,   $rowno);
      --echo $Field $Type $Null ->$Key<- $Default $Extra
      inc $rowno;
   }
}
--echo
--echo Number of columns with Default NULL: $count
--echo
eval $show_statement;

drop table t1;

# ----------------------------------------------------------------------------
# Test change_user command
# ----------------------------------------------------------------------------

--error 1
--exec echo "--change_user root,,inexistent" | $MYSQL_TEST 2>&1

--error 1
--exec echo "--change_user inexistent,,test" | $MYSQL_TEST 2>&1

--error 1
--exec echo "--change_user root,inexistent,test" | $MYSQL_TEST 2>&1

--change_user
--change_user root
--change_user root,,
--change_user root,,test

# ----------------------------------------------------------------------------
# Test mkdir and rmdir command
# ----------------------------------------------------------------------------

mkdir $MYSQLTEST_VARDIR/tmp/testdir;
rmdir $MYSQLTEST_VARDIR/tmp/testdir;

# Directory already exist
mkdir $MYSQLTEST_VARDIR/tmp/testdir;
--error 1
mkdir $MYSQLTEST_VARDIR/tmp/testdir;

# Remove dir with file inside
write_file $MYSQLTEST_VARDIR/tmp/testdir/file1.txt;
hello
EOF

# Verify that --replace_result also work on list_files
--replace_result file REPLACED_FILE
list_files $MYSQLTEST_VARDIR/tmp/testdir;
# list_files gets the directory list before creating the new file
list_files_write_file $MYSQLTEST_VARDIR/tmp/testdir/file2.txt $MYSQLTEST_VARDIR/tmp/testdir *;
list_files_append_file $MYSQLTEST_VARDIR/tmp/testdir/file2.txt $MYSQLTEST_VARDIR/tmp/testdir *2*;
list_files_write_file $MYSQLTEST_VARDIR/tmp/testdir/file2.txt $MYSQLTEST_VARDIR/tmp/testdir file?.txt;
list_files_append_file $MYSQLTEST_VARDIR/tmp/testdir/file3.txt $MYSQLTEST_VARDIR/tmp/testdir file*.txt;
diff_files $MYSQLTEST_VARDIR/tmp/testdir/file2.txt $MYSQLTEST_VARDIR/tmp/testdir/file3.txt;
--error 1
rmdir $MYSQLTEST_VARDIR/tmp/testdir;

cat_file $MYSQLTEST_VARDIR/tmp/testdir/file3.txt;

# Test replace_result and that it does not affect next SQL stmt
replace_result file prefix;
list_files $MYSQLTEST_VARDIR/tmp/testdir;
SELECT "bla bla file" as x;

list_files_write_file $MYSQLTEST_VARDIR/tmp/testdir/file11.txt $MYSQLTEST_VARDIR/tmp/testdir file?.txt;
remove_files_wildcard $MYSQLTEST_VARDIR/tmp/testdir file?.txt;
list_files_write_file $MYSQLTEST_VARDIR/tmp/testdir/dir-list.txt $MYSQLTEST_VARDIR/tmp/testdir file*.txt;
cat_file $MYSQLTEST_VARDIR/tmp/testdir/dir-list.txt;
remove_files_wildcard $MYSQLTEST_VARDIR/tmp/testdir file*.txt;
list_files $MYSQLTEST_VARDIR/tmp/testdir;
remove_files_wildcard $MYSQLTEST_VARDIR/tmp/testdir;
list_files $MYSQLTEST_VARDIR/tmp/testdir;
rmdir $MYSQLTEST_VARDIR/tmp/testdir;

#
# Bug#36041 mysql-test-run doesn't seem to string match 100% effectively
#           on Windows
#

--replace_result c:\\a.txt z
SELECT 'c:\\a.txt' AS col;

# ----------------------------------------------------------------------------
# Test that -- is not allowed as comment, only as mysqltest builtin command
# ----------------------------------------------------------------------------

# valid
select 1;
--query select 1
--query -- a comment for the server

# Not valid, "select" is not a mysqltest command
--error 1
--exec echo "--select 1;" | $MYSQL_TEST 2>&1


# ----------------------------------------------------------------------------
# BUG#35701 please allow test language variables in connection and sync_slave_with_master
# Test that "connection $variable" works and that $CURRENT_CONNECTION has the right value.
# ----------------------------------------------------------------------------

connect (con1,localhost,root,,);
--echo $CURRENT_CONNECTION
connect (con2,localhost,root,,);
--echo $CURRENT_CONNECTION

connection default;
--echo $CURRENT_CONNECTION

connection con1;
--echo $CURRENT_CONNECTION

connection con2;
--echo $CURRENT_CONNECTION

let $x= con1;
let $y= con2;

connection $x;
--echo $CURRENT_CONNECTION

connection $y;
--echo $CURRENT_CONNECTION

# Disconnect the not selected connection
disconnect $x;
--echo $CURRENT_CONNECTION

# Disconnect the selected connection
disconnect $y;
--echo $CURRENT_CONNECTION


--echo End of tests

connection default;
# Wait till we reached the initial number of concurrent sessions
--source include/wait_until_count_sessions.inc

Filemanager

Name Type Size Permission Actions
1st.test File 102 B 0644
alias.test File 9 KB 0644
almost_full.test File 848 B 0644
alter_table-big.test File 5.67 KB 0644
alter_table.test File 68.73 KB 0644
analyze.test File 2.25 KB 0644
ansi.test File 847 B 0644
archive-big.test File 41.09 KB 0644
archive.test File 106.4 KB 0644
archive_bitfield.test File 3.94 KB 0644
archive_debug.test File 395 B 0644
archive_gis.test File 103 B 0644
archive_no_symlink-master.opt File 22 B 0644
archive_no_symlink.test File 810 B 0644
archive_plugin-master.opt File 33 B 0644
archive_plugin.test File 972 B 0644
archive_symlink.test File 2.48 KB 0644
audit_plugin-master.opt File 17 B 0644
audit_plugin.test File 1.48 KB 0644
auth_rpl-master.opt File 35 B 0644
auth_rpl-slave.opt File 36 B 0644
auth_rpl.test File 1.86 KB 0644
auto_increment.test File 10.98 KB 0644
bench_count_distinct.test File 416 B 0644
bigint.test File 13.32 KB 0644
binary.test File 4.45 KB 0644
binary_to_hex.test File 2.24 KB 0644
blackhole.test File 762 B 0644
blackhole_plugin-master.opt File 35 B 0644
blackhole_plugin.test File 1009 B 0644
bool.test File 2.47 KB 0644
bootstrap-master.opt File 98 B 0644
bootstrap.test File 1.64 KB 0644
bug12427262.test File 1.7 KB 0644
bug12969156-master.opt File 32 B 0644
bug12969156.test File 498 B 0644
bug17076131-master.opt File 57 B 0644
bug17076131.test File 1.06 KB 0644
bug33509-master.opt File 33 B 0644
bug33509.test File 2.52 KB 0644
bug39022.test File 1.62 KB 0644
bug46080-master.opt File 69 B 0644
bug46080.test File 723 B 0644
bug46261-master.opt File 40 B 0644
bug46261.test File 405 B 0644
bug46760-master.opt File 53 B 0644
bug46760.test File 970 B 0644
bug47671-master.opt File 66 B 0644
bug47671.test File 448 B 0644
bug58669-master.opt File 12 B 0644
bug58669.test File 495 B 0644
bulk_replace.test File 311 B 0644
cache_innodb-master.opt File 21 B 0644
cache_innodb.test File 707 B 0644
case.test File 6.29 KB 0644
cast.test File 9.18 KB 0644
change_user-master.opt File 16 B 0644
change_user.test File 3.9 KB 0644
check.test File 1.59 KB 0644
check_auto_permission.test File 2.06 KB 0644
client_xml.test File 1.47 KB 0644
comment_column.test File 36.33 KB 0644
comment_column2.test File 131.05 KB 0644
comment_index.test File 22.08 KB 0644
comment_table.test File 13.99 KB 0644
comments.test File 1.37 KB 0644
commit.test File 15.16 KB 0644
commit_1innodb.test File 255 B 0644
compare.test File 2.25 KB 0644
compress.test File 827 B 0644
concurrent_innodb_safelog-master.opt File 29 B 0644
concurrent_innodb_safelog.test File 716 B 0644
concurrent_innodb_unsafelog-master.opt File 62 B 0644
concurrent_innodb_unsafelog.test File 718 B 0644
connect.test File 14.32 KB 0644
connect_debug.test File 2.12 KB 0644
consistent_snapshot.test File 2.02 KB 0644
constraints.test File 1.65 KB 0644
count_distinct.test File 7.47 KB 0644
count_distinct2-master.opt File 28 B 0644
count_distinct2.test File 1.83 KB 0644
count_distinct3.test File 1.35 KB 0644
create-big.test File 16.96 KB 0644
create.test File 65.6 KB 0644
create_not_windows.test File 1.06 KB 0644
create_select_tmp.test File 1.29 KB 0644
csv.test File 106.78 KB 0644
csv_alter_table.test File 1.81 KB 0644
csv_not_null.test File 3.24 KB 0644
ctype_ascii.test File 1.2 KB 0644
ctype_big5.test File 4.99 KB 0644
ctype_binary.test File 395 B 0644
ctype_collate.test File 9.18 KB 0644
ctype_cp1250_ch.test File 2.96 KB 0644
ctype_cp1251.test File 2.67 KB 0644
ctype_cp932.test File 1.01 KB 0644
ctype_cp932_binlog_row.test File 236 B 0644
ctype_cp932_binlog_stm.test File 4.57 KB 0644
ctype_create.test File 2.76 KB 0644
ctype_errors.test File 1.33 KB 0644
ctype_eucjpms.test File 29.89 KB 0644
ctype_euckr.test File 5.27 KB 0644
ctype_filename.test File 367 B 0644
ctype_filesystem-master.opt File 73 B 0644
ctype_filesystem.test File 233 B 0644
ctype_gb2312.test File 4.57 KB 0644
ctype_gbk.test File 5.7 KB 0644
ctype_gbk_binlog.test File 961 B 0644
ctype_hebrew.test File 398 B 0644
ctype_latin1.test File 7.15 KB 0644
ctype_latin1_de-master.opt File 67 B 0644
ctype_latin1_de.test File 5.79 KB 0644
ctype_latin2.test File 3.19 KB 0644
ctype_latin2_ch.test File 7.49 KB 0644
ctype_ldml-master.opt File 100 B 0644
ctype_ldml.test File 16.19 KB 0644
ctype_like_range.test File 3.91 KB 0644
ctype_many.test File 14.98 KB 0644
ctype_mb.test File 692 B 0644
ctype_recoding.test File 6.6 KB 0644
ctype_sjis.test File 5.71 KB 0644
ctype_tis620.test File 64.63 KB 0644
ctype_uca.test File 27.57 KB 0644
ctype_ucs.test File 23.66 KB 0644
ctype_ucs2_def-master.opt File 70 B 0644
ctype_ucs2_def.test File 1.49 KB 0644
ctype_ujis.test File 40.45 KB 0644
ctype_ujis_ucs2.test File 83.43 KB 0644
ctype_utf16.test File 22.01 KB 0644
ctype_utf16_def-master.opt File 36 B 0644
ctype_utf16_def.test File 227 B 0644
ctype_utf16_uca.test File 6.43 KB 0644
ctype_utf16le.test File 21.66 KB 0644
ctype_utf32.test File 24.79 KB 0644
ctype_utf32_uca.test File 7.31 KB 0644
ctype_utf8-master.opt File 32 B 0644
ctype_utf8.test File 52.04 KB 0644
ctype_utf8mb4-master.opt File 68 B 0644
ctype_utf8mb4.test File 58.88 KB 0644
ctype_utf8mb4_heap.test File 107 B 0644
ctype_utf8mb4_innodb-master.opt File 32 B 0644
ctype_utf8mb4_innodb.test File 162 B 0644
ctype_utf8mb4_myisam.test File 92 B 0644
ctype_utf8mb4_uca.test File 2.74 KB 0644
date_formats-master.opt File 46 B 0644
date_formats.test File 12.27 KB 0644
ddl_i18n_koi8r.test File 23.19 KB 0644
ddl_i18n_utf8.test File 23.47 KB 0644
deadlock_innodb.test File 358 B 0644
debug_sync.test File 13.71 KB 0644
debug_sync2-master.opt File 29 B 0644
debug_sync2.test File 559 B 0644
default.test File 5.76 KB 0644
delayed.test File 17.33 KB 0644
delete.test File 15.21 KB 0644
deprecated_features.test File 642 B 0644
derived.test File 46.85 KB 0644
dirty_close.test File 1.55 KB 0644
disabled.def File 1.25 KB 0644
disabled_replication-master.opt File 29 B 0644
disabled_replication.test File 2.08 KB 0644
disconnect_on_expired_password_default.test File 1.35 KB 0644
disconnect_on_expired_password_off-master.opt File 37 B 0644
disconnect_on_expired_password_off.test File 1.42 KB 0644
distinct.test File 24.88 KB 0644
drop-no_root.test File 2.38 KB 0644
drop.test File 7.89 KB 0644
drop_debug.test File 779 B 0644
ds_mrr-big.test File 1.99 KB 0644
dynamic_tracing.test File 3.92 KB 0644
empty_table.test File 302 B 0644
enable_cleartext_plugin-master.opt File 35 B 0644
enable_cleartext_plugin.test File 2.48 KB 0644
endspace.test File 4.36 KB 0644
eq_range_idx_stat.test File 2.04 KB 0644
error_simulation.test File 3.29 KB 0644
errors.test File 4.7 KB 0644
events_1.test File 16.1 KB 0644
events_2.test File 15.97 KB 0644
events_bugs-master.opt File 18 B 0644
events_bugs.test File 41.9 KB 0644
events_embedded.test File 79 B 0644
events_grant.test File 5.29 KB 0644
events_logs_tests-master.opt File 41 B 0644
events_logs_tests.test File 3.08 KB 0644
events_microsec.test File 748 B 0644
events_restart-master.opt File 18 B 0644
events_restart.test File 4.45 KB 0644
events_scheduling.test File 4.36 KB 0644
events_stress.test File 4.37 KB 0644
events_time_zone.test File 11.18 KB 0644
events_trans.test File 3.33 KB 0644
events_trans_notembedded.test File 1.7 KB 0644
execution_constants.test File 3.33 KB 0644
explain.test File 11.65 KB 0644
explain_json_all.test File 485 B 0644
explain_json_none.test File 616 B 0644
file_contents.test File 2.9 KB 0644
filesort_debug.test File 2.83 KB 0644
fix_priv_tables.test File 2.21 KB 0644
flush.test File 17.27 KB 0644
flush2-master.opt File 15 B 0644
flush2.test File 360 B 0644
flush_block_commit.test File 2.87 KB 0644
flush_block_commit_notembedded.test File 1.84 KB 0644
flush_read_lock.test File 72.45 KB 0644
flush_read_lock_kill.test File 2.32 KB 0644
flush_table.test File 15.58 KB 0644
foreign_key.test File 2.41 KB 0644
fulltext.test File 22.48 KB 0644
fulltext2.test File 8.12 KB 0644
fulltext3.test File 781 B 0644
fulltext_cache.test File 1.43 KB 0644
fulltext_distinct.test File 1.18 KB 0644
fulltext_left_join.test File 3.82 KB 0644
fulltext_multi.test File 666 B 0644
fulltext_order_by.test File 5.31 KB 0644
fulltext_plugin-master.opt File 19 B 0644
fulltext_plugin.test File 374 B 0644
fulltext_update.test File 907 B 0644
fulltext_var.test File 1.1 KB 0644
func_aes.test File 5.76 KB 0644
func_aes_cfb1.test File 445 B 0644
func_aes_cfb128.test File 455 B 0644
func_aes_cfb8.test File 445 B 0644
func_aes_misc.test File 6.11 KB 0644
func_aes_ofb.test File 440 B 0644
func_analyse.test File 9.37 KB 0644
func_compress.test File 3.3 KB 0644
func_concat.test File 3.67 KB 0644
func_crypt.test File 2.09 KB 0644
func_date_add.test File 3.28 KB 0644
func_default.test File 1 KB 0644
func_des_encrypt.test File 899 B 0644
func_digest.test File 109.12 KB 0644
func_encrypt-master.opt File 59 B 0644
func_encrypt.test File 5.4 KB 0644
func_encrypt_nossl.test File 1.16 KB 0644
func_encrypt_ucs2.test File 459 B 0644
func_equal.test File 1.1 KB 0644
func_gconcat.test File 26.84 KB 0644
func_group.test File 37.03 KB 0644
func_group_innodb.test File 3.57 KB 0644
func_group_innodb_16k.test File 605 B 0644
func_if.test File 5.08 KB 0644
func_in_all.test File 494 B 0644
func_in_icp.test File 567 B 0644
func_in_icp_mrr.test File 540 B 0644
func_in_mrr.test File 565 B 0644
func_in_mrr_cost.test File 575 B 0644
func_in_none.test File 607 B 0644
func_isnull.test File 1009 B 0644
func_like.test File 3.71 KB 0644
func_math.test File 17.27 KB 0644
func_misc-master.opt File 21 B 0644
func_misc.test File 25.73 KB 0644
func_op.test File 964 B 0644
func_regexp.test File 2.89 KB 0644
func_rollback.test File 14.3 KB 0644
func_sapdb.test File 7.58 KB 0644
func_set.test File 5.69 KB 0644
func_str.test File 58.46 KB 0644
func_str_debug.test File 421 B 0644
func_str_no_ps.test File 1.02 KB 0644
func_system.test File 1.47 KB 0644
func_test.test File 9.14 KB 0644
func_time.test File 43.13 KB 0644
func_timestamp.test File 661 B 0644
func_weight_string.test File 3.07 KB 0644
function_defaults.test File 737 B 0644
function_defaults_notembedded.test File 478 B 0644
gcc296.test File 526 B 0644
get_diagnostics.test File 18.25 KB 0644
gis-debug.test File 126 B 0644
gis-precise.test File 8.72 KB 0644
gis-rt-precise.test File 1.39 KB 0644
gis-rtree.test File 43.67 KB 0644
gis.test File 47.91 KB 0644
grant.test File 65.24 KB 0644
grant2.test File 32.51 KB 0644
grant3-master.opt File 19 B 0644
grant3.test File 6.59 KB 0644
grant4.test File 8.05 KB 0644
grant_cache-master.opt File 21 B 0644
grant_cache.test File 590 B 0644
grant_explain_non_select.test File 7.34 KB 0644
grant_lowercase_fs.test File 702 B 0644
greedy_optimizer.test File 30.6 KB 0644
greedy_search.test File 9.5 KB 0644
group_by.test File 64.36 KB 0644
group_min_max.test File 58.59 KB 0644
group_min_max_innodb.test File 13.24 KB 0644
handler_innodb.test File 571 B 0644
handler_myisam.test File 4.25 KB 0644
handler_read_last.test File 523 B 0644
having.test File 20.63 KB 0644
heap.test File 15.43 KB 0644
heap_auto_increment.test File 926 B 0644
heap_btree.test File 8.21 KB 0644
heap_hash.test File 9.69 KB 0644
help.test File 4.83 KB 0644
host_cache_size_functionality.test File 7.62 KB 0644
implicit_char_to_num_conversion.test File 7.63 KB 0644
implicit_commit-master.opt File 32 B 0644
implicit_commit.test File 19.42 KB 0644
import_schema_mismatch.test File 1018 B 0644
index_merge_delete.test File 261 B 0644
index_merge_innodb.test File 1.79 KB 0644
index_merge_insert-and-replace.test File 284 B 0644
index_merge_intersect_dml.test File 113 B 0644
index_merge_myisam.test File 5.38 KB 0644
index_merge_update.test File 261 B 0644
information_schema-big.test File 1.73 KB 0644
information_schema.test File 57.95 KB 0644
information_schema_chmod.test File 834 B 0644
information_schema_db.test File 7.01 KB 0644
information_schema_inno.test File 3.6 KB 0644
information_schema_parameters.test File 12.58 KB 0644
information_schema_part.test File 3.95 KB 0644
information_schema_routines.test File 13.19 KB 0644
init_connect-master.opt File 32 B 0644
init_connect.test File 5.53 KB 0644
init_file-master.opt File 51 B 0644
init_file.test File 944 B 0644
innodb_explain_json_non_select_all.test File 1.02 KB 0644
innodb_explain_json_non_select_none.test File 1.06 KB 0644
innodb_explain_non_select_all.test File 924 B 0644
innodb_explain_non_select_none.test File 960 B 0644
innodb_icp.test File 784 B 0644
innodb_icp_all.test File 679 B 0644
innodb_icp_none.test File 817 B 0644
innodb_ignore_builtin-master.opt File 38 B 0644
innodb_ignore_builtin.test File 441 B 0644
innodb_log_file_size_functionality.test File 5.4 KB 0644
innodb_mrr-master.opt File 35 B 0644
innodb_mrr.test File 825 B 0644
innodb_mrr_all-master.opt File 35 B 0644
innodb_mrr_all.test File 711 B 0644
innodb_mrr_cost-master.opt File 35 B 0644
innodb_mrr_cost.test File 824 B 0644
innodb_mrr_cost_all-master.opt File 35 B 0644
innodb_mrr_cost_all.test File 710 B 0644
innodb_mrr_cost_icp-master.opt File 35 B 0644
innodb_mrr_cost_icp.test File 779 B 0644
innodb_mrr_icp-master.opt File 35 B 0644
innodb_mrr_icp.test File 780 B 0644
innodb_mrr_none-master.opt File 35 B 0644
innodb_mrr_none.test File 831 B 0644
innodb_mysql_lock-master.opt File 31 B 0644
innodb_mysql_lock.test File 8.93 KB 0644
innodb_mysql_lock2.test File 29.1 KB 0644
innodb_mysql_sync.test File 21.04 KB 0644
innodb_pk_extension_off.test File 298 B 0644
innodb_pk_extension_on.test File 296 B 0644
innodb_recovery_with_upper_case_names-master.opt File 25 B 0644
innodb_recovery_with_upper_case_names.test File 1.75 KB 0644
insert.test File 17.1 KB 0644
insert_debug-master.opt File 29 B 0644
insert_debug.test File 2.39 KB 0644
insert_notembedded.test File 6.42 KB 0644
insert_select.test File 13.83 KB 0644
insert_update.test File 9.07 KB 0644
ipv4_as_ipv6-master.opt File 43 B 0644
ipv4_as_ipv6.test File 2.18 KB 0644
ipv6-master.opt File 20 B 0644
ipv6.test File 1.27 KB 0644
join.test File 40.06 KB 0644
join_cache_bka.test File 131 B 0644
join_cache_bka_nixbnl.test File 153 B 0644
join_cache_bkaunique.test File 198 B 0644
join_cache_bnl.test File 225 B 0644
join_cache_nojb.test File 249 B 0644
join_crash.test File 4.92 KB 0644
join_nested.test File 33.73 KB 0644
join_nested_bka.test File 2.29 KB 0644
join_nested_bka_nixbnl.test File 2.32 KB 0644
join_outer.test File 47.39 KB 0644
join_outer_bka.test File 169 B 0644
join_outer_bka_nixbnl.test File 191 B 0644
join_outer_innodb.test File 1.57 KB 0644
key.test File 16.98 KB 0644
key_cache-master.opt File 95 B 0644
key_cache.test File 8.25 KB 0644
key_diff.test File 554 B 0644
key_primary.test File 460 B 0644
keywords.test File 5.47 KB 0644
kill.test File 16.07 KB 0644
kill_debug.test File 1.34 KB 0644
limit.test File 3.54 KB 0644
loaddata.test File 20.75 KB 0644
loaddata_autocom_innodb.test File 98 B 0644
loadxml.test File 3.76 KB 0644
locale.test File 3.22 KB 0644
lock.test File 14.81 KB 0644
lock_multi.test File 27.89 KB 0644
lock_multi_bug38499.test File 4.46 KB 0644
lock_multi_bug38691.test File 2.77 KB 0644
lock_sync-master.opt File 32 B 0644
lock_sync.test File 40.24 KB 0644
lock_tables_lost_commit-master.opt File 24 B 0644
lock_tables_lost_commit.test File 845 B 0644
log_empty_name.opt File 43 B 0644
log_empty_name.test File 290 B 0644
log_errchk.test File 2.1 KB 0644
log_state-master.opt File 59 B 0644
log_state.test File 9.97 KB 0644
log_state_bug33693-master.opt File 60 B 0644
log_state_bug33693.test File 568 B 0644
log_tables-big-master.opt File 17 B 0644
log_tables-big.test File 1.19 KB 0644
log_tables-master.opt File 41 B 0644
log_tables.test File 30.45 KB 0644
log_tables_debug.test File 2.65 KB 0644
log_tables_upgrade.test File 1002 B 0644
long_tmpdir-master.opt File 141 B 0644
long_tmpdir-master.sh File 190 B 0755
long_tmpdir.test File 215 B 0644
lowercase_fs_off.test File 2.42 KB 0644
lowercase_fs_on.test File 1.33 KB 0644
lowercase_mixed_tmpdir-master.opt File 68 B 0644
lowercase_mixed_tmpdir-master.sh File 179 B 0755
lowercase_mixed_tmpdir.test File 305 B 0644
lowercase_mixed_tmpdir_innodb-master.opt File 68 B 0644
lowercase_mixed_tmpdir_innodb-master.sh File 180 B 0755
lowercase_mixed_tmpdir_innodb.test File 299 B 0644
lowercase_table-master.opt File 25 B 0644
lowercase_table.test File 2.74 KB 0644
lowercase_table2.test File 8.28 KB 0644
lowercase_table4-master.opt File 27 B 0644
lowercase_table4.test File 3.14 KB 0644
lowercase_table_grant-master.opt File 25 B 0644
lowercase_table_grant.test File 948 B 0644
lowercase_table_qcache-master.opt File 46 B 0644
lowercase_table_qcache.test File 697 B 0644
lowercase_utf8-master.opt File 58 B 0644
lowercase_utf8.test File 206 B 0644
lowercase_view-master.opt File 27 B 0644
lowercase_view.test File 6.19 KB 0644
main.lowercase_table_qcache-master.opt File 21 B 0644
mdl_sync-master.opt File 32 B 0644
mdl_sync.test File 144.7 KB 0644
merge-big.test File 3.04 KB 0644
merge.test File 84.28 KB 0644
merge_innodb.test File 1.06 KB 0644
merge_mmap-master.opt File 18 B 0644
merge_mmap.test File 4.06 KB 0644
metadata.test File 5.96 KB 0644
mix2_myisam-master.opt File 33 B 0644
mix2_myisam.test File 864 B 0644
mix2_myisam_ucs2.test File 847 B 0644
multi_plugin_load-master.opt File 92 B 0644
multi_plugin_load.test File 412 B 0644
multi_plugin_load_add-master.opt File 68 B 0644
multi_plugin_load_add.test File 495 B 0644
multi_plugin_load_add2-master.opt File 111 B 0644
multi_plugin_load_add2.test File 495 B 0644
multi_statement-master.opt File 80 B 0644
multi_statement.test File 761 B 0644
multi_update-master.opt File 22 B 0644
multi_update.test File 24.38 KB 0644
multi_update2-master.opt File 22 B 0644
multi_update2.test File 1.89 KB 0644
multi_update_innodb.test File 2.22 KB 0644
multi_update_tiny_hash-master.opt File 28 B 0644
multi_update_tiny_hash.test File 1.6 KB 0644
myisam-blob-master.opt File 80 B 0644
myisam-blob.test File 1.1 KB 0644
myisam-system.test File 593 B 0644
myisam.test File 67.22 KB 0644
myisam_crash_before_flush_keys-master.opt File 36 B 0644
myisam_crash_before_flush_keys.test File 1.49 KB 0644
myisam_debug.test File 1.37 KB 0644
myisam_explain_json_non_select_all.test File 825 B 0644
myisam_explain_json_non_select_none.test File 938 B 0644
myisam_explain_non_select_all.test File 696 B 0644
myisam_explain_non_select_none.test File 809 B 0644
myisam_icp.test File 612 B 0644
myisam_icp_all.test File 507 B 0644
myisam_icp_none.test File 644 B 0644
myisam_mrr.test File 789 B 0644
myisam_mrr_all.test File 675 B 0644
myisam_mrr_cost.test File 799 B 0644
myisam_mrr_cost_all.test File 674 B 0644
myisam_mrr_cost_icp.test File 753 B 0644
myisam_mrr_icp.test File 743 B 0644
myisam_mrr_none.test File 793 B 0644
myisam_recover-master.opt File 23 B 0644
myisam_recover.test File 5.61 KB 0644
myisam_row_rpl-master.opt File 54 B 0644
myisam_row_rpl-slave.opt File 54 B 0644
myisam_row_rpl.test File 1.82 KB 0644
myisampack.test File 12.31 KB 0644
mysql-bug41486.test File 1.54 KB 0644
mysql-bug45236.test File 1.41 KB 0644
mysql.test File 21.89 KB 0644
mysql_binary_mode.test File 5.52 KB 0644
mysql_client_test-master.opt File 150 B 0644
mysql_client_test.test File 1.13 KB 0644
mysql_client_test_embedded.cnf File 156 B 0644
mysql_client_test_embedded.test File 677 B 0644
mysql_client_test_qcache-master.opt File 21 B 0644
mysql_client_test_qcache.test File 858 B 0644
mysql_comments.sql File 4.58 KB 0644
mysql_comments.test File 1.44 KB 0644
mysql_config_editor.test File 7.44 KB 0644
mysql_cp932.test File 1.04 KB 0644
mysql_delimiter.sql File 1.48 KB 0644
mysql_delimiter_19799.sql File 13 B 0644
mysql_delimiter_source.sql File 122 B 0644
mysql_embedded-master.opt File 98 B 0644
mysql_embedded.test File 481 B 0644
mysql_embedded_client_test.test File 1.34 KB 0644
mysql_locale_posix.test File 6.97 KB 0644
mysql_not_windows.test File 399 B 0644
mysql_plugin-master.opt File 32 B 0644
mysql_plugin.test File 11.9 KB 0644
mysql_protocols.test File 715 B 0644
mysql_upgrade.test File 7.08 KB 0644
mysql_upgrade_ssl.test File 279 B 0644
mysqladmin.test File 2.5 KB 0644
mysqladmin_shutdown.test File 868 B 0644
mysqlbinlog-master.opt File 39 B 0644
mysqlbinlog.test File 19.19 KB 0644
mysqlbinlog_debug.test File 963 B 0644
mysqlbinlog_mixed_or_statment.test File 1.13 KB 0644
mysqlbinlog_raw_mode.test File 1.98 KB 0644
mysqlbinlog_raw_mode_win.test File 146 B 0644
mysqlbinlog_row_big.test File 4 KB 0644
mysqlcheck.test File 9.73 KB 0644
mysqld--defaults-file.test File 1.03 KB 0644
mysqld--help-notwin.test File 160 B 0644
mysqld--help-win.test File 156 B 0644
mysqldump-compat.opt File 31 B 0644
mysqldump-compat.test File 446 B 0644
mysqldump-max-master.opt File 32 B 0644
mysqldump-max.test File 40 KB 0644
mysqldump-no-binlog-master.opt File 15 B 0644
mysqldump-no-binlog.test File 194 B 0644
mysqldump.test File 86.47 KB 0644
mysqldump_restore.test File 3.85 KB 0644
mysqlhotcopy_archive.test File 180 B 0644
mysqlhotcopy_myisam.test File 145 B 0644
mysqlimport.test File 689 B 0644
mysqlshow.test File 1.63 KB 0644
mysqlslap.test File 5.45 KB 0644
mysqltest.test File 75.5 KB 0644
named_pipe-master.opt File 26 B 0644
named_pipe.test File 597 B 0644
negation_elimination.test File 3.93 KB 0644
no-threads-master.opt File 29 B 0644
no-threads.test File 373 B 0644
no_binlog.test File 165 B 0644
not_embedded_server-master.opt File 16 B 0644
not_embedded_server.test File 5.61 KB 0644
not_partition.test File 3 KB 0644
null.test File 8.55 KB 0644
null_key_all.test File 477 B 0644
null_key_icp.test File 569 B 0644
null_key_none.test File 609 B 0644
odbc.test File 923 B 0644
olap.test File 13.63 KB 0644
openssl_1.test File 9.39 KB 0644
optimizer_bug12837084.test File 14.16 KB 0644
optimizer_debug_sync.test File 2.23 KB 0644
optimizer_switch.test File 10.28 KB 0644
order_by_all.test File 497 B 0644
order_by_icp_mrr.test File 542 B 0644
order_by_none.test File 609 B 0644
order_by_sortkey.test File 2.16 KB 0644
order_fill_sortbuf-master.opt File 20 B 0644
order_fill_sortbuf.test File 578 B 0644
outfile.test File 4.03 KB 0644
outfile_loaddata.test File 10.18 KB 0644
overflow.test File 577 B 0644
packet.test File 3.49 KB 0644
parser.test File 21.89 KB 0644
parser_bug21114_innodb.test File 11.75 KB 0644
parser_not_embedded.test File 2.53 KB 0644
parser_precedence.test File 12.39 KB 0644
parser_stack.test File 12.07 KB 0644
partition.test File 66.34 KB 0644
partition_archive.test File 4.19 KB 0644
partition_binlog.test File 1.2 KB 0644
partition_binlog_stmt.test File 760 B 0644
partition_blackhole.test File 634 B 0644
partition_bug18198.test File 7.88 KB 0644
partition_cache-master.opt File 21 B 0644
partition_cache.test File 1.41 KB 0644
partition_charset.test File 675 B 0644
partition_column.test File 16.15 KB 0644
partition_column_prune.test File 2.24 KB 0644
partition_csv.test File 2.45 KB 0644
partition_datatype.test File 18.97 KB 0644
partition_debug_sync.test File 3.99 KB 0644
partition_disabled-master.opt File 23 B 0644
partition_disabled.test File 3.02 KB 0644
partition_error.test File 61.47 KB 0644
partition_exchange.test File 15.55 KB 0644
partition_explicit_prune.test File 30.93 KB 0644
partition_federated.test File 531 B 0644
partition_grant.test File 2.27 KB 0644
partition_hash.test File 5.57 KB 0644
partition_index_innodb.test File 5.81 KB 0644
partition_index_myisam.test File 3.88 KB 0644
partition_innodb.test File 29.42 KB 0644
partition_innodb_plugin.test File 5 KB 0644
partition_innodb_semi_consistent-master.opt File 61 B 0644
partition_innodb_semi_consistent.test File 4.09 KB 0644
partition_innodb_stmt.test File 1.17 KB 0644
partition_innodb_tablespace.test File 11.93 KB 0644
partition_key_cache.test File 10.82 KB 0644
partition_list.test File 8.04 KB 0644
partition_locking.test File 71.9 KB 0644
partition_locking_4.test File 1.53 KB 0644
partition_mgm.test File 3.67 KB 0644
partition_mgm_err.test File 6.18 KB 0644
partition_mgm_err2.test File 861 B 0644
partition_myisam.test File 8.14 KB 0644
partition_not_blackhole-master.opt File 23 B 0644
partition_not_blackhole.test File 875 B 0644
partition_not_windows-master.opt File 19 B 0644
partition_not_windows.test File 7.59 KB 0644
partition_open_files_limit-master.opt File 62 B 0644
partition_open_files_limit.test File 1.61 KB 0644
partition_order.test File 17.9 KB 0644
partition_pruning.test File 57.82 KB 0644
partition_range.test File 31.14 KB 0644
partition_rename_longfilename.test File 2.02 KB 0644
partition_symlink.test File 7.35 KB 0644
partition_sync.test File 2.15 KB 0644
partition_truncate.test File 806 B 0644
partition_utf8.test File 1.25 KB 0644
partition_windows.test File 1.24 KB 0644
perror-win.test File 915 B 0644
perror.test File 777 B 0644
plugin-master.opt File 20 B 0644
plugin.test File 7.53 KB 0644
plugin_auth-master.opt File 35 B 0644
plugin_auth.test File 19.86 KB 0644
plugin_auth_qa-master.opt File 35 B 0644
plugin_auth_qa.test File 14.16 KB 0644
plugin_auth_qa_1-master.opt File 35 B 0644
plugin_auth_qa_1.test File 15.1 KB 0644
plugin_auth_qa_2-master.opt File 55 B 0644
plugin_auth_qa_2.test File 8.31 KB 0644
plugin_auth_qa_3-master.opt File 49 B 0644
plugin_auth_qa_3.test File 1.51 KB 0644
plugin_auth_sha256-master.opt File 170 B 0644
plugin_auth_sha256.test File 4.76 KB 0644
plugin_auth_sha256_2-master.opt File 217 B 0644
plugin_auth_sha256_2.test File 2.06 KB 0644
plugin_auth_sha256_server_default-master.opt File 224 B 0644
plugin_auth_sha256_server_default.test File 3.06 KB 0644
plugin_auth_sha256_server_default_tls-master.opt File 48 B 0644
plugin_auth_sha256_server_default_tls.test File 3.42 KB 0644
plugin_auth_sha256_tls.test File 2.29 KB 0644
plugin_load-master.opt File 76 B 0644
plugin_load.test File 125 B 0644
plugin_load_option-master.opt File 85 B 0644
plugin_load_option.test File 265 B 0644
plugin_not_embedded-master.opt File 20 B 0644
plugin_not_embedded.test File 896 B 0644
preload.test File 2.43 KB 0644
profiling.test File 8.83 KB 0644
ps-master.opt File 73 B 0644
ps.test File 92.9 KB 0644
ps_10nestset.test File 2.75 KB 0644
ps_11bugs.test File 7.05 KB 0644
ps_1general.test File 28.22 KB 0644
ps_2myisam.test File 1.15 KB 0644
ps_3innodb-master.opt File 32 B 0644
ps_3innodb.test File 760 B 0644
ps_4heap.test File 1.53 KB 0644
ps_5merge.test File 2.71 KB 0644
ps_ddl.test File 52.87 KB 0644
ps_ddl1.test File 11.04 KB 0644
ps_grant.test File 3.9 KB 0644
ps_not_windows.test File 755 B 0644
query_cache-master.opt File 21 B 0644
query_cache.test File 43.88 KB 0644
query_cache_28249-master.opt File 21 B 0644
query_cache_28249.test File 4.2 KB 0644
query_cache_debug-master.opt File 21 B 0644
query_cache_debug.test File 10.7 KB 0644
query_cache_disabled-master.opt File 21 B 0644
query_cache_disabled.test File 496 B 0644
query_cache_merge-master.opt File 21 B 0644
query_cache_merge.test File 4.47 KB 0644
query_cache_notembedded-master.opt File 21 B 0644
query_cache_notembedded.test File 6.97 KB 0644
query_cache_ps_no_prot-master.opt File 21 B 0644
query_cache_ps_no_prot.test File 906 B 0644
query_cache_ps_ps_prot-master.opt File 21 B 0644
query_cache_ps_ps_prot.test File 840 B 0644
query_cache_size_functionality.test File 10.85 KB 0644
query_cache_type_functionality.test File 10.93 KB 0644
query_cache_with_views-master.opt File 21 B 0644
query_cache_with_views.test File 3.98 KB 0644
range_all.test File 490 B 0644
range_icp.test File 563 B 0644
range_icp_mrr.test File 536 B 0644
range_mrr.test File 561 B 0644
range_mrr_cost.test File 571 B 0644
range_none.test File 603 B 0644
read_many_rows_innodb.test File 417 B 0644
read_only.test File 8.16 KB 0644
read_only_innodb.test File 5.38 KB 0644
rename.test File 2.26 KB 0644
renamedb.test File 1.25 KB 0644
repair.test File 5.46 KB 0644
replace.test File 1.21 KB 0644
rewrite_general_log.test File 5.08 KB 0644
rewrite_slow_log.test File 3.23 KB 0644
rollback.test File 490 B 0644
round.test File 4.67 KB 0644
row.test File 9.01 KB 0644
rowid_order_innodb.test File 382 B 0644
rpl_mysqldump_slave.test File 1.06 KB 0644
schema.test File 4.68 KB 0644
secure_file_priv_win-master.opt File 34 B 0644
secure_file_priv_win.test File 2.77 KB 0644
select_all.test File 591 B 0644
select_all_bka.test File 268 B 0644
select_all_bka_nixbnl.test File 290 B 0644
select_found.test File 5.53 KB 0644
select_icp_mrr.test File 637 B 0644
select_icp_mrr_bka.test File 276 B 0644
select_icp_mrr_bka_nixbnl.test File 298 B 0644
select_none.test File 704 B 0644
select_none_bka.test File 270 B 0644
select_none_bka_nixbnl.test File 292 B 0644
select_safe.test File 2.31 KB 0644
server_uuid.test File 2.53 KB 0644
server_uuid_embedded.test File 1.13 KB 0644
shm-master.opt File 173 B 0644
shm.test File 1.46 KB 0644
show_check-master.opt File 93 B 0644
show_check.test File 32.42 KB 0644
show_processlist.test File 2.51 KB 0644
show_processlist_state.test File 208 B 0644
show_profile.test File 495 B 0644
signal.test File 55.55 KB 0644
signal_code.test File 854 B 0644
signal_demo1.test File 6.9 KB 0644
signal_demo2.test File 3.34 KB 0644
signal_demo3-master.opt File 33 B 0644
signal_demo3.test File 2.67 KB 0644
signal_sqlmode.test File 1.85 KB 0644
single_delete_update.test File 13.33 KB 0644
skip_grants-master.opt File 20 B 0644
skip_grants.test File 2.74 KB 0644
skip_log_bin-master.opt File 21 B 0644
skip_log_bin.test File 645 B 0644
skip_name_resolve-master.opt File 20 B 0644
skip_name_resolve.test File 1.56 KB 0644
sort_buffer_size_functionality.test File 9.2 KB 0644
sp-big.test File 2.15 KB 0644
sp-bugs.test File 5.3 KB 0644
sp-code.test File 20.71 KB 0644
sp-destruct.test File 8.06 KB 0644
sp-dynamic.test File 9.19 KB 0644
sp-error.test File 85.68 KB 0644
sp-fib-master.opt File 33 B 0644
sp-fib.test File 1.33 KB 0644
sp-lock-master.opt File 33 B 0644
sp-lock.test File 31.39 KB 0644
sp-master.opt File 54 B 0644
sp-no-code.test File 216 B 0644
sp-prelocking-master.opt File 33 B 0644
sp-prelocking.test File 8.43 KB 0644
sp-security.test File 25.06 KB 0644
sp-threads.test File 4 KB 0644
sp-ucs2.test File 3.38 KB 0644
sp-vars.test File 28.21 KB 0644
sp.test File 191.47 KB 0644
sp_debug.test File 1.03 KB 0644
sp_gis.test File 754 B 0644
sp_notembedded-master.opt File 21 B 0644
sp_notembedded.test File 13.09 KB 0644
sp_stress_case.test File 2.07 KB 0644
sp_sync.test File 4.88 KB 0644
sp_trans.test File 17.08 KB 0644
sp_trans_log.test File 1.35 KB 0644
sp_validation.test File 40.13 KB 0644
sql_mode.test File 12.7 KB 0644
ssl-big.test File 1.68 KB 0644
ssl-sha512-master.opt File 164 B 0644
ssl-sha512.test File 371 B 0644
ssl.test File 1.57 KB 0644
ssl_8k_key-master.opt File 118 B 0644
ssl_8k_key.test File 546 B 0644
ssl_and_innodb.test File 261 B 0644
ssl_ca-master.opt File 160 B 0644
ssl_ca.test File 2.07 KB 0644
ssl_cipher-master.opt File 24 B 0644
ssl_cipher.test File 588 B 0644
ssl_compress.test File 1.04 KB 0644
ssl_connect.test File 339 B 0644
ssl_crl-master.opt File 218 B 0644
ssl_crl.test File 2.47 KB 0644
ssl_crl_clients-master.opt File 234 B 0644
ssl_crl_clients.test File 1.85 KB 0644
ssl_crl_clients_valid-master.opt File 218 B 0644
ssl_crl_clients_valid.test File 1.24 KB 0644
ssl_crl_crlpath-master.opt File 206 B 0644
ssl_crl_crlpath.test File 1.4 KB 0644
ssl_mode.test File 1.78 KB 0644
ssl_mode_no_ssl-master.opt File 11 B 0644
ssl_mode_no_ssl.test File 1.29 KB 0644
ssl_verify_identity-master.opt File 181 B 0644
ssl_verify_identity.test File 4.04 KB 0644
status-master.opt File 24 B 0644
status.test File 12.91 KB 0644
status2.test File 1.54 KB 0644
status_bug17954.test File 1.7 KB 0644
status_debug.test File 1.42 KB 0644
strict-master.opt File 32 B 0644
strict.test File 43.22 KB 0644
strict_autoinc_1myisam.test File 117 B 0644
strict_autoinc_2innodb.test File 152 B 0644
strict_autoinc_3heap.test File 117 B 0644
subquery_all.test File 496 B 0644
subquery_all_bka.test File 173 B 0644
subquery_all_bka_nixbnl.test File 195 B 0644
subquery_bugs.test File 1.7 KB 0644
subquery_mat.test File 576 B 0644
subquery_mat_all.test File 484 B 0644
subquery_mat_none.test File 617 B 0644
subquery_nomat_nosj.test File 564 B 0644
subquery_nomat_nosj_bka.test File 187 B 0644
subquery_nomat_nosj_bka_nixbnl.test File 209 B 0644
subquery_none.test File 609 B 0644
subquery_none_bka.test File 175 B 0644
subquery_none_bka_nixbnl.test File 197 B 0644
subquery_sj_all-master.opt File 22 B 0644
subquery_sj_all.test File 502 B 0644
subquery_sj_all_bka-master.opt File 22 B 0644
subquery_sj_all_bka.test File 179 B 0644
subquery_sj_all_bka_nixbnl-master.opt File 22 B 0644
subquery_sj_all_bka_nixbnl.test File 201 B 0644
subquery_sj_all_bkaunique-master.opt File 22 B 0644
subquery_sj_all_bkaunique.test File 252 B 0644
subquery_sj_dupsweed-master.opt File 22 B 0644
subquery_sj_dupsweed.test File 809 B 0644
subquery_sj_dupsweed_bka-master.opt File 22 B 0644
subquery_sj_dupsweed_bka.test File 189 B 0644
subquery_sj_dupsweed_bka_nixbnl-master.opt File 22 B 0644
subquery_sj_dupsweed_bka_nixbnl.test File 211 B 0644
subquery_sj_dupsweed_bkaunique-master.opt File 22 B 0644
subquery_sj_dupsweed_bkaunique.test File 262 B 0644
subquery_sj_firstmatch-master.opt File 22 B 0644
subquery_sj_firstmatch.test File 2.36 KB 0644
subquery_sj_firstmatch_bka-master.opt File 22 B 0644
subquery_sj_firstmatch_bka.test File 193 B 0644
subquery_sj_firstmatch_bka_nixbnl.test File 215 B 0644
subquery_sj_firstmatch_bkaunique.test File 266 B 0644
subquery_sj_innodb_all.test File 550 B 0644
subquery_sj_innodb_all_bka.test File 193 B 0644
subquery_sj_innodb_all_bka_nixbnl.test File 215 B 0644
subquery_sj_innodb_all_bkaunique.test File 266 B 0644
subquery_sj_innodb_none.test File 663 B 0644
subquery_sj_innodb_none_bka.test File 195 B 0644
subquery_sj_innodb_none_bka_nixbnl.test File 217 B 0644
subquery_sj_innodb_none_bkaunique.test File 268 B 0644
subquery_sj_loosescan.test File 755 B 0644
subquery_sj_loosescan_bka.test File 191 B 0644
subquery_sj_loosescan_bka_nixbnl.test File 213 B 0644
subquery_sj_loosescan_bkaunique.test File 264 B 0644
subquery_sj_mat.test File 761 B 0644
subquery_sj_mat_bka.test File 179 B 0644
subquery_sj_mat_bka_nixbnl.test File 201 B 0644
subquery_sj_mat_bkaunique.test File 252 B 0644
subquery_sj_mat_nosj.test File 595 B 0644
subquery_sj_none.test File 615 B 0644
subquery_sj_none_bka.test File 181 B 0644
subquery_sj_none_bka_nixbnl.test File 203 B 0644
subquery_sj_none_bkaunique.test File 254 B 0644
subselect_debug.test File 508 B 0644
subselect_gis.test File 455 B 0644
subselect_innodb.test File 24.35 KB 0644
subselect_notembedded-master.opt File 33 B 0644
subselect_notembedded.test File 1.73 KB 0644
sum_distinct-big.test File 2 KB 0644
sum_distinct.test File 3.43 KB 0644
symlink.test File 9.68 KB 0644
symlink_windows.test File 2.21 KB 0644
synchronization.test File 1 KB 0644
sysdate_is_now-master.opt File 17 B 0644
sysdate_is_now.test File 297 B 0644
system_mysql_db.test File 452 B 0644
system_mysql_db_fix30020-master.opt File 30 B 0644
system_mysql_db_fix40123-master.opt File 30 B 0644
system_mysql_db_fix40123.test File 9.61 KB 0644
system_mysql_db_fix50030-master.opt File 30 B 0644
system_mysql_db_fix50030.test File 14.11 KB 0644
system_mysql_db_fix50117-master.opt File 30 B 0644
system_mysql_db_fix50117.test File 14.87 KB 0644
system_mysql_db_refs.test File 3.29 KB 0644
table_definition_cache_functionality.test File 8.56 KB 0644
table_open_cache_functionality.test File 12.95 KB 0644
tablelock.test File 1.37 KB 0644
tablespace.test File 5.17 KB 0644
temp_pool-master.opt File 31 B 0644
temp_pool.test File 1.05 KB 0644
temp_table-master.opt File 32 B 0644
temp_table.test File 7.45 KB 0644
temporal_literal.test File 6.05 KB 0644
timezone-master.opt File 15 B 0644
timezone.test File 1.83 KB 0644
timezone2.test File 9.73 KB 0644
timezone3-master.opt File 49 B 0644
timezone3.test File 2.54 KB 0644
timezone4-master.opt File 18 B 0644
timezone4.test File 310 B 0644
timezone_grant.test File 4.51 KB 0644
trans_read_only-master.opt File 29 B 0644
trans_read_only.test File 1.25 KB 0644
trigger-compat.test File 8.38 KB 0644
trigger-trans.test File 7 KB 0644
trigger.test File 73.28 KB 0644
trigger_notembedded.test File 24.73 KB 0644
truncate.test File 3.36 KB 0644
truncate_coverage.test File 5.58 KB 0644
type_binary.test File 3.19 KB 0644
type_bit.test File 12.96 KB 0644
type_bit_innodb.test File 4.53 KB 0644
type_blob.test File 22.43 KB 0644
type_date.test File 13.89 KB 0644
type_datetime.test File 21.45 KB 0644
type_decimal.test File 29.53 KB 0644
type_enum.test File 88.85 KB 0644
type_float.test File 9.26 KB 0644
type_nchar.test File 650 B 0644
type_newdecimal-big.test File 977 B 0644
type_newdecimal.test File 40.46 KB 0644
type_ranges.test File 8.93 KB 0644
type_set.test File 3.27 KB 0644
type_temporal_fractional.test File 287.94 KB 0644
type_temporal_upgrade.test File 3.51 KB 0644
type_time.test File 11.61 KB 0644
type_timestamp-master.opt File 36 B 0644
type_timestamp.test File 18.32 KB 0644
type_timestamp_explicit-master.opt File 34 B 0644
type_timestamp_explicit.test File 1.97 KB 0644
type_uint.test File 294 B 0644
type_varchar.test File 6.63 KB 0644
type_year.test File 4.64 KB 0644
udf-master.opt File 42 B 0644
udf.test File 15.87 KB 0644
udf_services-master.opt File 21 B 0644
udf_services.test File 765 B 0644
udf_skip_grants-master.opt File 41 B 0644
udf_skip_grants.test File 1.25 KB 0644
union-master.opt File 49 B 0644
union.test File 41.49 KB 0644
unsafe_binlog_innodb-master.opt File 67 B 0644
unsafe_binlog_innodb.test File 432 B 0644
update.test File 15.61 KB 0644
upgrade.test File 5.09 KB 0644
user_limits.test File 5.4 KB 0644
user_var-binlog.test File 924 B 0644
user_var.test File 12.64 KB 0644
validate_password_plugin-master.opt File 23 B 0644
validate_password_plugin.test File 11.44 KB 0644
varbinary.test File 2.85 KB 0644
variables-big.test File 1.93 KB 0644
variables-master.opt File 21 B 0644
variables-notembedded-master.opt File 47 B 0644
variables-notembedded.test File 10.74 KB 0644
variables-win.test File 393 B 0644
variables.test File 48.46 KB 0644
variables_community.test File 241 B 0644
variables_debug.test File 2.75 KB 0644
view.test File 114.56 KB 0644
view_alias.test File 4.03 KB 0644
view_grant.test File 63.28 KB 0644
wait_timeout.test File 5.31 KB 0644
warnings-master.opt File 34 B 0644
warnings.test File 5.53 KB 0644
warnings_engine_disabled.test File 762 B 0644
windows.test File 2.21 KB 0644
wl4435_generated.inc File 10.43 KB 0644
wl6219-csv.test File 109 B 0644
wl6219-innodb.test File 112 B 0644
wl6219-memory.test File 112 B 0644
wl6219-merge.test File 111 B 0644
wl6219-myisam.test File 112 B 0644
wl6219-upgrade.test File 3.92 KB 0644
wl6301_1_not_windows-master.opt File 20 B 0644
wl6301_1_not_windows.test File 455 B 0644
wl6301_2_not_windows-master.opt File 43 B 0644
wl6301_2_not_windows.test File 493 B 0644
wl6301_3-master.opt File 52 B 0644
wl6301_3.test File 903 B 0644
wl6443_deprecation-master.opt File 23 B 0644
wl6443_deprecation.test File 3.85 KB 0644
xa.test File 7.87 KB 0644
xml.test File 24.9 KB 0644