mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
merge from mysql-next-mr
This commit is contained in:
6
mysql-test/include/check_key_reads.inc
Normal file
6
mysql-test/include/check_key_reads.inc
Normal file
@ -0,0 +1,6 @@
|
||||
# include file for checking if variable key_reads is zero
|
||||
let $key_reads= query_get_value(SHOW STATUS LIKE 'key_reads',Value,1);
|
||||
--disable_query_log
|
||||
eval SELECT IF($key_reads = 0, "Yes!", "No!") as 'Zero key reads?';
|
||||
FLUSH STATUS;
|
||||
--enable_query_log
|
9
mysql-test/include/check_key_req.inc
Normal file
9
mysql-test/include/check_key_req.inc
Normal file
@ -0,0 +1,9 @@
|
||||
# include file for checking if variable key_reads = key_read_requests
|
||||
let $key_reads= query_get_value(SHOW STATUS LIKE 'key_reads',Value,1);
|
||||
let $key_r_req= query_get_value(SHOW STATUS LIKE 'key_read_requests',Value,1);
|
||||
let $key_writes= query_get_value(SHOW STATUS LIKE 'key_writes',Value,1);
|
||||
let $key_w_req= query_get_value(SHOW STATUS LIKE 'key_write_requests',Value,1);
|
||||
--disable_query_log
|
||||
eval SELECT IF($key_reads = $key_r_req, "reads == requests", "reads != requests") as 'reads vs requests';
|
||||
eval SELECT IF($key_writes = $key_w_req, "writes == requests", "writes != requests") as 'writes vs requests';
|
||||
--enable_query_log
|
@ -60,6 +60,7 @@ disable_query_log;
|
||||
--error 0,1
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/diff_table_2
|
||||
|
||||
|
||||
let $_diff_table=$diff_table_2;
|
||||
let $_diff_i=2;
|
||||
while ($_diff_i) {
|
||||
|
10
mysql-test/include/have_thread_concurrency.inc
Normal file
10
mysql-test/include/have_thread_concurrency.inc
Normal file
@ -0,0 +1,10 @@
|
||||
disable_query_log;
|
||||
disable_result_log;
|
||||
set @have_thread_concurrency=0;
|
||||
select @have_thread_concurrency:=1 from information_schema.global_variables where variable_name='thread_concurrency';
|
||||
if (`select @have_thread_concurrency = 0`)
|
||||
{
|
||||
skip Need @@thread_concurrency;
|
||||
}
|
||||
enable_result_log;
|
||||
enable_query_log;
|
@ -303,7 +303,7 @@ drop table t4;
|
||||
create table t4 (a int);
|
||||
insert into t4 values (1),(4),(3);
|
||||
set @save_join_buffer_size=@@join_buffer_size;
|
||||
set join_buffer_size= 4000;
|
||||
set join_buffer_size= 4096;
|
||||
explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
|
||||
from t0 as A force index(i1,i2), t0 as B force index (i1,i2)
|
||||
where (A.key1 < 500000 or A.key2 < 3)
|
||||
|
40
mysql-test/include/mysqld--help.inc
Normal file
40
mysql-test/include/mysqld--help.inc
Normal file
@ -0,0 +1,40 @@
|
||||
#
|
||||
# mysqld --help
|
||||
#
|
||||
--source include/not_embedded.inc
|
||||
|
||||
#
|
||||
# force lower-case-table-names=1 (linux/macosx have different defaults)
|
||||
# force symbolic-links=0 (valgrind build has a different default)
|
||||
#
|
||||
exec $MYSQLD_BOOTSTRAP_CMD --symbolic-links=0 --lower-case-table-names=1 --help --verbose > $MYSQL_TMP_DIR/mysqld--help.txt 2>&1;
|
||||
|
||||
perl;
|
||||
@skipvars=qw/basedir open-files-limit general-log-file log
|
||||
log-slow-queries pid-file slow-query-log-file/;
|
||||
@plugins=qw/innodb ndb ndbcluster safemalloc debug temp-pool ssl des-key-file
|
||||
thread-concurrency super-large-pages mutex-deadlock-detector/;
|
||||
@env=qw/MYSQLTEST_VARDIR MYSQL_TEST_DIR MYSQL_LIBDIR MYSQL_SHAREDIR/;
|
||||
$re1=join('|', @skipvars, @plugins);
|
||||
$re2=join('|', @plugins);
|
||||
$skip=0;
|
||||
open(F, '<', "$ENV{MYSQL_TMP_DIR}/mysqld--help.txt") or die;
|
||||
while (<F>) {
|
||||
next if 1../The following groups are read/;
|
||||
next if /^($re1) /;
|
||||
next if /^($re2)-/;
|
||||
$skip=0 if /^ -/;
|
||||
$skip=1 if / --($re2)\b/;
|
||||
# fixes for 32-bit
|
||||
y!\\!/!;
|
||||
s/\b4294967295\b/18446744073709551615/;
|
||||
s/\b2146435072\b/9223372036853727232/;
|
||||
s/\b196608\b/262144/;
|
||||
foreach $var (@env) { s/$ENV{$var}/$var/ }
|
||||
next if /use --skip-(use-)?symbolic-links to disable/; # for valgrind, again
|
||||
next if $skip;
|
||||
print;
|
||||
}
|
||||
close F;
|
||||
EOF
|
||||
|
@ -114,7 +114,7 @@ connection default;
|
||||
# This should be 'YES'.
|
||||
SHOW VARIABLES LIKE 'have_query_cache';
|
||||
|
||||
SET GLOBAL query_cache_size = 200000;
|
||||
SET GLOBAL query_cache_size = 204800;
|
||||
flush status;
|
||||
SET @@autocommit=1;
|
||||
eval SET SESSION STORAGE_ENGINE = $engine_type;
|
||||
|
@ -27,7 +27,7 @@ connect (con1,localhost,root,,test,$MASTER_MYPORT,);
|
||||
connection default;
|
||||
|
||||
set @initial_query_cache_size = @@global.query_cache_size;
|
||||
set @@global.query_cache_size=100000;
|
||||
set @@global.query_cache_size=102400;
|
||||
flush status;
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
@ -178,7 +178,7 @@ show status like 'Qcache_hits';
|
||||
# then QC is re-enabled for more EXECUTE.
|
||||
--echo ---- switch to connection default ----
|
||||
connection default;
|
||||
set global query_cache_size=100000;
|
||||
set global query_cache_size=102400;
|
||||
# Expect to see additional Qcache_hits.
|
||||
# The fact that the QC was temporary disabled should have no affect
|
||||
# except that the first execute will not hit results from the
|
||||
@ -235,7 +235,7 @@ prepare stmt3 from "select * from t1 where c1=10";
|
||||
--echo ---- switch to connection default ----
|
||||
connection default;
|
||||
# then QC is enabled at EXECUTE
|
||||
set global query_cache_size=100000;
|
||||
set global query_cache_size=102400;
|
||||
show status like 'Qcache_hits';
|
||||
execute stmt1;
|
||||
show status like 'Qcache_hits';
|
||||
@ -260,7 +260,7 @@ connection default;
|
||||
set global query_cache_size=0;
|
||||
prepare stmt1 from "select * from t1 where c1=?";
|
||||
# then QC is enabled at EXECUTE
|
||||
set global query_cache_size=100000;
|
||||
set global query_cache_size=102400;
|
||||
show status like 'Qcache_hits';
|
||||
set @a=1;
|
||||
execute stmt1 using @a;
|
||||
@ -509,7 +509,7 @@ execute stmt;
|
||||
set @@global.query_cache_size=0;
|
||||
alter table t1 add column b int;
|
||||
execute stmt;
|
||||
set @@global.query_cache_size=100000;
|
||||
set @@global.query_cache_size=102400;
|
||||
execute stmt;
|
||||
execute stmt;
|
||||
--echo #
|
||||
|
@ -3,6 +3,6 @@
|
||||
|
||||
# masked out log positions
|
||||
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT $DEFAULT_MASTER_PORT 3306
|
||||
--replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
||||
query_vertical SHOW SLAVE STATUS;
|
||||
|
Reference in New Issue
Block a user