Expanded the comment for the \!ok case to explain the specific reasons why
we fail-open when no auto-increment column is found:
1. Table transitional state during ALTER TABLE operations
2. Cannot determine overflow risk without target column type
3. Better to allow increment and let higher-level validation handle issues
4. Prevents breaking legitimate ALTER TABLE ADD auto-increment operations
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Test overflow protection for TINYINT, SMALLINT, MEDIUMINT, INT, and BIGINT
- Verify correct AUTO_INCREMENT value display at maximum values
- Verify proper duplicate key error (not overflow error) at boundaries
- Covers Issue #9530 comprehensively across all supported integer types
- Correct canIncrementAutoIncVal to return false when no auto-increment column exists
- Add comprehensive bats test for TINYINT overflow scenario (Issue #9530)
- Test verifies correct AUTO_INCREMENT value display and duplicate key error behavior
- Matches MySQL behavior exactly
Inlined bounds checking logic directly where used instead of helper function:
- Removed canIncrementAutoIncVal() helper function from table.go
- Inlined logic in table_editor.go Insert method (2 locations)
- Inlined logic in table.go AddColumn method (1 location)
- Used existing colType.Convert() pattern for type checking
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fixesdolthub/dolt#9556
The issue was in dolt's JSON path parser where unnecessarily quoted
simple field names like $."a" were being rejected, despite MySQL
accepting them. This caused compatibility issues with Django's
compile_json_path() function which always quotes keys.
Changes:
- Fixed lexer in json_location.go to properly handle quoted field names
- Adjusted token position when encountering opening quotes
- Corrected empty string detection logic for quoted keys
- Added comprehensive tests matching the customer's use case
The fix ensures MySQL compatibility for:
- $.a (unquoted field names)
- $."a" (unnecessarily quoted simple field names)
- $."a key" (necessarily quoted field names with spaces)
- $."a"."b" (nested quoted field names)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Previously auto gc would run anytime the store had grown 128MB. This change adds some simple heuristics which are used to keep auto gc from running when it is unlikely to collect much relative to the amount of work it will need to do.
In particular, the heuristics added are:
1) After GC has run, we will not run another GC until as much time as elapsed since the end of the GC as it took to run the GC itself.
2) After GC has run, we will not run another GC until the store has grown in size by at least as many bytes as the new gen contained at the end of the last successful GC run.
Dolt previously leaked a file descriptor on certain platforms every time stats was garbage collected. By closing the DoltDB, we no longer leak the descriptor.
Closing is currently best effort, since certain in-flight file operations can actually cause closing to fail.