2007-02-06 13:35:54 +01:00
|
|
|
create table t1 (a decimal(10,4) not null, primary key(a)) engine='InnoDB'
|
|
|
|
partition by key (a) (
|
Bug#34225: test suit parts uses /tmp-dir
Since it used /tmp-dir, it continues to fail on the same server
until the /tmp-dir is cleaned. (Another problem was that it
uses DATA/INDEX DIR without checking for symlink, which is needed)
Solution:
Moved all DATA/INDEX DIR test to a new partition_basic_symlink.inc file
and use this for myisam and innodb, also requiring symlinks and
not_windows.
(i.e. removed DATA/INDEX DIR use from several tests)
mysql-test/suite/parts/inc/partition_basic.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_bigint.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_binary.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_bit.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_blob.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_char.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_date.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_datetime.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_decimal.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_double.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_enum.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_float.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_int.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_key_16col.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_key_32col.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_key_4col.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_key_8col.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_mediumint.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_set.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_smallint.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_text.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_time.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_timestamp.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_tinyint.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_varbinary.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_varchar.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_year.inc:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/r/partition_basic_innodb.result:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/r/partition_basic_myisam.result:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/r/partition_bit_innodb.result:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/r/partition_bit_myisam.result:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/r/partition_char_innodb.result:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/r/partition_char_myisam.result:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/r/partition_datetime_innodb.result:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/r/partition_datetime_myisam.result:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/r/partition_decimal_innodb.result:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/r/partition_decimal_myisam.result:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/r/partition_float_innodb.result:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/r/partition_float_myisam.result:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/r/partition_int_innodb.result:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/r/partition_int_myisam.result:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/r/partition_special_innodb.result:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/r/partition_special_myisam.result:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/t/partition_sessions.test:
Bug#34225: test suit parts uses /tmp-dir
Removed the DATA/INDEX DIR, since the test is not dependent of it
(adding "--source include/have_symlink.inc" would have disabled it
on some platforms/configurations)
mysql-test/suite/parts/inc/partition_basic_symlink.inc:
Bug#34225: test suit parts uses /tmp-dir
Added this test case for testing some DATA/INDEX DIRECTORY cases
since I removed so much of it from all other tests.
mysql-test/suite/parts/r/partition_basic_symlink_innodb.result:
Bug#34225: test suit parts uses /tmp-dir
Added this test case for testing some DATA/INDEX DIRECTORY cases
since I removed so much of it from all other tests.
mysql-test/suite/parts/r/partition_basic_symlink_myisam.result:
Bug#34225: test suit parts uses /tmp-dir
Added this test case for testing some DATA/INDEX DIRECTORY cases
since I removed so much of it from all other tests.
mysql-test/suite/parts/t/partition_basic_symlink_innodb.test:
Bug#34225: test suit parts uses /tmp-dir
Added this test case for testing some DATA/INDEX DIRECTORY cases
since I removed so much of it from all other tests.
mysql-test/suite/parts/t/partition_basic_symlink_myisam.test:
Bug#34225: test suit parts uses /tmp-dir
Added this test case for testing some DATA/INDEX DIRECTORY cases
since I removed so much of it from all other tests.
2008-02-06 15:13:56 +01:00
|
|
|
partition pa1 max_rows=20 min_rows=2,
|
|
|
|
partition pa2 max_rows=30 min_rows=3,
|
|
|
|
partition pa3 max_rows=30 min_rows=4,
|
|
|
|
partition pa4 max_rows=40 min_rows=2);
|
2007-02-06 13:35:54 +01:00
|
|
|
show create table t1;
|
|
|
|
Table Create Table
|
|
|
|
t1 CREATE TABLE `t1` (
|
|
|
|
`a` decimal(10,4) NOT NULL,
|
|
|
|
PRIMARY KEY (`a`)
|
2008-11-04 08:43:21 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
2017-06-27 20:46:45 +02:00
|
|
|
PARTITION BY KEY (`a`)
|
|
|
|
(PARTITION `pa1` MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB,
|
|
|
|
PARTITION `pa2` MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB,
|
|
|
|
PARTITION `pa3` MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB,
|
|
|
|
PARTITION `pa4` MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB)
|
2007-02-06 13:35:54 +01:00
|
|
|
insert into t1 values (999999.9999), (-999999.9999), (123456.7899), (-123456.7899), (-1.5), (1), (0), (-1), (1.5), (1234.567), (-1234.567);
|
|
|
|
select * from t1;
|
|
|
|
a
|
|
|
|
-999999.9999
|
|
|
|
-123456.7899
|
|
|
|
-1234.5670
|
|
|
|
-1.5000
|
|
|
|
-1.0000
|
|
|
|
0.0000
|
|
|
|
1.0000
|
|
|
|
1.5000
|
|
|
|
1234.5670
|
|
|
|
123456.7899
|
|
|
|
999999.9999
|
|
|
|
select * from t1 where a=1234.567;
|
|
|
|
a
|
|
|
|
1234.5670
|
|
|
|
delete from t1 where a=1234.567;
|
|
|
|
select * from t1;
|
|
|
|
a
|
|
|
|
-999999.9999
|
|
|
|
-123456.7899
|
|
|
|
-1234.5670
|
|
|
|
-1.5000
|
|
|
|
-1.0000
|
|
|
|
0.0000
|
|
|
|
1.0000
|
|
|
|
1.5000
|
|
|
|
123456.7899
|
|
|
|
999999.9999
|
|
|
|
drop table t1;
|
|
|
|
create table t2 (a decimal(18,9) not null, primary key(a)) engine='InnoDB'
|
|
|
|
partition by key (a) partitions 10;
|
|
|
|
show create table t2;
|
|
|
|
Table Create Table
|
|
|
|
t2 CREATE TABLE `t2` (
|
|
|
|
`a` decimal(18,9) NOT NULL,
|
|
|
|
PRIMARY KEY (`a`)
|
2008-11-04 08:43:21 +01:00
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
2017-06-27 20:46:45 +02:00
|
|
|
PARTITION BY KEY (`a`)
|
2015-11-20 13:11:35 +01:00
|
|
|
PARTITIONS 10
|
2007-02-06 13:35:54 +01:00
|
|
|
insert into t2 values (999999999.999999999), (-999999999.999999999), (-1.5), (-1), (0), (1.5), (1234.567), (-1234.567);
|
|
|
|
select * from t2;
|
|
|
|
a
|
|
|
|
-999999999.999999999
|
|
|
|
-1234.567000000
|
|
|
|
-1.500000000
|
|
|
|
-1.000000000
|
|
|
|
0.000000000
|
|
|
|
1.500000000
|
|
|
|
1234.567000000
|
|
|
|
999999999.999999999
|
|
|
|
select * from t2 where a=1234.567;
|
|
|
|
a
|
|
|
|
1234.567000000
|
|
|
|
delete from t2 where a=1234.567;
|
|
|
|
select * from t2;
|
|
|
|
a
|
|
|
|
-999999999.999999999
|
|
|
|
-1234.567000000
|
|
|
|
-1.500000000
|
|
|
|
-1.000000000
|
|
|
|
0.000000000
|
|
|
|
1.500000000
|
|
|
|
999999999.999999999
|
|
|
|
delete from t2;
|
|
|
|
1024*3 inserts;
|
|
|
|
select count(*) from t2;
|
|
|
|
count(*)
|
|
|
|
3072
|
|
|
|
drop table t2;
|
2010-12-14 12:13:35 +01:00
|
|
|
create table t3 (a decimal(18,9) not null, primary key(a)) engine='InnoDB'
|
|
|
|
partition by range (floor(a)) subpartition by key (a) subpartitions 2 (
|
|
|
|
partition pa2 values less than (2),
|
|
|
|
partition pa4 values less than (4),
|
|
|
|
partition pa6 values less than (6),
|
|
|
|
partition pa8 values less than (8),
|
|
|
|
partition pa10 values less than (10)
|
|
|
|
);
|
|
|
|
show create table t3;
|
|
|
|
Table Create Table
|
|
|
|
t3 CREATE TABLE `t3` (
|
|
|
|
`a` decimal(18,9) NOT NULL,
|
|
|
|
PRIMARY KEY (`a`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
2017-06-27 20:46:45 +02:00
|
|
|
PARTITION BY RANGE (floor(`a`))
|
|
|
|
SUBPARTITION BY KEY (`a`)
|
2010-12-14 12:13:35 +01:00
|
|
|
SUBPARTITIONS 2
|
2017-06-27 20:46:45 +02:00
|
|
|
(PARTITION `pa2` VALUES LESS THAN (2) ENGINE = InnoDB,
|
|
|
|
PARTITION `pa4` VALUES LESS THAN (4) ENGINE = InnoDB,
|
|
|
|
PARTITION `pa6` VALUES LESS THAN (6) ENGINE = InnoDB,
|
|
|
|
PARTITION `pa8` VALUES LESS THAN (8) ENGINE = InnoDB,
|
|
|
|
PARTITION `pa10` VALUES LESS THAN (10) ENGINE = InnoDB)
|
2010-12-14 12:13:35 +01:00
|
|
|
9*3 inserts;
|
|
|
|
select count(*) from t3;
|
|
|
|
count(*)
|
|
|
|
27
|
|
|
|
drop table t3;
|
|
|
|
create table t4 (a decimal(18,9) not null, primary key(a)) engine='InnoDB'
|
|
|
|
partition by list (ceiling(a)) subpartition by key (a) subpartitions 2 (
|
|
|
|
partition pa2 values in (1,2),
|
|
|
|
partition pa4 values in (3,4),
|
|
|
|
partition pa6 values in (5,6),
|
|
|
|
partition pa8 values in (7,8),
|
|
|
|
partition pa10 values in (9,10)
|
|
|
|
);
|
|
|
|
show create table t4;
|
|
|
|
Table Create Table
|
|
|
|
t4 CREATE TABLE `t4` (
|
|
|
|
`a` decimal(18,9) NOT NULL,
|
|
|
|
PRIMARY KEY (`a`)
|
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
2017-06-27 20:46:45 +02:00
|
|
|
PARTITION BY LIST (ceiling(`a`))
|
|
|
|
SUBPARTITION BY KEY (`a`)
|
2010-12-14 12:13:35 +01:00
|
|
|
SUBPARTITIONS 2
|
2017-06-27 20:46:45 +02:00
|
|
|
(PARTITION `pa2` VALUES IN (1,2) ENGINE = InnoDB,
|
|
|
|
PARTITION `pa4` VALUES IN (3,4) ENGINE = InnoDB,
|
|
|
|
PARTITION `pa6` VALUES IN (5,6) ENGINE = InnoDB,
|
|
|
|
PARTITION `pa8` VALUES IN (7,8) ENGINE = InnoDB,
|
|
|
|
PARTITION `pa10` VALUES IN (9,10) ENGINE = InnoDB)
|
2010-12-14 12:13:35 +01:00
|
|
|
9*3 inserts;
|
|
|
|
select count(*) from t4;
|
|
|
|
count(*)
|
|
|
|
27
|
|
|
|
drop table t4;
|