1
create table t1 (a float not null, primary key(a)) engine='MYISAM'
3
partition pa1 max_rows=20 min_rows=2,
4
partition pa2 max_rows=30 min_rows=3,
5
partition pa3 max_rows=30 min_rows=4,
6
partition pa4 max_rows=40 min_rows=2);
12
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
13
insert into t1 values (-3.402823466E+38), (3.402823466E+38), (-1.5), (-1), (0), (1), (1.5);
23
select * from t1 where a=1.5;
26
delete from t1 where a=1.5;
36
create table t2 (a float not null, primary key(a)) engine='MYISAM'
37
partition by key (a) partitions 10;
40
t2 CREATE TABLE `t2` (
43
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 10 */
44
insert into t2 values (-3.402823466E+38), (-3.402823466E+37), (-123.456), (0), (1234546.789), (123.456), (1.5);
54
select * from t2 where a=123.456;
56
delete from t2 where a=123.456;
66
select * from t2 where a=1.5;
69
delete from t2 where a=1.5;
80
select count(*) from t2;
84
create table t1 (a double not null, primary key(a)) engine='MYISAM'
85
partition by key (a) (
86
partition pa1 max_rows=20 min_rows=2,
87
partition pa2 max_rows=30 min_rows=3,
88
partition pa3 max_rows=30 min_rows=4,
89
partition pa4 max_rows=40 min_rows=2);
92
t1 CREATE TABLE `t1` (
95
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = MyISAM) */
96
insert into t1 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
99
-2.2250738585072016e208
102
-2.2250738585072014e-208
106
2.2250738585072016e208
107
select * from t1 where a=1.5;
110
delete from t1 where a=1.5;
113
-2.2250738585072016e208
116
-2.2250738585072014e-208
119
2.2250738585072016e208
121
create table t2 (a double not null, primary key(a)) engine='MYISAM'
122
partition by key (a) partitions 10;
123
show create table t2;
125
t2 CREATE TABLE `t2` (
128
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 10 */
129
insert into t2 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
132
-2.2250738585072016e208
135
-2.2250738585072014e-208
139
2.2250738585072016e208
140
select * from t2 where a=1234.567;
143
delete from t2 where a=1234.567;
146
-2.2250738585072016e208
149
-2.2250738585072014e-208
152
2.2250738585072016e208
155
select count(*) from t2;