[MDEV-29818] Add ability to handle Oracle Identity columns in ORACLE Mode Created: 2022-10-18 Updated: 2023-11-13 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Kyle Hutchinson | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | Compatibility, Oracle | ||
| Description |
|
In Oracle 12c Oracle added the ability to create a numeric identity column that adds incrementing numbers automatically. In other words they added the AUTO_INCREMENT functionality without having to explicitly create a sequence first.
However, if that code is executed as is in MariaDB with Oracle mode on you get the following error:
For now to maintain the same functionality as the Oracle syntax above, the create table would need to be modified to the below code snippet:
Let's add the identity column syntax to Oracle mode to so we can minimize schema code rewrites. It appears that behind the scenes Oracle is still making a sequence, but doesn't require explicitly creating it ahead of time. For more details view https://oracle-base.com/articles/12c/identity-columns-in-oracle-12cr1. |