Merged PRs
dolt
- 7553: go/store/datas/pull: Create a PullChunkTracker for keeping track of what to pull.
The PullChunkTracker is an optimization which can concurrently call HasMany on the destination database while chunks are being pulled from the source database.
go-mysql-server
- 2368: support
JSON_MERGE()
andJSON_MERGE_PATCH()
MySQL Docs: - 2367: implement
JSON_OVERLAPS()
MySQL Docs:
https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#function_json-overlaps - 2366: Update README with latest sample code from _example/main.go
The latest release ofgo-mysql-server
requires a different way of instantiating the database server. Notably, a function that provides sessions must now be provided.
This change updates our README with the latest working example code from_example/main.go
.
Related to dolthub/go-mysql-server#2364 - 2365: implement
random_bytes()
MySQL Docs:
https://dev.mysql.com/doc/refman/8.0/en/encryption-functions.html#function_random-bytes - 2362: Feature:
last_insert_uuid()
function
UUIDs are often used in place ofauto_increment
IDs, but MySQL doesn't provide an easy way to get the last generated UUID that was used in an insert. This change introduces a new function,last_insert_uuid()
that operates similarly tolast_insert_id()
. For a column identified as a UUID column, callers can uselast_insert_uuid()
to retrieve the last generated UUID value that was inserted into that column. In order to be considered a UUID column, a column must be part of the primary key and it must meet one of the following type signatures:VARCHAR(36)
orCHAR(36)
with a default value expression ofUUID()
VARBINARY(16)
orBINARY(16)
with a default value expression ofUUID_to_bin(UUID())
(optionally, theswap_flag
forUUID_to_bin
may also be specified)
Example usage:
Related to #7547create table t (pk binary(16) primary key default (UUID_to_bin(UUID())), c1 varchar(100)); insert into t (c1) values ("one"), ("two"); select last_insert_uuid(); select c1 from t where pk = uuid_to_bin(last_insert_id());
- 2361: implement
ADDDATE()
MySQL Docs:
https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_adddate - 2360: fix special case for
now()
string
The BATS testsimport-mysqldump.bats
was failing due to a recent string replace case added by dolthub/go-mysql-server#2357.
I didn't account for whenNOW()
would be used with other functions inside aDEFAULT
column expression, and was replacing the"NOW("
with"CURRENT_TIMESTAMP("
. This was causing problems as we reparse ColumnDefaultExprs, resulting in unparenthesized default expressions, which threw an error. - 2359: unskip fixed tests
There are some tests that are fixed, but we haven't unskipped them.
Additionally, this cleans up the way we skip certain tests so that it is more consistent. - 2357: fix
ON UPDATE CURRENT_TIMESTAMP
precision
I had mistaken assumed that MySQL did not allow any precision arguments forNOW()
(and synonyms) for columnDEFAULT
andON UPDATE
expressions. It turns out MySQL only requires that the column type precision match the expression.
Additionally, we did not perform these error checks forDEFAULT
expression, so now we do.
fixes #7555 - 2351: implement
JSON_TYPE()
MySQL Docs:
https://dev.mysql.com/doc/refman/8.0/en/json-attribute-functions.html#function_json-type
Companion PR:
dolthub/vitess#314
vitess
Closed Issues
- 7561: "Data length" (i.e., table size on disk) value in DBeaver appears to be wrong
- 7555: Got "Invalid ON UPDATE clause" after bump to v0.18.0
- 3403: Support Shallow Clone
- 6982: Investigating TPCC perf
- 7371: Crash by
INNER JOIN
- 2364: Panic when executing sql statements from external command line tool after startup
- 2341: Does it support
Functional Key Parts
index ? - 2349: Foreign key constraints break auto-incrementing ids in memory mode
- 1157: show index from table_name doesn't include primary key
- 1340: Hangs on TPC-H Query 1
- 399: sql.FilteredTable usage and implementation
- 514: benchmark memory db
- 807: Documentation of some interfaces and some important concepts
- 1567: navicat connect DB but can not edit
- 2213: UPDATE statements are Noop
- 2215: any plan to build new release?
Performance
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 2.11 | 3.02 | 1.4 |
groupby_scan | 13.46 | 18.61 | 1.4 |
index_join | 1.34 | 5.37 | 4.0 |
index_join_scan | 1.25 | 2.18 | 1.7 |
index_scan | 34.33 | 63.32 | 1.8 |
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 | 34.33 | 63.32 | 1.8 |
types_table_scan | 75.82 | 170.48 | 2.2 |
reads_mean_multiplier | 2.2 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
oltp_delete_insert | 7.98 | 7.04 | 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.62 | 0.9 |
oltp_update_non_index | 3.82 | 3.55 | 0.9 |
oltp_write_only | 5.37 | 7.98 | 1.5 |
types_delete_insert | 7.7 | 7.84 | 1.0 |
writes_mean_multiplier | 1.1 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 103.25 | 23.96 | 5.0 |
tpcc_tps_multiplier | 5.0 |
Overall Mean Multiple | 2.77 |
---|