Merged PRs
dolt
- 8367: mark unscoped commit index as not unique
The index defined over thecommit_hash
column was marked as unique, when it definitely is not.
Along with fix from dolthub/go-mysql-server#2665
fixes #8365 - 8363: \edit support in
dolt sql
shell
Enable users to edit multiline queries in their EDITOR of choice. This is awkward to test, so punting on that for the time being. - 8359: More flexible
diff
printing when schema changes type of column
This partially addresses an old bug described in the fixed issue. There are certainly more complete solutions, but this seems like the right amount of effort for something pretty edge casey.
Fixes: #8133 - 8356: Compare strings with
strings.EqualFold
This PR fixes a Staticcheck warning (https://staticcheck.dev/docs/checks/#SA6005). Comparing two strings to the same case withstrings.ToLower
andstrings.ToUpper
is more computational expensive thanstrings.EqualFold
.
Sample benchmark:Result:func BenchmarkToUpperSingle(b *testing.B) { for i := 0; i < b.N; i++ { if strings.ToUpper("foobar") != "FOOBAR" { b.Fail() } } } func BenchmarkToUpperDouble(b *testing.B) { for i := 0; i < b.N; i++ { if strings.ToUpper("foobar") != strings.ToUpper("FOOBAR") { b.Fail() } } } func BenchmarkToLowerSingle(b *testing.B) { for i := 0; i < b.N; i++ { if strings.ToLower("FOOBAR") != "foobar" { b.Fail() } } } func BenchmarkToLowerDouble(b *testing.B) { for i := 0; i < b.N; i++ { if strings.ToLower("FOOBAR") != strings.ToLower("foobar") { b.Fail() } } } func BenchmarkEqualFold(b *testing.B) { for i := 0; i < b.N; i++ { if !strings.EqualFold("FOOBAR", "foobar") { b.Fail() } } }
goos: linux goarch: amd64 pkg: github.com/dolthub/dolt/go cpu: AMD Ryzen 7 PRO 4750U with Radeon Graphics BenchmarkToUpperSingle-16 9589896 113.8 ns/op 8 B/op 1 allocs/op BenchmarkToUpperDouble-16 7097330 155.9 ns/op 8 B/op 1 allocs/op BenchmarkToLowerSingle-16 12346219 106.5 ns/op 8 B/op 1 allocs/op BenchmarkToLowerDouble-16 8084006 143.6 ns/op 8 B/op 1 allocs/op BenchmarkEqualFold-16 63650023 18.76 ns/op 0 B/op 0 allocs/op PASS ok github.com/dolthub/dolt/go 6.456s
- 8347: Bug fixes for schema names in reset operation
Also factored some methods into the procedure to make it readable - 8305: Support for signed commits.
go-mysql-server
- 2665: Fix FunctionalDependencies for NonUnique, NonNull indexes on Server
When using the server engine, we return an error for indexes defined over non-unique not null columns.
This meant that filters over these columns would incorrectly return error when there were duplicate entries.
Oddly, this only happens on server engine and not using dolt sql-shell directly.
The bug stems from a missing check when gathering functional dependencies for equalities.
Related: #8365 - 2664: Updated go-icu-regex
- 2663: [stats] convert binary to string for stats bound rows
tests on Dolt side for round-trip serialization: #8361 - 2662: implement
charset()
function
MySQL Docs: https://dev.mysql.com/doc/refman/8.4/en/information-functions.html#function_charset
vitess
- 365: parse vector index syntax
Supports the following syntax:create table t (v blob, vector index(v))
create vector index vec on t(v)
alter table t add vector index vec on t(v)
- 363: support syntax for get_format
MySQL Docs: https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html#function_get-format