← Back to team overview

maria-developers team mailing list archive

Re: Virtual columns and 'mysqldump' (and similar)


06/11/2015 07:51, Peter Laursen wrote:
I reported this bug report to Oracle: http://bugs.mysql.com/bug.php?id=79148

It is almost the same in MariaDB - but the error message is different, see

SELECT VERSION(); -- 10.1.2-MariaDB-log

CREATE TABLE `vc_test`.`t1`(
  `id` INT NOT NULL,
  `id3` INT AS ( id*3 ) VIRTUAL

INSERT INTO `vc_test`.`t1` VALUES (1,3);
-- retruns: Error Code: 1906 - The value specified for computed column 'id3' in table 't1' ignored

-- returns empty set

So here the error message is that "value is ignored" (not that it is "not allowed"). It looks to me like somebody in MariaDB actually identified the problem, but forgot to finish things.

The statement should succeed (maybe raise a warning), and the "specified value should be ignored" as the error message says, but what it in reality is not.

What say?

In 10.1.8, the above returns:
| id | id3  |
|  1 |    3 |

Follow ups