mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
The partitioning clause is only a very long single line, which is very hard to interpret for a human. This patch breaks the partitioning syntax into one line for the partitioning type, and one line per partition/subpartition. mysql-test/r/information_schema_part.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/r/partition.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/r/partition_archive.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/r/partition_datatype.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/r/partition_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/r/partition_mgm.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/r/partition_mgm_err.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/r/partition_not_windows.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/r/partition_range.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/r/partition_symlink.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/ndb/r/ndb_partition_key.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/ndb/r/ndb_partition_range.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/inc/partition_directory.inc: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Changed partitioning clause format for verifying the new output format. mysql-test/suite/parts/r/ndb_dd_backuprestore.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/part_supported_sql_func_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/part_supported_sql_func_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/part_supported_sql_func_ndb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_alter1_1_2_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_alter1_1_2_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_alter1_1_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_alter1_1_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_alter1_2_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_alter1_2_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_alter2_1_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_alter2_1_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_alter2_2_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_alter2_2_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_alter3_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_alter3_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_alter4_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_alter4_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_auto_increment_archive.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_auto_increment_blackhole.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_auto_increment_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_auto_increment_memory.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_auto_increment_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_auto_increment_ndb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_basic_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_basic_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_basic_symlink_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_basic_symlink_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_bit_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_bit_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_bit_ndb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_char_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_char_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_datetime_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_datetime_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_decimal_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_decimal_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_engine_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_engine_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_engine_ndb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_float_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_float_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_int_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_int_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_int_ndb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_mgm_lc0_archive.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_mgm_lc0_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_mgm_lc0_memory.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_mgm_lc0_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_mgm_lc0_ndb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_mgm_lc1_archive.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_mgm_lc1_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_mgm_lc1_memory.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_mgm_lc1_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_mgm_lc1_ndb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_mgm_lc2_archive.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_mgm_lc2_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_mgm_lc2_memory.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_mgm_lc2_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_mgm_lc2_ndb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_special_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_special_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_syntax_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/partition_syntax_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/parts/r/rpl_partition.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/rpl/r/rpl_extraCol_innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/rpl/r/rpl_extraCol_myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/rpl/r/rpl_innodb_bug28430.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/rpl/r/rpl_row_basic_8partition.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_partitions.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/rpl_ndb/r/rpl_ndb_innodb2ndb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/suite/rpl_ndb/r/rpl_ndb_myisam2ndb.result: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Updated test result due to the new partitioning clause output format. mysql-test/t/partition.test: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Added small tests for for the new partitioning clause output format. mysql-test/t/partition_mgm.test: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Added small tests for for the new partitioning clause output format. sql/sql_partition.cc: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Changed formatting of the partitioning clause from single line into multiple indented lines sql/sql_show.cc: Bug#14326: No formatting of partitioning clause in SHOW CREATE TABLE output Changed formatting of the partitioning clause from single line into multiple indented lines
757 lines
56 KiB
Text
757 lines
56 KiB
Text
---- Partitioning and char data type
|
||
create table t1 (a char(255) not null, primary key(a)) engine='MyISAM'
|
||
partition by key (a) (
|
||
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);
|
||
show create table t1;
|
||
Table Create Table
|
||
t1 CREATE TABLE `t1` (
|
||
`a` char(255) NOT NULL,
|
||
PRIMARY KEY (`a`)
|
||
) 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) */
|
||
insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
|
||
select * from t1;
|
||
a
|
||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||
b
|
||
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||
select * from t1 where a='b';
|
||
a
|
||
b
|
||
update t1 set a='bb' where a='b';
|
||
delete from t1 where a='bb';
|
||
select * from t1;
|
||
a
|
||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||
drop table t1;
|
||
create table t2 (a char(255) not null, primary key(a)) engine='MyISAM'
|
||
partition by key (a) partitions 27;
|
||
show create table t2;
|
||
Table Create Table
|
||
t2 CREATE TABLE `t2` (
|
||
`a` char(255) NOT NULL,
|
||
PRIMARY KEY (`a`)
|
||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||
/*!50100 PARTITION BY KEY (a)
|
||
PARTITIONS 27 */
|
||
26 inserts;
|
||
insert into t2 values (repeat(char(ascii('a')+0),26+54));
|
||
insert into t2 values (repeat(char(ascii('a')+1),25+54));
|
||
insert into t2 values (repeat(char(ascii('a')+2),24+54));
|
||
insert into t2 values (repeat(char(ascii('a')+3),23+54));
|
||
insert into t2 values (repeat(char(ascii('a')+4),22+54));
|
||
insert into t2 values (repeat(char(ascii('a')+5),21+54));
|
||
insert into t2 values (repeat(char(ascii('a')+6),20+54));
|
||
insert into t2 values (repeat(char(ascii('a')+7),19+54));
|
||
insert into t2 values (repeat(char(ascii('a')+8),18+54));
|
||
insert into t2 values (repeat(char(ascii('a')+9),17+54));
|
||
insert into t2 values (repeat(char(ascii('a')+10),16+54));
|
||
insert into t2 values (repeat(char(ascii('a')+11),15+54));
|
||
insert into t2 values (repeat(char(ascii('a')+12),14+54));
|
||
insert into t2 values (repeat(char(ascii('a')+13),13+54));
|
||
insert into t2 values (repeat(char(ascii('a')+14),12+54));
|
||
insert into t2 values (repeat(char(ascii('a')+15),11+54));
|
||
insert into t2 values (repeat(char(ascii('a')+16),10+54));
|
||
insert into t2 values (repeat(char(ascii('a')+17),9+54));
|
||
insert into t2 values (repeat(char(ascii('a')+18),8+54));
|
||
insert into t2 values (repeat(char(ascii('a')+19),7+54));
|
||
insert into t2 values (repeat(char(ascii('a')+20),6+54));
|
||
insert into t2 values (repeat(char(ascii('a')+21),5+54));
|
||
insert into t2 values (repeat(char(ascii('a')+22),4+54));
|
||
insert into t2 values (repeat(char(ascii('a')+23),3+54));
|
||
insert into t2 values (repeat(char(ascii('a')+24),2+54));
|
||
insert into t2 values (repeat(char(ascii('a')+25),1+54));
|
||
select count(*) from t2;
|
||
count(*)
|
||
26
|
||
select * from t2;
|
||
a
|
||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
||
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
|
||
ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
|
||
eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
|
||
fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||
gggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg
|
||
hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
|
||
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||
jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||
kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||
lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll
|
||
mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
|
||
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
|
||
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
|
||
ppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp
|
||
qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
|
||
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
|
||
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
|
||
ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
|
||
uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
|
||
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
|
||
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
|
||
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
|
||
drop table t2;
|
||
---- Partitioning and binary data type
|
||
create table t1 (a binary(255) not null, primary key(a)) engine='MyISAM'
|
||
partition by key (a) (
|
||
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);
|
||
show create table t1;
|
||
Table Create Table
|
||
t1 CREATE TABLE `t1` (
|
||
`a` binary(255) NOT NULL,
|
||
PRIMARY KEY (`a`)
|
||
) 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) */
|
||
insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
|
||
select hex(a) from t1;
|
||
hex(a)
|
||
616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||
616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161
|
||
620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||
626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262626262620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||
select a from t1 where substr(a,1,2)='b\0';
|
||
a
|
||
b |