Details
-
Bug
-
Status: Open (View Workflow)
-
Trivial
-
Resolution: Unresolved
-
10.2(EOL)
-
None
Description
Note: I've seen from the tests that it's expected for now, but I think it could be improved.
This works |
MariaDB [test]> create table t1 (a datetime as (now()) VIRTUAL); |
Query OK, 0 rows affected (0.40 sec) |
This does not work |
MariaDB [test]> create table t2 (a datetime as (now()) VIRTUAL, INDEX(a)); |
ERROR 1901 (HY000): Function or expression 'current_timestamp()' cannot be used in the GENERATED ALWAYS AS clause of `a` |
The problem is not that it doesn't work, but that it pretends that NOW cannot be used at all, while it's only so for indexed columns. Maybe we need a different error message if there is no suitable one.
Attachments
Issue Links
- relates to
-
MDEV-5800 indexes on virtual (not materialized) columns
- Closed