Merge lp:~laurynas-biveinis/percona-server/ahi-partitions-5.6-5.5 into lp:percona-server/5.5
Proposed by
Laurynas Biveinis
Status: | Superseded |
---|---|
Proposed branch: | lp:~laurynas-biveinis/percona-server/ahi-partitions-5.6-5.5 |
Merge into: | lp:percona-server/5.5 |
Diff against target: |
140 lines (+112/-3) 5 files modified
Percona-Server/mysql-test/suite/innodb/r/percona_ahi_partitions.result (+27/-0) Percona-Server/mysql-test/suite/innodb/t/percona_ahi_partitions-master.opt (+1/-0) Percona-Server/mysql-test/suite/innodb/t/percona_ahi_partitions.test (+62/-0) Percona-Server/mysql-test/suite/sys_vars/r/innodb_adaptive_hash_index_partitions_basic.result (+8/-2) Percona-Server/mysql-test/suite/sys_vars/t/innodb_adaptive_hash_index_partitions_basic.test (+14/-1) |
To merge this branch: | bzr merge lp:~laurynas-biveinis/percona-server/ahi-partitions-5.6-5.5 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexey Kopytov (community) | Needs Fixing | ||
Review via email: mp+181713@code.launchpad.net |
This proposal has been superseded by a proposal from 2013-08-28.
Description of the change
Fix bug 1214449 (Adaptive hash index partitions not tested in MTR) by
creating a very basic partitioned AHI testcase.
This is done as a prerequisite for AHI partitions 5.6 port. No 5.6 MP is being submitted now, the testcase 5.6 merge will be submitted together with that port.
http://
To post a comment you must log in.
Looks good, except that the test does too much unnecessary stuff:
On Fri, Aug 23 2013 06:12:30 +0000, Laurynas Biveinis wrote:
> === added file 'Percona- Server/ mysql-test/ suite/innodb/ t/percona_ ahi_partitions. test' Server/ mysql-test/ suite/innodb/ t/percona_ ahi_partitions. test 1970-01-01 00:00:00 +0000 Server/ mysql-test/ suite/innodb/ t/percona_ ahi_partitions. test 2013-08-23 06:11:41 +0000 have_innodb. inc innodb_ adaptive_ hash_index; innodb_ adaptive_ hash_index_ partitions;
> --- Percona-
> +++ Percona-
> @@ -0,0 +1,72 @@
> +#
> +# Basic test for InnoDB adaptive hash index partitions.
> +# TODO: add another testcase that uses DEBUG_SYNC to check the partition locking
> +#
> +--source include/
> +
> +# Check setup
> +SELECT @@GLOBAL.
> +SELECT @@GLOBAL.
> +
> +FLUSH STATUS;
FLUSH STATUS has no effect on InnoDB status vars, so that’s redundant.
> + SCHEMA. GLOBAL_ STATUS adaptive_ hash_hash_ searches' ;
> +SELECT VARIABLE_VALUE INTO @ahi_searches_1 FROM INFORMATION_
> + WHERE VARIABLE_NAME = 'Innodb_
> +
> +--disable_warnings
> +DROP TABLE IF EXISTS t1, t2, t3;
> +--enable_warnings
You don’t really need that. Please forget it, and stop copy-pasting from
other tests.
> + query_log
> +# 6 index trees across 4 AHI partitions
> +CREATE TABLE t1 (a INT PRIMARY KEY, b INT, c CHAR(200), INDEX b(b)) ENGINE=InnoDB;
> +CREATE TABLE t2 (a INT PRIMARY KEY, b INT, c CHAR(200), INDEX b(b)) ENGINE=InnoDB;
> +CREATE TABLE t3 (a INT PRIMARY KEY, b INT, c CHAR(200), INDEX b(b)) ENGINE=InnoDB;
> +
> +--echo Filling tables
> +--disable_
> +let $i=4000;
> +while ($i)
> +{
> + eval INSERT INTO t1 VALUES ($i, $i, REPEAT("a", 200));
> + eval INSERT INTO t2 VALUES ($i, $i, REPEAT("a", 200));
> + eval INSERT INTO t3 VALUES ($i, $i, REPEAT("a", 200));
> + dec $i;
> +}
What’s the point in creating megabytes of data (and slowing down the
test considerably) just to query a few pages max later? I tried changing
4000 to 2 and the test still passes.
> + result_ log
> +--echo Querying
> +--disable_
> +let $i=1000;
> +while ($i)
> +{
> + SELECT b FROM t1 WHERE a=1;
> + SELECT a FROM t1 WHERE b=1;
> + SELECT b FROM t2 WHERE a=2;
> + SELECT a FROM t2 WHERE b=2;
> + SELECT b FROM t3 WHERE a=3;
> + SELECT a FROM t3 WHERE b=3;
> + dec $i;
> +}
Same here. 200 iterations seems to be sufficient for AHI to be involved.
> +--enable_ result_ log SCHEMA. GLOBAL_ STATUS adaptive_ hash_cells' ;
> +--enable_query_log
> +
> +# AHI hash tables should have some cells now
> +SELECT VARIABLE_VALUE > 0 AS should_be_1 FROM INFORMATION_
> + WHERE VARIABLE_NAME = 'Innodb_
> +
This is a pointless check. AHI hash cells are static (they are allocated
on startup), so this value is constant throughout the test.