Dolt Versions Save

Dolt – Git for Data

v1.35.12

2 weeks ago

Merged PRs

dolt

  • 7792: Fix nil write session panic
  • 7790: chore: fix some function names
  • 7776: dolt_history tables: Issue a warning when types have changed Adding a session warning when dolt_history tables can't create a rowConverter for a row due to a field's type having changed. In these cases, the old value can't always be returned safely as the new type, so we return NULL and issue a session warning. In the future, we could attempt to convert the old value to the new type. Follow up to https://github.com/dolthub/dolt/pull/7771
  • 7766: chore: use errors.New to replace fmt.Errorf with no parameters
  • 7760: Support for multiple schemas in a database Companion PRs: https://github.com/dolthub/vitess/pull/338 https://github.com/dolthub/go-mysql-server/pull/2466 https://github.com/dolthub/doltgresql/pull/181 This PR is a proof of concept for addressing multiple table namespaces (schemas) in a database. This is to support schemas in Doltgres initially, but could also be used to implement storing multiple databases in the same Dolt commit graph if we wanted to do that. All tables are stored in the root's table map like always, but tables with non-empty schemas have that schema name prepended in its map key, surrounded by null bytes. There are lots of things that don't work yet. This is what does work:
    create schema mySchema;
    create schema otherSchema;
    CREATE TABLE mySchema.test (pk BIGINT PRIMARY KEY, v1 BIGINT);
    insert into mySchema.test values (1,1), (2,2);
    CREATE TABLE otherSchema.test (pk BIGINT PRIMARY KEY, v1 BIGINT);
    insert into otherSchema.test values (3,3), (4,4);
    SELECT * FROM mySchema.test;
    SELECT * FROM otherSchema.test;
    
    Things I specifically want feedback on:
    • I am not crazy about the sweeping changes to table-access interfaces in root_val.go. In particular it seems likely to cause errors over time as people forget to include schema names in code changes where necessary, silently breaking doltgres. Another option I considered was to introduce some sort of RootReader interface on top of root value, which you create with a particular schema name, and thereafter all table accesses reference the given schema. There may be places where we have to juggle multiple RootReader instances at once, rather than just asking for qualified table names from a single root. But this is the pattern I used for the boundary between GMS and Dolt and it worked well, so maybe it could work for root_val.go as well.

go-mysql-server

  • 2482: don't check schema compatibility for select into

    fixes: https://github.com/dolthub/dolt/issues/7781

  • 2481: aliasExpr inputExpression case-insensitive check This PR adds case-insensitive check for aliasExpr.InputExpression and expr.String() to determine the expr is referencable.

  • 2473: remove re-parsing select stmt in create view stmt Depends on https://github.com/dolthub/vitess/pull/339

  • 2466: Schema-qualified table names This PR also fixes a couple unrelated issues:

    • IMDB query plans are brought up to date (this is most of the change lines)
    • Fixed bugs in certain show statements (information_schema tests)

vitess

Closed Issues

  • 6064: Prevent Indexing JSON Fields
  • 7781: cannot convert type longtext COLLATE utf8mb4_0900_ai_ci to datetime
  • 2472: Parser support for PARTITION BY

Performance

Read Tests MySQL Dolt Multiple
covering_index_scan 2.07 3.02 1.5
groupby_scan 13.7 17.63 1.3
index_join 1.34 5.18 3.9
index_join_scan 1.27 2.26 1.8
index_scan 34.33 52.89 1.5
oltp_point_select 0.17 0.51 3.0
oltp_read_only 3.36 8.43 2.5
select_random_points 0.33 0.8 2.4
select_random_ranges 0.39 0.95 2.4
table_scan 34.33 53.85 1.6
types_table_scan 74.46 158.63 2.1
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 16.12 1.9
oltp_update_index 3.82 3.55 0.9
oltp_update_non_index 3.82 3.43 0.9
oltp_write_only 5.37 7.98 1.5
types_delete_insert 7.7 7.56 1.0
writes_mean_multiplier 1.1
TPC-C TPS Tests MySQL Dolt Multiple
tpcc-scale-factor-1 101.61 4.98 4.2
tpcc_tps_multiplier 4.2
Overall Mean Multiple 2.50

v1.35.11

3 weeks ago

Merged PRs

