mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge fix
This commit is contained in:
@ -237,13 +237,18 @@ a
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 0
|
||||
select sql_cache * from t1;
|
||||
select sql_cache * from t1 union select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
set query_cache_type=2;
|
||||
select sql_cache * from t1;
|
||||
select sql_cache * from t1 union select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
select * from t1 union select sql_cache * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
@ -253,7 +258,7 @@ Variable_name Value
|
||||
Qcache_hits 4
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 1
|
||||
Qcache_queries_in_cache 2
|
||||
set query_cache_type=on;
|
||||
reset query cache;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
@ -576,3 +581,21 @@ show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 0
|
||||
drop table t1;
|
||||
create table t1 (a int);
|
||||
insert into t1 values (1),(2);
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 0
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
SET OPTION SQL_SELECT_LIMIT=1;
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
show status like "Qcache_queries_in_cache";
|
||||
Variable_name Value
|
||||
Qcache_queries_in_cache 2
|
||||
SET OPTION SQL_SELECT_LIMIT=DEFAULT;
|
||||
drop table t1;
|
||||
|
@ -6,8 +6,19 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
slave start;
|
||||
create table t1(a int not null auto_increment, b int, primary key(a) );
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
|
||||
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' ignore 1 lines;
|
||||
create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60));
|
||||
insert into t3 select * from t2;
|
||||
select * from t1;
|
||||
a b
|
||||
1 10
|
||||
2 15
|
||||
select * from t3;
|
||||
day id category name
|
||||
2003-02-22 2461 b a a a @ % ' " a
|
||||
2003-03-22 2161 c asdf
|
||||
2003-04-22 2416 a bbbbb
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
|
8
mysql-test/std_data/rpl_loaddata2.dat
Normal file
8
mysql-test/std_data/rpl_loaddata2.dat
Normal file
@ -0,0 +1,8 @@
|
||||
2003-01-21,6328,%a%,%aaaaa%
|
||||
##
|
||||
2003-02-22,2461,b,%a a a @@ @% @b ' " a%
|
||||
##
|
||||
2003-03-22,2161,%c%,%asdf%
|
||||
##
|
||||
2003-04-22,2416,%a%,%bbbbb%
|
||||
##
|
@ -144,9 +144,10 @@ create table t1 (a int not null);
|
||||
insert into t1 values (1),(2),(3);
|
||||
select * from t1;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
select sql_cache * from t1;
|
||||
select sql_cache * from t1 union select * from t1;
|
||||
set query_cache_type=2;
|
||||
select sql_cache * from t1;
|
||||
select sql_cache * from t1 union select * from t1;
|
||||
select * from t1 union select sql_cache * from t1;
|
||||
show status like "Qcache_hits";
|
||||
show status like "Qcache_queries_in_cache";
|
||||
set query_cache_type=on;
|
||||
@ -400,7 +401,6 @@ select * from t1 where id=2;
|
||||
#
|
||||
# Load data invalidation test
|
||||
#
|
||||
|
||||
create table t1 (word char(20) not null);
|
||||
select * from t1;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
@ -411,7 +411,6 @@ drop table t1;
|
||||
#
|
||||
# INTO OUTFILE/DUMPFILE test
|
||||
#
|
||||
|
||||
drop table if exists t1;
|
||||
create table t1 (a int);
|
||||
insert into t1 values (1),(2),(3);
|
||||
@ -419,4 +418,17 @@ show status like "Qcache_queries_in_cache";
|
||||
select * from t1 into outfile "query_caceh.out.file";
|
||||
select * from t1 limit 1 into dumpfile "query_cache.dump.file";
|
||||
show status like "Qcache_queries_in_cache";
|
||||
drop table t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# test of SQL_SELECT_LIMIT
|
||||
#
|
||||
create table t1 (a int);
|
||||
insert into t1 values (1),(2);
|
||||
show status like "Qcache_queries_in_cache";
|
||||
select * from t1;
|
||||
SET OPTION SQL_SELECT_LIMIT=1;
|
||||
select * from t1;
|
||||
show status like "Qcache_queries_in_cache";
|
||||
SET OPTION SQL_SELECT_LIMIT=DEFAULT;
|
||||
drop table t1;
|
||||
|
@ -1,16 +1,34 @@
|
||||
# See if replication of a "LOAD DATA in an autoincrement column"
|
||||
# Honours autoincrement values
|
||||
# i.e. if the master and slave have the same sequence
|
||||
#
|
||||
# check replication of load data for temporary tables with additional parameters
|
||||
#
|
||||
source include/master-slave.inc;
|
||||
|
||||
create table t1(a int not null auto_increment, b int, primary key(a) );
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
|
||||
create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
|
||||
#load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionaly enclosed by '%' escaped by '@' lines terminated by '\n%%\n' ignore 1 lines;
|
||||
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' ignore 1 lines;
|
||||
|
||||
create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60));
|
||||
insert into t3 select * from t2;
|
||||
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
select * from t1;
|
||||
|
||||
select * from t1;
|
||||
select * from t3;
|
||||
|
||||
connection master;
|
||||
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
|
Reference in New Issue
Block a user