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
When trying to change the type and name of a column to a JSON type, the onlineddl migration fails because it cannot find the new column name in the old table. This specifically only fails when converting to JSON, not any other type.
From the logs, I can see it trying to select the new column name from the old table, which is incorrect. Weirdly enough, the vreplication filter is printed out as using the correct (old) column name, but the query that is streamed is using the wrong (new) column name
Reproduction Steps
CREATE TABLE `example` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`id2` int DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB
creating controller .... filter:{rules:{match:"_21d02a9e_5ba9_11ee_a124_0e60febffd0b_20230925134048_vrepl" filter:"select `id` as `id`, convert(`id2` using utf8mb4) as `id3` from `example`
vttablet I0925 13:40:53.431411 2 engine.go:280] Streaming rows for query select/*vt+ ukColumns="id"*/ id, convert(id3 using utf8mb4) as id3 from example, lastpk: []
vttablet E0925 13:40:53.432177 2 planbuilder.go:434] column id3 not found in table example
vttablet E0925 13:40:53.432187 2 rowstreamer.go:185] column id3 not found in table example
The text was updated successfully, but these errors were encountered:
Then the actual error comes from here where it tries to find the new column in the table (the new column does not exist)
Both of these places use the alias as the column name, which isn't right in this case because the alias is the new column that doesn't exist in the table
Overview of the Issue
When trying to change the type and name of a column to a JSON type, the onlineddl migration fails because it cannot find the new column name in the old table. This specifically only fails when converting to JSON, not any other type.
From the logs, I can see it trying to select the new column name from the old table, which is incorrect. Weirdly enough, the vreplication filter is printed out as using the correct (old) column name, but the query that is streamed is using the wrong (new) column name
Reproduction Steps
See it fail with
column id3 not found in table example
Binary Version
"almost v18" - commit https://github.com/vitessio/vitess/commit/e7c0bb07ac0b5c0ddd2dfa2da5a1bfb2a25bae4a
Operating System and Environment details
Log Fragments
The text was updated successfully, but these errors were encountered: