v0.9.0
版本发布时间: 2021-04-02 08:54:24
dolthub/go-mysql-server最新发布版本:v0.18.1(2024-04-10 00:31:02)
This is a development release. It contains many features and performance improvements added since the last release.
Merged PRs
- 353: Column aliases for subqueries
- 342: Added partial SIGNAL and DECLARE CONDITION support
- 341: JSON_OBJECTAGG This pr adds JSON_OBJECTAGG functionality: https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_json-objectagg
- 340: Vinai/UUID This pr adds UUID support cc: https://dev.mysql.com/doc/refman/8.0/en/miscellaneous-functions.html#function_is-uuid
- 339: Wrap all select expressions in aliases with their original string expression This makes the result set schema exactly match the select expressions in the query.
-
338: Vinai/dbeaver fixes
This pr allows for queries like
CREATE TABLE x.table(pk int)
when the mysql client is not set to x. -
337: Vinai/more table status fixes
This pr fixes some mistakes in show table status where
- memory/table.go did not implement StatisticsTable
- ShowTableStatus is a part of Engine InformationSchema Tests
- 335: Updates to SHOW TABLE STATUS
- 334: Fixed procedure parameters missing in subqueries
- 333: SHOW CHARSET & SHOW ENGINE First step in getting some sql engines
-
332: JSON Values
This change moves the engine towards representing JSON values as Go values rather than strings.
I'm strongly considering a
There seems to be no precedent for thistype JSONValue interface{}
- 331: sql/{plan,analyzer}: {join,indexed_join}: Update join logic to work within subqueries when query scope is non-empty.
- 330: Support for WITH clauses (common table expressions)
- 329: sql/analyzer: join_search: Update indexed join search to respect structural requirements on left and right joins. Only commute join nodes when they are actually safe to commute.
- 328: Vinai/load data quick fixes Add quick fixes from testing load data on the Dolt side.
- 327: Add functionality and tests for JSON_ARRAGG. This pr does not include window function capabilities
-
326: Added function stubs for unimplemented JSON functions
31 unimplemented JSON functions, including two aggregation functions
JSON_ARRAYAGG
andJSON_OBJECTAGG
. - 325: sql/analyzer/indexed_joins.go: Use partial indexes for indexed joins when a full index isn't available.
- 324: sql/analyzer/filters.go: Never push a filter expression with a subquery down.
- 323: sql/analyzer/prune_columns.go: Fix scope parameter in fixRemainingFieldsIndexes when fixing Child of a subquery alias.
- 322: sql/{plan,analyzer}: Cache subquery results when joining against a subquery.
- 321: Bug fix for parallelization We have been parallelizing Filter and Project nodes, but this is a problem for such nodes that contain a Subquery expression, since the query plan for that subquery may not tolerate parallelization. This fixes that bug and adds tests.
- 320: Added proper PROCEDURE nested SELECT behavior + tests
- 319: sql/analyzer: Avoid pruning columns of nodes under an IndexedJoin, since the IndexedJoin expression itself is inscrutable.
- 318: sql/analyzer/pushdown.go: Push down appropriate filter predicates to sit right on top of a SubqueryAlias when appropriate.
-
317: Max/check constraint
check constraints in memory engine
depends on https://github.com/dolthub/vitess/pull/53
TODOs maybe:
- in mysql, an ALTER TABLE ADD CHECK fails if any of the existing rows fail the check. This is what the current implementation does, I'm not sure if toggling that off should be supported.
- when an INSERT row that fails a constraint, mysql errors and does not write any of the values. The current implementation defaults to INSERT IGNORE's behavior, where warnings are issues for failed checks but good rows are still included. TODOs in future:
- DropColumn, RenameColumn, ModifyColumn should error if touching a constraint-protected columns
- 316: Vinai/load data - Part 1 very basic functionality review This PR introduces basic functionality for LOAD DATA.
- 315: Added SHOW & DROP PROCEDURE, along with basic IF/ELSE support
- 315: Added SHOW & DROP PROCEDURE, along with basic IF/ELSE support
- 314: sql/analyzer/prune_columns.go: Turn off pruneColumns when a Subquery expression exists.
-
312: Added INOUT/OUT params to procedures & nested procedures
Stored procedures now work with
INOUT/OUT
directions for their parameters. Not only is this critical for nestedCALL
statements to work properly, but additional changes were made to handle nestedCALL
s. Stored procedures are now loaded before analyzing the query body. - 311: sql/analyzer/resolve_subqueries.go: Make subqueries which include subqueryaliases cacheable.
- 310: sql/plan/subquery.go: Make certain that analyzed nodes below a subquery that includes a subquery alias node see the row results they are expecting.
- 309: Max/float53 Follow specific rules for mysql float/double/error depending on the float ops.
-
308: Window functions
This is a full implementation of window functions, with only the ROW_NUMBER() function supported. Partitions and order-by work for the OVER() clause, but other constructs (PRECEDING, FOLLOWING, etc.) are not supported.
Other limitations:
- Can't use window functions with GROUP BY
- Can use non-window aggregates with window functions, but only if they are declared with an empty OVER clause
- 307: Bump vitess
- 306: Roughest implementation of stored procedures No need to go into detail regarding what doesn't work (a lot), but it's groundwork to iterate on.
- 305: sql/analyzer: resolve_subqueries.go: Add a missing stripQueryProcess in resolveSubqueries.
- 304: pass the context into Close calls
-
303: sql/analyzer: Make join_search faster
This helps the analyzer actually complete analyzing some of the example queries we're working on that have 9+ table joins. The basic idea is to recursively build every binary tree that has the in-order traversal we want and then attempt to apply join conditions to those trees.
Performance here can be further improved by coupling
visitJoinSearchNodes
andassignConditions
so that we can prune large portions of the subspace as being impossible from a join conditions standpoint. I may work on that next depending upon how further benchmarking goes. Currently a previous query which failed to analyze before take 30s. -
301: Naive/hacky show grants
hard-coded
SHOW GRANTS
handling:> dolt sql -q "show grants for current_user" +-------------------------------------------------------------+ | Grants for root@% | +-------------------------------------------------------------+ | GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION | +-------------------------------------------------------------+
- 300: Added Stored Procedure interface for integrators
- 299: sql/{plan,analyzer}: Add IndexedInSubqueryFilter for selecting the subquery results first and then making indexed lookups into the child.
-
298: Vinai/create database
Add functionality for
CREATE DATABASE
- 297: Max/sqlerror codes Append error codes/sql state to error messages for downstream clients.
-
296: Fixed BEGIN/END blocks with embedded SET statements
BEGIN/END
blocks did not return their results, and also did not build off of previous statements within the block. In addition, they were panicking by carrying anil
context that was assumed to be non-nil
elsewhere, so this fixes those issues. - 295: Changed analysis to isolate the values side of an INSERT statement Also cleaned up create trigger analysis, which broke when I did this at first. Now catches more errors than before.
- 294: Fixed a bug in join planning for Inserts. Table reordering was leaving nodes above the join with incorrect field indexes. This was getting fixed by other analyzer steps for some top-level nodes, but not Inserts.
- 293: Implement NullSafeEquals: The <=> operator in MySQL.
- 292: Make join planning work for insert statements
- 291: Consider SubqueryAlias nodes when planning indexed joins.
- 290: pushdown to indexed tables
- 288: remove slow span tag
- 287: Update README.md to reference Dolt
- 286: Fixed several bugs preventing indexes from being used in some joins
-
285: Implemented JOIN_ORDER optimizer hints
Also:
- Got rid of expensive comment stripping pass in the parser
- Fixed test behavior of MySQL executed comment statements like
/*!40101 SET NAMES utf8 */
- Made SHOW VARIABLES output sorted
- 284: Updated copyright headers and added missing ones
- 283: Fixed type bugs
- 282: Bug fix for pushing a projection down to a table in a subquery more than once
- 66: Support for subquery / values column aliases
- 65: go/vt/sqlparser/ast.go: SplitStatementToPieces: Avoid appending an empty "query" when splitting an incoming ComQuery.
- 64: Strip quotes and backticks from select expressions
- 63: VALUES statements
- 62: Added SQL_CALC_FOUND_ROWS keyword
- 61: Added SIGNAL companion statements
- 60: add better parsing for show table status
- 59: Add vitess support for show charset
- 58: Add json aggregate functions to ast.go
- 57: Implemented common table expressions (WITH) Also removed a bunch of unused vitess-only constructs from the grammar.
-
56: Capture the verbatim expression for select statements
This is a bit hacky and currently breaks on embedded comments. But in general this lets us faithfully reproduce the verbatim select expression in the return schema, which is required for compatibility with some clients.
Also makes expressions such as
MAX(a as b)
illegal, allowed before. - 55: Small parser fixes for stored procedures
- 54: Vinai/load data basic network handling. Basic steps for packet management. Have text with files up to 1gb. Definitely some more work to be done here in the future. Is it optimal to write everything to a file or can we do something better? Regardless, I think this is a good enough start for Max to get unblocked while I continue to build more functionality.
- 53: Add check constraint support Parser changes to handle CHECK statements.
- 52: Allow reserved words as column names for CREATE TABLE statements Needs tests
- 51: Vinai/load data p1
- 50: Removed CODE keyword
-
49: Max/float53
adds support and tests for
FLOAT(prec)
, which will help with pandas table creation. - 48: Add the constants Updates our vitess with a bunch of constants
- 47: add support for if exists and if not exists for create database
-
46: Added CREATE PROCEDURE & FUNCTION
This adds:
TheCREATE PROCEDURE SHOW PROCEDURE STATUS SHOW FUNCTION STATUS DROP PROCEDURE CALL
SHOW...CODE
statements are being skipped for now, as they're relatively unused compared to the above statements. Additionally, theCREATE
statements do not have a fully fleshed-out routine body, as we currently do not parse all valid statements anyway. - 45: Zachmu/window funcs