Debian Codegraph @

mysql-test/suite/ndb_ddl/alter_inplace_fail.result

raw
1 #
2 # Test INPLACE ALTER failures at various stages
3 # - on failure, they should rollback restoring the
4 # original table definitions if not already committed.
5 #
6 # Failure when meta-data is missing when trying to commit
7 SHOW CREATE TABLE t8;
8 Table Create Table
9 t8 CREATE TABLE `t8` (
10 `a` int DEFAULT NULL,
11 `b` varchar(255) DEFAULT NULL,
12 `c` datetime NOT NULL,
13 `d` int unsigned DEFAULT NULL,
14 `e` int NOT NULL
15 ) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
16 SELECT * FROM t8 ORDER BY a;
17 a b c d e
18 1 1-t8 2017-10-20 09:13:01 NULL 1
19 2 2-t8 2017-10-20 09:13:02 NULL 2
20 3 3-t8 2017-10-20 09:13:03 NULL 3
21 4 4-t8 2017-10-20 09:13:04 NULL 4
22 5 5-t8 2017-10-20 09:13:05 NULL 5
23 set @save_debug = @@global.debug;
24 set global debug='-d';
25 set global debug='+d,ndb_missing_table_in_inplace_alter';
26 call mtr.add_suppression("Failed to complete inplace alter table commit");
27 ALTER TABLE t8
28 RENAME COLUMN d to d_new,
29 ALGORITHM = INPLACE;
30 ERROR HY000: Internal error: Failed to complete inplace alter table commit, table not found
31 set global debug=@save_debug;
32 SHOW CREATE TABLE t8;
33 Table Create Table
34 t8 CREATE TABLE `t8` (
35 `a` int DEFAULT NULL,
36 `b` varchar(255) DEFAULT NULL,
37 `c` datetime NOT NULL,
38 `d_new` int unsigned DEFAULT NULL,
39 `e` int NOT NULL
40 ) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
41 -- t8 --
42 Version: Any
43 Fragment type: HashMapPartition
44 K Value: 6
45 Min load factor: 78
46 Max load factor: 80
47 Temporary table: no
48 Number of attributes: 6
49 Number of primary keys: 1
50 Length of frm data: XXX
51 Max Rows: 0
52 Row Checksum: 1
53 Row GCI: 1
54 SingleUserMode: 0
55 ForceVarPart: 1
56 PartitionCount: 8
57 FragmentCount: 8
58 PartitionBalance: FOR_RP_BY_LDM
59 ExtraRowGciBits: 0
60 ExtraRowAuthorBits: 0
61 TableStatus: Retrieved
62 Table options: readbackup
63 HashMap: DEFAULT-HASHMAP-3840-8
64 -- Attributes --
65 a Int NULL AT=FIXED ST=MEMORY
66 b Longvarchar(1020;utf8mb4_0900_ai_ci) NULL AT=MEDIUM_VAR ST=MEMORY
67 c Datetime2(0) NOT NULL AT=FIXED ST=MEMORY
68 d_new Unsigned NULL AT=FIXED ST=MEMORY
69 e Int NOT NULL AT=FIXED ST=MEMORY
70 $PK Bigunsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY AUTO_INCR
71 -- Indexes --
72 PRIMARY KEY($PK) - UniqueHashIndex
73
74 #
75 # Bug#31419144 FIX MEMORY LEAK OF NDB_ALTER_DATA IN PREPARE_INPLACE_ALTER_TABLE
76 #
77 set @save_debug = @@global.debug;
78 set global debug='+d,ndb_schema_dist_not_ready_early';
79 ALTER TABLE t1 ADD INDEX idx(a), ALGORITHM = INPLACE;
80 ERROR HY000: Got error 4009 'Cluster Failure' from NDBCLUSTER
81 set global debug=@save_debug;