File: alter_partitioned.result

package info (click to toggle)
mariadb 1%3A11.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 765,428 kB
  • sloc: ansic: 2,382,827; cpp: 1,803,532; asm: 378,315; perl: 63,176; sh: 46,496; pascal: 40,776; java: 39,363; yacc: 20,428; python: 19,506; sql: 17,864; xml: 12,463; ruby: 8,544; makefile: 6,059; cs: 5,855; ada: 1,700; lex: 1,193; javascript: 1,039; objc: 80; tcl: 73; awk: 46; php: 22
file content (57 lines) | stat: -rw-r--r-- 1,846 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#
# MDEV-26077 Assertion failure err != DB_DUPLICATE_KEY
# or unexpected ER_TABLE_EXISTS_ERROR
#
CREATE TABLE t1 (pk INT PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE t2 (pk INT PRIMARY KEY) ENGINE=InnoDB;
connect  con1,localhost,root,,test;
START TRANSACTION;
INSERT INTO t2 (pk) VALUES (1);
SAVEPOINT sp;
INSERT INTO t1 (pk) VALUES (1);
ROLLBACK TO SAVEPOINT sp;
connection default;
SET @save_timeout=@@lock_wait_timeout;
SET @save_innodb_timeout=@@innodb_lock_wait_timeout;
SET lock_wait_timeout=0;
SET innodb_lock_wait_timeout=0;
ALTER TABLE t1 PARTITION BY HASH(pk);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
SET lock_wait_timeout=@save_timeout;
SET innodb_lock_wait_timeout=@save_innodb_timeout;
SHOW CREATE TABLE t1;
Table	Create Table
t1	CREATE TABLE `t1` (
  `pk` int(11) NOT NULL,
  PRIMARY KEY (`pk`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
connection con1;
COMMIT;
connection default;
SET lock_wait_timeout=@save_timeout;
SET innodb_lock_wait_timeout=@save_innodb_timeout;
ALTER TABLE t2 PARTITION BY HASH(pk);
disconnect con1;
connection default;
DROP TABLE t1, t2;
# End of 10.2 tests
CREATE TABLE t1(a INT, b VARCHAR(10), INDEX(a))ENGINE=InnoDB
PARTITION BY RANGE(a)
(PARTITION pa VALUES LESS THAN (3),
PARTITION pb VALUES LESS THAN (5));
CREATE TABLE t2(a INT, FOREIGN KEY(a) REFERENCES t1(a))ENGINE=INNODB
PARTITION BY RANGE(a)
(PARTITION pa VALUES LESS THAN (2),
PARTITION pb VALUES LESS THAN (4));
ERROR HY000: Partitioned tables do not support FOREIGN KEY
DROP TABLE t1;
# End of 10.3 tests
#
# MDEV-24754 Server crash in
# ha_partition_inplace_ctx::~ha_partition_inplace_ctx
#
CREATE TABLE t1 (id INT PRIMARY KEY, a INT, va INT AS (a) VIRTUAL)
ENGINE=InnoDB PARTITION BY HASH(id) PARTITIONS 2;
ALTER TABLE t1 ADD b INT, ALGORITHM=INSTANT;
DROP TABLE t1;
# End of 10.5 tests