Support non-strict SQL modes
- Dominant language
- Go
- Stars
- 24.4k
- Forks
- 873
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 121
Description
Dolt currently behaves similarly to MySQL with `STRICT_TRANS_TABLES` mode enabled, which means (among other things) that trying to insert a value outside the accepted range for a column, like a `VARCHAR` with more than the allowed characters, returns an error and aborts the transaction. MySQL 8.0 runs in `STRICT_TRANS_TABLES` by default, but older versions of MySQL ran in a mode that would silently truncate such values to fit the column and log a warning. You can still get this behavior in MySQL by tuning the SQL mode, but Dolt doesn't respect these settings.
See https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sqlmode_strict_trans_tables for more information.
Related: https://github.com/dolthub/dolt/issues/2162
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by comparing Dolt's current SQL-mode behavior with the linked MySQL SQL-mode documentation and related issue #2162. Trace where SQL mode is configured and where out-of-range inserts are validated; done means the relevant non-strict setting is honored with truncation and warnings rather than an aborted transaction, with coverage for the example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, mysql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100