Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6
Description
An attempt to insert all default values into a view fails with "Column count doesn't match value count at row 1", while the same statement with the base table works all right. I couldn't find any explanation or a mention of such limitation in the docs.
CREATE TABLE t1 (i INT DEFAULT '0'); |
CREATE VIEW v1 AS SELECT * FROM t1; |
INSERT INTO v1 () VALUES (); |
 |
# Cleanup
|
DROP VIEW v1; |
DROP TABLE t1; |
10.2 259e5243 |
mysqltest: At line 3: query 'INSERT INTO v1 () VALUES ()' failed: 1136: Column count doesn't match value count at row 1 |
Same with INSERT INTO v1 VALUES ().
Reproducible on all of MariaDB and previous versions of MySQL. It has been recently fixed in MySQL 8.0.22.