[MDEV-16176] ER_INVALID_CHARACTER_STRING and Incorrect information in frm file upon ALTERs on a table with virtual column Created: 2018-05-15  Updated: 2018-05-15  Resolved: 2018-05-15

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Alter Table, Virtual Columns
Affects Version/s: 10.2, 10.3
Fix Version/s: 10.2.15, 10.3.7

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
PartOf
is part of MDEV-16110 ALTER with ALGORITHM=INPLACE breaks t... Closed

 Description   

CREATE TABLE t1 (a INT, b INT, v INT AS (b));
--error ER_DUP_FIELDNAME
ALTER TABLE t1 CHANGE COLUMN IF EXISTS b a INT;
ALTER TABLE t1 FORCE;
 
# Cleanup
DROP TABLE t1;

10.2 6c0f3dd3414a97266

mysqltest: At line 4: query 'ALTER TABLE t1 FORCE' failed: 1300: Invalid utf8mb4 character string: '\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5\xA5'

In the error log:

2018-05-15 16:02:56 139984398599936 [ERROR] mysqld: Incorrect information in file: './test/#sql-735a_4.frm'

Not reproducible on 10.1.

Please note that Incorrect information in file is suppressed in MTR, so it doesn't show up itself as a failure.



 Comments   
Comment by Sergei Golubchik [ 2018-05-15 ]

Same pattern as in MDEV-16110:

  • a table with a virtual column, CHECK constraint, or an expression in the DEFAULT clause.
  • ALTER TABLE that renames a column, which is used in the above expression
  • ALTER TABLE fails, leaving the in-memory table definition in the inconsistent state.
Generated at Thu Feb 08 08:26:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.