diff options
author | Rich Prohaska <prohaska@tokutek.com> | 2014-07-23 13:50:34 -0400 |
---|---|---|
committer | Rich Prohaska <prohaska@tokutek.com> | 2014-07-23 13:50:34 -0400 |
commit | 0cfbaccf644aa6120c9d2aa46db08ed4554d3da8 (patch) | |
tree | 00a39d4765e5bb3d8a94cf23d55495f3b0d78386 /mysql-test | |
parent | b196bddb59620d194928e7c12263c77a930f5513 (diff) | |
download | mariadb-git-0cfbaccf644aa6120c9d2aa46db08ed4554d3da8.tar.gz |
#261 run multiple queries in part_index_scan
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/suite/tokudb.bugs/r/part_index_scan.result | 162 | ||||
-rw-r--r-- | mysql-test/suite/tokudb.bugs/t/part_index_scan.test | 69 |
2 files changed, 216 insertions, 15 deletions
diff --git a/mysql-test/suite/tokudb.bugs/r/part_index_scan.result b/mysql-test/suite/tokudb.bugs/r/part_index_scan.result index 3ede692cc78..0d416c734b7 100644 --- a/mysql-test/suite/tokudb.bugs/r/part_index_scan.result +++ b/mysql-test/suite/tokudb.bugs/r/part_index_scan.result @@ -64,6 +64,60 @@ insert into t3 select * from t; select count(*) from t1; count(*) 8388608 +select count(*) from t1; +count(*) +8388608 +select count(*) from t1; +count(*) +8388608 +select count(*) from t1; +count(*) +8388608 +select count(*) from t1; +count(*) +8388608 +select count(*) from t1; +count(*) +8388608 +select count(*) from t1; +count(*) +8388608 +select count(*) from t1; +count(*) +8388608 +select count(*) from t1; +count(*) +8388608 +select count(*) from t1; +count(*) +8388608 +select count(*) from t2; +count(*) +8388608 +select count(*) from t2; +count(*) +8388608 +select count(*) from t2; +count(*) +8388608 +select count(*) from t2; +count(*) +8388608 +select count(*) from t2; +count(*) +8388608 +select count(*) from t2; +count(*) +8388608 +select count(*) from t2; +count(*) +8388608 +select count(*) from t2; +count(*) +8388608 +select count(*) from t2; +count(*) +8388608 select count(*) from t2; count(*) 8388608 @@ -71,10 +125,91 @@ count(*) select count(*) from t3; count(*) 8388608 +select count(*) from t3; +count(*) +8388608 +select count(*) from t3; +count(*) +8388608 +select count(*) from t3; +count(*) +8388608 +select count(*) from t3; +count(*) +8388608 +select count(*) from t3; +count(*) +8388608 +select count(*) from t3; +count(*) +8388608 +select count(*) from t3; +count(*) +8388608 +select count(*) from t3; +count(*) +8388608 +select count(*) from t3; +count(*) +8388608 1 select count(*) from t1 where num>7000000; count(*) 1847274 +select count(*) from t1 where num>7000000; +count(*) +1847274 +select count(*) from t1 where num>7000000; +count(*) +1847274 +select count(*) from t1 where num>7000000; +count(*) +1847274 +select count(*) from t1 where num>7000000; +count(*) +1847274 +select count(*) from t1 where num>7000000; +count(*) +1847274 +select count(*) from t1 where num>7000000; +count(*) +1847274 +select count(*) from t1 where num>7000000; +count(*) +1847274 +select count(*) from t1 where num>7000000; +count(*) +1847274 +select count(*) from t1 where num>7000000; +count(*) +1847274 +select count(*) from t2 where num>7000000; +count(*) +1847274 +select count(*) from t2 where num>7000000; +count(*) +1847274 +select count(*) from t2 where num>7000000; +count(*) +1847274 +select count(*) from t2 where num>7000000; +count(*) +1847274 +select count(*) from t2 where num>7000000; +count(*) +1847274 +select count(*) from t2 where num>7000000; +count(*) +1847274 +select count(*) from t2 where num>7000000; +count(*) +1847274 +select count(*) from t2 where num>7000000; +count(*) +1847274 +select count(*) from t2 where num>7000000; +count(*) +1847274 select count(*) from t2 where num>7000000; count(*) 1847274 @@ -82,5 +217,32 @@ count(*) select count(*) from t3 where num>7000000; count(*) 1847274 +select count(*) from t3 where num>7000000; +count(*) +1847274 +select count(*) from t3 where num>7000000; +count(*) +1847274 +select count(*) from t3 where num>7000000; +count(*) +1847274 +select count(*) from t3 where num>7000000; +count(*) +1847274 +select count(*) from t3 where num>7000000; +count(*) +1847274 +select count(*) from t3 where num>7000000; +count(*) +1847274 +select count(*) from t3 where num>7000000; +count(*) +1847274 +select count(*) from t3 where num>7000000; +count(*) +1847274 +select count(*) from t3 where num>7000000; +count(*) +1847274 1 drop table if exists t,t1,t2,t3; diff --git a/mysql-test/suite/tokudb.bugs/t/part_index_scan.test b/mysql-test/suite/tokudb.bugs/t/part_index_scan.test index 77bae5cc90c..be60fca3af3 100644 --- a/mysql-test/suite/tokudb.bugs/t/part_index_scan.test +++ b/mysql-test/suite/tokudb.bugs/t/part_index_scan.test @@ -1,10 +1,13 @@ # verify that index scans on parititions are not slow -# due totokudb bulk fetch not being used +# due to tokudb bulk fetch not being used source include/have_tokudb.inc; -source include/have_partition.inc; set default_storage_engine='tokudb'; disable_warnings; drop table if exists t,t1,t2,t3; +enable_warnings; + +let $debug = 0; +let $maxq = 10; CREATE TABLE `t` ( `num` int(10) unsigned auto_increment NOT NULL, @@ -13,6 +16,7 @@ CREATE TABLE `t` ( ); # put 8M rows into t +if ($debug) { let $ts = `select now()`; echo "start $ts"; } INSERT INTO t values (null,null); INSERT INTO t SELECT null,null FROM t; INSERT INTO t SELECT null,null FROM t; @@ -37,7 +41,9 @@ INSERT INTO t SELECT null,null FROM t; INSERT INTO t SELECT null,null FROM t; INSERT INTO t SELECT null,null FROM t; INSERT INTO t SELECT null,null FROM t; +if ($debug) { let $ts = `select now()`; echo "select $ts"; } SELECT count(*) FROM t; +if ($debug) { let $ts = `select now()`; echo "select done $ts"; } CREATE TABLE `t1` ( `num` int(10) unsigned NOT NULL, @@ -68,48 +74,81 @@ PARTITION BY RANGE (num) PARTITION p7 VALUES LESS THAN (8000000), PARTITION px VALUES LESS THAN MAXVALUE); +if ($debug) { let $ts = `select now()`; echo "insert t1 $ts"; } insert into t1 select * from t; +if ($debug) { let $ts = `select now()`; echo "insert t2 $ts"; } insert into t2 select * from t; +if ($debug) { let $ts = `select now()`; echo "insert t3 $ts"; } insert into t3 select * from t; +if ($debug) { let $ts = `select now()`; echo "select t1 $ts"; } # verify that full index scans on partitioned tables t2 and t3 are comparable to a non-partitioned table t1 let $s = `select to_seconds(now())`; -select count(*) from t1; +let $i = 0; +while ($i < $maxq) { + select count(*) from t1; + inc $i; +} let $t1 = `select to_seconds(now()) - $s`; -# echo $t1; + +if ($debug) { let $ts = `select now()`; echo "select t2 $ts"; } let $s = `select to_seconds(now())`; -select count(*) from t2; +let $i = 0; +while ($i < $maxq) { + select count(*) from t2; + inc $i; +} let $t2 = `select to_seconds(now()) - $s`; -# echo $t2; let $d = `select abs($t2 - $t1) <= $t1`; echo $d; +if ($debug) { let $ts = `select now()`; echo "select t3 $ts"; } + let $s = `select to_seconds(now())`; -select count(*) from t3; +let $i = 0; +while ($i < $maxq) { + select count(*) from t3; + inc $i; +} let $t3 = `select to_seconds(now()) - $s`; -# echo $t3; let $d = `select abs($t3 - $t1) <= $t1`; echo $d; +if ($debug) { let $ts = `select now()`; echo "select t1 $ts"; } + let $s = `select to_seconds(now())`; -select count(*) from t1 where num>7000000; +let $i = 0; +while ($i < $maxq) { + select count(*) from t1 where num>7000000; + inc $i; +} let $t1 = `select to_seconds(now()) - $s`; -# echo $t1; + +if ($debug) { let $ts = `select now()`; echo "select t2 $ts"; } let $s = `select to_seconds(now())`; -select count(*) from t2 where num>7000000; +let $i = 0; +while ($i < $maxq) { + select count(*) from t2 where num>7000000; + inc $i; +} let $t2 = `select to_seconds(now()) - $s`; -# echo $t2; let $d = `select abs($t2 - $t1) <= $t1`; echo $d; +if ($debug) { let $ts = `select now()`; echo "select t3 $ts"; } + let $s = `select to_seconds(now())`; -select count(*) from t3 where num>7000000; +let $i = 0; +while ($i < $maxq) { + select count(*) from t3 where num>7000000; + inc $i; +} let $t3 = `select to_seconds(now()) - $s`; -# echo $t3; let $d = `select abs($t3 - $t1) <= $t1`; echo $d; -enable_warnings; +if ($debug) { let $ts = `select now()`; echo "done $ts"; } + drop table if exists t,t1,t2,t3; |