Merged PRs
dolt
go-mysql-server
- 2387: exit early when
IF NOT EXISTS
and table exists
This PR addresses various issues related toCREATE TABLE IF NOT EXISTS ...
queries.
Before, we simply ignored the table exists error, and continued creating indexes, foreign keys, and checks.
This led to errors when attempting to create indexes/foreign keys/checks that already exists.
Additionally, it would errorneously create indexes/foreng keys/checks that did exist.
The correct behavior is to do nothing ifIF NOT EXISTS
is specified and the table exists.
Also this contains some refactors and simplifications.
fixes #7602 - 2386: ignore large tokens in fulltext indexes
We were panicking when attempting to insert/delete tokens that exceed the column type length.
It appears as though MySQL simple ignores these tokens.
fixes: #7593 - 2385: optimize sql.HashOf
- pool *xxhash.Digest objects
- use fmt.Fprintf to write to hash
benchmark stats
oos: linux goarch: amd64 pkg: github.com/dolthub/go-mysql-server/sql cpu: AMD Ryzen 9 7900 12-Core Processor │ b1 │ b2 │ │ sec/op │ sec/op vs base │ HashOf-24 79.65n ± 4% 70.86n ± 7% -11.03% (p=0.002 n=6) ParallelHashOf-24 10.47n ± 4% 11.85n ± 19% ~ (p=0.368 n=6) geomean 28.88n 28.98n +0.32% │ b1 │ b2 │ │ B/op │ B/op vs base │ HashOf-24 4.000 ± 0% 0.000 ± 0% -100.00% (p=0.002 n=6) ParallelHashOf-24 4.000 ± 0% 0.000 ± 0% -100.00% (p=0.002 n=6) geomean 4.000 ? ¹ ² ¹ summaries must be >0 to compute geomean ² ratios must be >0 to compute geomean │ b1 │ b2 │ │ allocs/op │ allocs/op vs base │ HashOf-24 2.000 ± 0% 0.000 ± 0% -100.00% (p=0.002 n=6) ParallelHashOf-24 2.000 ± 0% 0.000 ± 0% -100.00% (p=0.002 n=6) geomean 2.000 ? ¹ ² ¹ summaries must be >0 to compute geomean ² ratios must be >0 to compute geomean
- 2383: promote string lookup range types
When performing range lookups, we convert the key to the type of the column.
The conversion throws an error when the key doesn't fit within the type for the index.
The fix is to promote these (only for StringType) so the ranges fit.
There were issues withtype.Promote()
for all types.
Additionally, there are some inconsistencies with MySQL when performing these checks with NUL characters (\0
). They are skipped tests for now.
related #7588 - 2382: add support for
json_pretty
MySQL Docs:
https://dev.mysql.com/doc/refman/8.0/en/json-utility-functions.html#function_json-pretty - 2381: [memory] force mutating the editAcc AutoInc because tableEditor is unreliable
I can't figure a clean way to get the insert editor's edit accumulator and table editor data in sync when a self-referential foreign key initializes the session editor during analysis. So I just forced us to mutate the edit accumulator's auto increment id, which should prevent bugs of the kind we've been seeing. Zach might have a better understanding of how this should work.
fixes: dolthub/go-mysql-server#2369
vitess
- 319: make constraint name optional for primary key
fixes #7601 - 318: Support for more binlog statements
Adding parsing support for:- show replicas
- show binary logs
- show binary log status
- 315: support binary charset in table option
This PR addsbinary
as a valid charset option.
Additionally, this changesCHARSET
to expand to synonymCHARACTER SET
for parsing in GMS.
fixes #7576
Closed Issues
- 7593: Panic is Wikipedia import cause by a Replace into a table with Full text indexes
- 7602: Conditionally creating a table in a script produces index already exists error
- 7601: One more issue related to the Adobe Commerce ( Magento ) installation.
- 7588: Select statement throwing too large for column error
- 2369: Self-referencing foreign key constraint breaks auto-incrementing ids in memory mode
Performance
Read Tests | MySQL | Dolt | Multiple |
---|---|---|---|
covering_index_scan | 2.11 | 3.02 | 1.4 |
groupby_scan | 13.46 | 18.28 | 1.4 |
index_join | 1.34 | 5.18 | 3.9 |
index_join_scan | 1.25 | 2.14 | 1.7 |
index_scan | 33.72 | 63.32 | 1.9 |
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 | 33.72 | 63.32 | 1.9 |
types_table_scan | 74.46 | 173.58 | 2.3 |
reads_mean_multiplier | 2.2 |
Write Tests | MySQL | Dolt | Multiple |
---|---|---|---|
oltp_delete_insert | 7.98 | 6.91 | 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.55 | 0.9 |
oltp_update_non_index | 3.82 | 3.49 | 0.9 |
oltp_write_only | 5.37 | 7.98 | 1.5 |
types_delete_insert | 7.7 | 7.7 | 1.0 |
writes_mean_multiplier | 1.1 |
TPC-C TPS Tests | MySQL | Dolt | Multiple |
---|---|---|---|
tpcc-scale-factor-1 | 100.71 | 23.38 | 5.4 |
tpcc_tps_multiplier | 5.4 |
Overall Mean Multiple | 2.90 |
---|