mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
Merge dator6.(none):/home/mikael/mysql_clones/bug32943
into dator6.(none):/home/mikael/mysql_clones/mysql-5.1-engines
This commit is contained in:
commit
e1820b2e77
91 changed files with 63678 additions and 15382 deletions
1516
BUILD/build_mccge.sh
Executable file
1516
BUILD/build_mccge.sh
Executable file
File diff suppressed because it is too large
Load diff
143
BUILD/check-cpu
143
BUILD/check-cpu
|
@ -2,6 +2,9 @@
|
|||
#
|
||||
# Check cpu of current machine and find the
|
||||
# best compiler optimization flags for gcc
|
||||
# Will return result in:
|
||||
# cpu_arg : Type of CPU
|
||||
# check_cpu_args : Arguments for GCC compiler settings
|
||||
#
|
||||
|
||||
check_cpu () {
|
||||
|
@ -33,7 +36,7 @@ check_cpu () {
|
|||
|
||||
# parse CPU flags
|
||||
for flag in `$cpuinfo | grep '^flags' | sed -e 's/^flags.*: //' -e 's/[^a-zA-Z0-9_ ]/_/g'`; do
|
||||
eval cpu_flag_$flag=yes
|
||||
eval cpu_flag_$flag=yes
|
||||
done
|
||||
else
|
||||
# Fallback when there is no /proc/cpuinfo
|
||||
|
@ -62,92 +65,95 @@ check_cpu () {
|
|||
Alpha*EV6*)
|
||||
cpu_arg="ev6";
|
||||
;;
|
||||
|
||||
# Intel ia32
|
||||
*Intel*Core*|*X[eE][oO][nN]*)
|
||||
# a Xeon is just another pentium4 ...
|
||||
# ... unless it has the "lm" (long-mode) flag set,
|
||||
# in that case it's a Xeon with EM64T support
|
||||
# If SSE3 support exists it is a Core2 Duo or newer
|
||||
# So is Intel Core.
|
||||
if [ -z "$cpu_flag_lm" ]; then
|
||||
cpu_arg="pentium4";
|
||||
else
|
||||
cpu_arg="nocona";
|
||||
if [ -z "$cpu_flag_lm" ]; then
|
||||
cpu_arg="pentium4"
|
||||
else
|
||||
cpu_arg="nocona"
|
||||
fi
|
||||
if test -z "$cpu_flag_ssse3" ; then
|
||||
core2="no"
|
||||
else
|
||||
core2="yes"
|
||||
fi
|
||||
;;
|
||||
*Pentium*4*Mobile*)
|
||||
cpu_arg="pentium4m";
|
||||
;;
|
||||
cpu_arg="pentium4m"
|
||||
;;
|
||||
*Pentium*4*)
|
||||
cpu_arg="pentium4";
|
||||
cpu_arg="pentium4"
|
||||
;;
|
||||
*Pentium*III*Mobile*)
|
||||
cpu_arg="pentium3m";
|
||||
;;
|
||||
cpu_arg="pentium3m"
|
||||
;;
|
||||
*Pentium*III*)
|
||||
cpu_arg="pentium3";
|
||||
;;
|
||||
cpu_arg="pentium3"
|
||||
;;
|
||||
*Pentium*M*pro*)
|
||||
cpu_arg="pentium-m";
|
||||
cpu_arg="pentium-m"
|
||||
;;
|
||||
*Celeron\(R\)*\ M*)
|
||||
cpu_arg="pentium-m";
|
||||
;;
|
||||
cpu_arg="pentium-m"
|
||||
;;
|
||||
*Celeron*Coppermine*)
|
||||
cpu_arg="pentium3"
|
||||
;;
|
||||
;;
|
||||
*Celeron\(R\)*)
|
||||
cpu_arg="pentium4"
|
||||
;;
|
||||
;;
|
||||
*Celeron*)
|
||||
cpu_arg="pentium2";
|
||||
;;
|
||||
*Athlon*64*)
|
||||
cpu_arg="athlon64";
|
||||
cpu_arg="pentium2"
|
||||
;;
|
||||
*Turion*)
|
||||
cpu_arg="athlon64";
|
||||
cpu_arg="athlon64"
|
||||
;;
|
||||
*Opteron*)
|
||||
cpu_arg="athlon64";
|
||||
*Athlon*64*)
|
||||
cpu_arg="athlon64"
|
||||
;;
|
||||
*Athlon*)
|
||||
cpu_arg="athlon";
|
||||
cpu_arg="athlon"
|
||||
;;
|
||||
*Opteron*)
|
||||
cpu_arg="opteron";
|
||||
cpu_arg="opteron"
|
||||
;;
|
||||
# MacOSX / Intel
|
||||
*i386*i486*)
|
||||
cpu_arg="pentium-m";
|
||||
cpu_arg="pentium-m"
|
||||
;;
|
||||
*i386*)
|
||||
cpu_arg="i386"
|
||||
;;
|
||||
#Core 2 Duo
|
||||
*Intel*Core\(TM\)2*)
|
||||
cpu_arg="nocona";
|
||||
cpu_arg="nocona"
|
||||
;;
|
||||
|
||||
# Intel ia64
|
||||
*Itanium*)
|
||||
# Don't need to set any flags for itanium(at the moment)
|
||||
cpu_arg="";
|
||||
cpu_arg="itanium"
|
||||
;;
|
||||
|
||||
#
|
||||
# Solaris Sparc
|
||||
*sparc*sun4u*)
|
||||
cpu_arg="sparc"
|
||||
;;
|
||||
# Power PC
|
||||
*ppc*)
|
||||
cpu_arg='powerpc'
|
||||
cpu_arg="powerpc"
|
||||
;;
|
||||
|
||||
*powerpc*)
|
||||
cpu_arg='powerpc'
|
||||
cpu_arg="powerpc"
|
||||
;;
|
||||
|
||||
# unknown
|
||||
*)
|
||||
cpu_arg="";
|
||||
cpu_arg=""
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
if test -z "$cpu_arg" ; then
|
||||
if test "$CPUINFO" != " " ; then
|
||||
# fallback to uname if necessary
|
||||
|
@ -181,24 +187,17 @@ check_cpu () {
|
|||
*GCC*)
|
||||
# different gcc backends (and versions) have different CPU flags
|
||||
case `gcc -dumpmachine` in
|
||||
i?86-*)
|
||||
if test "$cc_comp" -lt 304
|
||||
then
|
||||
check_cpu_args='-mcpu=$cpu_arg'
|
||||
i?86-* | x86_64-*)
|
||||
if test "$cc_comp" -lt 304 ; then
|
||||
check_cpu_cflags="-mcpu=${cpu_arg}"
|
||||
elif test "$cc_comp" -ge 402 ; then
|
||||
check_cpu_cflags="-mtune=native"
|
||||
else
|
||||
check_cpu_args='-mtune=$cpu_arg'
|
||||
check_cpu_cflags="-mtune=${cpu_arg}"
|
||||
fi
|
||||
;;
|
||||
ppc-*)
|
||||
check_cpu_args='-mcpu=$cpu_arg -mtune=$cpu_arg'
|
||||
;;
|
||||
x86_64-*)
|
||||
if test "$cc_comp" -lt 304
|
||||
then
|
||||
check_cpu_args='-mcpu=$cpu_arg'
|
||||
else
|
||||
check_cpu_args='-mtune=$cpu_arg'
|
||||
fi
|
||||
check_cpu_cflags="-mcpu=${cpu_arg} -mtune=${cpu_arg}"
|
||||
;;
|
||||
*)
|
||||
check_cpu_cflags=""
|
||||
|
@ -208,7 +207,7 @@ check_cpu () {
|
|||
;;
|
||||
2.95.*)
|
||||
# GCC 2.95 doesn't expose its name in --version output
|
||||
check_cpu_args='-m$cpu_arg'
|
||||
check_cpu_cflags="-m${cpu_arg}"
|
||||
;;
|
||||
*)
|
||||
check_cpu_cflags=""
|
||||
|
@ -219,41 +218,23 @@ check_cpu () {
|
|||
# now we check whether the compiler really understands the cpu type
|
||||
touch __test.c
|
||||
|
||||
if test "x$core2" = "xyes" ; then
|
||||
cpu_arg="core2"
|
||||
fi
|
||||
while [ "$cpu_arg" ] ; do
|
||||
printf "testing $cpu_arg ... " >&2
|
||||
|
||||
# compile check
|
||||
check_cpu_cflags=`eval echo $check_cpu_args`
|
||||
if $cc -c $check_cpu_cflags __test.c 2>/dev/null; then
|
||||
echo ok >&2
|
||||
break;
|
||||
eval "$cc -c $check_cpu_cflags __test.c" 2>/dev/null
|
||||
if test "x$?" = "x0" ; then
|
||||
echo ok >&2
|
||||
break;
|
||||
fi
|
||||
|
||||
echo failed >&2
|
||||
check_cpu_cflags=""
|
||||
|
||||
# if compile failed: check whether it supports a predecessor of this CPU
|
||||
# this list is not complete, feel free to add further entries
|
||||
case "$cpu_arg" in
|
||||
# Intel ia32
|
||||
nocona) cpu_arg=pentium4 ;;
|
||||
prescott) cpu_arg=pentium4 ;;
|
||||
pentium4m) cpu_arg=pentium4 ;;
|
||||
pentium4) cpu_arg=pentium3 ;;
|
||||
pentium3m) cpu_arg=pentium3 ;;
|
||||
pentium3) cpu_arg=pentium2 ;;
|
||||
pentium2) cpu_arg=pentiumpro ;;
|
||||
pentiumpro) cpu_arg=pentium ;;
|
||||
pentium) cpu_arg=i486 ;;
|
||||
i486) cpu_arg=i386 ;;
|
||||
|
||||
# power / powerPC
|
||||
7450) cpu_arg=7400 ;;
|
||||
|
||||
*) cpu_arg="" ;;
|
||||
esac
|
||||
break;
|
||||
done
|
||||
|
||||
rm __test.*
|
||||
}
|
||||
|
||||
|
|
|
@ -5379,4 +5379,13 @@ SHOW WARNINGS;
|
|||
Level Code Message
|
||||
Error 1178 The storage engine for the table doesn't support nullable columns
|
||||
Error 1005 Can't create table 'test.t1' (errno: 138)
|
||||
create table t1 (c1 tinyblob not null) engine=csv;
|
||||
insert into t1 values("This");
|
||||
update t1 set c1="That" where c1="This";
|
||||
affected rows: 1
|
||||
info: Rows matched: 1 Changed: 1 Warnings: 0
|
||||
select * from t1;
|
||||
c1
|
||||
That
|
||||
drop table t1;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -21,4 +21,14 @@ INSERT INTO t1 VALUES('A', 'A'), ('B', 'B'), ('C', 'C');
|
|||
INSERT INTO t1 VALUES('A ', 'A ');
|
||||
ERROR 23000: Duplicate entry '' for key 'key1'
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(255) CHARACTER SET UCS2 COLLATE UCS2_BIN NOT NULL,
|
||||
KEY(c1)
|
||||
) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('marshall\'s');
|
||||
INSERT INTO t1 VALUES ('marsh');
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
|
|
|
@ -2023,4 +2023,185 @@ CHECK TABLE t1;
|
|||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(130),
|
||||
c2 VARCHAR(1)
|
||||
) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES(REPEAT("a",128), 'b');
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
REPAIR TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair status OK
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(130),
|
||||
c2 VARCHAR(1)
|
||||
) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES(REPEAT("a",128), 'b');
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair status OK
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(130),
|
||||
c2 VARCHAR(1)
|
||||
) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES(REPEAT("a",128), 'b');
|
||||
INSERT INTO t1 VALUES('b', 'b');
|
||||
INSERT INTO t1 VALUES('c', 'b');
|
||||
DELETE FROM t1 WHERE c1='b';
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
2
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
2
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(130),
|
||||
c2 VARCHAR(1),
|
||||
KEY (c1)
|
||||
) ENGINE=MyISAM;
|
||||
# Insert 100 rows. Query log disabled.
|
||||
UPDATE t1 SET c1=REPEAT("a",128) LIMIT 90;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
100
|
||||
ALTER TABLE t1 ENGINE=MyISAM;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
100
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(50),
|
||||
c2 VARCHAR(1)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET UTF8;
|
||||
INSERT INTO t1 VALUES(REPEAT(_utf8 x'e0ae85',43), 'b');
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
REPAIR TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair status OK
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(50),
|
||||
c2 VARCHAR(1)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET UTF8;
|
||||
INSERT INTO t1 VALUES(REPEAT(_utf8 x'e0ae85',43), 'b');
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair status OK
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(50),
|
||||
c2 VARCHAR(1)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET UTF8;
|
||||
INSERT INTO t1 VALUES(REPEAT(_utf8 x'e0ae85',43), 'b');
|
||||
INSERT INTO t1 VALUES('b', 'b');
|
||||
INSERT INTO t1 VALUES('c', 'b');
|
||||
DELETE FROM t1 WHERE c1='b';
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
2
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
2
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(50),
|
||||
c2 VARCHAR(1),
|
||||
KEY (c1)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET UTF8;
|
||||
# Insert 100 rows. Query log disabled.
|
||||
UPDATE t1 SET c1=REPEAT(_utf8 x'e0ae85',43) LIMIT 90;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
100
|
||||
ALTER TABLE t1 ENGINE=MyISAM;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
100
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
c1 VARCHAR(10) NOT NULL,
|
||||
c2 CHAR(10) DEFAULT NULL,
|
||||
c3 VARCHAR(10) NOT NULL,
|
||||
KEY (c1),
|
||||
KEY (c2)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0;
|
||||
|
||||
MyISAM file: MYSQLTEST_VARDIR/master-data/test/t1
|
||||
Record format: Packed
|
||||
Character set: utf8_general_ci (33)
|
||||
Data records: 0 Deleted blocks: 0
|
||||
Recordlength: 94
|
||||
|
||||
table description:
|
||||
Key Start Len Index Type
|
||||
1 2 30 multip. varchar
|
||||
2 33 30 multip. char NULL
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
drop table if exists t1;
|
||||
create table t1 (a int) partition by list ((a/3)*10 div 1)
|
||||
(partition p0 values in (0), partition p1 values in (1));
|
||||
ERROR HY000: This partition function is not allowed
|
||||
CREATE TABLE t1 (
|
||||
d DATE NOT NULL
|
||||
)
|
||||
|
@ -44,15 +47,6 @@ partition by key(a)
|
|||
partitions 1e+300;
|
||||
ERROR 42000: Only integers allowed as number here near '1e+300' at line 3
|
||||
create table t1 (a int)
|
||||
partition by key (a)
|
||||
(partition p0 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
|
||||
ERROR 42000: Incorrect table name 'part-data'
|
||||
create table t1 (a int)
|
||||
partition by key (a)
|
||||
(partition p0,
|
||||
partition p1 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
|
||||
ERROR 42000: Incorrect table name 'part-data'
|
||||
create table t1 (a int)
|
||||
partition by list (a)
|
||||
(partition p0 values in (1));
|
||||
create procedure pz()
|
||||
|
@ -1207,25 +1201,6 @@ SELECT t2.id FROM t2 WHERE t2.id IN (SELECT id FROM t1 WHERE status = 'Verified'
|
|||
id
|
||||
22589
|
||||
drop table t1, t2;
|
||||
set @org_mode=@@sql_mode;
|
||||
set @@sql_mode='NO_DIR_IN_CREATE';
|
||||
select @@sql_mode;
|
||||
@@sql_mode
|
||||
NO_DIR_IN_CREATE
|
||||
create table t1 (i int )
|
||||
partition by range (i)
|
||||
(
|
||||
partition p01 values less than (1000)
|
||||
data directory='/not/existing'
|
||||
index directory='/not/existing'
|
||||
);
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (i) (PARTITION p01 VALUES LESS THAN (1000) ENGINE = MyISAM) */
|
||||
DROP TABLE t1, t2;
|
||||
set @@sql_mode=@org_mode;
|
||||
create table t1 (c1 varchar(255),c2 tinyint,primary key(c1))
|
||||
partition by key (c1) partitions 10 ;
|
||||
insert into t1 values ('aaa','1') on duplicate key update c2 = c2 + 1;
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
drop table if exists t1;
|
||||
# test with not null
|
||||
create table t1 (a bit not null) partition by key (a);
|
||||
insert into t1 values (b'1');
|
||||
select hex(a) from t1 where a = b'1';
|
||||
hex(a)
|
||||
1
|
||||
drop table t1;
|
||||
create table t1 (a tinyint not null) partition by key (a);
|
||||
insert into t1 values (2);
|
||||
select * from t1 where a = 2;
|
||||
|
@ -30,22 +37,22 @@ a
|
|||
2
|
||||
drop table t1;
|
||||
create table t1 (a float not null) partition by key (a);
|
||||
insert into t1 values (2.1);
|
||||
select * from t1 where a = 2.1;
|
||||
insert into t1 values (0.5);
|
||||
select * from t1 where a = 0.5;
|
||||
a
|
||||
0.5
|
||||
drop table t1;
|
||||
create table t1 (a double not null) partition by key (a);
|
||||
insert into t1 values (2.1);
|
||||
select * from t1 where a = 2.1;
|
||||
insert into t1 values (0.5);
|
||||
select * from t1 where a = 0.5;
|
||||
a
|
||||
2.1
|
||||
0.5
|
||||
drop table t1;
|
||||
create table t1 (a decimal not null) partition by key (a);
|
||||
create table t1 (a decimal(4,2) not null) partition by key (a);
|
||||
insert into t1 values (2.1);
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'a' at row 1
|
||||
select * from t1 where a = 2.1;
|
||||
a
|
||||
2.10
|
||||
drop table t1;
|
||||
create table t1 (a date not null) partition by key (a);
|
||||
insert into t1 values ('2001-01-01');
|
||||
|
@ -125,6 +132,13 @@ select * from t1 where a = 'y';
|
|||
a
|
||||
y
|
||||
drop table t1;
|
||||
# test with null allowed
|
||||
create table t1 (a bit) partition by key (a);
|
||||
insert into t1 values (b'1');
|
||||
select hex(a) from t1 where a = b'1';
|
||||
hex(a)
|
||||
1
|
||||
drop table t1;
|
||||
create table t1 (a tinyint) partition by key (a);
|
||||
insert into t1 values (2);
|
||||
select * from t1 where a = 2;
|
||||
|
@ -156,22 +170,22 @@ a
|
|||
2
|
||||
drop table t1;
|
||||
create table t1 (a float) partition by key (a);
|
||||
insert into t1 values (2.1);
|
||||
select * from t1 where a = 2.1;
|
||||
insert into t1 values (0.5);
|
||||
select * from t1 where a = 0.5;
|
||||
a
|
||||
0.5
|
||||
drop table t1;
|
||||
create table t1 (a double) partition by key (a);
|
||||
insert into t1 values (2.1);
|
||||
select * from t1 where a = 2.1;
|
||||
insert into t1 values (0.5);
|
||||
select * from t1 where a = 0.5;
|
||||
a
|
||||
2.1
|
||||
0.5
|
||||
drop table t1;
|
||||
create table t1 (a decimal) partition by key (a);
|
||||
create table t1 (a decimal(4,2)) partition by key (a);
|
||||
insert into t1 values (2.1);
|
||||
Warnings:
|
||||
Note 1265 Data truncated for column 'a' at row 1
|
||||
select * from t1 where a = 2.1;
|
||||
a
|
||||
2.10
|
||||
drop table t1;
|
||||
create table t1 (a date) partition by key (a);
|
||||
insert into t1 values ('2001-01-01');
|
||||
|
@ -254,25 +268,41 @@ drop table t1;
|
|||
create table t1 (a varchar(65531)) partition by key (a);
|
||||
insert into t1 values ('bbbb');
|
||||
insert into t1 values ('aaaa');
|
||||
select * from t1 where a = 'aaa%';
|
||||
select * from t1 where a = 'aaaa';
|
||||
a
|
||||
aaaa
|
||||
select * from t1 where a like 'aaa%';
|
||||
a
|
||||
aaaa
|
||||
select * from t1 where a = 'bbbb';
|
||||
a
|
||||
bbbb
|
||||
drop table t1;
|
||||
create table t1 (a varchar(65532)) partition by key (a);
|
||||
insert into t1 values ('bbbb');
|
||||
insert into t1 values ('aaaa');
|
||||
select * from t1 where a = 'aaa%';
|
||||
select * from t1 where a = 'aaaa';
|
||||
a
|
||||
aaaa
|
||||
select * from t1 where a like 'aaa%';
|
||||
a
|
||||
aaaa
|
||||
select * from t1 where a = 'bbbb';
|
||||
a
|
||||
bbbb
|
||||
drop table t1;
|
||||
create table t1 (a varchar(65533) not null) partition by key (a);
|
||||
insert into t1 values ('bbbb');
|
||||
insert into t1 values ('aaaa');
|
||||
select * from t1 where a = 'aaa%';
|
||||
select * from t1 where a = 'aaaa';
|
||||
a
|
||||
aaaa
|
||||
select * from t1 where a like 'aaa%';
|
||||
a
|
||||
aaaa
|
||||
select * from t1 where a = 'bbbb';
|
||||
a
|
||||
bbbb
|
||||
drop table t1;
|
||||
create table t1 (a varchar(65533)) partition by key (a);
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
|
||||
|
@ -280,3 +310,17 @@ create table t1 (a varchar(65534) not null) partition by key (a);
|
|||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
|
||||
create table t1 (a varchar(65535)) partition by key (a);
|
||||
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs
|
||||
create table t1 (a bit(27), primary key (a)) engine=myisam
|
||||
partition by hash (a)
|
||||
(partition p0, partition p1, partition p2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(27) NOT NULL DEFAULT '\0\0\0\0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (a) (PARTITION p0 ENGINE = MyISAM, PARTITION p1 ENGINE = MyISAM, PARTITION p2 ENGINE = MyISAM) */
|
||||
insert into t1 values (1),(4),(7),(10),(13),(16),(19),(22),(25),(28),(31),(34);
|
||||
select hex(a) from t1 where a = 7;
|
||||
hex(a)
|
||||
7
|
||||
drop table t1;
|
||||
|
|
|
@ -1,4 +1,15 @@
|
|||
drop table if exists t1, t2;
|
||||
create table t1 (a int)
|
||||
partition by range (a)
|
||||
( partition p0 values less than (maxvalue));
|
||||
alter table t1 add partition (partition p1 values less than (100000));
|
||||
ERROR HY000: MAXVALUE can only be used in last partition definition
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
|
||||
drop table t1;
|
||||
create table t1 (a integer)
|
||||
partition by range (a)
|
||||
( partition p0 values less than (4),
|
||||
|
|
|
@ -81,3 +81,34 @@ Got one of the listed errors
|
|||
DROP DATABASE mysqltest2;
|
||||
USE test;
|
||||
DROP USER mysqltest_1@localhost;
|
||||
set @org_mode=@@sql_mode;
|
||||
set @@sql_mode='NO_DIR_IN_CREATE';
|
||||
select @@sql_mode;
|
||||
@@sql_mode
|
||||
NO_DIR_IN_CREATE
|
||||
create table t1 (i int )
|
||||
partition by range (i)
|
||||
(
|
||||
partition p01 values less than (1000)
|
||||
data directory='/not/existing'
|
||||
index directory='/not/existing'
|
||||
);
|
||||
Warnings:
|
||||
Warning 0 DATA DIRECTORY option ignored
|
||||
Warning 0 INDEX DIRECTORY option ignored
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (i) (PARTITION p01 VALUES LESS THAN (1000) ENGINE = MyISAM) */
|
||||
DROP TABLE t1, t2;
|
||||
set @@sql_mode=@org_mode;
|
||||
create table t1 (a int)
|
||||
partition by key (a)
|
||||
(partition p0 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
|
||||
ERROR 42000: Incorrect table name 'part-data'
|
||||
create table t1 (a int)
|
||||
partition by key (a)
|
||||
(partition p0,
|
||||
partition p1 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
|
||||
ERROR 42000: Incorrect table name 'part-data'
|
||||
|
|
|
@ -1,14 +1,30 @@
|
|||
DROP TABLE IF EXISTS `example`;
|
||||
CREATE TABLE `example` (
|
||||
`ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`DESCRIPTION` varchar(30) NOT NULL,
|
||||
`LEVEL` smallint(5) unsigned DEFAULT NULL,
|
||||
PRIMARY KEY (`ID_EXAMPLE`)
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (
|
||||
c1 int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
c2 varchar(30) NOT NULL,
|
||||
c3 smallint(5) unsigned DEFAULT NULL,
|
||||
PRIMARY KEY (c1)
|
||||
) ENGINE = MYISAM
|
||||
PARTITION BY HASH(ID_EXAMPLE)(
|
||||
PARTITION p0 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p0Data',
|
||||
PARTITION p1 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p1Data',
|
||||
PARTITION p2 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p2Data',
|
||||
PARTITION p3 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p3Data'
|
||||
PARTITION BY HASH(c1)(
|
||||
PARTITION p0
|
||||
DATA DIRECTORY = 'C:/mysqltest/p0Data'
|
||||
INDEX DIRECTORY = 'D:/mysqltest/p0Index',
|
||||
PARTITION p1,
|
||||
PARTITION p2
|
||||
DATA DIRECTORY = 'E:/mysqltest/p2Data'
|
||||
INDEX DIRECTORY = 'F:/mysqltest/p2Index'
|
||||
);
|
||||
ERROR HY000: Can't create/write to file 'C:\build\5.1\data\partitiontest\p0Data\example#P#p0.MYD' (Errcode: 2)
|
||||
Warnings:
|
||||
Warning 0 DATA DIRECTORY option ignored
|
||||
Warning 0 INDEX DIRECTORY option ignored
|
||||
Warning 0 DATA DIRECTORY option ignored
|
||||
Warning 0 INDEX DIRECTORY option ignored
|
||||
INSERT INTO t1 VALUES (NULL, "first", 1);
|
||||
INSERT INTO t1 VALUES (NULL, "second", 2);
|
||||
INSERT INTO t1 VALUES (NULL, "third", 3);
|
||||
ALTER TABLE t1 ADD PARTITION (PARTITION p3 DATA DIRECTORY = 'G:/mysqltest/p3Data' INDEX DIRECTORY = 'H:/mysqltest/p3Index');
|
||||
Warnings:
|
||||
Warning 0 DATA DIRECTORY option ignored
|
||||
Warning 0 INDEX DIRECTORY option ignored
|
||||
INSERT INTO t1 VALUES (NULL, "last", 4);
|
||||
DROP TABLE t1;
|
||||
|
|
3
mysql-test/r/plugin_load.result
Normal file
3
mysql-test/r/plugin_load.result
Normal file
|
@ -0,0 +1,3 @@
|
|||
SELECT @@global.example_enum_var = 'e2';
|
||||
@@global.example_enum_var = 'e2'
|
||||
1
|
|
@ -162,3 +162,11 @@ DROP DATABASE db1;
|
|||
DROP DATABASE db2;
|
||||
USE test;
|
||||
End of 5.0 tests
|
||||
SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE='NO_DIR_IN_CREATE';
|
||||
CREATE TABLE t1(a INT) DATA DIRECTORY='MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY='MYSQLTEST_VARDIR/tmp';
|
||||
Warnings:
|
||||
Warning 0 DATA DIRECTORY option ignored
|
||||
Warning 0 INDEX DIRECTORY option ignored
|
||||
DROP TABLE t1;
|
||||
SET @@SQL_MODE=@OLD_SQL_MODE;
|
||||
End of 5.1 tests
|
||||
|
|
|
@ -30,29 +30,6 @@
|
|||
let $unique= ;
|
||||
--source suite/parts/inc/partition_methods1.inc
|
||||
#
|
||||
--echo # 1.1.1 with DATA DIECTORY/INDEX DIRECTORY
|
||||
#
|
||||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
# Make directory for partition data
|
||||
--exec mkdir $MYSQLTEST_VARDIR/master-data/test/data || true
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''''$MYSQLTEST_VARDIR/master-data/test/data''''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
# Make directory for partition index
|
||||
--exec mkdir $MYSQLTEST_VARDIR/master-data/test/index || true
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''''$MYSQLTEST_VARDIR/master-data/test/index''''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
|
||||
let $with_directories= 1;
|
||||
--source suite/parts/inc/partition_methods1.inc
|
||||
--source suite/parts/inc/partition_directory.inc
|
||||
let $with_directories= 0;
|
||||
--enable_query_log
|
||||
#
|
||||
--echo # 1.2 The partitioning function contains two columns.
|
||||
let $unique= ;
|
||||
--source suite/parts/inc/partition_methods2.inc
|
||||
|
@ -72,28 +49,6 @@ if ($more_pk_ui_tests)
|
|||
--echo # 2.2 UNIQUE INDEX consisting of one column
|
||||
let $unique= , UNIQUE INDEX uidx1 (f_int1);
|
||||
--source suite/parts/inc/partition_methods1.inc
|
||||
|
||||
--echo # 2.2.1 with DATA DIECTORY/INDEX DIRECTORY
|
||||
#
|
||||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
# Make directory for partition data
|
||||
--exec mkdir $MYSQLTEST_VARDIR/master-data/test/data || true
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''''$MYSQLTEST_VARDIR/master-data/test/data''''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
# Make directory for partition index
|
||||
--exec mkdir $MYSQLTEST_VARDIR/master-data/test/index || true
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''''$MYSQLTEST_VARDIR/master-data/test/index''''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
|
||||
let $with_directories= TRUE;
|
||||
--source suite/parts/inc/partition_methods1.inc
|
||||
let $with_directories= FALSE;
|
||||
--enable_query_log
|
||||
#
|
||||
if ($do_pk_tests)
|
||||
{
|
||||
|
|
159
mysql-test/suite/parts/inc/partition_basic_symlink.inc
Normal file
159
mysql-test/suite/parts/inc/partition_basic_symlink.inc
Normal file
|
@ -0,0 +1,159 @@
|
|||
################################################################################
|
||||
# inc/partition_basic_symlink.inc #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Basic tests around create partitioned table with/without PRIMARY KEY and #
|
||||
# /or UNIQUE INDEX #
|
||||
# Also includes test for DATA/INDEX DIR which requires symlinked files #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: mleich #
|
||||
# Original Date: 2006-03-05 #
|
||||
# Change Author: mattiasj #
|
||||
# Change Date: 2008-02-06 #
|
||||
# Change: copied it from partition_basic.inc and kept DATA/INDEX DIR #
|
||||
################################################################################
|
||||
--enable_abort_on_error
|
||||
|
||||
--echo
|
||||
--echo #========================================================================
|
||||
--echo # Check partitioning methods on just created tables
|
||||
--echo # The tables should be defined without/with PRIMARY KEY and
|
||||
--echo # UNIQUE INDEXes.
|
||||
--echo # Every test round has to check
|
||||
--echo # PARTITION BY HASH/KEY/LIST/RANGE
|
||||
--echo # PARTITION BY RANGE/LIST ... SUBPARTITION BY HASH/KEY ...
|
||||
--echo #========================================================================
|
||||
--echo #------------------------------------------------------------------------
|
||||
--echo # 1 Tables without PRIMARY KEY or UNIQUE INDEXes
|
||||
--echo #------------------------------------------------------------------------
|
||||
--echo # 1.1 The partitioning function contains one column.
|
||||
let $unique= ;
|
||||
--source suite/parts/inc/partition_methods1.inc
|
||||
#
|
||||
--echo # 1.1.1 with DATA DIECTORY/INDEX DIRECTORY
|
||||
#
|
||||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
# Make directory for partition data
|
||||
--exec mkdir $MYSQLTEST_VARDIR/master-data/test/data || true
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''''$MYSQLTEST_VARDIR/master-data/test/data''''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
# Make directory for partition index
|
||||
--exec mkdir $MYSQLTEST_VARDIR/master-data/test/index || true
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''''$MYSQLTEST_VARDIR/master-data/test/index''''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
|
||||
let $with_directories= 1;
|
||||
--source suite/parts/inc/partition_methods1.inc
|
||||
--source suite/parts/inc/partition_directory.inc
|
||||
let $with_directories= 0;
|
||||
--enable_query_log
|
||||
#
|
||||
--echo # 1.2 The partitioning function contains two columns.
|
||||
let $unique= ;
|
||||
--source suite/parts/inc/partition_methods2.inc
|
||||
#
|
||||
--echo #------------------------------------------------------------------------
|
||||
--echo # 2 Tables with PRIMARY KEY and/or UNIQUE INDEXes
|
||||
--echo # The partitioning function contains one column.
|
||||
--echo #------------------------------------------------------------------------
|
||||
if ($more_pk_ui_tests)
|
||||
{
|
||||
if ($do_pk_tests)
|
||||
{
|
||||
--echo # 2.1 PRIMARY KEY consisting of one column
|
||||
let $unique= , PRIMARY KEY(f_int1);
|
||||
--source suite/parts/inc/partition_methods1.inc
|
||||
}
|
||||
--echo # 2.2 UNIQUE INDEX consisting of one column
|
||||
let $unique= , UNIQUE INDEX uidx1 (f_int1);
|
||||
--source suite/parts/inc/partition_methods1.inc
|
||||
|
||||
--echo # 2.2.1 with DATA DIECTORY/INDEX DIRECTORY
|
||||
#
|
||||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
# Make directory for partition data
|
||||
--exec mkdir $MYSQLTEST_VARDIR/master-data/test/data || true
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''''$MYSQLTEST_VARDIR/master-data/test/data''''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
# Make directory for partition index
|
||||
--exec mkdir $MYSQLTEST_VARDIR/master-data/test/index || true
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''''$MYSQLTEST_VARDIR/master-data/test/index''''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
|
||||
let $with_directories= TRUE;
|
||||
--source suite/parts/inc/partition_methods1.inc
|
||||
let $with_directories= FALSE;
|
||||
--enable_query_log
|
||||
#
|
||||
if ($do_pk_tests)
|
||||
{
|
||||
--echo # 2.3 PRIMARY KEY consisting of two columns
|
||||
let $unique= , PRIMARY KEY(f_int1,f_int2);
|
||||
--source suite/parts/inc/partition_methods1.inc
|
||||
let $unique= , PRIMARY KEY(f_int2,f_int1);
|
||||
--source suite/parts/inc/partition_methods1.inc
|
||||
}
|
||||
#
|
||||
--echo # 2.4 UNIQUE INDEX consisting of two columns
|
||||
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
|
||||
--source suite/parts/inc/partition_methods1.inc
|
||||
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
|
||||
--source suite/parts/inc/partition_methods1.inc
|
||||
#
|
||||
}
|
||||
--echo # 2.5 PRIMARY KEY + UNIQUE INDEX consisting of two columns
|
||||
if ($do_pk_tests)
|
||||
{
|
||||
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1);
|
||||
--source suite/parts/inc/partition_methods1.inc
|
||||
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2);
|
||||
--source suite/parts/inc/partition_methods1.inc
|
||||
}
|
||||
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1);
|
||||
--source suite/parts/inc/partition_methods1.inc
|
||||
|
||||
--echo #------------------------------------------------------------------------
|
||||
--echo # 3 Tables with PRIMARY KEY and/or UNIQUE INDEXes
|
||||
--echo # The partitioning function contains two columns.
|
||||
--echo #------------------------------------------------------------------------
|
||||
#
|
||||
if ($more_pk_ui_tests)
|
||||
{
|
||||
if ($do_pk_tests)
|
||||
{
|
||||
--echo # 3.1 PRIMARY KEY consisting of two columns
|
||||
let $unique= , PRIMARY KEY(f_int1,f_int2);
|
||||
--source suite/parts/inc/partition_methods2.inc
|
||||
|
||||
let $unique= , PRIMARY KEY(f_int2,f_int1);
|
||||
--source suite/parts/inc/partition_methods2.inc
|
||||
}
|
||||
#
|
||||
--echo # 3.2 UNIQUE INDEX consisting of two columns
|
||||
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2);
|
||||
--source suite/parts/inc/partition_methods2.inc
|
||||
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1);
|
||||
--source suite/parts/inc/partition_methods2.inc
|
||||
}
|
||||
#
|
||||
--echo # 3.3 PRIMARY KEY and UNIQUE INDEX consisting of two columns
|
||||
if ($do_pk_tests)
|
||||
{
|
||||
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1);
|
||||
--source suite/parts/inc/partition_methods2.inc
|
||||
let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2);
|
||||
--source suite/parts/inc/partition_methods2.inc
|
||||
}
|
||||
let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1);
|
||||
--source suite/parts/inc/partition_methods2.inc
|
|
@ -1,21 +1,9 @@
|
|||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a bigint unsigned not null, primary key(a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535);
|
||||
select * from t1;
|
||||
|
|
|
@ -1,23 +1,11 @@
|
|||
--echo ---- Partitioning and binary data type
|
||||
|
||||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a binary(255) not null, primary key(a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
|
||||
select hex(a) from t1;
|
||||
|
|
|
@ -1,15 +1,3 @@
|
|||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
@ -23,8 +11,8 @@ drop table t1;
|
|||
|
||||
eval create table t1 (a bit(0), primary key (a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory,
|
||||
partition pa2 $data_directory $index_directory);
|
||||
partition pa1,
|
||||
partition pa2);
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
|
@ -37,15 +25,16 @@ insert into t1 values
|
|||
(b'0000000000000000000000000000000000000000000000000000000000000001'),
|
||||
(b'1010101010101010101010101010101010101010101010101010101010101010'),
|
||||
(b'0101010101010101010101010101010101010101010101010101010101010101');
|
||||
--sorted_result
|
||||
select hex(a) from t1;
|
||||
drop table t1;
|
||||
|
||||
eval create table t1 (a bit(64), primary key (a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values
|
||||
(b'1111111111111111111111111111111111111111111111111111111111111111'),
|
||||
|
@ -55,6 +44,7 @@ insert into t1 values
|
|||
(b'0101010101010101010101010101010101010101010101010101010101010101');
|
||||
select hex(a) from t1 where a=b'0101010101010101010101010101010101010101010101010101010101010101';
|
||||
delete from t1 where a=b'0101010101010101010101010101010101010101010101010101010101010101';
|
||||
--sorted_result
|
||||
select hex(a) from t1;
|
||||
drop table t1;
|
||||
|
||||
|
@ -62,12 +52,15 @@ eval create table t2 (a bit, primary key (a)) engine=$engine
|
|||
partition by key (a) partitions 4;
|
||||
show create table t2;
|
||||
insert into t2 values (b'0'), (b'1');
|
||||
--sorted_result
|
||||
select hex(a) from t2;
|
||||
alter table t2 drop primary key;
|
||||
show create table t2;
|
||||
--sorted_result
|
||||
select hex(a) from t2;
|
||||
alter table t2 add primary key (a);
|
||||
show create table t2;
|
||||
--sorted_result
|
||||
select hex(a) from t2;
|
||||
drop table t2;
|
||||
|
||||
|
@ -90,6 +83,7 @@ dec $count;
|
|||
select hex(a) from t3 where a=b'01010101';
|
||||
delete from t3 where a=b'01010101';
|
||||
select count(*) from t3;
|
||||
--sorted_result
|
||||
select hex(a) from t3;
|
||||
drop table t3;
|
||||
|
||||
|
@ -111,5 +105,6 @@ dec $count;
|
|||
select hex(a) from t4 where a=b'00000001';
|
||||
delete from t4 where a=b'00000001';
|
||||
select count(*) from t4;
|
||||
--sorted_result
|
||||
select hex(a) from t4;
|
||||
drop table t4;
|
||||
|
|
|
@ -1,24 +1,12 @@
|
|||
--echo ---- Partitioning and blob data type
|
||||
|
||||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
--error ER_BLOB_FIELD_IN_PART_FUNC_ERROR
|
||||
eval create table t1 (a blob not null, primary key(a(767))) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
#insert into t1 values (repeat('a',1000)), ('b'), (repeat('a',500)), (repeat('b',64));
|
||||
|
|
|
@ -1,23 +1,11 @@
|
|||
--echo ---- Partitioning and char data type
|
||||
|
||||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a char(255) not null, primary key(a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values (repeat('a',255)), ('b'), (repeat('a',128)), (repeat('b',64));
|
||||
select * from t1;
|
||||
|
|
|
@ -1,21 +1,9 @@
|
|||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a date not null, primary key(a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values ('1975-01-01'), ('2020-12-31'), ('1980-10-14'), ('2000-06-15');
|
||||
select * from t1;
|
||||
|
|
|
@ -1,21 +1,9 @@
|
|||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a datetime not null, primary key(a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59');
|
||||
select * from t1;
|
||||
|
|
|
@ -1,21 +1,9 @@
|
|||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a decimal(10,4) not null, primary key(a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
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;
|
||||
|
|
|
@ -1,21 +1,9 @@
|
|||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a double not null, primary key(a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
|
||||
select * from t1;
|
||||
|
|
|
@ -1,23 +1,11 @@
|
|||
--echo ---- Partitioning and enum data type
|
||||
|
||||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a enum('A','B','C','D','E','F','G','H','I','J','K','L') not null, primary key(a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values ('A'),('D'),('L'),('G');
|
||||
select * from t1;
|
||||
|
|
|
@ -1,21 +1,9 @@
|
|||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a float not null, primary key(a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values (-3.402823466E+38), (3.402823466E+38), (-1.5), (-1), (0), (1), (1.5);
|
||||
select * from t1;
|
||||
|
|
|
@ -1,21 +1,9 @@
|
|||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a int unsigned not null, primary key(a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values (4294967295), (4294967294), (4294967293), (4294967292), (1), (2), (65535);
|
||||
select * from t1;
|
||||
|
|
|
@ -1,21 +1,9 @@
|
|||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine=$engine
|
||||
partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values
|
||||
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
|
||||
|
|
|
@ -1,29 +1,17 @@
|
|||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
--error ER_TOO_MANY_KEY_PARTS
|
||||
eval create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3)) engine=$engine
|
||||
partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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);
|
||||
|
||||
eval create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine=$engine
|
||||
partition by key(a,b,c,d,e,f,g,h) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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);
|
||||
|
||||
--disable_abort_on error
|
||||
show create table t1;
|
||||
|
|
|
@ -1,21 +1,9 @@
|
|||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w'), primary key(a,b,c,d)) engine=$engine
|
||||
partition by key (a,b,c,d) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values
|
||||
('1975-01-01', 'abcde', 'abcde','m'),
|
||||
|
|
|
@ -1,21 +1,9 @@
|
|||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h)) engine=$engine
|
||||
partition by key(a,b,c,d,e,f,g,h) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values
|
||||
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
|
||||
|
|
|
@ -1,21 +1,9 @@
|
|||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a mediumint unsigned not null, primary key(a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values (16777215), (16777214), (16777213), (16777212), (1), (2), (65535);
|
||||
select * from t1;
|
||||
|
|
|
@ -1,23 +1,11 @@
|
|||
--echo ---- Partitioning and set data type
|
||||
|
||||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a set('A','B','C','D','E','F','G','H','I','J','K','L') not null, primary key(a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values ('A,B'),('C,D'),('E,L'),('G,H,K');
|
||||
select * from t1 order by a;
|
||||
|
|
|
@ -1,21 +1,9 @@
|
|||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a smallint unsigned not null, primary key(a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values (65535), (65534), (65533), (65532), (1), (2), (256);
|
||||
select * from t1;
|
||||
|
|
|
@ -1,24 +1,12 @@
|
|||
--echo ---- Partitioning and text data type
|
||||
|
||||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
--error ER_BLOB_FIELD_IN_PART_FUNC_ERROR
|
||||
eval create table t1 (a text not null, primary key(a(767))) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
#insert into t1 values (repeat('a',1000)), ('b'), (repeat('a',500)), (repeat('b',64));
|
||||
|
|
|
@ -1,21 +1,9 @@
|
|||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a time not null, primary key(a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values ('21:21:21'), ('12:10:30'), ('03:03:03'), ('23:59');
|
||||
select * from t1;
|
||||
|
|
|
@ -1,21 +1,9 @@
|
|||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a timestamp not null, primary key(a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59');
|
||||
select * from t1;
|
||||
|
|
|
@ -1,21 +1,9 @@
|
|||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a tinyint unsigned not null, primary key(a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values (255), (254), (253), (252), (1), (2), (128);
|
||||
select * from t1;
|
||||
|
|
|
@ -1,23 +1,11 @@
|
|||
--echo ---- Partitioning and varbinary data type
|
||||
|
||||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a varbinary(767) not null, primary key(a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64));
|
||||
select * from t1;
|
||||
|
|
|
@ -1,23 +1,11 @@
|
|||
--echo ---- Partitioning and varchar data type
|
||||
|
||||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a varchar(767) not null, primary key(a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values (repeat('a',767)), ('b'), (repeat('a',500)), (repeat('b',64));
|
||||
select * from t1;
|
||||
|
|
|
@ -1,21 +1,9 @@
|
|||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''/tmp''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''/tmp''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
eval create table t1 (a year not null, primary key(a)) engine=$engine
|
||||
partition by key (a) (
|
||||
partition pa1 $data_directory $index_directory max_rows=20 min_rows=2,
|
||||
partition pa2 $data_directory $index_directory max_rows=30 min_rows=3,
|
||||
partition pa3 $data_directory $index_directory max_rows=30 min_rows=4,
|
||||
partition pa4 $data_directory $index_directory max_rows=40 min_rows=2);
|
||||
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;
|
||||
insert into t1 values ('1975'), (2020), ('1980'), ('2000');
|
||||
select * from t1;
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
37465
mysql-test/suite/parts/r/partition_basic_symlink_innodb.result
Normal file
37465
mysql-test/suite/parts/r/partition_basic_symlink_innodb.result
Normal file
File diff suppressed because it is too large
Load diff
22911
mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
Normal file
22911
mysql-test/suite/parts/r/partition_basic_symlink_myisam.result
Normal file
File diff suppressed because it is too large
Load diff
|
@ -12,18 +12,14 @@ t1 CREATE TABLE `t1` (
|
|||
drop table t1;
|
||||
create table t1 (a bit(0), primary key (a)) engine='INNODB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp',
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp');
|
||||
partition pa1,
|
||||
partition pa2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(1) NOT NULL DEFAULT '\0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 ENGINE = InnoDB, PARTITION pa2 ENGINE = InnoDB) */
|
||||
drop table t1;
|
||||
create table t1 (a bit(64), primary key (a)) engine='INNODB'
|
||||
partition by key (a) partitions 2;
|
||||
|
@ -49,24 +45,16 @@ FFFFFFFFFFFFFFFF
|
|||
drop table t1;
|
||||
create table t1 (a bit(64), primary key (a)) engine='INNODB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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
|
||||
(b'1111111111111111111111111111111111111111111111111111111111111111'),
|
||||
(b'1000000000000000000000000000000000000000000000000000000000000000'),
|
||||
|
@ -105,8 +93,8 @@ t2 CREATE TABLE `t2` (
|
|||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) PARTITIONS 4 */
|
||||
select hex(a) from t2;
|
||||
hex(a)
|
||||
1
|
||||
0
|
||||
1
|
||||
alter table t2 add primary key (a);
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
|
@ -142,20 +130,6 @@ count(*)
|
|||
select hex(a) from t3;
|
||||
hex(a)
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
A
|
||||
B
|
||||
C
|
||||
D
|
||||
E
|
||||
F
|
||||
10
|
||||
11
|
||||
12
|
||||
|
@ -172,6 +146,7 @@ F
|
|||
1D
|
||||
1E
|
||||
1F
|
||||
2
|
||||
20
|
||||
21
|
||||
22
|
||||
|
@ -188,6 +163,7 @@ F
|
|||
2D
|
||||
2E
|
||||
2F
|
||||
3
|
||||
30
|
||||
31
|
||||
32
|
||||
|
@ -204,6 +180,7 @@ F
|
|||
3D
|
||||
3E
|
||||
3F
|
||||
4
|
||||
40
|
||||
41
|
||||
42
|
||||
|
@ -220,6 +197,7 @@ F
|
|||
4D
|
||||
4E
|
||||
4F
|
||||
5
|
||||
50
|
||||
51
|
||||
52
|
||||
|
@ -235,6 +213,7 @@ F
|
|||
5D
|
||||
5E
|
||||
5F
|
||||
6
|
||||
60
|
||||
61
|
||||
62
|
||||
|
@ -251,6 +230,7 @@ F
|
|||
6D
|
||||
6E
|
||||
6F
|
||||
7
|
||||
70
|
||||
71
|
||||
72
|
||||
|
@ -267,6 +247,7 @@ F
|
|||
7D
|
||||
7E
|
||||
7F
|
||||
8
|
||||
80
|
||||
81
|
||||
82
|
||||
|
@ -283,6 +264,7 @@ F
|
|||
8D
|
||||
8E
|
||||
8F
|
||||
9
|
||||
90
|
||||
91
|
||||
92
|
||||
|
@ -299,6 +281,7 @@ F
|
|||
9D
|
||||
9E
|
||||
9F
|
||||
A
|
||||
A0
|
||||
A1
|
||||
A2
|
||||
|
@ -315,6 +298,7 @@ AC
|
|||
AD
|
||||
AE
|
||||
AF
|
||||
B
|
||||
B0
|
||||
B1
|
||||
B2
|
||||
|
@ -331,6 +315,7 @@ BC
|
|||
BD
|
||||
BE
|
||||
BF
|
||||
C
|
||||
C0
|
||||
C1
|
||||
C2
|
||||
|
@ -347,6 +332,7 @@ CC
|
|||
CD
|
||||
CE
|
||||
CF
|
||||
D
|
||||
D0
|
||||
D1
|
||||
D2
|
||||
|
@ -363,6 +349,7 @@ DC
|
|||
DD
|
||||
DE
|
||||
DF
|
||||
E
|
||||
E0
|
||||
E1
|
||||
E2
|
||||
|
@ -379,6 +366,7 @@ EC
|
|||
ED
|
||||
EE
|
||||
EF
|
||||
F
|
||||
F0
|
||||
F1
|
||||
F2
|
||||
|
@ -417,20 +405,6 @@ count(*)
|
|||
31
|
||||
select hex(a) from t4;
|
||||
hex(a)
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
A
|
||||
B
|
||||
C
|
||||
D
|
||||
E
|
||||
F
|
||||
10
|
||||
11
|
||||
12
|
||||
|
@ -447,5 +421,19 @@ F
|
|||
1D
|
||||
1E
|
||||
1F
|
||||
2
|
||||
20
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
A
|
||||
B
|
||||
C
|
||||
D
|
||||
E
|
||||
F
|
||||
drop table t4;
|
||||
|
|
|
@ -12,18 +12,14 @@ t1 CREATE TABLE `t1` (
|
|||
drop table t1;
|
||||
create table t1 (a bit(0), primary key (a)) engine='MyISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp',
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp');
|
||||
partition pa1,
|
||||
partition pa2);
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(1) NOT NULL DEFAULT '\0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 ENGINE = MyISAM, PARTITION pa2 ENGINE = MyISAM) */
|
||||
drop table t1;
|
||||
create table t1 (a bit(64), primary key (a)) engine='MyISAM'
|
||||
partition by key (a) partitions 2;
|
||||
|
@ -49,24 +45,16 @@ FFFFFFFFFFFFFFFF
|
|||
drop table t1;
|
||||
create table t1 (a bit(64), primary key (a)) engine='MyISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` bit(64) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0',
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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
|
||||
(b'1111111111111111111111111111111111111111111111111111111111111111'),
|
||||
(b'1000000000000000000000000000000000000000000000000000000000000000'),
|
||||
|
@ -142,20 +130,6 @@ count(*)
|
|||
select hex(a) from t3;
|
||||
hex(a)
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
A
|
||||
B
|
||||
C
|
||||
D
|
||||
E
|
||||
F
|
||||
10
|
||||
11
|
||||
12
|
||||
|
@ -172,6 +146,7 @@ F
|
|||
1D
|
||||
1E
|
||||
1F
|
||||
2
|
||||
20
|
||||
21
|
||||
22
|
||||
|
@ -188,6 +163,7 @@ F
|
|||
2D
|
||||
2E
|
||||
2F
|
||||
3
|
||||
30
|
||||
31
|
||||
32
|
||||
|
@ -204,6 +180,7 @@ F
|
|||
3D
|
||||
3E
|
||||
3F
|
||||
4
|
||||
40
|
||||
41
|
||||
42
|
||||
|
@ -220,6 +197,7 @@ F
|
|||
4D
|
||||
4E
|
||||
4F
|
||||
5
|
||||
50
|
||||
51
|
||||
52
|
||||
|
@ -235,6 +213,7 @@ F
|
|||
5D
|
||||
5E
|
||||
5F
|
||||
6
|
||||
60
|
||||
61
|
||||
62
|
||||
|
@ -251,6 +230,7 @@ F
|
|||
6D
|
||||
6E
|
||||
6F
|
||||
7
|
||||
70
|
||||
71
|
||||
72
|
||||
|
@ -267,6 +247,7 @@ F
|
|||
7D
|
||||
7E
|
||||
7F
|
||||
8
|
||||
80
|
||||
81
|
||||
82
|
||||
|
@ -283,6 +264,7 @@ F
|
|||
8D
|
||||
8E
|
||||
8F
|
||||
9
|
||||
90
|
||||
91
|
||||
92
|
||||
|
@ -299,6 +281,7 @@ F
|
|||
9D
|
||||
9E
|
||||
9F
|
||||
A
|
||||
A0
|
||||
A1
|
||||
A2
|
||||
|
@ -315,6 +298,7 @@ AC
|
|||
AD
|
||||
AE
|
||||
AF
|
||||
B
|
||||
B0
|
||||
B1
|
||||
B2
|
||||
|
@ -331,6 +315,7 @@ BC
|
|||
BD
|
||||
BE
|
||||
BF
|
||||
C
|
||||
C0
|
||||
C1
|
||||
C2
|
||||
|
@ -347,6 +332,7 @@ CC
|
|||
CD
|
||||
CE
|
||||
CF
|
||||
D
|
||||
D0
|
||||
D1
|
||||
D2
|
||||
|
@ -363,6 +349,7 @@ DC
|
|||
DD
|
||||
DE
|
||||
DF
|
||||
E
|
||||
E0
|
||||
E1
|
||||
E2
|
||||
|
@ -379,6 +366,7 @@ EC
|
|||
ED
|
||||
EE
|
||||
EF
|
||||
F
|
||||
F0
|
||||
F1
|
||||
F2
|
||||
|
@ -417,20 +405,6 @@ count(*)
|
|||
31
|
||||
select hex(a) from t4;
|
||||
hex(a)
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
A
|
||||
B
|
||||
C
|
||||
D
|
||||
E
|
||||
F
|
||||
10
|
||||
11
|
||||
12
|
||||
|
@ -447,5 +421,19 @@ F
|
|||
1D
|
||||
1E
|
||||
1F
|
||||
2
|
||||
20
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
A
|
||||
B
|
||||
C
|
||||
D
|
||||
E
|
||||
F
|
||||
drop table t4;
|
||||
|
|
|
@ -1,24 +1,16 @@
|
|||
---- Partitioning and char data type
|
||||
create table t1 (a char(255) not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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
|
||||
|
@ -107,24 +99,16 @@ 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 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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)
|
||||
|
@ -216,24 +200,16 @@ drop table t2;
|
|||
---- Partitioning and varchar data type
|
||||
create table t1 (a varchar(767) not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` varchar(767) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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',767)), ('b'), (repeat('a',500)), (repeat('b',64));
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -322,24 +298,16 @@ drop table t2;
|
|||
---- Partitioning and varbinary data type
|
||||
create table t1 (a varbinary(767) not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` varbinary(767) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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',767)), ('b'), (repeat('a',500)), (repeat('b',64));
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -428,24 +396,16 @@ drop table t2;
|
|||
---- Partitioning and enum data type
|
||||
create table t1 (a enum('A','B','C','D','E','F','G','H','I','J','K','L') not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` enum('A','B','C','D','E','F','G','H','I','J','K','L') NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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 ('A'),('D'),('L'),('G');
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -558,24 +518,16 @@ drop table t2;
|
|||
---- Partitioning and set data type
|
||||
create table t1 (a set('A','B','C','D','E','F','G','H','I','J','K','L') not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` set('A','B','C','D','E','F','G','H','I','J','K','L') NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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 ('A,B'),('C,D'),('E,L'),('G,H,K');
|
||||
select * from t1 order by a;
|
||||
a
|
||||
|
@ -727,18 +679,10 @@ drop table t2;
|
|||
---- Partitioning and blob data type
|
||||
create table t1 (a blob not null, primary key(a(767))) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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);
|
||||
ERROR HY000: A BLOB field is not allowed in partition function
|
||||
create table t2 (a blob not null, primary key(a(767))) engine='InnoDB'
|
||||
partition by key (a) partitions 30;
|
||||
|
@ -755,18 +699,10 @@ ERROR HY000: A BLOB field is not allowed in partition function
|
|||
---- Partitioning and text data type
|
||||
create table t1 (a text not null, primary key(a(767))) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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);
|
||||
ERROR HY000: A BLOB field is not allowed in partition function
|
||||
create table t2 (a tinytext not null, primary key(a(767))) engine='InnoDB'
|
||||
partition by key (a) partitions 30;
|
||||
|
|
|
@ -1,24 +1,16 @@
|
|||
---- Partitioning and char data type
|
||||
create table t1 (a char(255) not null, primary key(a)) engine='MyISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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
|
||||
|
@ -107,24 +99,16 @@ 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 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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)
|
||||
|
@ -216,24 +200,16 @@ drop table t2;
|
|||
---- Partitioning and varchar data type
|
||||
create table t1 (a varchar(767) not null, primary key(a)) engine='MyISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` varchar(767) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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',767)), ('b'), (repeat('a',500)), (repeat('b',64));
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -322,24 +298,16 @@ drop table t2;
|
|||
---- Partitioning and varbinary data type
|
||||
create table t1 (a varbinary(767) not null, primary key(a)) engine='MyISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` varbinary(767) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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',767)), ('b'), (repeat('a',500)), (repeat('b',64));
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -428,24 +396,16 @@ drop table t2;
|
|||
---- Partitioning and enum data type
|
||||
create table t1 (a enum('A','B','C','D','E','F','G','H','I','J','K','L') not null, primary key(a)) engine='MyISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` enum('A','B','C','D','E','F','G','H','I','J','K','L') NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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 ('A'),('D'),('L'),('G');
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -558,24 +518,16 @@ drop table t2;
|
|||
---- Partitioning and set data type
|
||||
create table t1 (a set('A','B','C','D','E','F','G','H','I','J','K','L') not null, primary key(a)) engine='MyISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` set('A','B','C','D','E','F','G','H','I','J','K','L') NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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 ('A,B'),('C,D'),('E,L'),('G,H,K');
|
||||
select * from t1 order by a;
|
||||
a
|
||||
|
@ -727,18 +679,10 @@ drop table t2;
|
|||
---- Partitioning and blob data type
|
||||
create table t1 (a blob not null, primary key(a(767))) engine='MyISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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);
|
||||
ERROR HY000: A BLOB field is not allowed in partition function
|
||||
create table t2 (a blob not null, primary key(a(767))) engine='MyISAM'
|
||||
partition by key (a) partitions 30;
|
||||
|
@ -755,18 +699,10 @@ ERROR HY000: A BLOB field is not allowed in partition function
|
|||
---- Partitioning and text data type
|
||||
create table t1 (a text not null, primary key(a(767))) engine='MyISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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);
|
||||
ERROR HY000: A BLOB field is not allowed in partition function
|
||||
create table t2 (a tinytext not null, primary key(a(767))) engine='MyISAM'
|
||||
partition by key (a) partitions 30;
|
||||
|
|
|
@ -1,23 +1,15 @@
|
|||
create table t1 (a timestamp not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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 ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59');
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -281,24 +273,16 @@ a
|
|||
drop table t4;
|
||||
create table t1 (a date not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` date NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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 ('1975-01-01'), ('2020-12-31'), ('1980-10-14'), ('2000-06-15');
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -608,24 +592,16 @@ a
|
|||
drop table t4;
|
||||
create table t1 (a time not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` time NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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 ('21:21:21'), ('12:10:30'), ('03:03:03'), ('23:59');
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -1073,24 +1049,16 @@ a
|
|||
drop table t4;
|
||||
create table t1 (a datetime not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` datetime NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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 ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59');
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -1350,24 +1318,16 @@ a
|
|||
drop table t4;
|
||||
create table t1 (a year not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` year(4) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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 ('1975'), (2020), ('1980'), ('2000');
|
||||
select * from t1;
|
||||
a
|
||||
|
|
|
@ -1,23 +1,15 @@
|
|||
create table t1 (a timestamp not null, primary key(a)) engine='MyISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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 ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59');
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -281,24 +273,16 @@ a
|
|||
drop table t4;
|
||||
create table t1 (a date not null, primary key(a)) engine='MyISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` date NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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 ('1975-01-01'), ('2020-12-31'), ('1980-10-14'), ('2000-06-15');
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -608,24 +592,16 @@ a
|
|||
drop table t4;
|
||||
create table t1 (a time not null, primary key(a)) engine='MyISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` time NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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 ('21:21:21'), ('12:10:30'), ('03:03:03'), ('23:59');
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -1073,24 +1049,16 @@ a
|
|||
drop table t4;
|
||||
create table t1 (a datetime not null, primary key(a)) engine='MyISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` datetime NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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 ('1975-01-01 21:21:21'), ('2020-12-31 12:10:30'), ('1980-10-14 03:03'), ('2000-06-15 23:59');
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -1350,24 +1318,16 @@ a
|
|||
drop table t4;
|
||||
create table t1 (a year not null, primary key(a)) engine='MyISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` year(4) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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 ('1975'), (2020), ('1980'), ('2000');
|
||||
select * from t1;
|
||||
a
|
||||
|
|
|
@ -1,23 +1,15 @@
|
|||
create table t1 (a decimal(10,4) not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` decimal(10,4) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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 (999999.9999), (-999999.9999), (123456.7899), (-123456.7899), (-1.5), (1), (0), (-1), (1.5), (1234.567), (-1234.567);
|
||||
select * from t1;
|
||||
a
|
||||
|
|
|
@ -1,23 +1,15 @@
|
|||
create table t1 (a decimal(10,4) not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` decimal(10,4) NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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 (999999.9999), (-999999.9999), (123456.7899), (-123456.7899), (-1.5), (1), (0), (-1), (1.5), (1234.567), (-1234.567);
|
||||
select * from t1;
|
||||
a
|
||||
|
|
|
@ -1,23 +1,15 @@
|
|||
create table t1 (a float not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` float NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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 (-3.402823466E+38), (3.402823466E+38), (-1.5), (-1), (0), (1), (1.5);
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -91,24 +83,16 @@ count(*)
|
|||
drop table t2;
|
||||
create table t1 (a double not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` double NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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 (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
|
||||
select * from t1;
|
||||
a
|
||||
|
|
|
@ -1,23 +1,15 @@
|
|||
create table t1 (a float not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` float NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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 (-3.402823466E+38), (3.402823466E+38), (-1.5), (-1), (0), (1), (1.5);
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -91,24 +83,16 @@ count(*)
|
|||
drop table t2;
|
||||
create table t1 (a double not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` double NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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 (-2.2250738585072014E+208), (-2.2250738585072014E-208), (-1.5), (-1), (0), (1.5), (1234.567), (2.2250738585072014E+208);
|
||||
select * from t1;
|
||||
a
|
||||
|
|
|
@ -1,23 +1,15 @@
|
|||
create table t1 (a tinyint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` tinyint(3) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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 (255), (254), (253), (252), (1), (2), (128);
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -108,24 +100,16 @@ a
|
|||
drop table t3;
|
||||
create table t1 (a smallint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` smallint(5) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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 (65535), (65534), (65533), (65532), (1), (2), (256);
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -216,24 +200,16 @@ a
|
|||
drop table t3;
|
||||
create table t1 (a int unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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 (4294967295), (4294967294), (4294967293), (4294967292), (1), (2), (65535);
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -324,24 +300,16 @@ a
|
|||
drop table t3;
|
||||
create table t1 (a mediumint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` mediumint(8) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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 (16777215), (16777214), (16777213), (16777212), (1), (2), (65535);
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -432,24 +400,16 @@ a
|
|||
drop table t3;
|
||||
create table t1 (a bigint unsigned not null, primary key(a)) engine='InnoDB'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` bigint(20) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) 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 (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535);
|
||||
select * from t1;
|
||||
a
|
||||
|
|
|
@ -1,23 +1,15 @@
|
|||
create table t1 (a tinyint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` tinyint(3) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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 (255), (254), (253), (252), (1), (2), (128);
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -108,24 +100,16 @@ a
|
|||
drop table t3;
|
||||
create table t1 (a smallint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` smallint(5) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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 (65535), (65534), (65533), (65532), (1), (2), (256);
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -216,24 +200,16 @@ a
|
|||
drop table t3;
|
||||
create table t1 (a int unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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 (4294967295), (4294967294), (4294967293), (4294967292), (1), (2), (65535);
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -324,24 +300,16 @@ a
|
|||
drop table t3;
|
||||
create table t1 (a mediumint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` mediumint(8) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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 (16777215), (16777214), (16777213), (16777212), (1), (2), (65535);
|
||||
select * from t1;
|
||||
a
|
||||
|
@ -432,24 +400,16 @@ a
|
|||
drop table t3;
|
||||
create table t1 (a bigint unsigned not null, primary key(a)) engine='MYISAM'
|
||||
partition by key (a) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` bigint(20) unsigned NOT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) 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 (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535);
|
||||
select * from t1;
|
||||
a
|
||||
|
|
|
@ -1,17 +1,9 @@
|
|||
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w'), primary key(a,b,c,d)) engine='InnoDB'
|
||||
partition by key (a,b,c,d) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` (
|
||||
|
@ -20,7 +12,7 @@ t1 CREATE TABLE `t1` (
|
|||
`c` varchar(50) NOT NULL,
|
||||
`d` enum('m','w') NOT NULL DEFAULT 'm',
|
||||
PRIMARY KEY (`a`,`b`,`c`,`d`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d) (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
|
||||
('1975-01-01', 'abcde', 'abcde','m'),
|
||||
('1983-12-31', 'cdef', 'srtbvsr', 'w'),
|
||||
|
@ -40,18 +32,10 @@ a b c d
|
|||
drop table t1;
|
||||
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h)) engine='InnoDB'
|
||||
partition by key(a,b,c,d,e,f,g,h) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` (
|
||||
|
@ -65,7 +49,7 @@ t1 CREATE TABLE `t1` (
|
|||
`h` tinyint(4) NOT NULL,
|
||||
`i` char(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (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
|
||||
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
|
||||
('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'),
|
||||
|
@ -85,18 +69,10 @@ a b c d e f g h i
|
|||
drop table t1;
|
||||
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine='InnoDB'
|
||||
partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` (
|
||||
|
@ -118,7 +94,7 @@ t1 CREATE TABLE `t1` (
|
|||
`h1` tinyint(4) NOT NULL,
|
||||
`i` char(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`,`a1`,`b1`,`c1`,`d1`,`e1`,`f1`,`g1`,`h1`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (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
|
||||
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
|
||||
('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127,'1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'),
|
||||
|
@ -138,33 +114,17 @@ a b c d e f g h a1 b1 c1 d1 e1 f1 g1 h1 i
|
|||
drop table t1;
|
||||
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3)) engine='InnoDB'
|
||||
partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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);
|
||||
ERROR 42000: Too many key parts specified; max 16 parts allowed
|
||||
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine='InnoDB'
|
||||
partition by key(a,b,c,d,e,f,g,h) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` (
|
||||
|
@ -202,7 +162,7 @@ t1 CREATE TABLE `t1` (
|
|||
`h3` tinyint(4) NOT NULL,
|
||||
`i` char(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`,`a1`,`b1`,`c1`,`d1`,`e1`,`f1`,`g1`,`h1`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = InnoDB) */
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (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
|
||||
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, '1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
|
||||
('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127,'1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, '1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, '1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'),
|
||||
|
|
|
@ -1,17 +1,9 @@
|
|||
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w'), primary key(a,b,c,d)) engine='MyISAM'
|
||||
partition by key (a,b,c,d) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` (
|
||||
|
@ -20,7 +12,7 @@ t1 CREATE TABLE `t1` (
|
|||
`c` varchar(50) NOT NULL,
|
||||
`d` enum('m','w') NOT NULL DEFAULT 'm',
|
||||
PRIMARY KEY (`a`,`b`,`c`,`d`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d) (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
|
||||
('1975-01-01', 'abcde', 'abcde','m'),
|
||||
('1983-12-31', 'cdef', 'srtbvsr', 'w'),
|
||||
|
@ -40,18 +32,10 @@ a b c d
|
|||
drop table t1;
|
||||
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h)) engine='MyISAM'
|
||||
partition by key(a,b,c,d,e,f,g,h) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` (
|
||||
|
@ -65,7 +49,7 @@ t1 CREATE TABLE `t1` (
|
|||
`h` tinyint(4) NOT NULL,
|
||||
`i` char(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (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
|
||||
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
|
||||
('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'),
|
||||
|
@ -85,18 +69,10 @@ a b c d e f g h i
|
|||
drop table t1;
|
||||
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine='MyISAM'
|
||||
partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` (
|
||||
|
@ -118,7 +94,7 @@ t1 CREATE TABLE `t1` (
|
|||
`h1` tinyint(4) NOT NULL,
|
||||
`i` char(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`,`a1`,`b1`,`c1`,`d1`,`e1`,`f1`,`g1`,`h1`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1) (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
|
||||
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
|
||||
('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127,'1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'),
|
||||
|
@ -138,33 +114,17 @@ a b c d e f g h a1 b1 c1 d1 e1 f1 g1 h1 i
|
|||
drop table t1;
|
||||
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3)) engine='MyISAM'
|
||||
partition by key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1,a2,b2,c2,d2,e2,f2,g2,h2,a3,b3,c3,d3,e3,f3,g3,h3) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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);
|
||||
ERROR 42000: Too many key parts specified; max 16 parts allowed
|
||||
create table t1 (a date not null, b varchar(50) not null, c varchar(50) not null, d enum('m', 'w') not null, e int not null, f decimal (18,2) not null, g bigint not null, h tinyint not null, a1 date not null, b1 varchar(50) not null, c1 varchar(50) not null, d1 enum('m', 'w') not null, e1 int not null, f1 decimal (18,2) not null, g1 bigint not null, h1 tinyint not null, a2 date not null, b2 varchar(50) not null, c2 varchar(50) not null, d2 enum('m', 'w') not null, e2 int not null, f2 decimal (18,2) not null, g2 bigint not null, h2 tinyint not null, a3 date not null, b3 varchar(50) not null, c3 varchar(50) not null, d3 enum('m', 'w') not null, e3 int not null, f3 decimal (18,2) not null, g3 bigint not null, h3 tinyint not null, i char(255), primary key(a,b,c,d,e,f,g,h,a1,b1,c1,d1,e1,f1,g1,h1)) engine='MyISAM'
|
||||
partition by key(a,b,c,d,e,f,g,h) (
|
||||
partition pa1 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=20 min_rows=2,
|
||||
partition pa2 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=3,
|
||||
partition pa3 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=30 min_rows=4,
|
||||
partition pa4 DATA DIRECTORY =
|
||||
'/tmp' INDEX DIRECTORY =
|
||||
'/tmp' max_rows=40 min_rows=2);
|
||||
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` (
|
||||
|
@ -202,7 +162,7 @@ t1 CREATE TABLE `t1` (
|
|||
`h3` tinyint(4) NOT NULL,
|
||||
`i` char(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`,`b`,`c`,`d`,`e`,`f`,`g`,`h`,`a1`,`b1`,`c1`,`d1`,`e1`,`f1`,`g1`,`h1`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (PARTITION pa1 MAX_ROWS = 20 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa2 MAX_ROWS = 30 MIN_ROWS = 3 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa3 MAX_ROWS = 30 MIN_ROWS = 4 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM, PARTITION pa4 MAX_ROWS = 40 MIN_ROWS = 2 DATA DIRECTORY = '/tmp' INDEX DIRECTORY = '/tmp' ENGINE = MyISAM) */
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (a,b,c,d,e,f,g,h) (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
|
||||
('1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113,'1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, '1975-01-01', 'abcde', 'abcde','m', 1234, 123.45, 32412341234, 113, 'tbhth nrzh ztfghgfh fzh ftzhj fztjh'),
|
||||
('1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127,'1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, '1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, '1983-12-31', 'cdef', 'srtbvsr', 'w', 45634, 13452.56, 3452346456, 127, 'liuugbzvdmrlti b itiortudirtfgtibm dfi'),
|
||||
|
|
84
mysql-test/suite/parts/t/partition_basic_symlink_innodb.test
Normal file
84
mysql-test/suite/parts/t/partition_basic_symlink_innodb.test
Normal file
|
@ -0,0 +1,84 @@
|
|||
################################################################################
|
||||
# t/partition_basic_innodb.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Tests around Create Partitioned table using DATA/INDEX DIR #
|
||||
# InnoDB branch #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: mleich #
|
||||
# Original Date: 2006-03-05 #
|
||||
# Change Author: mattiasj #
|
||||
# Change Date: 2008-02-05 #
|
||||
# Change: copied it from partition_basic_innodb.test and kept DATA DIR #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
|
||||
##### Options, for debugging support #####
|
||||
let $debug= 0;
|
||||
let $with_partitioning= 1;
|
||||
|
||||
##### Option, for displaying files #####
|
||||
let $ls= 1;
|
||||
|
||||
##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments #####
|
||||
# on partioned tables
|
||||
SET @max_row = 20;
|
||||
|
||||
##### Execute more tests #####
|
||||
let $more_trigger_tests= 0;
|
||||
let $more_pk_ui_tests= 0;
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
# The server must support symlink for DATA/INDEX DIRECTORY.
|
||||
--source include/have_symlink.inc
|
||||
# windows does not support symlink for DATA/INDEX DIRECTORY.
|
||||
--source include/not_windows.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
|
||||
##### Storage engine to be tested
|
||||
--source include/have_innodb.inc
|
||||
let $engine= 'InnoDB';
|
||||
|
||||
##### Execute the test of "table" files
|
||||
# InnoDB has no files per PK, UI, ...
|
||||
let $do_file_tests= 0;
|
||||
|
||||
##### Execute PRIMARY KEY tests #####
|
||||
# AFAIK InnoDB clusters the table around PRIMARY KEYs.
|
||||
let $do_pk_tests= 1;
|
||||
|
||||
##### Assign a big number smaller than the maximum value for partitions #####
|
||||
# and smaller than the maximum value of SIGNED INTEGER
|
||||
let $MAX_VALUE= (2147483646);
|
||||
|
||||
# Generate the prerequisites ($variables, @variables, tables) needed
|
||||
--source suite/parts/inc/partition.pre
|
||||
|
||||
##### Workarounds for known open engine specific bugs
|
||||
# none
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_basic_symlink.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute storage engine specific tests
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Cleanup
|
||||
--source suite/parts/inc/partition_cleanup.inc
|
86
mysql-test/suite/parts/t/partition_basic_symlink_myisam.test
Normal file
86
mysql-test/suite/parts/t/partition_basic_symlink_myisam.test
Normal file
|
@ -0,0 +1,86 @@
|
|||
################################################################################
|
||||
# t/partition_basic_myisam.test #
|
||||
# #
|
||||
# Purpose: #
|
||||
# Tests around Create Partitioned table using DATA/INDEX DIR #
|
||||
# MyISAM branch #
|
||||
# #
|
||||
#------------------------------------------------------------------------------#
|
||||
# Original Author: mleich #
|
||||
# Original Date: 2006-03-05 #
|
||||
# Change Author: mattiasj #
|
||||
# Change Date: 2008-02-05 #
|
||||
# Change: copied it from partition_basic_myisam.test and kept DATA DIR #
|
||||
################################################################################
|
||||
|
||||
#
|
||||
# NOTE: PLEASE DO NOT ADD NOT MYISAM SPECIFIC TESTCASES HERE !
|
||||
# TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN
|
||||
# THE SOURCED FILES ONLY.
|
||||
#
|
||||
# Please read the README at the end of inc/partition.pre before changing
|
||||
# any of the variables.
|
||||
#
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# General not engine specific settings and requirements
|
||||
|
||||
##### Options, for debugging support #####
|
||||
let $debug= 0;
|
||||
let $with_partitioning= 1;
|
||||
|
||||
##### Option, for displaying files #####
|
||||
let $ls= 1;
|
||||
|
||||
##### Number of rows for the INSERT/UPDATE/DELETE/SELECT experiments #####
|
||||
# on partioned tables
|
||||
SET @max_row = 20;
|
||||
|
||||
##### Execute more tests #####
|
||||
let $more_trigger_tests= 0;
|
||||
let $more_pk_ui_tests= 0;
|
||||
|
||||
# The server must support partitioning.
|
||||
--source include/have_partition.inc
|
||||
# The server must support symlink for DATA/INDEX DIRECTORY.
|
||||
--source include/have_symlink.inc
|
||||
# windows does not support symlink for DATA/INDEX DIRECTORY.
|
||||
--source include/not_windows.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Engine specific settings and requirements
|
||||
|
||||
##### Storage engine to be tested
|
||||
let $engine= 'MyISAM';
|
||||
# The server uses in case of MyISAM symlinking (if available) and the expected
|
||||
# results fit to symlinking support.
|
||||
--source include/have_symlink.inc
|
||||
|
||||
##### Execute the test of "table" files
|
||||
# MyISAM has files per PK, UI, ...
|
||||
let $do_file_tests= 1;
|
||||
|
||||
##### Execute PRIMARY KEY tests #####
|
||||
# AFAIK MyISAM treats PRIMARY KEYs like UNIQUE INDEXes
|
||||
let $do_pk_tests= 0;
|
||||
|
||||
##### Assign a big number smaller than the maximum value for partitions #####
|
||||
# and smaller than the maximum value of SIGNED INTEGER
|
||||
let $MAX_VALUE= (2147483646);
|
||||
|
||||
# Generate the prerequisites ($variables, @variables, tables) needed
|
||||
--source suite/parts/inc/partition.pre
|
||||
|
||||
##### Workarounds for known open engine specific bugs
|
||||
# none
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute the tests to be applied to all storage engines
|
||||
--source suite/parts/inc/partition_basic_symlink.inc
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Execute storage engine specific tests
|
||||
|
||||
#------------------------------------------------------------------------------#
|
||||
# Cleanup
|
||||
--source suite/parts/inc/partition_cleanup.inc
|
|
@ -27,27 +27,6 @@ f4 datetime;
|
|||
let $col_access_list = f1,f2,f3,f4 ;
|
||||
let $col_new_list = new.f1,new.f2,new.f3 new.f4 ;
|
||||
|
||||
#--------------------------------------------------
|
||||
# initialize directories for partitions
|
||||
#--------------------------------------------------
|
||||
|
||||
--disable_query_log
|
||||
# DATA DIRECTORY
|
||||
# Make directory for partition data
|
||||
--exec mkdir $MYSQLTEST_VARDIR/master-data/tmpdata || true
|
||||
eval SET @data_dir = 'DATA DIRECTORY =
|
||||
''$MYSQLTEST_VARDIR/master-data/tmpdata''';
|
||||
let $data_directory = `select @data_dir`;
|
||||
|
||||
#INDEX DIRECTORY
|
||||
# Make directory for partition index
|
||||
--exec mkdir $MYSQLTEST_VARDIR/master-data/tmpindex || true
|
||||
eval SET @indx_dir = 'INDEX DIRECTORY =
|
||||
''$MYSQLTEST_VARDIR/master-data/tmpindex''';
|
||||
let $index_directory = `select @indx_dir`;
|
||||
--enable_query_log
|
||||
|
||||
|
||||
#---------------------------------------------------
|
||||
# Setting the parameters to use during testing
|
||||
#---------------------------------------------------
|
||||
|
@ -134,16 +113,16 @@ create table test_stat (
|
|||
# tb3_eng1: key partitioning
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
#--replace_result $data_directory <data_directory> $index_directory <index_directory> $ENG1 ENG1
|
||||
#--replace_result $ENG1 ENG1
|
||||
eval create table tb3_eng1 (
|
||||
i1 int NOT NULL auto_increment, primary key (i1),
|
||||
$column_list
|
||||
) engine=$ENG1
|
||||
PARTITION BY KEY (i1) PARTITIONS 4
|
||||
(PARTITION part1 $data_directory $index_directory,
|
||||
PARTITION part2 $data_directory $index_directory,
|
||||
PARTITION part3 $data_directory $index_directory,
|
||||
PARTITION part4 $data_directory $index_directory);
|
||||
(PARTITION part1,
|
||||
PARTITION part2,
|
||||
PARTITION part3,
|
||||
PARTITION part4);
|
||||
|
||||
#--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
eval load data local infile '$MYSQL_TEST_DIR/suite/system_3/data/tb1.txt'
|
||||
|
|
|
@ -1773,4 +1773,15 @@ drop table t1;
|
|||
CREATE TABLE t1(a INT) ENGINE=CSV;
|
||||
SHOW WARNINGS;
|
||||
|
||||
#
|
||||
# BUG#33067 - .
|
||||
#
|
||||
create table t1 (c1 tinyblob not null) engine=csv;
|
||||
insert into t1 values("This");
|
||||
--enable_info
|
||||
update t1 set c1="That" where c1="This";
|
||||
--disable_info
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
|
|
@ -39,4 +39,17 @@ INSERT INTO t1 VALUES('A', 'A'), ('B', 'B'), ('C', 'C');
|
|||
INSERT INTO t1 VALUES('A ', 'A ');
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug#32705 - myisam corruption: Key in wrong position
|
||||
# at page 1024 with ucs2_bin
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(255) CHARACTER SET UCS2 COLLATE UCS2_BIN NOT NULL,
|
||||
KEY(c1)
|
||||
) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('marshall\'s');
|
||||
INSERT INTO t1 VALUES ('marsh');
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
|
|
@ -1278,5 +1278,189 @@ DELETE FROM t1 WHERE c1 >= 10;
|
|||
CHECK TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug#33222 - myisam-table drops rows when column is added
|
||||
# and a char-field > 128 exists
|
||||
#
|
||||
# Test #1 - CHECK TABLE sees wrong record, REPAR TABLE deletes it.
|
||||
# Using a CHAR column that can have > 127 characters.
|
||||
# Using a VARCHAR to create a table with dynamic row format.
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(130),
|
||||
c2 VARCHAR(1)
|
||||
) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES(REPEAT("a",128), 'b');
|
||||
SELECT COUNT(*) FROM t1;
|
||||
CHECK TABLE t1;
|
||||
REPAIR TABLE t1;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
CHECK TABLE t1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Test #2 - same as test #1, but using EXTENDED.
|
||||
# Using a CHAR column that can have > 127 characters.
|
||||
# Using a VARCHAR to create a table with dynamic row format.
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(130),
|
||||
c2 VARCHAR(1)
|
||||
) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES(REPEAT("a",128), 'b');
|
||||
SELECT COUNT(*) FROM t1;
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Test #3 - same as test #1, but using OPTIMIZE TABLE.
|
||||
# Using a CHAR column that can have > 127 characters.
|
||||
# Using a VARCHAR to create a table with dynamic row format.
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(130),
|
||||
c2 VARCHAR(1)
|
||||
) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES(REPEAT("a",128), 'b');
|
||||
# Insert more rows and delete one in the middle to force optimize.
|
||||
INSERT INTO t1 VALUES('b', 'b');
|
||||
INSERT INTO t1 VALUES('c', 'b');
|
||||
DELETE FROM t1 WHERE c1='b';
|
||||
SELECT COUNT(*) FROM t1;
|
||||
OPTIMIZE TABLE t1;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Test #4 - ALTER TABLE deletes rows.
|
||||
# Using a CHAR column that can have > 127 characters.
|
||||
# Using a VARCHAR to create a table with dynamic row format.
|
||||
# Using an index which can be disabled during bulk insert.
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(130),
|
||||
c2 VARCHAR(1),
|
||||
KEY (c1)
|
||||
) ENGINE=MyISAM;
|
||||
#
|
||||
# Insert 100 rows. This turns bulk insert on during the copy phase of
|
||||
# ALTER TABLE. Bulk insert disables keys before the insert and re-enables
|
||||
# them by repair after the insert.
|
||||
--disable_query_log
|
||||
let $count= 100;
|
||||
--echo # Insert $count rows. Query log disabled.
|
||||
while ($count)
|
||||
{
|
||||
INSERT INTO t1 VALUES ('a', 'b');
|
||||
dec $count;
|
||||
}
|
||||
--enable_query_log
|
||||
#
|
||||
# Change most of the rows into long character values with > 127 characters.
|
||||
UPDATE t1 SET c1=REPEAT("a",128) LIMIT 90;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
ALTER TABLE t1 ENGINE=MyISAM;
|
||||
#
|
||||
# With bug present, this shows that all long rows are gone.
|
||||
SELECT COUNT(*) FROM t1;
|
||||
CHECK TABLE t1;
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Test #5 - same as test #1 but UTF-8.
|
||||
# Using a CHAR column that can have > 127 characters.
|
||||
# Using a VARCHAR to create a table with dynamic row format.
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(50),
|
||||
c2 VARCHAR(1)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET UTF8;
|
||||
# Using Tamil Letter A, Unicode U+0B85
|
||||
INSERT INTO t1 VALUES(REPEAT(_utf8 x'e0ae85',43), 'b');
|
||||
SELECT COUNT(*) FROM t1;
|
||||
CHECK TABLE t1;
|
||||
REPAIR TABLE t1;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
CHECK TABLE t1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Test #6 - same as test #2, but UTF-8.
|
||||
# Using a CHAR column that can have > 127 characters.
|
||||
# Using a VARCHAR to create a table with dynamic row format.
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(50),
|
||||
c2 VARCHAR(1)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET UTF8;
|
||||
# Using Tamil Letter A, Unicode U+0B85
|
||||
INSERT INTO t1 VALUES(REPEAT(_utf8 x'e0ae85',43), 'b');
|
||||
SELECT COUNT(*) FROM t1;
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Test #7 - same as test #3, but UTF-8.
|
||||
# Using a CHAR column that can have > 127 characters.
|
||||
# Using a VARCHAR to create a table with dynamic row format.
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(50),
|
||||
c2 VARCHAR(1)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET UTF8;
|
||||
# Using Tamil Letter A, Unicode U+0B85
|
||||
INSERT INTO t1 VALUES(REPEAT(_utf8 x'e0ae85',43), 'b');
|
||||
# Insert more rows and delete one in the middle to force optimize.
|
||||
INSERT INTO t1 VALUES('b', 'b');
|
||||
INSERT INTO t1 VALUES('c', 'b');
|
||||
DELETE FROM t1 WHERE c1='b';
|
||||
SELECT COUNT(*) FROM t1;
|
||||
OPTIMIZE TABLE t1;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Test #8 - same as test #4, but UTF-8.
|
||||
# Using a CHAR column that can have > 42 UTF-8 characters.
|
||||
# Using a VARCHAR to create a table with dynamic row format.
|
||||
# Using an index which can be disabled during bulk insert.
|
||||
CREATE TABLE t1 (
|
||||
c1 CHAR(50),
|
||||
c2 VARCHAR(1),
|
||||
KEY (c1)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET UTF8;
|
||||
#
|
||||
# Insert 100 rows. This turns bulk insert on during the copy phase of
|
||||
# ALTER TABLE. Bulk insert disables keys before the insert and re-enables
|
||||
# them by repair after the insert.
|
||||
--disable_query_log
|
||||
let $count= 100;
|
||||
--echo # Insert $count rows. Query log disabled.
|
||||
while ($count)
|
||||
{
|
||||
INSERT INTO t1 VALUES ('a', 'b');
|
||||
dec $count;
|
||||
}
|
||||
--enable_query_log
|
||||
#
|
||||
# Change most of the rows into long character values with > 42 characters.
|
||||
# Using Tamil Letter A, Unicode U+0B85
|
||||
UPDATE t1 SET c1=REPEAT(_utf8 x'e0ae85',43) LIMIT 90;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
ALTER TABLE t1 ENGINE=MyISAM;
|
||||
#
|
||||
# With bug present, this shows that all long rows are gone.
|
||||
SELECT COUNT(*) FROM t1;
|
||||
CHECK TABLE t1;
|
||||
CHECK TABLE t1 EXTENDED;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug#29182 - MyISAMCHK reports wrong character set
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
c1 VARCHAR(10) NOT NULL,
|
||||
c2 CHAR(10) DEFAULT NULL,
|
||||
c3 VARCHAR(10) NOT NULL,
|
||||
KEY (c1),
|
||||
KEY (c2)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--exec $MYISAMCHK -d $MYSQLTEST_VARDIR/master-data/test/t1
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
|
|
|
@ -14,6 +14,10 @@
|
|||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED
|
||||
create table t1 (a int) partition by list ((a/3)*10 div 1)
|
||||
(partition p0 values in (0), partition p1 values in (1));
|
||||
|
||||
#
|
||||
# Bug #30695: An apostrophe ' in the comment of the ADD PARTITION causes the Server to crash.
|
||||
#
|
||||
|
@ -78,24 +82,6 @@ create table t1 (a int)
|
|||
partition by key(a)
|
||||
partitions 1e+300;
|
||||
|
||||
#
|
||||
# Bug 21350: Data Directory problems
|
||||
#
|
||||
-- error ER_WRONG_TABLE_NAME
|
||||
create table t1 (a int)
|
||||
partition by key (a)
|
||||
(partition p0 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
|
||||
|
||||
#
|
||||
# Insert a test that manages to create the first partition and fails with
|
||||
# the second, ensure that we clean up afterwards in a proper manner.
|
||||
#
|
||||
--error ER_WRONG_TABLE_NAME
|
||||
create table t1 (a int)
|
||||
partition by key (a)
|
||||
(partition p0,
|
||||
partition p1 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
|
||||
|
||||
#
|
||||
# Bug 19309 Partitions: Crash if double procedural alter
|
||||
#
|
||||
|
@ -1398,35 +1384,6 @@ SELECT t2.id FROM t2 WHERE t2.id IN (SELECT id FROM t1 WHERE status = 'Verified'
|
|||
|
||||
drop table t1, t2;
|
||||
|
||||
#
|
||||
# Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables
|
||||
#
|
||||
|
||||
disable_query_log;
|
||||
eval create table t2 (i int )
|
||||
partition by range (i)
|
||||
(
|
||||
partition p01 values less than (1000)
|
||||
data directory="$MYSQLTEST_VARDIR/master-data/test/"
|
||||
index directory="$MYSQLTEST_VARDIR/master-data/test/"
|
||||
);
|
||||
enable_query_log;
|
||||
|
||||
set @org_mode=@@sql_mode;
|
||||
set @@sql_mode='NO_DIR_IN_CREATE';
|
||||
select @@sql_mode;
|
||||
create table t1 (i int )
|
||||
partition by range (i)
|
||||
(
|
||||
partition p01 values less than (1000)
|
||||
data directory='/not/existing'
|
||||
index directory='/not/existing'
|
||||
);
|
||||
|
||||
show create table t2;
|
||||
DROP TABLE t1, t2;
|
||||
set @@sql_mode=@org_mode;
|
||||
|
||||
#
|
||||
# Bug #27123 partition + on duplicate key update + varchar = Can't find record in <table>
|
||||
#
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
# FIXME: disabled this test because of valgrind error
|
||||
#create table t1 (a bit not null) partition by key (a);
|
||||
#insert into t1 values (b'1');
|
||||
#select * from t1 where a = b'1';
|
||||
#drop table t1;
|
||||
-- echo # test with not null
|
||||
create table t1 (a bit not null) partition by key (a);
|
||||
insert into t1 values (b'1');
|
||||
select hex(a) from t1 where a = b'1';
|
||||
drop table t1;
|
||||
create table t1 (a tinyint not null) partition by key (a);
|
||||
insert into t1 values (2);
|
||||
select * from t1 where a = 2;
|
||||
|
@ -37,14 +37,14 @@ insert into t1 values (2);
|
|||
select * from t1 where a = 2;
|
||||
drop table t1;
|
||||
create table t1 (a float not null) partition by key (a);
|
||||
insert into t1 values (2.1);
|
||||
select * from t1 where a = 2.1;
|
||||
insert into t1 values (0.5);
|
||||
select * from t1 where a = 0.5;
|
||||
drop table t1;
|
||||
create table t1 (a double not null) partition by key (a);
|
||||
insert into t1 values (2.1);
|
||||
select * from t1 where a = 2.1;
|
||||
insert into t1 values (0.5);
|
||||
select * from t1 where a = 0.5;
|
||||
drop table t1;
|
||||
create table t1 (a decimal not null) partition by key (a);
|
||||
create table t1 (a decimal(4,2) not null) partition by key (a);
|
||||
insert into t1 values (2.1);
|
||||
select * from t1 where a = 2.1;
|
||||
drop table t1;
|
||||
|
@ -100,11 +100,11 @@ create table t1 (a set('y','n') not null) partition by key (a);
|
|||
insert into t1 values ('y');
|
||||
select * from t1 where a = 'y';
|
||||
drop table t1;
|
||||
# FIXME: disabled this test because of valgrind error
|
||||
#create table t1 (a bit) partition by key (a);
|
||||
#insert into t1 values (b'1');
|
||||
#select * from t1 where a = b'1';
|
||||
#drop table t1;
|
||||
-- echo # test with null allowed
|
||||
create table t1 (a bit) partition by key (a);
|
||||
insert into t1 values (b'1');
|
||||
select hex(a) from t1 where a = b'1';
|
||||
drop table t1;
|
||||
create table t1 (a tinyint) partition by key (a);
|
||||
insert into t1 values (2);
|
||||
select * from t1 where a = 2;
|
||||
|
@ -126,14 +126,14 @@ insert into t1 values (2);
|
|||
select * from t1 where a = 2;
|
||||
drop table t1;
|
||||
create table t1 (a float) partition by key (a);
|
||||
insert into t1 values (2.1);
|
||||
select * from t1 where a = 2.1;
|
||||
insert into t1 values (0.5);
|
||||
select * from t1 where a = 0.5;
|
||||
drop table t1;
|
||||
create table t1 (a double) partition by key (a);
|
||||
insert into t1 values (2.1);
|
||||
select * from t1 where a = 2.1;
|
||||
insert into t1 values (0.5);
|
||||
select * from t1 where a = 0.5;
|
||||
drop table t1;
|
||||
create table t1 (a decimal) partition by key (a);
|
||||
create table t1 (a decimal(4,2)) partition by key (a);
|
||||
insert into t1 values (2.1);
|
||||
select * from t1 where a = 2.1;
|
||||
drop table t1;
|
||||
|
@ -192,18 +192,23 @@ drop table t1;
|
|||
create table t1 (a varchar(65531)) partition by key (a);
|
||||
insert into t1 values ('bbbb');
|
||||
insert into t1 values ('aaaa');
|
||||
select * from t1 where a = 'aaa%';
|
||||
select * from t1 where a = 'aaaa';
|
||||
select * from t1 where a like 'aaa%';
|
||||
select * from t1 where a = 'bbbb';
|
||||
drop table t1;
|
||||
create table t1 (a varchar(65532)) partition by key (a);
|
||||
insert into t1 values ('bbbb');
|
||||
insert into t1 values ('aaaa');
|
||||
select * from t1 where a = 'aaa%';
|
||||
select * from t1 where a = 'aaaa';
|
||||
select * from t1 where a like 'aaa%';
|
||||
select * from t1 where a = 'bbbb';
|
||||
drop table t1;
|
||||
create table t1 (a varchar(65533) not null) partition by key (a);
|
||||
insert into t1 values ('bbbb');
|
||||
insert into t1 values ('aaaa');
|
||||
select * from t1 where a = 'aaa%';
|
||||
select * from t1 where a = 'aaaa';
|
||||
select * from t1 where a like 'aaa%';
|
||||
select * from t1 where a = 'bbbb';
|
||||
drop table t1;
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
create table t1 (a varchar(65533)) partition by key (a);
|
||||
|
@ -211,3 +216,14 @@ create table t1 (a varchar(65533)) partition by key (a);
|
|||
create table t1 (a varchar(65534) not null) partition by key (a);
|
||||
-- error ER_TOO_BIG_ROWSIZE
|
||||
create table t1 (a varchar(65535)) partition by key (a);
|
||||
|
||||
#
|
||||
# Bug#34358: error in key_restore for bitfields with uneven bits
|
||||
#
|
||||
create table t1 (a bit(27), primary key (a)) engine=myisam
|
||||
partition by hash (a)
|
||||
(partition p0, partition p1, partition p2);
|
||||
show create table t1;
|
||||
insert into t1 values (1),(4),(7),(10),(13),(16),(19),(22),(25),(28),(31),(34);
|
||||
select hex(a) from t1 where a = 7;
|
||||
drop table t1;
|
||||
|
|
|
@ -10,6 +10,16 @@ drop table if exists t1, t2;
|
|||
--enable_warnings
|
||||
|
||||
#
|
||||
# BUG 33429: Succeeds in adding partition when maxvalue on last partition
|
||||
#
|
||||
create table t1 (a int)
|
||||
partition by range (a)
|
||||
( partition p0 values less than (maxvalue));
|
||||
--error ER_PARTITION_MAXVALUE_ERROR
|
||||
alter table t1 add partition (partition p1 values less than (100000));
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
# BUG 32943:
|
||||
# Locking problems in relation to partitioning and triggers
|
||||
# Also fixes and test cases of generic lock issues with
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
# (DATA/INDEX DIR requires symlinks)
|
||||
-- source include/have_partition.inc
|
||||
-- source include/have_symlink.inc
|
||||
# remove the not_windows line after fixing bug#30459
|
||||
# remove the not_windows line after fixing bug#33687
|
||||
# symlinks must also work for files, not only directories
|
||||
# as in --skip-symbolic-links
|
||||
-- source include/not_windows.inc
|
||||
-- disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
|
@ -118,4 +120,50 @@ connection default;
|
|||
DROP USER mysqltest_1@localhost;
|
||||
disconnect con1;
|
||||
|
||||
#
|
||||
# Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables
|
||||
#
|
||||
|
||||
disable_query_log;
|
||||
eval create table t2 (i int )
|
||||
partition by range (i)
|
||||
(
|
||||
partition p01 values less than (1000)
|
||||
data directory="$MYSQLTEST_VARDIR/master-data/test/"
|
||||
index directory="$MYSQLTEST_VARDIR/master-data/test/"
|
||||
);
|
||||
enable_query_log;
|
||||
|
||||
set @org_mode=@@sql_mode;
|
||||
set @@sql_mode='NO_DIR_IN_CREATE';
|
||||
select @@sql_mode;
|
||||
create table t1 (i int )
|
||||
partition by range (i)
|
||||
(
|
||||
partition p01 values less than (1000)
|
||||
data directory='/not/existing'
|
||||
index directory='/not/existing'
|
||||
);
|
||||
|
||||
show create table t2;
|
||||
DROP TABLE t1, t2;
|
||||
set @@sql_mode=@org_mode;
|
||||
|
||||
#
|
||||
# Bug 21350: Data Directory problems
|
||||
#
|
||||
-- error ER_WRONG_TABLE_NAME
|
||||
create table t1 (a int)
|
||||
partition by key (a)
|
||||
(partition p0 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
|
||||
|
||||
#
|
||||
# Insert a test that manages to create the first partition and fails with
|
||||
# the second, ensure that we clean up afterwards in a proper manner.
|
||||
#
|
||||
--error ER_WRONG_TABLE_NAME
|
||||
create table t1 (a int)
|
||||
partition by key (a)
|
||||
(partition p0,
|
||||
partition p1 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data');
|
||||
|
||||
|
|
|
@ -7,23 +7,34 @@
|
|||
#
|
||||
# Bug 25141: Crash Server on Partitioning command
|
||||
#
|
||||
# Bug#30459: Partitioning across disks failing on Windows
|
||||
# updated this test, since symlinked files are not supported on Windows
|
||||
# (not the same as symlinked directories that have a special hack
|
||||
# on windows). This test is not dependent on have_symlink.
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS `example`;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
--disable_abort_on_error
|
||||
CREATE TABLE `example` (
|
||||
`ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`DESCRIPTION` varchar(30) NOT NULL,
|
||||
`LEVEL` smallint(5) unsigned DEFAULT NULL,
|
||||
PRIMARY KEY (`ID_EXAMPLE`)
|
||||
CREATE TABLE t1 (
|
||||
c1 int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
c2 varchar(30) NOT NULL,
|
||||
c3 smallint(5) unsigned DEFAULT NULL,
|
||||
PRIMARY KEY (c1)
|
||||
) ENGINE = MYISAM
|
||||
PARTITION BY HASH(ID_EXAMPLE)(
|
||||
PARTITION p0 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p0Data',
|
||||
PARTITION p1 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p1Data',
|
||||
PARTITION p2 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p2Data',
|
||||
PARTITION p3 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p3Data'
|
||||
PARTITION BY HASH(c1)(
|
||||
PARTITION p0
|
||||
DATA DIRECTORY = 'C:/mysqltest/p0Data'
|
||||
INDEX DIRECTORY = 'D:/mysqltest/p0Index',
|
||||
PARTITION p1,
|
||||
PARTITION p2
|
||||
DATA DIRECTORY = 'E:/mysqltest/p2Data'
|
||||
INDEX DIRECTORY = 'F:/mysqltest/p2Index'
|
||||
);
|
||||
--enable_abort_on_error
|
||||
INSERT INTO t1 VALUES (NULL, "first", 1);
|
||||
INSERT INTO t1 VALUES (NULL, "second", 2);
|
||||
INSERT INTO t1 VALUES (NULL, "third", 3);
|
||||
ALTER TABLE t1 ADD PARTITION (PARTITION p3 DATA DIRECTORY = 'G:/mysqltest/p3Data' INDEX DIRECTORY = 'H:/mysqltest/p3Index');
|
||||
INSERT INTO t1 VALUES (NULL, "last", 4);
|
||||
DROP TABLE t1;
|
||||
|
||||
|
|
3
mysql-test/t/plugin_load-master.opt
Normal file
3
mysql-test/t/plugin_load-master.opt
Normal file
|
@ -0,0 +1,3 @@
|
|||
$EXAMPLE_PLUGIN_OPT
|
||||
"--plugin-load=;EXAMPLE=ha_example.so;"
|
||||
--loose-plugin-example-enum-var=e2
|
3
mysql-test/t/plugin_load.test
Normal file
3
mysql-test/t/plugin_load.test
Normal file
|
@ -0,0 +1,3 @@
|
|||
--source include/have_example_plugin.inc
|
||||
|
||||
SELECT @@global.example_enum_var = 'e2';
|
|
@ -226,3 +226,15 @@ USE test;
|
|||
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
#
|
||||
# BUG#25677 - With --skip-symbolic-links option on, DATA DIRECTORY clause is
|
||||
# silently ignored
|
||||
#
|
||||
SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE='NO_DIR_IN_CREATE';
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval CREATE TABLE t1(a INT) DATA DIRECTORY='$MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY='$MYSQLTEST_VARDIR/tmp';
|
||||
DROP TABLE t1;
|
||||
SET @@SQL_MODE=@OLD_SQL_MODE;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
|
|
@ -256,6 +256,7 @@ main(void)
|
|||
char * str;
|
||||
char * dst;
|
||||
|
||||
require(src);
|
||||
for (j= 0; j<src_len; j++)
|
||||
{
|
||||
char c= rand();
|
||||
|
@ -265,6 +266,7 @@ main(void)
|
|||
/* Encode */
|
||||
needed_length= base64_needed_encoded_length(src_len);
|
||||
str= (char *) malloc(needed_length);
|
||||
require(str);
|
||||
for (k= 0; k < needed_length; k++)
|
||||
str[k]= 0xff; /* Fill memory to check correct NUL termination */
|
||||
require(base64_encode(src, src_len, str) == 0);
|
||||
|
@ -272,7 +274,8 @@ main(void)
|
|||
|
||||
/* Decode */
|
||||
dst= (char *) malloc(base64_needed_decoded_length(strlen(str)));
|
||||
dst_len= base64_decode(str, strlen(str), dst);
|
||||
require(dst);
|
||||
dst_len= base64_decode(str, strlen(str), dst, NULL);
|
||||
require(dst_len == src_len);
|
||||
|
||||
if (memcmp(src, dst, src_len) != 0)
|
||||
|
|
17
sql/field.cc
17
sql/field.cc
|
@ -8793,6 +8793,23 @@ Field_bit::Field_bit(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
|
|||
}
|
||||
|
||||
|
||||
void Field_bit::hash(ulong *nr, ulong *nr2)
|
||||
{
|
||||
if (is_null())
|
||||
{
|
||||
*nr^= (*nr << 1) | 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
CHARSET_INFO *cs= &my_charset_bin;
|
||||
longlong value= Field_bit::val_int();
|
||||
uchar tmp[8];
|
||||
mi_int8store(tmp,value);
|
||||
cs->coll->hash_sort(cs, tmp, 8, nr, nr2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
size_t
|
||||
Field_bit::do_last_null_byte() const
|
||||
{
|
||||
|
|
|
@ -1904,6 +1904,7 @@ public:
|
|||
Field::move_field_offset(ptr_diff);
|
||||
bit_ptr= ADD_TO_PTR(bit_ptr, ptr_diff, uchar*);
|
||||
}
|
||||
void hash(ulong *nr, ulong *nr2);
|
||||
|
||||
private:
|
||||
virtual size_t do_last_null_byte() const;
|
||||
|
|
|
@ -296,7 +296,6 @@ class Item_num_op :public Item_func_numhybrid
|
|||
void print(String *str) { print_op(str); }
|
||||
void find_num_type();
|
||||
String *str_op(String *str) { DBUG_ASSERT(0); return 0; }
|
||||
bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
|
||||
};
|
||||
|
||||
|
||||
|
@ -382,6 +381,7 @@ class Item_func_additive_op :public Item_num_op
|
|||
public:
|
||||
Item_func_additive_op(Item *a,Item *b) :Item_num_op(a,b) {}
|
||||
void result_precision();
|
||||
bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
|
||||
};
|
||||
|
||||
|
||||
|
@ -416,6 +416,7 @@ public:
|
|||
double real_op();
|
||||
my_decimal *decimal_op(my_decimal *);
|
||||
void result_precision();
|
||||
bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
|
||||
};
|
||||
|
||||
|
||||
|
@ -456,6 +457,7 @@ public:
|
|||
const char *func_name() const { return "%"; }
|
||||
void result_precision();
|
||||
void fix_length_and_dec();
|
||||
bool check_partition_func_processor(uchar *int_arg) {return FALSE;}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -168,6 +168,7 @@ void key_restore(uchar *to_record, uchar *from_key, KEY *key_info,
|
|||
}
|
||||
for (key_part= key_info->key_part ; (int) key_length > 0 ; key_part++)
|
||||
{
|
||||
uchar used_uneven_bits= 0;
|
||||
if (key_part->null_bit)
|
||||
{
|
||||
if (*from_key++)
|
||||
|
@ -186,6 +187,8 @@ void key_restore(uchar *to_record, uchar *from_key, KEY *key_info,
|
|||
set_rec_bits(bits, to_record + key_part->null_offset +
|
||||
(key_part->null_bit == 128),
|
||||
field->bit_ofs, field->bit_len);
|
||||
/* we have now used the byte with 'uneven' bits */
|
||||
used_uneven_bits= 1;
|
||||
}
|
||||
}
|
||||
if (key_part->key_part_flag & HA_BLOB_PART)
|
||||
|
@ -222,7 +225,9 @@ void key_restore(uchar *to_record, uchar *from_key, KEY *key_info,
|
|||
else
|
||||
{
|
||||
length= min(key_length, key_part->length);
|
||||
memcpy(to_record + key_part->offset, from_key, (size_t) length);
|
||||
/* skip the byte with 'uneven' bits, if used */
|
||||
memcpy(to_record + key_part->offset, from_key + used_uneven_bits
|
||||
, (size_t) length - used_uneven_bits);
|
||||
}
|
||||
from_key+= length;
|
||||
key_length-= length;
|
||||
|
|
|
@ -794,8 +794,18 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type,
|
|||
partition_element *part_elem= part_it++;
|
||||
if (part_elem->engine_type == NULL)
|
||||
part_elem->engine_type= default_engine_type;
|
||||
if (thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE)
|
||||
part_elem->data_file_name= part_elem->index_file_name= 0;
|
||||
#ifdef HAVE_READLINK
|
||||
if (!my_use_symdir || (thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE))
|
||||
#endif
|
||||
{
|
||||
if (part_elem->data_file_name)
|
||||
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
|
||||
"DATA DIRECTORY option ignored");
|
||||
if (part_elem->index_file_name)
|
||||
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
|
||||
"INDEX DIRECTORY option ignored");
|
||||
part_elem->data_file_name= part_elem->index_file_name= NULL;
|
||||
}
|
||||
if (!is_sub_partitioned())
|
||||
{
|
||||
if (check_table_name(part_elem->partition_name,
|
||||
|
|
|
@ -118,11 +118,14 @@ void change_rpl_status(RPL_STATUS from_status, RPL_STATUS to_status)
|
|||
}
|
||||
|
||||
|
||||
#define get_object(p, obj) \
|
||||
#define get_object(p, obj, msg) \
|
||||
{\
|
||||
uint len = (uint)*p++; \
|
||||
if (p + len > p_end || len >= sizeof(obj)) \
|
||||
{\
|
||||
errmsg= msg;\
|
||||
goto err; \
|
||||
}\
|
||||
strmake(obj,(char*) p,len); \
|
||||
p+= len; \
|
||||
}\
|
||||
|
@ -168,6 +171,7 @@ int register_slave(THD* thd, uchar* packet, uint packet_length)
|
|||
int res;
|
||||
SLAVE_INFO *si;
|
||||
uchar *p= packet, *p_end= packet + packet_length;
|
||||
const char *errmsg= "Wrong parameters to function register_slave";
|
||||
|
||||
if (check_access(thd, REPL_SLAVE_ACL, any_db,0,0,0,0))
|
||||
return 1;
|
||||
|
@ -176,9 +180,9 @@ int register_slave(THD* thd, uchar* packet, uint packet_length)
|
|||
|
||||
thd->server_id= si->server_id= uint4korr(p);
|
||||
p+= 4;
|
||||
get_object(p,si->host);
|
||||
get_object(p,si->user);
|
||||
get_object(p,si->password);
|
||||
get_object(p,si->host, "Failed to register slave: too long 'report-host'");
|
||||
get_object(p,si->user, "Failed to register slave: too long 'report-user'");
|
||||
get_object(p,si->password, "Failed to register slave; too long 'report-password'");
|
||||
if (p+10 > p_end)
|
||||
goto err;
|
||||
si->port= uint2korr(p);
|
||||
|
@ -197,8 +201,7 @@ int register_slave(THD* thd, uchar* packet, uint packet_length)
|
|||
|
||||
err:
|
||||
my_free(si, MYF(MY_WME));
|
||||
my_message(ER_UNKNOWN_ERROR, "Wrong parameters to function register_slave",
|
||||
MYF(0));
|
||||
my_message(ER_UNKNOWN_ERROR, errmsg, MYF(0));
|
||||
err2:
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -2356,15 +2356,7 @@ mysql_execute_command(THD *thd)
|
|||
/* Might have been updated in create_table_precheck */
|
||||
create_info.alias= create_table->alias;
|
||||
|
||||
#ifndef HAVE_READLINK
|
||||
if (create_info.data_file_name)
|
||||
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
|
||||
"DATA DIRECTORY option ignored");
|
||||
if (create_info.index_file_name)
|
||||
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
|
||||
"INDEX DIRECTORY option ignored");
|
||||
create_info.data_file_name= create_info.index_file_name= NULL;
|
||||
#else
|
||||
#ifdef HAVE_READLINK
|
||||
/* Fix names if symlinked tables */
|
||||
if (append_file_to_dir(thd, &create_info.data_file_name,
|
||||
create_table->table_name) ||
|
||||
|
|
|
@ -4314,6 +4314,11 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info,
|
|||
my_error(ER_NO_BINLOG_ERROR, MYF(0));
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
if (tab_part_info->defined_max_value)
|
||||
{
|
||||
my_error(ER_PARTITION_MAXVALUE_ERROR, MYF(0));
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
if (no_new_partitions == 0)
|
||||
{
|
||||
my_error(ER_ADD_PARTITION_NO_NEW_PARTITION, MYF(0));
|
||||
|
|
|
@ -1181,9 +1181,8 @@ int plugin_init(int *argc, char **argv, int flags)
|
|||
/* Register all dynamic plugins */
|
||||
if (!(flags & PLUGIN_INIT_SKIP_DYNAMIC_LOADING))
|
||||
{
|
||||
if (opt_plugin_load &&
|
||||
plugin_load_list(&tmp_root, argc, argv, opt_plugin_load))
|
||||
goto err;
|
||||
if (opt_plugin_load)
|
||||
plugin_load_list(&tmp_root, argc, argv, opt_plugin_load);
|
||||
if (!(flags & PLUGIN_INIT_SKIP_PLUGIN_TABLE))
|
||||
plugin_load(&tmp_root, argc, argv);
|
||||
}
|
||||
|
@ -1412,7 +1411,11 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv,
|
|||
while (list)
|
||||
{
|
||||
if (p == buffer + sizeof(buffer) - 1)
|
||||
break;
|
||||
{
|
||||
sql_print_error("plugin-load parameter too long");
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
||||
switch ((*(p++)= *(list++))) {
|
||||
case '\0':
|
||||
list= NULL; /* terminate the loop */
|
||||
|
@ -1421,10 +1424,17 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv,
|
|||
case ':': /* can't use this as delimiter as it may be drive letter */
|
||||
#endif
|
||||
case ';':
|
||||
name.str[name.length]= '\0';
|
||||
if (str != &dl) // load all plugins in named module
|
||||
str->str[str->length]= '\0';
|
||||
if (str == &name) // load all plugins in named module
|
||||
{
|
||||
if (!name.length)
|
||||
{
|
||||
p--; /* reset pointer */
|
||||
continue;
|
||||
}
|
||||
|
||||
dl= name;
|
||||
pthread_mutex_lock(&LOCK_plugin);
|
||||
if ((plugin_dl= plugin_dl_add(&dl, REPORT_TO_LOG)))
|
||||
{
|
||||
for (plugin= plugin_dl->plugins; plugin->info; plugin++)
|
||||
|
@ -1434,7 +1444,10 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv,
|
|||
|
||||
free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE));
|
||||
if (plugin_add(tmp_root, &name, &dl, argc, argv, REPORT_TO_LOG))
|
||||
{
|
||||
pthread_mutex_unlock(&LOCK_plugin);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
plugin_dl_del(&dl); // reduce ref count
|
||||
}
|
||||
|
@ -1442,9 +1455,14 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv,
|
|||
else
|
||||
{
|
||||
free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE));
|
||||
pthread_mutex_lock(&LOCK_plugin);
|
||||
if (plugin_add(tmp_root, &name, &dl, argc, argv, REPORT_TO_LOG))
|
||||
{
|
||||
pthread_mutex_unlock(&LOCK_plugin);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&LOCK_plugin);
|
||||
name.length= dl.length= 0;
|
||||
dl.str= NULL; name.str= p= buffer;
|
||||
str= &name;
|
||||
|
@ -1453,6 +1471,7 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv,
|
|||
case '#':
|
||||
if (str == &name)
|
||||
{
|
||||
name.str[name.length]= '\0';
|
||||
str= &dl;
|
||||
str->str= p;
|
||||
continue;
|
||||
|
@ -2999,7 +3018,8 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp,
|
|||
DBUG_RETURN(-1);
|
||||
}
|
||||
|
||||
if (opt->flags & PLUGIN_VAR_NOCMDOPT)
|
||||
if ((opt->flags & (PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_THDLOCAL))
|
||||
== PLUGIN_VAR_NOCMDOPT)
|
||||
continue;
|
||||
|
||||
if (!opt->name)
|
||||
|
@ -3009,7 +3029,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp,
|
|||
DBUG_RETURN(-1);
|
||||
}
|
||||
|
||||
if (!(v= find_bookmark(name, opt->name, opt->flags)))
|
||||
if (!(opt->flags & PLUGIN_VAR_THDLOCAL))
|
||||
{
|
||||
optnamelen= strlen(opt->name);
|
||||
optname= (char*) alloc_root(mem_root, namelen + optnamelen + 2);
|
||||
|
@ -3017,7 +3037,23 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp,
|
|||
optnamelen= namelen + optnamelen + 1;
|
||||
}
|
||||
else
|
||||
optname= (char*) memdup_root(mem_root, v->key + 1, (optnamelen= v->name_len) + 1);
|
||||
{
|
||||
/* this should not fail because register_var should create entry */
|
||||
if (!(v= find_bookmark(name, opt->name, opt->flags)))
|
||||
{
|
||||
sql_print_error("Thread local variable '%s' not allocated "
|
||||
"in plugin '%s'.", opt->name, plugin_name);
|
||||
DBUG_RETURN(-1);
|
||||
}
|
||||
|
||||
*(int*)(opt + 1)= offset= v->offset;
|
||||
|
||||
if (opt->flags & PLUGIN_VAR_NOCMDOPT)
|
||||
continue;
|
||||
|
||||
optname= (char*) memdup_root(mem_root, v->key + 1,
|
||||
(optnamelen= v->name_len) + 1);
|
||||
}
|
||||
|
||||
/* convert '_' to '-' */
|
||||
for (p= optname; *p; p++)
|
||||
|
@ -3029,20 +3065,13 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp,
|
|||
options->app_type= opt;
|
||||
options->id= (options-1)->id + 1;
|
||||
|
||||
if (opt->flags & PLUGIN_VAR_THDLOCAL)
|
||||
*(int*)(opt + 1)= offset= v->offset;
|
||||
|
||||
plugin_opt_set_limits(options, opt);
|
||||
|
||||
if ((opt->flags & PLUGIN_VAR_TYPEMASK) != PLUGIN_VAR_ENUM &&
|
||||
(opt->flags & PLUGIN_VAR_TYPEMASK) != PLUGIN_VAR_SET)
|
||||
{
|
||||
if (opt->flags & PLUGIN_VAR_THDLOCAL)
|
||||
options->value= options->u_max_value= (uchar**)
|
||||
(global_system_variables.dynamic_variables_ptr + offset);
|
||||
else
|
||||
options->value= options->u_max_value= *(uchar***) (opt + 1);
|
||||
}
|
||||
if (opt->flags & PLUGIN_VAR_THDLOCAL)
|
||||
options->value= options->u_max_value= (uchar**)
|
||||
(global_system_variables.dynamic_variables_ptr + offset);
|
||||
else
|
||||
options->value= options->u_max_value= *(uchar***) (opt + 1);
|
||||
|
||||
options[1]= options[0];
|
||||
options[1].name= p= (char*) alloc_root(mem_root, optnamelen + 8);
|
||||
|
|
|
@ -3484,8 +3484,18 @@ bool mysql_create_table_no_lock(THD *thd,
|
|||
thd_proc_info(thd, "creating table");
|
||||
create_info->table_existed= 0; // Mark that table is created
|
||||
|
||||
if (thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE)
|
||||
#ifdef HAVE_READLINK
|
||||
if (!my_use_symdir || (thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE))
|
||||
#endif
|
||||
{
|
||||
if (create_info->data_file_name)
|
||||
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
|
||||
"DATA DIRECTORY option ignored");
|
||||
if (create_info->index_file_name)
|
||||
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
|
||||
"INDEX DIRECTORY option ignored");
|
||||
create_info->data_file_name= create_info->index_file_name= 0;
|
||||
}
|
||||
create_info->table_options=db_options;
|
||||
|
||||
path[path_length - reg_ext_length]= '\0'; // Remove .frm extension
|
||||
|
|
41
sql/table.cc
41
sql/table.cc
|
@ -892,26 +892,31 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
|
|||
ha_legacy_type(share->db_type())));
|
||||
}
|
||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||
else
|
||||
else if (str_db_type_length == 9 &&
|
||||
!strncmp((char *) next_chunk + 2, "partition", 9))
|
||||
{
|
||||
LEX_STRING pname= { C_STRING_WITH_LEN( "partition" ) };
|
||||
if (str_db_type_length == pname.length &&
|
||||
!strncmp((char *) next_chunk + 2, pname.str, pname.length))
|
||||
{
|
||||
/*
|
||||
Use partition handler
|
||||
tmp_plugin is locked with a local lock.
|
||||
we unlock the old value of share->db_plugin before
|
||||
replacing it with a globally locked version of tmp_plugin
|
||||
*/
|
||||
plugin_unlock(NULL, share->db_plugin);
|
||||
share->db_plugin= ha_lock_engine(NULL, partition_hton);
|
||||
DBUG_PRINT("info", ("setting dbtype to '%.*s' (%d)",
|
||||
str_db_type_length, next_chunk + 2,
|
||||
ha_legacy_type(share->db_type())));
|
||||
}
|
||||
/*
|
||||
Use partition handler
|
||||
tmp_plugin is locked with a local lock.
|
||||
we unlock the old value of share->db_plugin before
|
||||
replacing it with a globally locked version of tmp_plugin
|
||||
*/
|
||||
plugin_unlock(NULL, share->db_plugin);
|
||||
share->db_plugin= ha_lock_engine(NULL, partition_hton);
|
||||
DBUG_PRINT("info", ("setting dbtype to '%.*s' (%d)",
|
||||
str_db_type_length, next_chunk + 2,
|
||||
ha_legacy_type(share->db_type())));
|
||||
}
|
||||
#endif
|
||||
else if (!tmp_plugin)
|
||||
{
|
||||
/* purecov: begin inspected */
|
||||
error= 8;
|
||||
my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), name.str);
|
||||
my_free(buff, MYF(0));
|
||||
goto err;
|
||||
/* purecov: end */
|
||||
}
|
||||
next_chunk+= str_db_type_length + 2;
|
||||
}
|
||||
if (next_chunk + 5 < buff_end)
|
||||
|
@ -2200,6 +2205,8 @@ void open_table_error(TABLE_SHARE *share, int error, int db_errno, int errarg)
|
|||
"of MySQL and cannot be read",
|
||||
MYF(0), buff);
|
||||
break;
|
||||
case 8:
|
||||
break;
|
||||
default: /* Better wrong error than none */
|
||||
case 4:
|
||||
strxmov(buff, share->normalized_path.str, reg_ext, NullS);
|
||||
|
|
|
@ -225,11 +225,17 @@ int get_byte(s)
|
|||
if (s->stream.avail_in == 0)
|
||||
{
|
||||
errno = 0;
|
||||
s->stream.avail_in = my_read(s->file, (uchar *)s->inbuf, AZ_BUFSIZE_READ, MYF(0));
|
||||
s->stream.avail_in= (uInt) my_read(s->file, (uchar *)s->inbuf,
|
||||
AZ_BUFSIZE_READ, MYF(0));
|
||||
if (s->stream.avail_in == 0)
|
||||
{
|
||||
s->z_eof = 1;
|
||||
/* if (ferror(s->file)) s->z_err = Z_ERRNO; */
|
||||
return EOF;
|
||||
}
|
||||
else if (s->stream.avail_in == (uInt) -1)
|
||||
{
|
||||
s->z_eof= 1;
|
||||
s->z_err= Z_ERRNO;
|
||||
return EOF;
|
||||
}
|
||||
s->stream.next_in = s->inbuf;
|
||||
|
|
|
@ -56,6 +56,7 @@ TODO:
|
|||
#define META_BUFFER_SIZE sizeof(uchar) + sizeof(uchar) + sizeof(ulonglong) \
|
||||
+ sizeof(ulonglong) + sizeof(ulonglong) + sizeof(ulonglong) + sizeof(uchar)
|
||||
#define TINA_CHECK_HEADER 254 // The number we use to determine corruption
|
||||
#define BLOB_MEMROOT_ALLOC_SIZE 8192
|
||||
|
||||
/* The file extension */
|
||||
#define CSV_EXT ".CSV" // The data file
|
||||
|
@ -597,6 +598,8 @@ int ha_tina::find_current_row(uchar *buf)
|
|||
bool read_all;
|
||||
DBUG_ENTER("ha_tina::find_current_row");
|
||||
|
||||
free_root(&blobroot, MYF(MY_MARK_BLOCKS_FREE));
|
||||
|
||||
/*
|
||||
We do not read further then local_saved_data_file_length in order
|
||||
not to conflict with undergoing concurrent insert.
|
||||
|
@ -684,6 +687,22 @@ int ha_tina::find_current_row(uchar *buf)
|
|||
if ((*field)->store(buffer.ptr(), buffer.length(), buffer.charset(),
|
||||
CHECK_FIELD_WARN))
|
||||
goto err;
|
||||
if ((*field)->flags & BLOB_FLAG)
|
||||
{
|
||||
Field_blob *blob= *(Field_blob**) field;
|
||||
uchar *src, *tgt;
|
||||
uint length, packlength;
|
||||
|
||||
packlength= blob->pack_length_no_ptr();
|
||||
length= blob->get_length(blob->ptr);
|
||||
memcpy_fixed(&src, blob->ptr + packlength, sizeof(char*));
|
||||
if (src)
|
||||
{
|
||||
tgt= (uchar*) alloc_root(&blobroot, length);
|
||||
bmove(tgt, src, length);
|
||||
memcpy_fixed(blob->ptr + packlength, &tgt, sizeof(char*));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
next_position= end_offset + eoln_len;
|
||||
|
@ -914,9 +933,10 @@ int ha_tina::open_update_temp_file_if_needed()
|
|||
int ha_tina::update_row(const uchar * old_data, uchar * new_data)
|
||||
{
|
||||
int size;
|
||||
int rc= -1;
|
||||
DBUG_ENTER("ha_tina::update_row");
|
||||
|
||||
ha_statistic_increment(&SSV::ha_read_rnd_next_count);
|
||||
ha_statistic_increment(&SSV::ha_update_count);
|
||||
|
||||
if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE)
|
||||
table->timestamp_field->set_time();
|
||||
|
@ -931,20 +951,23 @@ int ha_tina::update_row(const uchar * old_data, uchar * new_data)
|
|||
The temp_file_length is used to calculate new data file length.
|
||||
*/
|
||||
if (chain_append())
|
||||
DBUG_RETURN(-1);
|
||||
goto err;
|
||||
|
||||
if (open_update_temp_file_if_needed())
|
||||
DBUG_RETURN(-1);
|
||||
goto err;
|
||||
|
||||
if (my_write(update_temp_file, (uchar*)buffer.ptr(), size,
|
||||
MYF(MY_WME | MY_NABP)))
|
||||
DBUG_RETURN(-1);
|
||||
goto err;
|
||||
temp_file_length+= size;
|
||||
rc= 0;
|
||||
|
||||
/* UPDATE should never happen on the log tables */
|
||||
DBUG_ASSERT(!share->is_log_table);
|
||||
|
||||
DBUG_RETURN(0);
|
||||
err:
|
||||
DBUG_PRINT("info",("rc = %d", rc));
|
||||
DBUG_RETURN(rc);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1050,6 +1073,8 @@ int ha_tina::rnd_init(bool scan)
|
|||
records_is_known= 0;
|
||||
chain_ptr= chain;
|
||||
|
||||
init_alloc_root(&blobroot, BLOB_MEMROOT_ALLOC_SIZE, 0);
|
||||
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
@ -1115,7 +1140,7 @@ void ha_tina::position(const uchar *record)
|
|||
int ha_tina::rnd_pos(uchar * buf, uchar *pos)
|
||||
{
|
||||
DBUG_ENTER("ha_tina::rnd_pos");
|
||||
ha_statistic_increment(&SSV::ha_read_rnd_next_count);
|
||||
ha_statistic_increment(&SSV::ha_read_rnd_count);
|
||||
current_position= (off_t)my_get_ptr(pos,ref_length);
|
||||
DBUG_RETURN(find_current_row(buf));
|
||||
}
|
||||
|
@ -1179,6 +1204,7 @@ int ha_tina::rnd_end()
|
|||
off_t file_buffer_start= 0;
|
||||
DBUG_ENTER("ha_tina::rnd_end");
|
||||
|
||||
free_root(&blobroot, MYF(0));
|
||||
records_is_known= 1;
|
||||
|
||||
if ((chain_ptr - chain) > 0)
|
||||
|
@ -1350,6 +1376,8 @@ int ha_tina::repair(THD* thd, HA_CHECK_OPT* check_opt)
|
|||
/* set current position to the beginning of the file */
|
||||
current_position= next_position= 0;
|
||||
|
||||
init_alloc_root(&blobroot, BLOB_MEMROOT_ALLOC_SIZE, 0);
|
||||
|
||||
/* Read the file row-by-row. If everything is ok, repair is not needed. */
|
||||
while (!(rc= find_current_row(buf)))
|
||||
{
|
||||
|
@ -1358,6 +1386,8 @@ int ha_tina::repair(THD* thd, HA_CHECK_OPT* check_opt)
|
|||
current_position= next_position;
|
||||
}
|
||||
|
||||
free_root(&blobroot, MYF(0));
|
||||
|
||||
my_free((char*)buf, MYF(0));
|
||||
|
||||
if (rc == HA_ERR_END_OF_FILE)
|
||||
|
@ -1535,6 +1565,9 @@ int ha_tina::check(THD* thd, HA_CHECK_OPT* check_opt)
|
|||
local_saved_data_file_length= share->saved_data_file_length;
|
||||
/* set current position to the beginning of the file */
|
||||
current_position= next_position= 0;
|
||||
|
||||
init_alloc_root(&blobroot, BLOB_MEMROOT_ALLOC_SIZE, 0);
|
||||
|
||||
/* Read the file row-by-row. If everything is ok, repair is not needed. */
|
||||
while (!(rc= find_current_row(buf)))
|
||||
{
|
||||
|
@ -1543,6 +1576,8 @@ int ha_tina::check(THD* thd, HA_CHECK_OPT* check_opt)
|
|||
current_position= next_position;
|
||||
}
|
||||
|
||||
free_root(&blobroot, MYF(0));
|
||||
|
||||
my_free((char*)buf, MYF(0));
|
||||
thd_proc_info(thd, old_proc_info);
|
||||
|
||||
|
|
|
@ -82,6 +82,7 @@ class ha_tina: public handler
|
|||
uint32 chain_size;
|
||||
uint local_data_file_version; /* Saved version of the data file used */
|
||||
bool records_is_known;
|
||||
MEM_ROOT blobroot;
|
||||
|
||||
private:
|
||||
bool get_write_pos(off_t *end_pos, tina_set *closest_hole);
|
||||
|
|
|
@ -608,7 +608,6 @@ const char *ft_precompiled_stopwords[] = {
|
|||
"won't",
|
||||
"wonder",
|
||||
"would",
|
||||
"would",
|
||||
"wouldn't",
|
||||
"yes",
|
||||
"yet",
|
||||
|
|
|
@ -1859,6 +1859,7 @@ int ha_myisam::create(const char *name, register TABLE *table_arg,
|
|||
share->avg_row_length);
|
||||
create_info.data_file_name= ha_create_info->data_file_name;
|
||||
create_info.index_file_name= ha_create_info->index_file_name;
|
||||
create_info.language= share->table_charset->number;
|
||||
|
||||
if (ha_create_info->options & HA_LEX_CREATE_TMP_TABLE)
|
||||
create_flags|= HA_CREATE_TMP_TABLE;
|
||||
|
|
|
@ -1006,12 +1006,12 @@ uint _mi_rec_pack(MI_INFO *info, register uchar *to,
|
|||
{
|
||||
if (rec->length > 255 && new_length > 127)
|
||||
{
|
||||
to[0]=(char) ((new_length & 127)+128);
|
||||
to[1]=(char) (new_length >> 7);
|
||||
to+=2;
|
||||
}
|
||||
else
|
||||
*to++= (char) new_length;
|
||||
to[0]= (uchar) ((new_length & 127) + 128);
|
||||
to[1]= (uchar) (new_length >> 7);
|
||||
to+=2;
|
||||
}
|
||||
else
|
||||
*to++= (uchar) new_length;
|
||||
memcpy((uchar*) to,pos,(size_t) new_length); to+=new_length;
|
||||
flag|=bit;
|
||||
}
|
||||
|
@ -1045,7 +1045,7 @@ uint _mi_rec_pack(MI_INFO *info, register uchar *to,
|
|||
}
|
||||
if ((bit= bit << 1) >= 256)
|
||||
{
|
||||
*packpos++ = (char) (uchar) flag;
|
||||
*packpos++= (uchar) flag;
|
||||
bit=1; flag=0;
|
||||
}
|
||||
}
|
||||
|
@ -1055,9 +1055,9 @@ uint _mi_rec_pack(MI_INFO *info, register uchar *to,
|
|||
}
|
||||
}
|
||||
if (bit != 1)
|
||||
*packpos= (char) (uchar) flag;
|
||||
*packpos= (uchar) flag;
|
||||
if (info->s->calc_checksum)
|
||||
*to++=(char) info->checksum;
|
||||
*to++= (uchar) info->checksum;
|
||||
DBUG_PRINT("exit",("packed length: %d",(int) (to-startpos)));
|
||||
DBUG_RETURN((uint) (to-startpos));
|
||||
} /* _mi_rec_pack */
|
||||
|
@ -1128,12 +1128,14 @@ my_bool _mi_rec_check(MI_INFO *info,const uchar *record, uchar *rec_buff,
|
|||
goto err;
|
||||
if (rec->length > 255 && new_length > 127)
|
||||
{
|
||||
if (to[0] != (char) ((new_length & 127)+128) ||
|
||||
to[1] != (char) (new_length >> 7))
|
||||
goto err;
|
||||
to+=2;
|
||||
}
|
||||
else if (*to++ != (char) new_length)
|
||||
/* purecov: begin inspected */
|
||||
if (to[0] != (uchar) ((new_length & 127) + 128) ||
|
||||
to[1] != (uchar) (new_length >> 7))
|
||||
goto err;
|
||||
to+=2;
|
||||
/* purecov: end */
|
||||
}
|
||||
else if (*to++ != (uchar) new_length)
|
||||
goto err;
|
||||
to+=new_length;
|
||||
}
|
||||
|
|
|
@ -815,8 +815,17 @@ static void setup_key_functions(register MI_KEYDEF *keyinfo)
|
|||
keyinfo->get_key= _mi_get_pack_key;
|
||||
if (keyinfo->seg[0].flag & HA_PACK_KEY)
|
||||
{ /* Prefix compression */
|
||||
/*
|
||||
_mi_prefix_search() compares end-space against ASCII blank (' ').
|
||||
It cannot be used for character sets, that do not encode the
|
||||
blank character like ASCII does. UCS2 is an example. All
|
||||
character sets with a fixed width > 1 or a mimimum width > 1
|
||||
cannot represent blank like ASCII does. In these cases we have
|
||||
to use _mi_seq_search() for the search.
|
||||
*/
|
||||
if (!keyinfo->seg->charset || use_strnxfrm(keyinfo->seg->charset) ||
|
||||
(keyinfo->seg->flag & HA_NULL_PART))
|
||||
(keyinfo->seg->flag & HA_NULL_PART) ||
|
||||
(keyinfo->seg->charset->mbminlen > 1))
|
||||
keyinfo->bin_search=_mi_seq_search;
|
||||
else
|
||||
keyinfo->bin_search=_mi_prefix_search;
|
||||
|
|
Loading…
Reference in a new issue