This release contains backwards incompatible changes:
Dolt CREATE TABLE
and ALTER TABLE
statements enforce maximum row lengths for schemas. A preexisting schema with columns that sum to a row length greater than the maximum allowable will continue to work in-place, but will need to be migrated to a valid schema before Dolt will accept other schema alterations. A multi-alter statement can change several VARCHAR columns to either (1) shorter VARCHARs or (2) TEXT columns with a serializable maximum length.
Per Dolt’s versioning policy, this is a minor version bump because these changes may impact existing applications. Please reach out to us on GitHub or Discord if you have questions or need help with any of these changes.
Merged PRs
dolt
- 7544: schema validator impl
Allow alter statements on tables with bad schemas.
companion: dolthub/go-mysql-server#2348 - 7537: Fixed handler bug related to ExtendedTypes
- 7533: [store] row length guards for prolly serial messages
Prevent writing rows that exceed the prolly serial message max size. When writing fields we use the current buffer size, the new field length, and the serial message metadata size to validate inserts.
fixes: #7487
fixes: #7524
companion: dolthub/go-mysql-server#2342 - 7507: [stats]: fix panic for empty table stats with one root chunk
There's one root chunk for an empty table that needs special handling because there is no histogram bucket for it.
go-mysql-server
- 2350: [planbuilder] Limit allows unsigned ints
Parameterizing limits in stored procedures exposed a bug where we weren't accepting unsigned ints in LIMIT/OFFSET. This is only possible in prepared or stored procedure contexts afaik. - 2348: Optional integrator schema validation
Move table schema validation so that we validate the accumulated result rather than sequential alters. - 2347: implement
json_depth()
MySQL Docs:
https://dev.mysql.com/doc/refman/8.0/en/json-attribute-functions.html#function_json-depth - 2346: fix null and empty paths for json functions
- 2345: Return correct MySQL error code when inserting into nonexistent columns.
Fixes dolthub/go-mysql-server#2344
This PR also adds a test framework for testing MySQL error codes, since this doesn't appear to currently be tested. This should make adding tests for other error codes easy.
Some of the MySQL error codes that I expected us to use (such as1050: ERTableExists
) have zero usages in GMS or Dolt. We're probably returning1105: ERUnknownError
for these. - 2343: fix json bool comparison
JSON Boolean values are special; they do not behave like normal when converted/compared against other types.
fixes #7528 - 2342: Add row length guards
Tests and basic engine-side guards similar to mysql's behavior.
re: #7524 - 2339: only use
crosshashjoin
on subqueryaliases
This fixes 2 sqllogictests. - 2319: Add net.Listener as server config option
Presently go-mysql-server is served by anet.Listener
backed by a real port or socket. In some environments (like testing) we want to avoid the host's networking stack entirely. This changeset adds support for the caller to provide thenet.Listener
, which gives them full control over where the sever serves.
This opens the door for some cool workflows. For example, you can run the server using a buffer-basednet.Listener
implementation (which is what happens in the test that I added).
I landed on this solution while thinking through dolthub/go-mysql-server#2314
vitess
- 313: supports
FROM s.account
, in whichaccount
is non-reserved keyword - 311: add syntax support for
SELECT ... INTO OUTFILE ...
options
We had parser support forSELECT ... INTO OUTFILE
, but were lacking parser support for the variety ofOUTFILE
options.
This PR adds support for all the options and certain combinations of them.
However, we are missing support for duplicate options and certain orderings of these options; tests for these are added as error tests with a TODO.
MySQL Docs:
https://dev.mysql.com/doc/refman/8.0/en/select-into.html
MariaDB Docs (this has the actual grammar):
https://mariadb.com/kb/en/select-into-outfile/
Closed Issues
- 7458: Any chance to get dynamic parameters for user procedures?
- 7524: Large row sizes panic on insert
- 7487: Rows that are too large will panic
- 2349: Foreign key constraints break auto-incrementing ids in memory mode
- 2344: Server error message compatibility when doing INSERT
Performance
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 2.11 | 3.07 | 1.5 |
groupby_scan | 13.22 | 18.61 | 1.4 |
index_join | 1.32 | 5.28 | 4.0 |
index_join_scan | 1.25 | 2.18 | 1.7 |
index_scan | 33.72 | 64.47 | 1.9 |
oltp_point_select | 0.17 | 0.47 | 2.8 |
oltp_read_only | 3.36 | 7.98 | 2.4 |
select_random_points | 0.32 | 0.77 | 2.4 |
select_random_ranges | 0.39 | 0.92 | 2.4 |
table_scan | 33.72 | 64.47 | 1.9 |
types_table_scan | 74.46 | 173.58 | 2.3 |
reads_mean_multiplier | 2.2 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
oltp_delete_insert | 7.98 | 6.91 | 0.9 |
oltp_insert | 3.75 | 3.43 | 0.9 |
oltp_read_write | 8.43 | 15.83 | 1.9 |
oltp_update_index | 3.82 | 3.55 | 0.9 |
oltp_update_non_index | 3.82 | 3.49 | 0.9 |
oltp_write_only | 5.37 | 7.98 | 1.5 |
types_delete_insert | 7.7 | 7.7 | 1.0 |
writes_mean_multiplier | 1.1 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 101.41 | 22.63 | 5.5 |
tpcc_tps_multiplier | 5.5 |
Overall Mean Multiple | 2.93 |
---|