Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
None
-
None
-
None
-
None
Description
One can INSERT a row into a table without specifying the fields names. But if the table contains Virtual Columns, you don't include those values in the statement. But then, MariaDB says that column count doesn't match.
MariaDB [test]> DROP VIEW IF EXISTS `t1`;
Query OK, 0 rows affected, 1 warning (0.00 sec)
MariaDB [test]> DROP TABLE IF EXISTS `t1`;
Query OK, 0 rows affected (0.46 sec)
MariaDB [test]> CREATE TABLE `t1` (
-> `a` INTEGER UNSIGNED NULL DEFAULT NULL,
-> `b` INTEGER UNSIGNED GENERATED ALWAYS AS (`a` + 1) PERSISTENT
-> )
-> ENGINE = Aria
-> ROW_FORMAT = PAGE;
Query OK, 0 rows affected (0.18 sec)
MariaDB [test]> INSERT INTO `t1` VALUES (1);
ERROR 1136 (21S01): Column count doesn't match value count at row 1