Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Not a Bug
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
I created a table with a virtual column, tried to update the virtual column, and no error was issued.
MariaDB [test]> DROP VIEW IF EXISTS `t1`;
Query OK, 0 rows affected, 1 warning (0.01 sec)
MariaDB [test]> DROP TABLE IF EXISTS `t1`;
Query OK, 0 rows affected (0.11 sec)
MariaDB [test]> CREATE TABLE `t1` (
-> `a` INTEGER UNSIGNED NULL DEFAULT NULL,
-> `b` INTEGER UNSIGNED GENERATED ALWAYS AS (`a` + 100) VIRTUAL
-> )
-> ENGINE = Aria
-> ROW_FORMAT = PAGE;
Query OK, 0 rows affected (0.21 sec)
MariaDB [test]> UPDATE `t1` SET `b` = 1;
Query OK, 0 rows affected (0.01 sec)
Rows matched: 0 Changed: 0 Warnings: 0
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Hi Federico,
You are not getting an error because your UPDATE does not really update anything, the table is empty.
If you had had any rows that are supposed to be updated, you'd have gotten either a warning or an error, depending on the server version and sql_mode.