mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 07:44:22 +01:00
8b941ba52c
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)
715 lines
56 KiB
Text
715 lines
56 KiB
Text
---- Partitioning and char data type
|
||
create table t1 (a char(255) not null, primary key(a)) engine='InnoDB'
|
||
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=InnoDB DEFAULT CHARSET=latin1 /*!50100 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) */
|
||
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='InnoDB'
|
||
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=InnoDB 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='InnoDB'
|
||
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=InnoDB DEFAULT CHARSET=latin1 /*!50100 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) */
|
||
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 |