[MDEV-15146] SQLError[4122]: View is not system versioned Created: 2018-01-31 Updated: 2018-10-26 Resolved: 2018-02-13 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Versioned Tables, Views |
| Affects Version/s: | 10.3.4 |
| Fix Version/s: | 10.3.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Benjamin Bartels | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows 10 x64 |
||
| Description |
|
According to the System-Versioned Table documentation you are supposed to be able to create a view from a system versioned table and work with it just like with the versioned table itself. However in the below test case I am encountering SQLError[4122] "Table 'v1' is not system versioned" when running the query. Testcase:
|
| Comments |
| Comment by Elena Stepanova [ 2018-01-31 ] |
|
Thanks for the report. Even the literal example from the documentation doesn't work, either the manual is wrong, or something got broken. |
| Comment by Eugene Kosov (Inactive) [ 2018-01-31 ] |
|
Quote from ISO/IEC 9075-2:2016(E), 7.6 <table reference> IIRC this worked in past before merge to 10.3. But it was removed as not standard extension. serg knows better. |
| Comment by Sergei Golubchik [ 2018-01-31 ] |
|
Yes, it's non-standard (and the manual says that). But, it's not unique, as far as I remember, DB2 supports it. |
| Comment by Eugene Kosov (Inactive) [ 2018-01-31 ] |
|
Should MariaDB support that? |
| Comment by Benjamin Bartels [ 2018-01-31 ] |
|
Well I think it could certainly be useful for ORM's without support for System Versioned tables. You could create a view of a table and map it to an object, this way you have a type safe representation of the versioning without the need for an ORM to implement explicit support. |
| Comment by Sergei Golubchik [ 2018-02-01 ] |
|
yes, I believe MariaDB should support it. This feature disappeared in 84b718ae7054bce517f7b15d1512ca831191113c as a side effect. |