mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
87e6c2ba77
added string length for more speed made code covarage for print() method of Item fixed printability of some items (SCRUM) (WL#1274) mysql-test/r/auto_increment.result: print() code coverage mysql-test/r/bench_count_distinct.result: print() code coverage mysql-test/r/case.result: print() code coverage mysql-test/r/cast.result: print() code coverage mysql-test/r/ctype_collate.result: print() code coverage mysql-test/r/ctype_many.result: convert with 3 arguments code covarage print() code coverage mysql-test/r/ctype_utf8.result: char_length code coverage mysql-test/r/date_formats.result: print() code coverage mysql-test/r/fulltext.result: print() code coverage mysql-test/r/func_compress.result: print() code coverage mysql-test/r/func_gconcat.result: print() code coverage mysql-test/r/func_group.result: bit_xor() code coverage print() code coverage mysql-test/r/func_if.result: nullif() code coverage print() code coverage mysql-test/r/func_in.result: print() code coverage mysql-test/r/func_math.result: print() code coverage mysql-test/r/func_op.result: print() code coverage mysql-test/r/func_regexp.result: print() code coverage mysql-test/r/func_set.result: print() code coverage mysql-test/r/func_str.result: crc32() code coverage print() code coverage mysql-test/r/func_system.result: print() code coverage mysql-test/r/func_test.result: print() code coverage mysql-test/r/func_time.result: print() code coverage mysql-test/r/group_by.result: print() code coverage mysql-test/r/having.result: print() code coverage mysql-test/r/insert_update.result: print() code coverage mysql-test/r/null.result: print() code coverage mysql-test/r/olap.result: print() code coverage mysql-test/r/query_cache.result: print() code coverage mysql-test/r/row.result: print() code coverage mysql-test/r/rpl000001.result: print() code coverage mysql-test/r/rpl_get_lock.result: print() code coverage mysql-test/r/rpl_master_pos_wait.result: print() code coverage mysql-test/r/select.result: print() code coverage mysql-test/r/subselect.result: print() code coverage mysql-test/r/type_blob.result: print() code coverage mysql-test/r/varbinary.result: print() code coverage mysql-test/r/variables.result: print() code coverage mysql-test/t/auto_increment.test: print() code coverage mysql-test/t/bench_count_distinct.test: print() code coverage mysql-test/t/case.test: print() code coverage mysql-test/t/cast.test: print() code coverage mysql-test/t/ctype_collate.test: print() code coverage mysql-test/t/ctype_many.test: convert with 3 arguments code covarage print() code coverage mysql-test/t/ctype_utf8.test: char_length code coverage mysql-test/t/date_formats.test: print() code coverage mysql-test/t/fulltext.test: print() code coverage mysql-test/t/func_compress.test: print() code coverage mysql-test/t/func_gconcat.test: print() code coverage mysql-test/t/func_group.test: bit_xor() code coverage print() code coverage mysql-test/t/func_if.test: nullif() code coverage print() code coverage mysql-test/t/func_in.test: print() code coverage mysql-test/t/func_math.test: print() code coverage mysql-test/t/func_op.test: print() code coverage mysql-test/t/func_regexp.test: print() code coverage mysql-test/t/func_set.test: print() code coverage mysql-test/t/func_str.test: crc32() code covarage print() code coverage mysql-test/t/func_system.test: print() code coverage mysql-test/t/func_test.test: print() code coverage mysql-test/t/func_time.test: print() code coverage mysql-test/t/group_by.test: print() code coverage mysql-test/t/having.test: print() code coverage mysql-test/t/insert_update.test: print() code coverage mysql-test/t/null.test: print() code coverage mysql-test/t/olap.test: print() code coverage mysql-test/t/query_cache.test: print() code coverage mysql-test/t/row.test: print() code coverage mysql-test/t/rpl000001.test: print() code coverage mysql-test/t/rpl_get_lock.test: print() code coverage mysql-test/t/rpl_master_pos_wait.test: print() code coverage mysql-test/t/select.test: print() code coverage mysql-test/t/type_blob.test: print() code coverage mysql-test/t/varbinary.test: print() code coverage mysql-test/t/variables.test: print() code coverage sql/item.cc: added string length for more speed layout fix fixed string printability sql/item.h: added string length for more speed sql/item_cmpfunc.cc: added string length for more speed sql/item_cmpfunc.h: fixed printability sql/item_create.cc: fixed printability sql/item_func.cc: fixed printability added string length for more speed sql/item_func.h: fixed printability sql/item_strfunc.cc: fixed printability added string length for more speed sql/item_strfunc.h: fixed printability sql/item_subselect.cc: added string length for more speed sql/item_sum.cc: added string length for more speed sql/item_timefunc.cc: added string length for more speed sql/item_timefunc.h: fixed printability sql/item_uniq.h: added string length for more speed sql/key.cc: added string length for more speed sql/sql_lex.cc: added string length for more speed sql/sql_parse.cc: after merge fix sql/sql_repl.cc: string changed with character for more speed sql/sql_select.cc: added string length for more speed sql/sql_show.cc: added string length for more speed
125 lines
3.2 KiB
Text
125 lines
3.2 KiB
Text
source include/master-slave.inc;
|
|
|
|
create table t1 (word char(20) not null);
|
|
load data infile '../../std_data/words.dat' into table t1;
|
|
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
|
eval load data local infile '$MYSQL_TEST_DIR/std_data/words.dat' into table t1;
|
|
select * from t1 limit 10;
|
|
|
|
#
|
|
# Test slave with wrong password
|
|
#
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
stop slave;
|
|
connection master;
|
|
set password for root@"localhost" = password('foo');
|
|
connection slave;
|
|
start slave;
|
|
connection master;
|
|
#
|
|
# Give slave time to do at last one failed connect retry
|
|
# This one must be short so that the slave will not stop retrying
|
|
real_sleep 2;
|
|
set password for root@"localhost" = password('');
|
|
# Give slave time to connect (will retry every second)
|
|
sleep 2;
|
|
|
|
create table t3(n int);
|
|
insert into t3 values(1),(2);
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
select * from t3;
|
|
select sum(length(word)) from t1;
|
|
connection master;
|
|
drop table t1,t3;
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
|
|
#test handling of aborted connection in the middle of update
|
|
connection master;
|
|
reset master;
|
|
connection slave;
|
|
stop slave;
|
|
reset slave;
|
|
|
|
connection master;
|
|
create table t1(n int);
|
|
#we want the log to exceed 16K to test deal with the log that is bigger than
|
|
#IO_SIZE
|
|
let $1=5000;
|
|
disable_query_log;
|
|
while ($1)
|
|
{
|
|
eval insert into t1 values($1+get_lock("hold_slave",10)*0);
|
|
dec $1;
|
|
}
|
|
enable_query_log;
|
|
|
|
# Try to cause a large relay log lag on the slave
|
|
connection slave;
|
|
select get_lock("hold_slave",10);
|
|
explain extended select get_lock("hold_slave",10);
|
|
start slave;
|
|
#hope this is long enough for I/O thread to fetch over 16K relay log data
|
|
sleep 3;
|
|
select release_lock("hold_slave");
|
|
explain extended select release_lock("hold_slave");
|
|
unlock tables;
|
|
|
|
connection master;
|
|
create table t2(id int);
|
|
insert into t2 values(connection_id());
|
|
save_master_pos;
|
|
|
|
connection master1;
|
|
# Avoid generating result
|
|
create temporary table t3(n int);
|
|
insert into t3 select get_lock('crash_lock%20C', 1) from t2;
|
|
|
|
connection master;
|
|
send update t1 set n = n + get_lock('crash_lock%20C', 2);
|
|
connection master1;
|
|
sleep 3;
|
|
select (@id := id) - id from t2;
|
|
kill @id;
|
|
# We don't drop t3 as this is a temporary table
|
|
drop table t2;
|
|
connection master;
|
|
--error 1053;
|
|
reap;
|
|
connection slave;
|
|
# The SQL slave thread should now have stopped because the query was killed on
|
|
# the master (so it has a non-zero error code in the binlog).
|
|
wait_for_slave_to_stop;
|
|
|
|
# The following test can't be done because the result of Pos will differ
|
|
# on different computers
|
|
# --replace_result 9306 9999 3334 9999 3335 9999
|
|
# show slave status;
|
|
|
|
set global sql_slave_skip_counter=1;
|
|
start slave;
|
|
select count(*) from t1;
|
|
connection master1;
|
|
drop table t1;
|
|
create table t1 (n int);
|
|
insert into t1 values(3456);
|
|
insert into mysql.user (Host, User, Password)
|
|
VALUES ("10.10.10.%", "blafasel2", password("blafasel2"));
|
|
select select_priv,user from mysql.user where user = 'blafasel2';
|
|
update mysql.user set Select_priv = "Y" where User="blafasel2";
|
|
select select_priv,user from mysql.user where user = 'blafasel2';
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|
|
select n from t1;
|
|
select select_priv,user from mysql.user where user = 'blafasel2';
|
|
connection master1;
|
|
drop table t1;
|
|
save_master_pos;
|
|
connection slave;
|
|
sync_with_master;
|