Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
10.3.29, 10.4.19, 10.5.10, 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
Description
When an Update Statement happens with an alias. The alias seems to replace the table name.
See below an example Query to reproduce the failure:
DROP TABLE IF EXISTS `test_table`; |
|
CREATE TABLE `test_table` ( |
`id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, |
`order_date` datetime NOT NULL, |
`language_id` BINARY(16) NULL |
);
|
|
ALTER TABLE `test_table` CHANGE `order_date` `order_date_time` DATETIME(3) NOT NULL; |
|
ALTER TABLE `test_table` ADD COLUMN `order_date` DATE GENERATED ALWAYS AS (CONVERT(`order_date_time`, DATE)) STORED AFTER `order_date_time`; |
|
UPDATE `test_table` as `x` SET order_date = NULL; |
|
ALTER TABLE `test_table` MODIFY COLUMN `language_id` BINARY(16) NOT NULL; |
Results in the following error on the ALTER TABLE statement:
Unknown column '`test`.`x`.`order_date_time`' in 'GENERATED ALWAYS' |
Attachments
Issue Links
- duplicates
-
MDEV-25673 MariaDB fail to execute CONVERT TO CHARACTER
- Closed
-
MDEV-25676 Alias in a view on a table with virtual column avoid index creation
- Closed
-
MDEV-25699 Cannot create new column - check constraint issue reported on an existing json column
- Closed
-
MDEV-25732 Error while removing the constraint
- Closed
-
MDEV-25733 Select with table name alias prevents foreign key deletion
- Closed
-
MDEV-25763 optimize table : Unknown column
- Closed
-
MDEV-25868 CHECK constaint refers to old table name after temporary table rename
- Closed
-
MDEV-25879 Problem with modifing tables with STORED columns used in procedures
- Closed
-
MDEV-25932 Error 1054 on DROP INDEX for tables having virtual column and view referencing it
- Closed
- is caused by
-
MDEV-25091 CREATE TABLE: field references qualified by a wrong table name succeed
- Closed
- is duplicated by
-
MDEV-25997 ALTER TABLE command works on one table, but not the other
- Closed
- relates to
-
MDEV-10355 Weird error message upon CREATE TABLE with DEFAULT: Function or expression 'cache' cannot be used in the ??? clause
- Closed
-
MDEV-16039 Crash when selecting virtual columns generated using functions with DAYNAME()
- Closed
-
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if()
- Closed
-
MDEV-25794 vcol_info refix during lock_tables() leads to memory leak until table flush
- Open