File: alter_inplace_fail.result

package info (click to toggle)
mysql-8.0 8.0.43-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,273,924 kB
  • sloc: cpp: 4,684,605; ansic: 412,450; pascal: 108,398; java: 83,641; perl: 30,221; cs: 27,067; sql: 26,594; sh: 24,181; python: 21,816; yacc: 17,169; php: 11,522; xml: 7,388; javascript: 7,076; makefile: 2,194; lex: 1,075; awk: 670; asm: 520; objc: 183; ruby: 97; lisp: 86
file content (81 lines) | stat: -rw-r--r-- 2,481 bytes parent folder | download
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#
# Test INPLACE ALTER failures at various stages
#  - on failure, they should rollback restoring the
#    original table definitions if not already committed.
#
# Failure when meta-data is missing when trying to commit
SHOW CREATE TABLE t8;
Table	Create Table
t8	CREATE TABLE `t8` (
  `a` int DEFAULT NULL,
  `b` varchar(255) DEFAULT NULL,
  `c` datetime NOT NULL,
  `d` int unsigned DEFAULT NULL,
  `e` int NOT NULL
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
SELECT * FROM t8 ORDER BY a;
a	b	c	d	e
1	1-t8	2017-10-20 09:13:01	NULL	1
2	2-t8	2017-10-20 09:13:02	NULL	2
3	3-t8	2017-10-20 09:13:03	NULL	3
4	4-t8	2017-10-20 09:13:04	NULL	4
5	5-t8	2017-10-20 09:13:05	NULL	5
set @save_debug = @@global.debug;
set global debug='-d';
set global debug='+d,ndb_missing_table_in_inplace_alter';
call mtr.add_suppression("Failed to complete inplace alter table commit");
ALTER TABLE t8
RENAME COLUMN d to d_new,
ALGORITHM = INPLACE;
ERROR HY000: Internal error: Failed to complete inplace alter table commit, table not found
set global debug=@save_debug;
SHOW CREATE TABLE t8;
Table	Create Table
t8	CREATE TABLE `t8` (
  `a` int DEFAULT NULL,
  `b` varchar(255) DEFAULT NULL,
  `c` datetime NOT NULL,
  `d_new` int unsigned DEFAULT NULL,
  `e` int NOT NULL
) ENGINE=ndbcluster DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
-- t8 --
Version: Any
Fragment type: HashMapPartition
K Value: 6
Min load factor: 78
Max load factor: 80
Temporary table: no
Number of attributes: 6
Number of primary keys: 1
Length of frm data: XXX
Max Rows: 0
Row Checksum: 1
Row GCI: 1
SingleUserMode: 0
ForceVarPart: 1
PartitionCount: 8
FragmentCount: 8
PartitionBalance: FOR_RP_BY_LDM
ExtraRowGciBits: 0
ExtraRowAuthorBits: 0
TableStatus: Retrieved
Table options: readbackup
HashMap: DEFAULT-HASHMAP-3840-8
-- Attributes --
a Int NULL AT=FIXED ST=MEMORY
b Longvarchar(1020;utf8mb4_0900_ai_ci) NULL AT=MEDIUM_VAR ST=MEMORY
c Datetime2(0) NOT NULL AT=FIXED ST=MEMORY
d_new Unsigned NULL AT=FIXED ST=MEMORY
e Int NOT NULL AT=FIXED ST=MEMORY
$PK Bigunsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY AUTO_INCR
-- Indexes -- 
PRIMARY KEY($PK) - UniqueHashIndex

#
# Bug#31419144 FIX MEMORY LEAK OF NDB_ALTER_DATA IN PREPARE_INPLACE_ALTER_TABLE
#
set @save_debug = @@global.debug;
set global debug='+d,ndb_schema_dist_not_ready_early';
ALTER TABLE t1 ADD INDEX idx(a), ALGORITHM = INPLACE;
ERROR HY000: Got error 4009 'Cluster Failure' from NDBCLUSTER
set global debug=@save_debug;