[MCOL-780] auto increment needs to use MariaDB's auto increment methods Created: 2017-06-20 Updated: 2021-12-27 Resolved: 2020-03-11 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | N/A |
| Affects Version/s: | 1.0.9 |
| Fix Version/s: | Icebox |
| Type: | New Feature | Priority: | Major |
| Reporter: | David Thompson (Inactive) | Assignee: | Todd Stoffel (Inactive) |
| Resolution: | Won't Do | Votes: | 3 |
| Labels: | community | ||
| Issue Links: |
|
||||||||||||||||||||
| Epic Link: | ColumnStore Compatibility Improvements | ||||||||||||||||||||
| Description |
|
We have a ColumnStore table with an autoincrement column (defined as a comment in the table, as documented here). We noticed that none of the usual methods of retrieving the current autoincrement value for the table work: Is this a bug? If not, is there any other way to retrieve the current autoincrement value? |
| Comments |
| Comment by David Thompson (Inactive) [ 2017-06-20 ] | ||||||||||||||
|
Can reproduce with python client, create table:
then running the following python code will always return 0.
| ||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2017-06-20 ] | ||||||||||||||
|
Our autoincrement implementation is separate to MariaDB's so MariaDB's autoincrement based functions do not work with ColumnStore. Some planning needs to be done to make this works as there are some things to solve around multi-UM setups. For example the handling of the auto_increment_increment variable. That said NDB engine has already solved these problems with MySQL so we should be able to solve them. I thought we had a Jira for this already but I can't find it. In the mean time the NEXTVALUE column in calpontsys.syscolumn can get the next autoincrement value. | ||||||||||||||
| Comment by MG [ 2017-08-11 ] | ||||||||||||||
|
On a related note, INSERT of NULL to the ai column gives a warning: MariaDB [mgtest]> insert into ai select null, null; MariaDB [mgtest]> show warnings;
--------
-------- MariaDB [mgtest]> select * from ai;
---
--- | ||||||||||||||
| Comment by Andrew Hutchings (Inactive) [ 2017-12-04 ] | ||||||||||||||
|
We should implement full auto increment support. Each UM needs to have offset/increment set in server variables with one spare for cpimport. |