mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge 48863,49269,49345,49672,49761
This commit is contained in:
@ -1605,6 +1605,57 @@ insert into t1 values (2,4);
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# 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
|
||||
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.in 2>&1
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/mysqltest.in;
|
||||
|
||||
drop table t1;
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# test for remove_file
|
||||
# ----------------------------------------------------------------------------
|
||||
@ -2059,6 +2110,44 @@ INSERT INTO t1 SELECT f1 - 512 FROM t1;
|
||||
SELECT * FROM t1;
|
||||
--enable_result_log
|
||||
DROP TABLE t1;
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# test for lowercase_result
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# 1. Basic test
|
||||
--lowercase_result
|
||||
SELECT "500g BL<42>B<EFBFBD>RSYLTET<45>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 <20><><EFBFBD>";
|
||||
--character_set latin1
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Some coverage tests
|
||||
# ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user