1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00
This commit is contained in:
Mattias Jonsson
2009-08-21 18:00:38 +02:00
4 changed files with 44 additions and 35 deletions

View File

@@ -1,5 +1,19 @@
drop table if exists t1, t2;
CREATE TABLE t1 (
a int NOT NULL,
b int NOT NULL);
CREATE TABLE t2 (
a int NOT NULL,
b int NOT NULL,
INDEX(b)
)
PARTITION BY HASH(a) PARTITIONS 2;
INSERT INTO t1 VALUES (399, 22);
INSERT INTO t2 VALUES (1, 22), (1, 42);
INSERT INTO t2 SELECT 1, 399 FROM t2, t1
WHERE t1.b = t2.b;
DROP TABLE t1, t2;
CREATE TABLE t1 (
a timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
b varchar(10),
PRIMARY KEY (a)