Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.8.3
-
None
-
Windows 10 64 bit Pro Desktop (V21H2). Running on a i9 mini with 2x2 Tb M2SSDs and 32 Gb RAM
Description
See my question to Experts Exchange for the full details and my workaround
https://www.experts-exchange.com/questions/29245628/BUG-IN-MARIADB-AUTOINC-FUNCTION.html
Short version: On importing blocks of 10000 CSVs using a LOAD DATA script run from a batch file, the first block will be numbered correctly. The first row in the second block will skip exactly 6183 numbers (as though the auto_increment value was reset by that amount)
I discovered by trial and error that if I tried, prior to the next upload, to reset the auto_increment value manually (through the HEIDI SQL UI) the next block would be numbered correctly. If I imported the block after that WITHOUT such intervention, it would arrive with its first number having skipped the same 6183.
As I'm trying to build a table with 300 million rows, manual intervention wasn't an option so I discovered that, if before triggering the next upload, I calculate correct auto_increment value and issue the command:
ALTER TABLE `hash_chain` AUTO_INCREMENT=[whatever I've just calculated]
that has the same effect as the manual intervention and the numbering appears as it should.
(medium whinge: it took me 3 days to get that line to work because NOWHERE could I find any hint that we needed to use that eclectic punctuation. Maria's own guide https://mariadb.com/kb/en/auto_increment/ doesn't even use punctuation and all the examples I could find were using either no punctuation or standard quote marks instead of those "diacriticals". I only discovered by forensically examining the code HEIDI produced when I did the manual intervention.)
The important point, of course, is that this kludge simply shouldn't be necessary and I can find no evidence that anyone else has reported similar behaviour.
If required, because the data is entirely anonymous, (and changes every time I build it) I'm happy to provide a few sample csvs and the code I use to run the import, for others to try to recreate the problem.
Attachments
Issue Links
- is duplicated by
-
MDEV-29788 Auto Increment Function Broken (revived issue)
- Closed
- relates to
-
MDEV-27844 Set innodb_autoinc_lock_mode=2 by default, and deprecate it
- Stalled