The system variable is read-only. The only way to enable Auto GC remains setting:
behavior:
auto_gc_behavior:
enable: true
in the config.yaml file which is given to `dolt sql-server` in its `--config` parameter.
A bug in the usage of dynassert meant that clone() was always opening a new table file, instead of using the existing open file.
There were a few known consequences:
* the window of opportunity when unlocked reads could try to read a closed chunk source and receive an error was much larger than typical. As a result, auto_gc on a standby replica in a cluster was much more likely to fail spuriously.
* the number of file descriptors a running server would churn was higher than typical, and some operations were a bit slower / more prone to context switches than they needed to be.
This PR also updates some errors to be slightly more verbose about their origin.
This PR also updates TestAutoGC in go-sql-server-tests to run less iterations in CI and in -test.short mode. The iterations should be able to be lower since auto GC will fail less often now.
The previous implementation incorrectly advanced auto-increment counters
during INSERT expression evaluation, causing failed INSERT operations
to advance the counter. This resulted in auto-increment ID mismatches
in CI tests (expected InsertID: 1,2 but got 3,4).
Fixed by:
- Extracting the actual auto-increment value from the sqlRow
- Only advancing the counter after successful INSERT operations
- Properly coordinating between expression evaluation and storage layers
This ensures failed INSERT operations do not advance auto-increment
counters, matching MySQL behavior exactly.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Fixed test expectations to match enhanced error messages with column names
- Updated script tests to expect 'Data truncated for column 'e'' instead of empty string
- Fixed SET statement result expectations in insert ignore tests
- All enum-related tests now pass with improved error message format
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>