Merged PRs
dolt
- 6389: fix panic in
dolt_history_<table>
Thedolt_history_...
table derives its schema from the base table + 3 additional columns historyTableSchema().
However, when we have a projection over the table, the schema returned fromHistoryTable.Schema()
is trimmed to only the columns we look at. This is problematic when we're join planning as we look over all indexes and panic when we find an index over a column that isn't in the schema; in this case, it's the Primary key.
By havingHistoryTable
implementPrimaryKeySchema
, we can return a schema with all the columns, and the index picking portion of join planning works.
Fix for: #6382
go-mysql-server
- 1896: Stubbing out new Handler function to prep for supporting
ANSI_QUOTES
SQL mode
PR dolthub/vitess#256 adds support at the Vitess layer for parsing SQL statements usingANSI_QUOTES
SQL mode, where double quotes are used as identifier quotes, and not string literal quotes. This change updates the implementations ofmysql.Handler
for the new function needed to parse prepared statement commands withANSI_QUOTES
mode. A future PR will enable the ability to turn on theANSI_QUOTES
support in Vitess. - 1892: Fix panic for
WHERE
filter overSHOW VARIABLES
Fix for: #6379 - 1891: Left pad odd length hex strings
Fixes #6351
If hex string v is of odd length, prepend an "0" before passing it to Go's DecodeString.
I've changed the implementation to use DecodeString, but if keeping this as a byte array is preferred, I'll switch back. - 1890: Fix panic when selecting unsigned number columns via driver
Calling thereflect.Value.Int()
on an unsigned typed value will panic.
Thereflect.Value.Uint()
must be used. - 1889: Recost LookupJoins to remove special casing for indexes where every column is used in a filter.
The only joins that are affected by this recosting are joins that use an index where every column in the index has a key expression, but we can't prove that lookups are constant.
We currently special case this, giving these a slightly elevated priority over joins that don't use every column in the index (and we can't prove that lookups are constant.)
So for example a lookup with one key expression on an index with one column ends up being preferred over say, a lookup with three key expressions on an index with four columns, even though it looks like in practice the latter is a more efficient join. Removing this special casing resulted in improved plans in specific client queries.
Most of the changed plans in this PR are workarounds for dolthub/go-mysql-server#1893, dolthub/go-mysql-server#1894, and dolthub/go-mysql-server#1895. A few are actually better plans than we were previously generating. - 1882: Add dynamic privilege CLONE_ADMIN
vitess
- 256: Support
ANSI_QUOTES
parsing mode
TheANSI_QUOTES
SQL mode changes the behavior of the double quote character. By default in MySQL,ANSI_QUOTES
is not enabled and the double quote character is used to quote string literals. WhenANSI_QUOTES
is enabled, the double quote character may only quote identifiers. TheANSI_QUOTES
mode does not change the behavior for backtick quote chars (they always quote identifiers) or single quote chars (they always quote string literals).
MySQL Reference Docs for ANSI_QUOTES
Related to: #6305 (This is the first step towards supportingANSI_QUOTES
mode in Dolt/GMS)
GMS PR dolthub/go-mysql-server#1896 stubs out the newHandler
interface function, but actually usingANSI_QUOTES
mode in Dolt or GMS won't be possible until a few more changes to Dolt/GMS. - 250: support
LATERAL
syntax
syntax for: #6194