dolt

  • 7778: Bump mysql2 from 3.9.4 to 3.9.7 in /integration-tests/mysql-client-tests/node Bumps mysql2 from 3.9.4 to 3.9.7.
  • 7775: Allow updating conflict table even if the underlying table schema changed. This is an old check from before we had schema merge. I'm convinced that it was never actually needed. This PR has the necessary changes in order to remove it. It's important that the user is able to resolve data conflicts even if the table schema has changed, because otherwise it is not possible to manually resolve data conflicts after a schema merge. This PR also contains some additional tests, some of which are currently disabled because of https://github.com/dolthub/dolt/issues/7767 and https://github.com/dolthub/dolt/issues/7762
  • 7771: Don't generate new tags for column type changes Currently, when a column's type changes to a new type family (e.g. changing from varchar to int), we assign a new column tag. This prevents us from easily identifying the column across type changes. For example:
    • If column X is renamed and then its type is later changed, we can't track it across the rename or type change anymore. This usage pattern removes the value that column tags were intended to provide.
    • If column X changes its type, we can't easily differentiate between column X being dropped and a new column X being added. Heuristically, we can look at all the data in the table if it's all exactly identical, then we know it's a rename, but this is a somewhat hacky heuristic that can become ambiguous in more nuanced cases. This currently causes us to generate incorrect SQL patch statements that drops the renamed column and adds a new column. If customers were to apply these incorrect patch statements, it would drop all the data from their existing column, instead of converting it to the new type. This affects dolt_patch() and dolt diff -r sql and also prevents us from generating correct DDL statements for binlog replication. This PR changes schema alterations so that columns now retain their original column tag across type changes, which fixes the issues above. A side effect of this change is that if a customer is working on a branch, creates a column, and changes its type, the tag won't match if the schema on another branch is updated to the final type change (i.e. without going through the initial/intermediary type). Code was originally added for this case (see: https://github.com/dolthub/dolt/issues/3950), however, since then, we have added support for schema merging and this isn't an issue anymore. I've confirmed that we can successfully merge non-matching column tags, from both directions, and added a test for this case, too. Longer-term, I agree we should continue exploring removing tags completely, but in the short-term, this fixes a correctness problem with SQL patch statement generation that binlog support needs. Related to: https://github.com/dolthub/dolt/issues/6710#issuecomment-1734318087
  • 7769: AUTO_INCREMENT columns have NOT NULL constraint companion pr: https://github.com/dolthub/go-mysql-server/pull/2467
  • 7768: fix: fix function name
  • 7731: [nbs] getMany read planning and parallelize Add read planning for journal getMany so instead of doing randIO we get seqIO. SeqIO has a large effect for disk storage systems. Also parallelize getMany calls. The biggest change here is the semantics around how reading locks the journal file. Reads hold the journal lock for longer, which could lower write throughput in some cases. If we see evidence of this, we can do more work to limit the amount of time batch reads can interruptibly holding the journal lock.

go-mysql-server

  • 2468: Remove session mutex, status variables atomic inc Avoid concurrent ctx use in doQuery. I standardized the session status variables to uint64 to make it easier to have them be atomics. The return types for these variables in MySQL seem to be strings, so switching them from int640->uint64 seems OK. We could always change the presentation layer later. Removing the session mutex appears to be safe after these changes.
  • 2467: improve DESCRIBE columns and auto_increment bugs This PR makes it so our DESCRIBE statement is more correct when there are unique keys. There's an edge case we miss:
    create table t (i int not null, j int not null, unique key (j), unique key (i));
    describe t;
    
    In MySQL, UNIQUE KEY j is created before UNIQUE KEY i, so describe makes j as PRI. In Dolt, we store indexes in a map and return them in order of index name, so we mark i as PRI. There are skipped tests for this Additionally, this adds the NOT NULL constraint to columns that are marked AUTO_INCREMENT. partially addresses: https://github.com/dolthub/dolt/issues/2289
  • 2465: projection schema finds default values fixes: https://github.com/dolthub/dolt/issues/6016
  • 2464: skipping auto_increment on error tests I was wrong, this is very broken in dolt. Could not find a quick fix, so skipping tests to unblock auto-bumps. reopens: https://github.com/dolthub/dolt/issues/3157

vitess

  • 340: improving partition parsing partially addresses: https://github.com/dolthub/go-mysql-server/issues/2472
  • 337: Consistently using pointer to AliasedValues in InsertRows interface, never values. Once again, golang reminds me that a value type implementing an interface forces the pointer type to also implement the interface, and mixing the two messes up our runtime type reflection. I changed all uses of the AliasedValues in InsertRows interface to be pointers so that we can interact with them consistently on the GMS side.

Closed Issues

  • 3129: dolt login works with DoltHub, but not a DoltLab instance

Performance

Read Tests MySQL Dolt Multiple
covering_index_scan 2.11 3.02 1.4
groupby_scan 13.22 17.63 1.3
index_join 1.34 5.18 3.9
index_join_scan 1.27 2.26 1.8
index_scan 33.72 53.85 1.6
oltp_point_select 0.17 0.52 3.1
oltp_read_only 3.36 8.58 2.6
select_random_points 0.33 0.83 2.5
select_random_ranges 0.39 0.99 2.5
table_scan 34.33 54.83 1.6
types_table_scan 75.82 161.51 2.1
reads_mean_multiplier 2.2
Write Tests MySQL Dolt Multiple
oltp_delete_insert 7.84 6.79 0.9
oltp_insert 3.75 3.36 0.9
oltp_read_write 8.28 16.41 2.0
oltp_update_index 3.82 3.49 0.9
oltp_update_non_index 3.82 3.43 0.9
oltp_write_only 5.28 7.84 1.5
types_delete_insert 7.56 7.56 1.0
writes_mean_multiplier 1.2
TPC-C TPS Tests MySQL Dolt Multiple
tpcc-scale-factor-1 101.85 2.36 3.7
tpcc_tps_multiplier 3.7
Overall Mean Multiple 2.37

v1.35.10

4 weeks ago

Merged PRs

dolt

  • 7757: chore: fix some comments
  • 7739: Fix some comments
  • 7735: Bump mysql2 from 2.3.3 to 3.9.4 in /integration-tests/mysql-client-tests/node Bumps mysql2 from 2.3.3 to 3.9.4.
  • 7704: Implement traditional auto-increment lock mode hold the lock for the duration of the insert iter. Fixes https://github.com/dolthub/dolt/issues/7634 This is the dolt half of https://github.com/dolthub/go-mysql-server/pull/2439 This adds support for innodb_autoinc_lock_mode=0 ("traditional"). When this system variable is set, the engine will guarantee that every insert statement generates consecutive IDs for AUTO INCREMENT columns. This PR also allows the user to set innodb_autoinc_lock_mode=1 ("consecutive"), although the behavior is currently identical to "traditional". This is acceptable because both modes make the same guarantees (that each statement gets consecutive IDs), and the observed behavior is the same in almost all cases. (The "consecutive" contains an additional optimization: if there is a known upper bound on the number of IDs that must be generated for an insert, under "consecutive" mode the engine will just increment the counter by that upper bound and immediately release the lock. In places where not all of those IDs are actually used, the excess are wasted. This PR does not include that optimization. Thus, with this PR, traditional and consecutive behave the same.)

go-mysql-server

  • 2464: skipping auto_increment on error tests I was wrong, this is very broken in dolt. Could not find a quick fix, so skipping tests to unblock auto-bumps. reopens: https://github.com/dolthub/dolt/issues/3157
  • 2463: Update GMS to detect INSERT statements with row alias and return error. We parse these statements but don't yet support them. So for now we return a helpful error.
  • 2461: tests for auto_inc with error Hard to tell which PR or combination or PRs fixed this, but this issue no longer reproduces in GMS or Dolt. This PR just adds an explicit test case for it. fixes https://github.com/dolthub/dolt/issues/3157
  • 2460: implement last_days() mysql docs: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_last-day
  • 2458: add table comments to information_schema.tables fixes https://github.com/dolthub/dolt/issues/2389
  • 2456: support to_days() and from_days() This PR implements the TO_DAYS and FROM_DAYS MySQL functions. Initially, I attempted to use the existing logic from Add/Sub Date along with the 0 year, but there were overflow issues. So, there's a skipped test for Intervals. to_days docs: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_to-days from_days docs: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_from-days
  • 2455: Feature: gtid_subtract() function Adds support for MySQL's gtid_subtract() built-in function: https://dev.mysql.com/doc/refman/8.0/en/gtid-functions.html#function_gtid-subtract
  • 2452: Adding support for the SHOW BINARY LOG STATUS statement Adds support for handling MySQL's SHOW BINARY LOG STATUS statement. As with the other replication commands, we test the privilege checks in GMS and test the actual integration for data flowing through this statement in Dolt.
  • 2449: Bug fix: SHOW VARIABLES LIKE should be case-insensitive Bug fix to make SHOW VARIABLES LIKE '...' match MySQL's behavior by matching patterns case-insensitively. Also includes changes to add the missing binlog_format system variable that some replication clients need to query, and initializes the server_uuid system variable.
  • 2448: use SubStatementStr field in DDL for getting sub statement in CREATE VIEW This PR allows using defined string for sub statement instead of slicing the original query. If this field is empty, then slice the original query to get the sub statement.
  • 2446: support DECLARE in BEGIN...END BLOCK in TRIGGER This PR allows us to use DECLARE statements in TRIGGERS. The analyzer rule applyTriggers was altered to initialize ProcedureReference for TriggerBeginEndBlock. The important part was ensuring that all relevant nodes (TriggerBeingEndBlock, BeginEndBlock, ProcedureParam) all had the same ProcedureReference and to search in all the nodes. Additionally, nil guards are added to all receiver methods for ProcedureReference to prevent panics. It seems like events might have this issue, but there's a banaid fix for it. Not sure if I want to touch that code. fixes: https://github.com/dolthub/dolt/issues/7720
  • 2445: updating declare in trigger error to be more descriptive
  • 2443: docs: very minor grammar fixes in README.md Hi, I just wanted to fix a couple of minor grammatical errors in the README.md file.
  • 2439: For AutoIncrement lock modes other than "interleaved", hold the lock for the duration of the insert iter. This is the GMS side of https://github.com/dolthub/dolt/issues/7634 This PR changes the engine to make it acquire a lock (provided by the storage layer) when innodb_autoinc_lock_mode is set to the "consecutive" or "traditional" values. More specifically, it calls a new function in the AutoIncrementSetter interface which optionally acquires a lock and returns a callback for releasing the lock. The in-memory DB doesn't have multithreading support, so when just using GMS, this is a no-op. A followup PR in Dolt will update its implementation of AutoIncrementSetter to handle the locking.

vitess

  • 337: Consistently using pointer to AliasedValues in InsertRows interface, never values. Once again, golang reminds me that a value type implementing an interface forces the pointer type to also implement the interface, and mixing the two messes up our runtime type reflection. I changed all uses of the AliasedValues in InsertRows interface to be pointers so that we can interact with them consistently on the GMS side.
  • 336: Adding support for subtracting GTIDSets Needed to support the gtid_subtract() built-in function. Also exposes the ParseMysql56GTIDSet function so that we can parse GTIDSet strings from GMS. Related GMS PR: https://github.com/dolthub/go-mysql-server/pull/2455
  • 334: Parser support for FLUSH TABLES statement Adds parser support for the FLUSH TABLES <tablename_list> [WITH READ LOCK] statement. Also adds SHOW MASTER STATUS as an alias for SHOW BINARY LOG STATUS for compatibility with clients that use the older syntax (e.g. Debezium).
  • 333: Add support for parsing row and column aliases on insert statements. Related to https://github.com/dolthub/dolt/issues/7638 This allows us to parse statements of the form: INSERT INTO t VALUES (?, ?, ?) AS new ON DUPLICATE KEY v = new.v;
  • 332: add SubStatementStr for DDL struct
  • 331: add check option to create view This PR adds optional WITH CHECK OPTION support for CREATE VIEW
  • 330: support rename constraint syntax This PR adds syntax support for ALTER TABLE ... RENAME CONSTRAINT [FOREIGN KEY / CHECK]... for foreign key constraints.

Closed Issues

  • 6016: Schema of "Create table t SELECT * FROM tbl" drops default values when compared to MySql
  • 2199: trim(trailing ',' from column) syntax not supported
  • 7093: Nested subquery problems
  • 6553: Index scan analysis perf
  • 6407: Alias references in subquery expressions
  • 6226: Dolt picks the wrong filter order. Very slow query resulting in DoltHub timeouts
  • 6180: Slow Join + Filter query
  • 5954: select ... not in ... returns wrong results for nulls
  • 2389: Table comments are "ignored"
  • 5661: EXPLAIN with uuid_to_bin is not working in case primary key in IntelliJ IDEA
  • 7385: Messaging on a merge where a table was altered and deleted on each side of the merge not helpful
  • 5958: Prepared statements v2
  • 5993: Joins missing optimal indexes
  • 5444: Slow join orders
  • 5405: dolt clone command only output is the word 'Killed'
  • 3922: dolt sql and other commands should connect to running database
  • 3364: Pandas "shell" as alternative to dolt sql
  • 2638: dolt conflicts resolve <table> --combine-ours or --combine-theirs
  • 4489: support for := operator in SELECT
  • 4479: Support row and column aliases in INSERT ON DUPLICATE KEY UPDATE
  • 1995: Expecting Indexed JOINs. Got Inner JOINs.
  • 4485: ORDER BY expressions containing aggregation functions are not handled appropriately by the analyzer.
  • 505: Dolt CLI should always use the pager when results are more than one page.
  • 7720: Crash on BEFORE INSERT trigger using DECLARE variable
  • 7634: Support for traditional and consecutive behavior for innodb_autoinc_lock_mode
  • 2447: Any Benchmarks available

Performance

Read Tests MySQL Dolt Multiple
covering_index_scan 2.07 3.02 1.5
groupby_scan 13.22 17.63 1.3
index_join 1.37 5.18 3.8
index_join_scan 1.3 2.26 1.7
index_scan 34.33 55.82 1.6
oltp_point_select 0.17 0.53 3.1
oltp_read_only 3.36 8.58 2.6
select_random_points 0.33 0.84 2.5
select_random_ranges 0.39 1.01 2.6
table_scan 34.33 55.82 1.6
types_table_scan 73.13 161.51 2.2
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 16.41 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 101.79 0.16 4.5
tpcc_tps_multiplier 4.5
Overall Mean Multiple 2.60

v1.35.9

1 month ago

Merged PRs

dolt

  • 7727: Version Command Refactor The Version command is currently used by doltgres, but there are some issues. You can't add extra args to it, and it prints out the wrong binary name. This refactor makes the binary name printed by the Version command configurable, and it also refactors the Exec so that its functionality can be extended by doltgres without having to duplicate things like checkAndPrintVersionOutOfDateWarning, and the printing of the feature version.
  • 7724: Move Version Moves Version into a package where it can be referenced by external code.
  • 7721: Improve error messaging when encountering a primary key schema change during a merge. When a merge encounters a table that can't be merged because its primary key changed, we now:
    • Include the name of the affected table
    • Indicate whether the primary key discrepancy is between the two branches or between one branch and the common ancestor.
  • 7718: [store] use struct{} as a value in a hashset Testing if CI works with branch in repo. Original: https://github.com/dolthub/dolt/pull/7706
  • 7713: [statspro] Avoid duplicating branch suffix when resolving stats database fixes: https://github.com/dolthub/dolt/issues/7710
  • 7711: match mysql fk name generation This PR removes logic where we would use a consistent hash to create foreign key names, when one isn't explicitly provided. Instead, we use logic in GMS to generate a name with the template "<tbl_name>_ibfk_<num>", which matches MySQL behavior. As a result, we now allow multiple foreign keys over the same sets of columns (as long as the names are different). companion pr: https://github.com/dolthub/go-mysql-server/pull/2438 fixes: https://github.com/dolthub/dolt/issues/7650
  • 7708: chore: fix function names in comment
  • 7707: go/libraries/doltcore/dbfactory, misc: Ensure we close a *grpc.ClientConn when we are done with it. In the cluster commithook, we had a failure mode where we would leak a *grpc.ClientConn without closing it. It turns out, if an outbound request has made on a ClientConn, it will continue retrying the connection. And we would leak one on a fixed interval, resulting in ever-increasing CPU utilization.
  • 7706: [store] use struct{} as a value in a hashset
  • 7704: Implement traditional auto-increment lock mode hold the lock for the duration of the insert iter. Fixes https://github.com/dolthub/dolt/issues/7634 This is the dolt half of https://github.com/dolthub/go-mysql-server/pull/2439 This adds support for innodb_autoinc_lock_mode=0 ("traditional"). When this system variable is set, the engine will guarantee that every insert statement generates consecutive IDs for AUTO INCREMENT columns. This PR also allows the user to set innodb_autoinc_lock_mode=1 ("consecutive"), although the behavior is currently identical to "traditional". This is acceptable because both modes make the same guarantees (that each statement gets consecutive IDs), and the observed behavior is the same in almost all cases. (The "consecutive" contains an additional optimization: if there is a known upper bound on the number of IDs that must be generated for an insert, under "consecutive" mode the engine will just increment the counter by that upper bound and immediately release the lock. In places where not all of those IDs are actually used, the excess are wasted. This PR does not include that optimization. Thus, with this PR, traditional and consecutive behave the same.)
  • 7699: Add per-table locking for AutoIncrementTracker This PR refactors the AutoIncrementTracker to hold a separate mutex for each table instead of a single mutex for the entire database.
  • 7689: Allow 'old' versions of Dolt to handle future table file versions Now that we are fairly certain that the dolt table format for compressed history files will have a new file signature, we want current versions of dolt to provide decent messages if one of those files is encountered. Automated testing of this is tricky at the moment. I hand edited an existing table file to ensure that a sane message comes back. Also, dolt sql-server doesn't currently print a message at all when a bad table file is encountered.
  • 7670: Add name on cd-release-pgo workflows add name on cd-release-pgo workflows

go-mysql-server

  • 2442: prevent panic on triggers with declare statements We're reusing a code from stored procedures to handle begin end blocks, but we're missing a lot of set up that prevents certain variables from being nil. Consequently, we panic in a couple places. This PR fixes some of those panics, but reveals other problems we have in resolving/executing triggers of this format. Partially addresses: https://github.com/dolthub/dolt/issues/7720
  • 2440: support ALTER TABLE ... RENAME CONSTRAINT ... for foreign key constraints This PR adds support for ALTER TABLE ... RENAME CONSTRAINT ... for foreign key constraints. This is a feature that is NOT supported in MySQL, but we're adding it to make it easier to resolve merge conflicts resulting from foreign key name collisions. related: https://github.com/dolthub/go-mysql-server/pull/2438
  • 2439: For AutoIncrement lock modes other than "interleaved", hold the lock for the duration of the insert iter. This is the GMS side of https://github.com/dolthub/dolt/issues/7634 This PR changes the engine to make it acquire a lock (provided by the storage layer) when innodb_autoinc_lock_mode is set to the "consecutive" or "traditional" values. More specifically, it calls a new function in the AutoIncrementSetter interface which optionally acquires a lock and returns a callback for releasing the lock. The in-memory DB doesn't have multithreading support, so when just using GMS, this is a no-op. A followup PR in Dolt will update its implementation of AutoIncrementSetter to handle the locking.
  • 2438: have generated index and foreign key names match mysql changes:
    • auto-generated secondary index names don't match (after a conflict)
    • we started at 0, while mysql starts at 2
    • auto-generate foreign key names in a way that matches mysql
    • in-memory used to just have empty string as the constraint name we used to error when generating foreign keys over the same sets of columns, but not anymore related: https://github.com/dolthub/dolt/issues/7650
  • 2437: lowercase when looking up self referential foreign key columns fixes: https://github.com/dolthub/dolt/issues/7700
  • 2429: server trace time includes parsing

vitess

  • 330: support rename constraint syntax This PR adds syntax support for ALTER TABLE ... RENAME CONSTRAINT [FOREIGN KEY / CHECK]... for foreign key constraints.
  • 329: Changes to binlog event creation functions
    • Exposing the Length() function in the BinlogEvent interface so calling code can access the event size present in a binlog event's header. Needed for calculating binlog file position.
    • Renaming FakeBinlogStreamBinlogStream so calling code can use it when serializing binlog events.

Closed Issues

  • 7634: Support for traditional and consecutive behavior for innodb_autoinc_lock_mode
  • 7722: remote 'origin' not found.
  • 7650: Default constraint symbol value is not same as MySQL, lead to replication breaks
  • 2394: AUTO_INCREMENT clause missing in result from SHOW CREATE TABLE
  • 7710: Statistics database qualify fails for branch connection string
  • 2364: Panic when executing sql statements from external command line tool after startup

Performance

Read Tests MySQL Dolt Multiple
covering_index_scan 2.11 3.07 1.5
groupby_scan 12.98 17.63 1.4
index_join 1.34 5.28 3.9
index_join_scan 1.27 2.26 1.8
index_scan 34.33 54.83 1.6
oltp_point_select 0.17 0.54 3.2
oltp_read_only 3.36 8.74 2.6
select_random_points 0.33 0.84 2.5
select_random_ranges 0.39 0.99 2.5
table_scan 34.33 55.82 1.6
types_table_scan 74.46 164.45 2.2
reads_mean_multiplier 2.3
Write Tests MySQL Dolt Multiple
oltp_delete_insert 7.84 6.91 0.9
oltp_insert 3.75 3.36 0.9
oltp_read_write 8.28 16.41 2.0
oltp_update_index 3.82 3.49 0.9
oltp_update_non_index 3.82 3.43 0.9
oltp_write_only 5.28 7.98 1.5
types_delete_insert 7.7 7.56 1.0
writes_mean_multiplier 1.2
TPC-C TPS Tests MySQL Dolt Multiple
tpcc-scale-factor-1 101.95 19.63 4.5
tpcc_tps_multiplier 4.5
Overall Mean Multiple 2.67

v1.35.8

1 month ago

Merged PRs

dolt

  • 7688: add alternative type check for auto_increment type validation
  • 7679: dolt_verify_constraints() support for all constraint types The dolt_verify_constraints() stored procedure now supports verifying all constraint types: foreign keys, not null, unique, and check constraints. This new implementation reuses merge logic to calculate the constraint violations. Note that the dolt constraints verify CLI command next needs to be migrated to use this stored procedure so that it can also verify all constraint violation types. Until then, customers can use dolt sql -q "CALL dolt_verify_constraints(...)" if they want to verify all constraint types from the CLI. Doc updates: https://github.com/dolthub/docs/pull/2093 Fixes: https://github.com/dolthub/dolt/issues/6320

go-mysql-server

  • 2437: lowercase when looking up self referential foreign key columns fixes: https://github.com/dolthub/dolt/issues/7700
  • 2436: Making @@server_id default value match MySQL
  • 2434: Fixing the default value for the binlog_checksum system variable Small change to make the default value of the global binlog_checksum system variable match MySQL's default value (i.e. "CRC32").
  • 2433: NULL to nil The SHOW FIELDS/COLUMNS FROM <table> query would return the string "NULL" for Default column rather than nil. This mattered for Knex, which relied on it being NULL and not "NULL". fixes: https://github.com/dolthub/dolt/issues/7692
  • 2432: support Threads_connected and Threads_running status variables This PR adds support for Threads_connected and Threads_running status variables. Additionally, the local enginetest are flaking consistently in dolt ci, so those have been removed; we have handler tests for com_delete, com_insert, and com_update anyway. Related: https://github.com/dolthub/dolt/issues/7646
  • 2431: Setting Innodb_buffer_pool_pages_total to 1, to avoid an issue with Datadog's collector Datadog's metric collector errors out with a divide by zero error if the Innodb_buffer_pool_pages_total status variable is 0; changing it to 1 avoids this and allows the agent to collect metrics from Dolt.
  • 2430: have status variables use go routines This PR changes Status Variables to update through go routines, to avoid slowing down query execution due to the mutexes present.
  • 2426: use @@session.collation_server during create database ... This PR makes it so create database ... actually reads the @@session.collation_server variable. Additionally, this ensures that settings @@character_set_server sets @@collation_server and vice versa. Interestingly, it seems like MySQL actually ignores the global scope of these system variables, and reads the session scope instead. fixes https://github.com/dolthub/dolt/issues/7651

vitess

  • 329: Changes to binlog event creation functions
    • Exposing the Length() function in the BinlogEvent interface so calling code can access the event size present in a binlog event's header. Needed for calculating binlog file position.
    • Renaming FakeBinlogStreamBinlogStream so calling code can use it when serializing binlog events.
  • 328: revert decimals issue: https://github.com/dolthub/vitess/pull/328

Closed Issues

  • 7700: self referential foreign key is case sensitive
  • 7649: Questions about Dolt
  • 7651: set global character_set_server not working the same way in MySQL, may lead inconsistency
  • 6320: dolt verify-contraints does not check unique constraints
  • 7692: Show fields returns 'NULL' (in quotes)
  • 7665: Error 1105: type time.Time not supported as bind var

v1.35.7

1 month ago

Merged PRs

dolt

  • 7673: CLI Docs: Adding docs for system_variables field in config.yaml for sql-server command The CLI docs for sql-server doesn't include the system_variables field available in config.yaml.
  • 7672: [store] use hasCache to minimize pendingRef pool Expand the ChunkStore interface to let the nodeStore access recently accessed chunks. Avoid adding a child ref to the pendingRef list when already present in nbs.hasCache. For TPC-C this appears to reduce the pending ref count by another ~80%.
  • 7666: [statspro] Avoid copying histograms, perf improvement companion: https://github.com/dolthub/go-mysql-server/pull/2421
  • 7654: [store] one hashset for child ref checks When writes add chunks at execution time, we currently add their direct child references to the memory table's pending ref queue to check for GC'd refs. We do this by constructing a hash map to pass every chunk's child refs to the memtable's pending queue. This PR avoids creating a new hashset per chunk by using a callback to delay reading out the refs. We make one child ref set per memtable, which has the added benefit of deduplicating child refs between chunks.

go-mysql-server

  • 2427: support Com_delete, Com_insert, Com_update status variables related: https://github.com/dolthub/dolt/issues/7646
  • 2426: use @@session.collation_server during create database ... This PR makes it so create database ... actually reads the @@session.collation_server variable. Additionally, this ensures that settings @@character_set_server sets @@collation_server and vice versa. Interestingly, it seems like MySQL actually ignores the global scope of these system variables, and reads the session scope instead. fixes https://github.com/dolthub/dolt/issues/7651
  • 2423: Adding test for preparing time.Time types This PR adds tests for using time.Time, some tests have to be skipped because we don't support Timespan correctly. companion pr: https://github.com/dolthub/vitess/pull/327 https://github.com/dolthub/vitess/pull/328 test for https://github.com/dolthub/dolt/issues/7665
  • 2422: Support Questions status variable This PR adds logic to update status variable Questions. This only works in the server context, probably doesn't through dolt sql cli. https://github.com/dolthub/dolt/issues/7646
  • 2421: [stats] costed index scan perf Histogram copying is expensive. Instead pass and mutate references. We have to use a different struct type to load stats from JSON in order to support histogram interface generalization. related Dolt-side: https://github.com/dolthub/dolt/pull/7666
  • 2420: support case-insensitive LIKE for show status/variables MySQL stores session and global variables in a performance_schema database, and these tables have a case-insensitive collation on the variable names. This PR emulates that behavior by hard coding the collation the schemas for ShowStatus and ShowVariables nodes.
  • 2419: Bug fix: Allow JSON scalar comparison between int64 and float64 When comparing JSON values, numbers may be represented internally as an int64 or float64, but our comparison code wasn't casting an int64 to a float64 in order to compare it with a float64 value. Fixes https://github.com/dolthub/dolt/issues/7656
  • 2418: fix show create database to actually show charset/collation This PR fixes the SHOW CREATE DATABASE ... statement to actually show the charset/collation that the db is under instead of always default. Additionally, this PR parses the charset database option, instead of ignoring it like before. partially fixes: https://github.com/dolthub/dolt/issues/7651
  • 2416: /{.github,go.mod,go.sum}: bump go version
  • 2414: stubbing out status variables This PR adds the initial implementation of Status Variables. There are 682 status variables, and are very similar to System Variables. Every variable is read-only (and can only be updated by the server itself), and there are session-specific variables. MySQL Docs: https://dev.mysql.com/doc/refman/8.0/en/server-status-variable-reference.html Related: https://github.com/dolthub/dolt/issues/7646

vitess

  • 328: revert decimals issue: https://github.com/dolthub/vitess/pull/328
  • 327: add case for time.Time and decimal in bindvars We were unable to use time.Time and decimal type variables bind vars, so they couldn't be used as arguments to prepare statements. This PR addresses that issue. fixes: https://github.com/dolthub/dolt/issues/7665
  • 325: /{.github,go.mod,go.sum}: bump go version
  • 320: Updates for binlog primary protocol
    • Porting over more code from vitess.io/vitess – support for the COM_REGISTER_REPLICA command.
    • Fixing a bug in Vitess' deserialization of the COM_BINLOG_DUMP_GTID command.
    • Adding some String functions to help with debugging.
    • Exposing the ability to flush a connection's buffer, as a short-term workaround for needing to flush the buffer more frequently than at the end of the connection in order to support `COM_BINLOG_DUMP_GTID'.

Closed Issues

  • 7651: set global character_set_server not working the same way in MySQL, may lead inconsistency
  • 7601: One more issue related to the Adobe Commerce ( Magento ) installation.
  • 7665: Error 1105: type time.Time not supported as bind var
  • 7656: JSON_CONTAINS regression
  • 7653: Panic in calculateMergeConflicts during dolt pull if sql-server is running

Performance

Read Tests MySQL Dolt Multiple
covering_index_scan 2.07 3.07 1.5
groupby_scan 13.46 17.63 1.3
index_join 1.34 5.18 3.9
index_join_scan 1.27 2.26 1.8
index_scan 34.33 54.83 1.6
oltp_point_select 0.17 0.49 2.9
oltp_read_only 3.36 8.13 2.4
select_random_points 0.33 0.78 2.4
select_random_ranges 0.39 0.94 2.4
table_scan 34.95 54.83 1.6
types_table_scan 74.46 158.63 2.1
reads_mean_multiplier 2.2
Write Tests MySQL Dolt Multiple
oltp_delete_insert 8.13 6.79 0.8
oltp_insert 3.75 3.36 0.9
oltp_read_write 8.43 15.55 1.8
oltp_update_index 3.82 3.49 0.9
oltp_update_non_index 3.82 3.36 0.9
oltp_write_only 5.37 7.7 1.4
types_delete_insert 7.7 7.43 1.0
writes_mean_multiplier 1.1
TPC-C TPS Tests MySQL Dolt Multiple
tpcc-scale-factor-1 102.03 18.72 6.5
tpcc_tps_multiplier 6.5
Overall Mean Multiple 3.27

v1.35.6

1 month ago

Merged PRs

dolt

  • 7659: Don't panic for conflicts in the dolt pull command This was reported by a user: https://github.com/dolthub/dolt/issues/7653 This was covered by a test, but it turns out that the pull, fetch, and push tests were all using SQL_ENGINE=remote-server incorrectly.
  • 7558: Statistics for multiple branches Fork interface for how to store database statistics. Can either store in the original source database, in a separate database in .dolt/stats, or an alternative implementation like a lsm that will have easier append only semantics. The implementation for the noms chunkstore isn't particularly efficient, we will not deduplicate common chunks between branches. How the new code is organized: statspro has generic interfaces for how a Dolts-specific stats implementation works. statsnoms is an implementation that uses a second database at .dolt/stats to store statistic refs. The stats refs are the same, just now they are named by the branch they reference (ex: refs/statistics/main). So storage is the concern of the concrete implementation. The common interface forces the implementation to handle branches. The branch switching in statsnoms are just named refs. A high level of what's happening during certain operations: There are still two operations, load and update. Load now either initializes the stats database at .dolt/stats or loads existing stats. Update is the same, ANALYZE or auto refresh. Most of the changes are just forcing the logic through a generic interface. There were import cycle issues (dtables) and deadlock issues for creating a database (dolt provider takes a lock that prevents doing certain operation on the session in the stats provider) that motivated packaging decisions.

go-mysql-server

  • 2412: New interface for binlog primary callbacks First pass on connecting the GMS layer with the Dolt layer for handling callbacks when the SQL server is acting in binlog primary mode, through the new BinlogPrimaryController interface. This new interface pretty closely mirrors the existing callback interface for replica callbacks, the BinlogReplicaController interface. Related to https://github.com/dolthub/dolt/issues/7512

Closed Issues

Performance

Read Tests MySQL Dolt Multiple
covering_index_scan 2.07 3.07 1.5
groupby_scan 13.46 17.32 1.3
index_join 1.37 5.18 3.8
index_join_scan 1.27 2.26 1.8
index_scan 34.33 63.32 1.8
oltp_point_select 0.17 0.49 2.9
oltp_read_only 3.36 8.28 2.5
select_random_points 0.33 0.78 2.4
select_random_ranges 0.39 0.95 2.4
table_scan 34.33 63.32 1.8
types_table_scan 74.46 176.73 2.4
reads_mean_multiplier 2.2
Write Tests MySQL Dolt Multiple
oltp_delete_insert 7.98 7.04 0.9
oltp_insert 3.75 3.49 0.9
oltp_read_write 8.43 16.12 1.9
oltp_update_index 3.82 3.62 0.9
oltp_update_non_index 3.82 3.55 0.9
oltp_write_only 5.37 8.13 1.5
types_delete_insert 7.7 7.84 1.0
writes_mean_multiplier 1.1
TPC-C TPS Tests MySQL Dolt Multiple
tpcc-scale-factor-1 101.15 16.93 5.7
tpcc_tps_multiplier 5.7
Overall Mean Multiple 3.00

v1.35.5

1 month ago

Merged PRs

dolt

  • 7644: go/store/datas/pull: pull_chunk_fetcher: Move chunk fetching to a streaming interface instead of batch. We want to better pipeline I/O when pulling from a remote, and moving a streaming interface where storage can see more of the addresses that are needed at once will allow us to achieve it. For now, we implement the streaming interface just by calling the existing batch get interface.
  • 7643: [no release notes] odd n ends clean up Random things I cleaned up while digging into NBS. All NoOp.
  • 7637: innodb_autoinc_lock_mode tests companion pr: https://github.com/dolthub/go-mysql-server/pull/2410
  • 7629: refactor tablespec Use changes to handle table option parsing, and apply auto_increment table option. Additionally, changes resetScripts() in doltHarness to not drop and recreate all auto_increment tables. This step is not necessary, and causes problems now because we actually display and read AUTO_INCREMENT table option in show create table statements. Contains changes from: https://github.com/dolthub/dolt/pull/7631 Companion PR: https://github.com/dolthub/go-mysql-server/pull/2401
  • 7582: add dolt_hashof_table func and dolt_hashof (Deprecate hashof) I created this function for my GDC demo. We can talk about pros and cons of integrating this back to main.
  • 7579: use system variable interface Depends on GMS PR: https://github.com/dolthub/go-mysql-server/pull/2375
  • 7572: go/store/datas/pull: pull_table_file_writer.go: Optimize pull/push to allow for concurrent table file uploads. Move management of the upload workers and the table file writer to its own struct which is testable in isolation.

go-mysql-server

  • 2412: New interface for binlog primary callbacks First pass on connecting the GMS layer with the Dolt layer for handling callbacks when the SQL server is acting in binlog primary mode, through the new BinlogPrimaryController interface. This new interface pretty closely mirrors the existing callback interface for replica callbacks, the BinlogReplicaController interface. Related to https://github.com/dolthub/dolt/issues/7512
  • 2411: implement json_search() MySQL Docs: https://dev.mysql.com/doc/refman/8.3/en/json-search-functions.html#function_json-search
  • 2410: Adding system variable innodb_autoinc_lock_mode We currently only support innodb_autoinc_lock_mode = 2, not 0 or 1. MySQL Docs: https://dev.mysql.com/doc/refman/8.0/en/innodb-auto-increment-handling.html related: https://github.com/dolthub/dolt/issues/7634
  • 2404: Improve handling of unsigned and decimal types in JSON Fixes https://github.com/dolthub/go-mysql-server/issues/2391 MySQL's JSON type differs from standard JSON in some important ways. It supports types not supported in standard JSON, such as separate types for integers and floats, an unsigned int type, and a decimal type. Prior to this PR, we would convert values to JSON by using the encodings/json package to marshall the value to a JSON string and then unmarshall it to a go map. This is not only slow, but it's incorrect for these additional types. The main purpose of this PR is to add special handling for these types that allow them to be stored in JSON documents. We also avoid generating and parsing JSON in places where it's not actually necessary, and fix bugs where decimals get incorrectly converted into strings, or unsigned ints get converted into signed ints. Finally, this fixes an issue where we send incorrect bytes for JSON-wrapped decimal values along the wire.
  • 2403: fix dbName not being used in the example This PR makes sure that dbName in the example is actually being used, instead of having a hardcoded "mydb" in createTestDatabase. fixes #2402
  • 2401: refactor and parse table options, support auto_increment table option Table Options are now parsed as structs, so we can read/use some of the variables. Character Sets, Collations, Create Table, TableSpec, etc. have been refactored. Additionally, this PR adds support to parse and use the auto_increment table option. TODO:
    • CREATE TABLE ... LIKE ... needs to preserve table opts, like comments
    • alter table add column ... auto_increment does not work when there are already rows Companion PR: https://github.com/dolthub/vitess/pull/322
  • 2399: fix custom insert ordering for pk fixes https://github.com/dolthub/go-mysql-server/issues/2397
  • 2398: fix in-memory implementation of RenameTable to read from session The in-memory implementation of RenameTable uses data from the BaseDatabase, instead of reading it from the session. This is problematic when there are multiple alter statements. Additonally, includes some small refactor so all functions are pointer receiver instead of a mix. fixes https://github.com/dolthub/go-mysql-server/issues/2396
  • 2394: Bug fix: Set non-boolean system variable enum values to 'ON' or 'OFF' We were automatically converting ON and OFF values to to true and false when setting a system variable, which made it impossible to set system variables to those enum values. For example:
    SET @@GLOBAL.gtid_mode='ON';
    Variable 'gtid_mode' can't be set to the value of 'true'
    
  • 2393: Restored and refactored missing functionality required by Dolt
  • 2375: create system variable interface This PR creates SystemVariable and SystemVariableScope interfaces. This allows doltgres to use these interfaces for defining and handling all the configuration parameters. The SystemVariable struct is renamed to MysqlSystemVariable. The SystemVariableScope byte is renamed to MysqlSVScopeType.

vitess

  • 324: Ensure that float values parsed into expressions will always be parsed back into floats, not decimals.
  • 323: Parser support for SOURCE_AUTO_POSITION When acting as a replica, Dolt implicitly assumes SOURCE_AUTO_POSITION is set to 1. This adds parser support so that it can be explicitly specified. Adding this so that when we're configuring a MySQL replica, we can use the same setup code without having to special case this parameter.
  • 322: parse table options into struct Instead of just making a large string that is reparsed in GMS, parse table_options into a list of structs similar to how we handle index_options and constraint_options.
  • 321: [ast] walk tableFuncExpr for bind variables
  • 320: Updates for binlog primary protocol
    • Porting over more code from vitess.io/vitess – support for the COM_REGISTER_REPLICA command.
    • Fixing a bug in Vitess' deserialization of the COM_BINLOG_DUMP_GTID command.
    • Adding some String functions to help with debugging.
    • Exposing the ability to flush a connection's buffer, as a short-term workaround for needing to flush the buffer more frequently than at the end of the connection in order to support `COM_BINLOG_DUMP_GTID'.
  • 317: Port: Support for Vitess server to send binlog events Porting over support from the main Vitess repo for a server to send back binlog events over a connection. Also includes support for handling the COM_BINLOG_DUMP_GTID command. Related to https://github.com/dolthub/dolt/issues/7512

Closed Issues

  • 7641: Does it support connecting to existing MySQL or linking to TDSQL
  • 5486: Ability to "project" schema at a commit onto data at another commit
  • 7630: Add topic 'mariadb' to GitHub repository
  • 7621: Migrate dolt gc to SQL
  • 2402: Consistent usage of variables in the example
  • 2391: Potential regression: number cast to JSON no longer read as float
  • 2396: Running multiple migrations in a transaction
  • 2397: Primary key column order changes column order on insert

Performance

Read Tests MySQL Dolt Multiple
covering_index_scan 2.07 3.02 1.5
groupby_scan 13.46 17.63 1.3
index_join 1.39 5.09 3.7
index_join_scan 1.32 2.22 1.7
index_scan 35.59 63.32 1.8
oltp_point_select 0.18 0.48 2.7
oltp_read_only 3.43 8.13 2.4
select_random_points 0.33 0.78 2.4
select_random_ranges 0.39 0.94 2.4
table_scan 35.59 63.32 1.8
types_table_scan 74.46 176.73 2.4
reads_mean_multiplier 2.2
Write Tests MySQL Dolt Multiple
oltp_delete_insert 7.98 7.04 0.9
oltp_insert 3.75 3.49 0.9
oltp_read_write 8.43 16.12 1.9
oltp_update_index 3.82 3.62 0.9
oltp_update_non_index 3.82 3.55 0.9
oltp_write_only 5.37 8.13 1.5
types_delete_insert 7.7 7.84 1.0
writes_mean_multiplier 1.1
TPC-C TPS Tests MySQL Dolt Multiple
tpcc-scale-factor-1 101.78 22.7 5.0
tpcc_tps_multiplier 5.0
Overall Mean Multiple 2.77

v1.35.4

2 months ago

Merged PRs

dolt

  • 7617: go/libraries/doltcore/merge: fulltext_rebuild.go: Add some comments, refactor some things into functions, even if they are still too big.
  • 7616: [sqle] don't panic reading history table Found an issue with the history table while testing GORM. It's specific to the ComPrepare interface, this doesn't trigger with a simple PREPARE query.
    DEBU[0197] preparing query                               paramsCount=2 query="SELECT column_name, column_default, is_nullable = 'YES', data_type, character_maximum_length, column_type, column_key, extra, column_comment, numeric_precision, numeric_scale , datetime_precision FROM information_schema.columns WHERE table_schema = ? AND table_name = ? ORDER BY ORDINAL_POSITION" statementId=2
    ERRO[0197] mysql_server caught panic:
    interface conversion: sql.Table is *sqle.WritableDoltTable, not *sqle.AlterableDoltTable
    /Users/maxhoffman/go/pkg/mod/github.com/dolthub/[email protected]/sql/planbuilder/parse.go:169 (0x101612ae7)
    com/dolthub/go-mysql-server/sql/planbuilder.(*Builder).BindOnly.func1: panic(r)
    /usr/local/go/src/runtime/panic.go:914 (0x1000d2187)
    gopanic: done = runOpenDeferFrame(d)
    /usr/local/go/src/runtime/iface.go:263 (0x1000a516f)
    panicdottypeE: panic(&TypeAssertionError{iface, have, want, ""})
    /usr/local/go/src/runtime/iface.go:273 (0x1000a5128)
    panicdottypeI: panicdottypeE(t, want, iface)
    /Users/maxhoffman/go/github.com/dolthub/dolt/go/libraries/doltcore/sqle/database.go:357 (0x101a1f1a7)
    com/dolthub/dolt/go/libraries/doltcore/sqle.Database.getTableInsensitive: return NewHistoryTable(baseTable.(*AlterableDoltTable).DoltTable, db.ddb, head), true, nil
    
  • 7615: [sqle] Allow bindvars in most function constructors This fixes all but the diff_table() function I think. That requires heavier refactoring to support prepared statements.
  • 7610: Optimize full-text to selectively rebuild This changes the Full-Text rebuild process to only trigger on tables that were changed in both roots (ours and theirs), rather than rebuilding every time a merge is performed regardless of what was actually changed. The rules here are fairly permissive, in that if a parent table or any of the indexed child tables are changed in both, then we rebuild all Full-Text indexes for that table. I chose this behavior out of caution, as dual changes in a single child table is probably due to some kind of renaming, so it's safer to rebuild everything for that table.
  • 7609: Drop the nbs.addr type in favor of hash.Hash type These two types were essentially the same, with the addition of the Prefix and Suffix methods to hash.Hash they are the same.
  • 7592: go/store/datas/pull: Restore puller optimization for parallel HasMany calls. Fix crash in pull_chunk_tracker.

go-mysql-server

vitess

Closed Issues

  • 7604: wikipedia import into mediawiki can consistently produce a Dolt deadlock
  • 7600: Specifying an AUTO_INCREMENT primary key results in spurious duplicate primary key given error
  • 7602: Conditionally creating a table in a script produces index already exists error

Performance

Read Tests MySQL Dolt Multiple
covering_index_scan 2.07 2.97 1.4
groupby_scan 12.98 17.32 1.3
index_join 1.32 5.09 3.9
index_join_scan 1.25 2.18 1.7
index_scan 33.72 63.32 1.9
oltp_point_select 0.17 0.48 2.8
oltp_read_only 3.36 7.98 2.4
select_random_points 0.32 0.77 2.4
select_random_ranges 0.38 0.94 2.5
table_scan 34.33 63.32 1.8
types_table_scan 74.46 176.73 2.4
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.28 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 101.1 22.45 4.6
tpcc_tps_multiplier 4.6
Overall Mean Multiple 2.63

v1.35.3

2 months ago

Merged PRs

dolt

go-mysql-server

  • 2387: exit early when IF NOT EXISTS and table exists This PR addresses various issues related to CREATE 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 if IF NOT EXISTS is specified and the table exists. Also this contains some refactors and simplifications. fixes https://github.com/dolthub/dolt/issues/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: https://github.com/dolthub/dolt/issues/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 with type.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 https://github.com/dolthub/dolt/issues/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: https://github.com/dolthub/go-mysql-server/issues/2369

vitess

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