Merged PRs
dolt
- 6068: Add support for parquet as an output format for
dolt sql
Adds support for outputting the results of queries as parquet data. For example,dolt sql -r parquet -q "select * from mytable;" > out.parquet
will select all rows frommytable
, output them to stdout as parquet data, and redirect that output to theout.parquet
file.
go-mysql-server
- 1804: Reworked implicit PK handling for referenced foreign keys
Builds on dolthub/go-mysql-server#1798, introduces an interface which exposes internal (and implicit) primary keys on indexes. Not all integrators will have the functionality, so it's an optional interface to expand compatibility. Also quite a bit simpler. - 1803: Added "utf8mb3_czech_ci" collation, fixed missing collation check for enum/set
Fixes dolthub/go-mysql-server#1801
Adds the requested collation, and fixes the panic. The panic came from an oversight when checking for a collation's implementation.enum
andset
use the collation during type creation, which occurs before we've verified the collation's implementation. The other string types do not use the collation during type creation, so we return the appropriate error as a result. - 1802: Update README.md to sync with _example/main.go
- 1799: show all indexes, and prevent creating indexes named
'primary'
We had some logic inSHOW CREATE TABLE
to preventPRIMARY KEY
s from showing up twice in because they are within tables IndexCollection. This logic relied on checking if all the columns in the index were part of the Primary Key. MySQL allows and showsSECONDARY INDEXES
that are identical to the primary key. It appears to differentiate them by naming the PK index "PRIMARY". Additionally, MySQL prevents users from creatingSECONDARY INDEXES
named"primary"
.
MySQL names PK index Primary
fix for: #6049 - 1798: include primary key in index mapping for foreign keys
MySQL does some behind the scenes magic and appends the primary key columns to secondary indexes.
This creates not obvious prefixes on secondary indexes for foreign keys.
A plus is that we save on creating secondary indexes when we don't need to.
Note: it appears this special prefix matching applies when looking for a secondary index on the referenced table, but not on the child table itself.
Fix for: #6038 - 1796: Added a method to SystemVariable to let them be compared using their underlying types, used to this to fix least / greatest not working with system vars
Fixes #6022 - 1779: Add extra filters to AntiJoin to guarentee correct behavior around NULLs.
This is a correctness fix: generating AntiJoins is not currently equivalent to MySql if either column being used in thenot in
expression contains NULL.
This will break a lot of regression tests. If this doesn't break Turbine's tests, we should submit this while we work on a fix.
vitess
- 241: Walking sub-nodes for
SHOW TABLE
statements
When preparing aSHOW TABLES
statement with a bound variable in the filter clause (e.g.SHOW TABLES FROM mydb WHERE Tables_in_mydb = ?;
) GMS and Vitess were identifying the bound variable parameters differently and causing the SQL client on the other end to panic. Vitess code inconn.go
walks the parsed tree and looks forSQLVal
instances to identify the parameters and then returns that metadata over the SQL connection. TheSHOW TABLES
statement above fails because thesqlparser
AST wasn't including all the members ofSHOW TABLES
node in the walk. This case is a little tricky to test directly in go-mysql-server, because it only repros in a running sql-server when running over a Vitessconn
.
The GMS and Vitess layers are both calculating bind variable metadata, with two different techniques, and whenever they get out of sync, we will see issues like this that only appear when running over a SQL connection. Longer term, we may want consider allowing GMS to return its bind variable metadata and avoid Vitess needing to re-calculate it, if we see more instances of this problem.
Fixes: dolthub/go-mysql-server#1793 - 238: Fix for charset introducers in default values
Fixes #5970 by adding an additional default expression rule that handles charset introducers.
Closed Issues
- 6038:
Missing index for foreign key
error duringCREATE TABLE
- 6049: Created index missing in
SHOW CREATE TABLE
anddolt dump
output - 1801: Creating an enum column with collation utf8_czech_ci causes panic
- 1793: PrepareStatement got incorrect paramsCount in response packet from mock mysql server.
Latency
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 1.93 | 2.71 | 1.4 |
groupby_scan | 12.3 | 16.71 | 1.4 |
index_join | 1.16 | 4.1 | 3.5 |
index_join_scan | 1.12 | 2.11 | 1.9 |
index_scan | 30.26 | 53.85 | 1.8 |
oltp_point_select | 0.14 | 0.46 | 3.3 |
oltp_read_only | 2.81 | 7.98 | 2.8 |
select_random_points | 0.3 | 0.77 | 2.6 |
select_random_ranges | 0.35 | 1.06 | 3.0 |
table_scan | 30.81 | 53.85 | 1.7 |
types_table_scan | 69.29 | 170.48 | 2.5 |
reads_mean_multiplier | 2.4 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
bulk_insert | 0.001 | 0.001 | 1.0 |
oltp_delete_insert | 4.91 | 5.99 | 1.2 |
oltp_insert | 2.43 | 2.97 | 1.2 |
oltp_read_write | 6.43 | 15.27 | 2.4 |
oltp_update_index | 2.48 | 3.02 | 1.2 |
oltp_update_non_index | 2.48 | 2.97 | 1.2 |
oltp_write_only | 3.55 | 7.7 | 2.2 |
types_delete_insert | 5.18 | 6.79 | 1.3 |
writes_mean_multiplier | 1.5 |
Overall Mean Multiple | 2.0 |
---|