Merged PRs
dolt
- 7336: Fixed spurious error message for event scheduling when the dolt_schem…
…as table doesn't exist.
go-mysql-server
- 2267: Fix
HASH IN <tuple>
when comparing against collated string types
This PR changes theHASH IN
to always use a collation to hash the values in the case that we compare a numerical type against a collated string type.
fixes #7338 - 2266: Field response packets MySQL consistency improvements
While debugging a customer issue, I noticed that Dolt/GMS has several details in the field metadata packets that differ from MySQL's behavior. This PR fixes the following differences:- flags are now populated for nullability, unsigned types, blobs
- column names for projected system variables now only include the variable scope when it was explicitly specified in the query
@@max_allowed_packet
should be an unsigned integer type
Vitess PR: dolthub/vitess#302
- 2264: implement
octet_length()
function
This PR implementsOCTET_LENGTH()
, which is just a synonym forLENGTH()
MySQL Docs: https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_octet-length - 2258: implementing
quarter()
function
This PR adds support for theQUARTER()
function, which tells the quarter from the provided date.
MySQL Docs: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_quarter - 2256: implementing
ORD()
function
This PR adds support for theORD()
function in MySQL, which converts a unicode character into its numerical representation.
In the case ofSTRINGS
, only the leftmost unicode character is evaluated.
Additionally, this PR fixes the bool -> string coversion to match MySQL.
MySQL Docs: https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_ord
Also fixes: #7323 - 2255: implementing
CHAR()
function
This PR implements most ofCHAR()
functionality.
Additionally, this fixes an overflow issue withUINT32
andUINT64
By default, we display Bit Strings inutf8mb4
, while you need to useUSING
in MySQL.
WithoutUSING
the bit strings are supposed to show up as hexadecimal values.
MySQL Docs: https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_char - 2212: Join estimation algos
Code and tests related to estimating output distributions for joins. Limited to numeric types.
vitess
- 303: Add parser support for the
ALTER USER
statement
Adds support for parsingALTER USER
statements (MySQL reference). First step towards allowing users to change passwords.
Related to: #7348 - 302: Detect if a system variable scope was explicitly specified or not
Changes theVarScope
function so that it returns whether a scope was explicitly specified, or if one has been inferred.
This is needed because some tooling (e.g. the official MySQL .NET Connector library) will query system variables (e.g.SELECT @@max_allowed_packet
) and then will look up the returned value in the result set using the expected column name (@@max_allowed_packet
). Currently, from the way we parse the system variable, this was always returned with the scope present, but to match MySQL's behavior, the column name needs to match the requested name.
Related GMS PR: dolthub/go-mysql-server#2266 - 301: support special syntax for
position()
This PR adds support forPOSITION(<expr1> in <expr2>)
, which is a synoynm forLOCATE(<expr1>, <expr2>);
MySQL Docs: https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_position - 300: custom
char()
syntax handling
In order to support the charset argument forCHAR(... using <charset>)
, there has to be special syntax support.
Companion PR: dolthub/go-mysql-server#2255 - 299: Define an ExtendedHandler interface to handle postgres specific interactions
These are pretty narrowly tailored for postgres prepared statements and long term should probably be placed in either doltgresql or another package. Defining them here is just expedient for experimenting with the new interfaces while they change.
Closed Issues
- 7343: Increasing Code Cov and integration zero-code tool for tests
- 7277: Implement SUBDATE
- 7338: Unexpected result when using Boolean in
IN
- 7275: Deleting from dolt_constraint_violations_ causes a panic when unique column constraint violation exists.
- 7322: Subquery in an INSERT statement return NULL