diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2003-04-07 14:32:25 +0300 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2003-04-07 14:32:25 +0300 |
commit | ad9c7f040aacf77ae726657768b20ff60360380f (patch) | |
tree | 134f618dcd5db6f2845391a1a298b03cb5e21727 /mysql-test | |
parent | 00d9b06a7a6a659762e5fd4a6b8e32bbf3b639d0 (diff) | |
parent | bfdaffb892a5aca81217dfc5e0ee18a2757ac3ec (diff) | |
download | mariadb-git-ad9c7f040aacf77ae726657768b20ff60360380f.tar.gz |
merge fix
mysql-test/r/myisam.result:
Auto merged
mysql-test/t/myisam.test:
Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/query_cache.result | 29 | ||||
-rw-r--r-- | mysql-test/r/rpl_loaddata.result | 11 | ||||
-rw-r--r-- | mysql-test/std_data/rpl_loaddata2.dat | 8 | ||||
-rw-r--r-- | mysql-test/t/query_cache.test | 22 | ||||
-rw-r--r-- | mysql-test/t/rpl_loaddata.test | 20 |
5 files changed, 81 insertions, 9 deletions
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 0907abcbc86..a55e05578e0 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -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; diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result index 27f3d185f63..c1518e8e29a 100644 --- a/mysql-test/r/rpl_loaddata.result +++ b/mysql-test/r/rpl_loaddata.result @@ -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; diff --git a/mysql-test/std_data/rpl_loaddata2.dat b/mysql-test/std_data/rpl_loaddata2.dat new file mode 100644 index 00000000000..7a3d4ea7695 --- /dev/null +++ b/mysql-test/std_data/rpl_loaddata2.dat @@ -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% +## diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index f19d3bdc93a..33f226f9253 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -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;
\ No newline at end of file +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; diff --git a/mysql-test/t/rpl_loaddata.test b/mysql-test/t/rpl_loaddata.test index d7fc2a10ca4..2acb67dfce2 100644 --- a/mysql-test/t/rpl_loaddata.test +++ b/mysql-test/t/rpl_loaddata.test @@ -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; |