Debian Codegraph @

mysql-test/suite/innodb/r/online_table_rebuild.result

raw
1 CREATE TABLE t1(f1 INT NOT NULL, f2 CHAR(200), f3 CHAR(200))ENGINE=InnoDB;
2 INSERT INTO t1 VALUES(3, "innodb", "alter log");
3 SET DEBUG_SYNC="inplace_after_index_build SIGNAL dml_start WAIT_FOR dml_commit";
4 ALTER TABLE t1 ADD PRIMARY KEY(f3(10)), ADD UNIQUE KEY(f2(10));
5 CONNECT con1,localhost,root,,,;
6 SET DEBUG_SYNC="now WAIT_FOR dml_start";
7 BEGIN;
8 INSERT INTO t1 VALUES(1, repeat('b', 100), repeat('c', 100));
9 INSERT INTO t1 VALUES(2, repeat('b', 100), repeat('a', 100));
10 COMMIT;
11 SET DEBUG_SYNC="now SIGNAL dml_commit";
12 connection default;
13 # The below error displays a wrong (too long) key value.
14 # The problem is reported as:
15 # MDEV-34387 Too long value in the Duplicate entry message with online alter and utf8
16 # Please make sure to remove this comment when MDEV-34387 is fixed.
17 ERROR 23000: Duplicate entry 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' for key 'f2'
18 connection default;
19 SET DEBUG_SYNC="inplace_after_index_build SIGNAL dml_start WAIT_FOR dml_commit";
20 ALTER TABLE t1 ADD PRIMARY KEY(f1);
21 connection con1;
22 SET DEBUG_SYNC="now WAIT_FOR dml_start";
23 INSERT INTO t1 SELECT 10, repeat('a', 100), repeat('b', 100) FROM seq_1_to_4800;
24 SET DEBUG_SYNC="now SIGNAL dml_commit";
25 connection default;
26 ERROR HY000: Creating index 'PRIMARY' required more than 'innodb_online_alter_log_max_size' bytes of modification log. Please try again
27 DELETE FROM t1;
28 INSERT INTO t1 VALUES(1, repeat('a', 100), repeat('b', 100));
29 ALTER TABLE t1 ADD PRIMARY KEY(f1);
30 set DEBUG_SYNC="innodb_inplace_alter_table_enter SIGNAL dml_start WAIT_FOR dml_commit";
31 ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(f3(10));
32 connection con1;
33 SET DEBUG_SYNC="now WAIT_FOR dml_start";
34 BEGIN;
35 INSERT INTO t1 VALUES(2, repeat('b', 100), repeat('c', 100));
36 UPDATE t1 set f3=repeat('c', 100) where f1=1;
37 COMMIT;
38 SET DEBUG_SYNC="now SIGNAL dml_commit";
39 connection default;
40 ERROR 23000: Duplicate entry 'cccccccccccccccccccccccccccccccccccccccc' for key 'PRIMARY'
41 SHOW CREATE TABLE t1;
42 Table Create Table
43 t1 CREATE TABLE `t1` (
44 `f1` int(11) NOT NULL,
45 `f2` char(200) DEFAULT NULL,
46 `f3` char(200) DEFAULT NULL,
47 PRIMARY KEY (`f1`)
48 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
49 DROP TABLE t1;
50 #
51 # MDEV-30183 Assertion `!memcmp(rec_trx_id, old_pk_trx_id->data,
52 # 6 + 7)' failed in row_log_table_apply_update
53 #
54 set @old_sql_mode = @@sql_mode;
55 set @@sql_mode="";
56 CREATE TABLE t1(col_int int, col_varchar varchar(500))ENGINE=InnoDB;
57 INSERT INTO t1(col_int) values(2560);
58 set debug_sync="row_log_table_apply1_before SIGNAL con1_begin WAIT_FOR con1_commit";
59 ALTER TABLE t1 ADD PRIMARY KEY ( col_varchar);
60 connection con1;
61 SET DEBUG_SYNC="now WAIT_FOR con1_begin";
62 UPDATE t1 SET col_int = 2178;
63 INSERT INTO t1(col_int) VALUES(3016);
64 UPDATE t1 set col_int=2802;
65 SET DEBUG_SYNC="now SIGNAL con1_commit";
66 connection default;
67 ERROR 23000: Duplicate entry '' for key 'PRIMARY'
68 DROP TABLE t1;
69 SET @@sql_mode = @old_sql_mode;
70 disconnect con1;
71 SET DEBUG_SYNC=reset;