You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
log.Info("ALTER is not eligible for INSTANT DDL because the MySQL server version does not support changing a column default with INSTANT DDL", slog.String("alter", sqlparser.CanonicalString(alterOption)))
136
+
}
137
+
iferr!=nil {
138
+
log.Error("Error while checking MySQL server INSTANT DDL capability for ALTER", slog.String("alter", sqlparser.CanonicalString(alterOption)), slog.Any("error", err))
// this increases the SET storage size (1 byte for up to 8 values, 2 bytes beyond)
158
+
// this increases the ENUM storage size (1 byte for up to 255 values, 2 bytes beyond)
159
+
log.Info("ALTER is not eligible for INSTANT DDL because we would be crossing the 255 enum value count, which increases the storage size from 1 to 2 bytes",
if (len(col.Type.EnumValues)+7)/8!= (len(newCol.Type.EnumValues)+7)/8 {
118
166
// this increases the SET storage size (1 byte for up to 8 values, 2 bytes for 8-15, etc.)
167
+
log.Info("ALTER is not eligible for INSTANT DDL because we would be crossing the 8 SET value count, which increases the storage size from 1 to 2 bytes.",
log.Info("ALTER is not eligible for INSTANT DDL because the column was not found", slog.String("alter", sqlparser.CanonicalString(alterOption)), slog.String("column", opt.Name.Name.String()))
172
264
returnfalse, nil
173
265
}
174
266
iftableHasFulltextIndex {
175
267
// not supported if the table has a FULLTEXT index
268
+
log.Info("ALTER is not eligible for INSTANT DDL because the table has a FULLTEXT index", slog.String("alter", sqlparser.CanonicalString(alterOption)))
176
269
returnfalse, nil
177
270
}
178
271
// Not supported in COMPRESSED tables
179
272
iftableIsCompressed {
273
+
log.Info("ALTER is not eligible for INSTANT DDL because the table is compressed", slog.String("alter", sqlparser.CanonicalString(alterOption)))
log.Info("ALTER is not eligible for INSTANT DDL because the MySQL server version does not support dropping virtual generated columns with INSTANT DDL", slog.String("alter", sqlparser.CanonicalString(alterOption)))
289
+
}
290
+
iferr!=nil {
291
+
log.Error("Error while checking MySQL server INSTANT DDL capability for ALTER", slog.String("alter", sqlparser.CanonicalString(alterOption)), slog.Any("error", err))
log.Info("ALTER is not eligible for INSTANT DDL because CHANGE COLUMN does not support FIRST or AFTER clauses with INSTANT DDL", slog.String("alter", sqlparser.CanonicalString(alterOption)))
196
299
returnfalse, nil
197
300
}
198
301
// We do not support INSTANT for renaming a column (ALTER TABLE ...CHANGE) because:
log.Info("ALTER is not eligible for INSTANT DDL as the column name is being changed and that is not supported with INSTANT DDL", slog.String("alter", sqlparser.CanonicalString(alterOption)))
log.Error("Error while checking ALTER for INSTANT DDL capability", slog.String("alter", sqlparser.CanonicalString(alterOption)), slog.Any("error", err))
314
+
}
315
+
returncapable, err
208
316
}
317
+
log.Info("ALTER is not eligible for INSTANT DDL because the column was not found", slog.String("alter", sqlparser.CanonicalString(alterOption)), slog.String("column", opt.OldColumn.Name.String()))
209
318
returnfalse, nil
210
319
case*sqlparser.ModifyColumn:
211
320
ifopt.First||opt.After!=nil {
321
+
log.Info("ALTER is not eligible for INSTANT DDL as the MODIFY COLUMN clause does not support FIRST or AFTER clauses with INSTANT DDL", slog.String("alter", sqlparser.CanonicalString(alterOption)))
log.Error("Error while checking ALTER for INSTANT DDL capability", slog.String("alter", sqlparser.CanonicalString(alterOption)), slog.Any("error", err))
328
+
}
329
+
returncapable, err
216
330
}
331
+
log.Info("ALTER is not eligible for INSTANT DDL because the column was not found", slog.String("alter", sqlparser.CanonicalString(alterOption)), slog.String("column", opt.NewColDefinition.Name.String()))
log.Info("ALTER is not eligible for INSTANT DDL because the MySQL server version does not support changing column defaults with INSTANT DDL", slog.String("alter", sqlparser.CanonicalString(alterOption)))
338
+
}
339
+
iferr!=nil {
340
+
log.Error("Error while checking MySQL server INSTANT DDL capability for ALTER", slog.String("alter", sqlparser.CanonicalString(alterOption)), slog.Any("error", err))
log.Info("ALTER is not eligible for INSTANT DDL because the MySQL server version does not support changing column visibility with INSTANT DDL", slog.String("alter", sqlparser.CanonicalString(alterOption)))
348
+
}
349
+
iferr!=nil {
350
+
log.Error("Error while checking MySQL server INSTANT DDL capability for ALTER", slog.String("alter", sqlparser.CanonicalString(alterOption)), slog.Any("error", err))
log.Info("ALTER is not eligible for INSTANT DDL because the MySQL server version does not support INSTANT DDL", slog.String("alter", sqlparser.CanonicalString(alterTable)))
// > The maximum number of columns in the internal representation of the table cannot exceed 1022 after column addition with the INSTANT algorithm
401
+
log.Info("ALTER is not eligible for INSTANT DDL because the table would exceed the maximum number of columns", slog.String("alter", sqlparser.CanonicalString(alterTable)))
0 commit comments