mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Clean up merge from 4.1
configure.in: Auto merged extra/my_print_defaults.c: Auto merged mysql-test/mysql-test-run.sh: Auto merged mysql-test/r/lowercase_table.result: Auto merged mysql-test/r/query_cache.result: Mege results mysql-test/t/lowercase_table.test: Merge tests mysql-test/t/query_cache.test: Merge tests mysys/default.c: Merge from 4.1 sql/sql_cache.cc: Merge sql/sql_parse.cc: Merge from 4.1 sql/sql_table.cc: Merge tests/mysql_client_test.c: Merge
This commit is contained in:
@ -703,6 +703,12 @@ then
|
||||
fi
|
||||
|
||||
MYSQL_CLIENT_TEST="$MYSQL_CLIENT_TEST --no-defaults --testcase --user=root --socket=$MASTER_MYSOCK --port=$MYSQL_TCP_PORT --silent $EXTRA_MYSQL_CLIENT_TEST_OPT"
|
||||
# Need to pass additional arguments to MYSQL_CLIENT_TEST for embedded server
|
||||
# -A marks each argument for passing to the function which initializes the
|
||||
# embedded library
|
||||
if [ "x$USE_EMBEDDED_SERVER" = "x1" ]; then
|
||||
MYSQL_CLIENT_TEST="$MYSQL_CLIENT_TEST -A --language=$LANGUAGE -A --datadir=$SLAVE_MYDDIR -A --character-sets-dir=$CHARSETSDIR"
|
||||
fi
|
||||
MYSQL_DUMP="$MYSQL_DUMP --no-defaults -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
|
||||
MYSQL_SHOW="$MYSQL_SHOW -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLSHOW_OPT"
|
||||
MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR --character-sets-dir=$CHARSETSDIR $EXTRA_MYSQLBINLOG_OPT"
|
||||
|
@ -79,5 +79,8 @@ ERROR 42000: Not unique table/alias: 'C'
|
||||
select C.a, c.a from t1 c, t2 C;
|
||||
ERROR 42000: Not unique table/alias: 'C'
|
||||
drop table t1, t2;
|
||||
create table t1 (a int);
|
||||
create table t2 like T1;
|
||||
drop table t1, t2;
|
||||
show tables;
|
||||
Tables_in_test
|
||||
|
File diff suppressed because one or more lines are too long
@ -74,4 +74,12 @@ select * from t1 c, t2 C;
|
||||
select C.a, c.a from t1 c, t2 C;
|
||||
drop table t1, t2;
|
||||
|
||||
#
|
||||
# Bug #9761: CREATE TABLE ... LIKE ... not handled correctly when
|
||||
# lower_case_table_names is set
|
||||
|
||||
create table t1 (a int);
|
||||
create table t2 like T1;
|
||||
drop table t1, t2;
|
||||
|
||||
show tables;
|
||||
|
@ -711,4 +711,49 @@ repair table t1;
|
||||
show status like 'qcache_queries_in_cache';
|
||||
drop table t1;
|
||||
|
||||
# Bug #9549: Make sure cached queries that span more than one cache block
|
||||
# are handled properly in the embedded server.
|
||||
|
||||
# We just want a small query cache, so we can fragment it easily
|
||||
set GLOBAL query_cache_size=64*1024;
|
||||
# This actually gives us a usable cache size of about 48K
|
||||
|
||||
# Each table is about 14K
|
||||
create table t1 (a text);
|
||||
insert into t1 values (repeat('abcdefghijklmnopqrstuvwxyz', 550));
|
||||
create table t2 (a text);
|
||||
insert into t2 values (repeat('ijklmnopqrstuvwxyzabcdefgh', 550));
|
||||
|
||||
# Load a query from each table into the query cache
|
||||
--disable_result_log
|
||||
select a from t1; # Q1
|
||||
select a from t2; # Q2
|
||||
--enable_result_log
|
||||
show status like 'Qcache_%_blocks';
|
||||
|
||||
# Now the cache looks like (14K for Q1)(14K for Q2)(20K free)
|
||||
|
||||
# Flush Q1 from the cache by adding an out-of-order chunk to t1
|
||||
insert into t1 select reverse(a) from t1;
|
||||
show status like 'Qcache_%_blocks';
|
||||
|
||||
# Now the cache looks like (14K free)(14K for Q2)(20K free)
|
||||
|
||||
# Load our new data into the query cache
|
||||
--disable_result_log
|
||||
select a from t1; # Q3
|
||||
--enable_result_log
|
||||
show status like 'Qcache_%_blocks';
|
||||
|
||||
# Now the cache should be like (14K for Q3)(14K for Q2)(14K for Q3)(6K free)
|
||||
|
||||
# Note that Q3 is split across two chunks!
|
||||
|
||||
# Load Q3 from the cache, and actually pay attention to the results
|
||||
select a from t1;
|
||||
|
||||
flush query cache;
|
||||
|
||||
drop table t1, t2;
|
||||
|
||||
set GLOBAL query_cache_size=0;
|
||||
|
Reference in New Issue
Block a user