github dolthub/dolt v0.39.0
0.39.0

latest releases: v1.43.15, v1.43.14, v1.43.13...
2 years ago

Merged PRs

dolt

  • 3238: latest GMS main
  • 3234: /go/cmd/dolt/commands/login.go: make dolt login command configurable, can authenticate against different remotes
    This PR adds the --auth-endpoint, --login-url, and --insecure arguments to the dolt login command so that it can authenticate against remotes beyond doltremoteapi.dolthub.com:443. This supports dolt login's use with DoltLab instances. It also adds a dolt config option doltlab.insecure, which if true will establish an insecure gRPC connection to the remote authentication server (currently required for DoltLab's remote auth server).
    dolt login will continue to use doltremoteapi.dolthub.com:443 as the default remote authEndpoint and https://www.dolthub.com/settings/credentials as the loginUrl opened by the browser.
    If a local or global dolt config file sets remotes.default_host and remotes.default_port, the values specified in the config will be used over the defaults. If creds.add_url is set in the config file, its value will be used instead of the default loginUrl. All values supplied with the command line arguments take precedence over the config file values.
    Examples:
    # login to dolthub.com
    dolt login
    # login to doltlab.dolthub.com
    dolt login -i -e doltlab.dolthub.com:50051 -url http://doltlab.dolthub.com/settings/credentials
    # login to doltlab.dolthub.com with config
    dolt config --global --add remotes.default_host doltlab.dolthub.com
    dolt config --global --add remotes.default_port 50051
    dolt config --global --add creds.add_url http://doltlab.dolthub.com/settings/credentials
    dolt config --global --add doltlab.insecure true
    dolt login
  • 3208: Allow local Dolt Clone
    Fix for: #3184
    For some reason we use EmptyWorkingSet() (which has a TODO for it to be deleted/modified), instead of srcDB.ResolveWorkingSet().
    can't include /c/... before path on windows or it'll translate it to C:\c\Users\...
  • 3073: Add Tests to ensure default values are correctly interpreted in the information_schema.columns table
    this PR fixes NULL and EMPTY values were not being converted correctly when converting from Dolt schema
    previousy default value of NULL and "" (empty) was defined incorrectly
    > dolt sql -q "SELECT column_name, is_nullable, column_default FROM information_schema.columns WHERE table_name = 'mytable'" -r csv
    column_name,is_nullable,column_default
    i,NO,""
    s,YES,""""""
    somecol,YES,""
    col4,YES,""
    
    for table with schema:
    CREATE TABLE `mytable` (
    `i` bigint NOT NULL,
    `s` varchar(20) DEFAULT "",
    `somecol` int,
    `col4` bigint,
    PRIMARY KEY (`i`)
    )
    
  • 2790: Prepared statement GMS bump
    GMS dependency PR: dolthub/go-mysql-server#795

go-mysql-server

  • 955: allow NULL value for geometry types
    Allow handling null values some geometry data types. For these types, DEFAULT NULL values should be allowed
  • 954: Allow arbitrary parameter count for external stored procedures
    If an overloaded function contains a variadic variant, that variant is only used if an exact match is not found.
  • 953: fixing geometry tests
    Fix for: #3217
    Types returned should be wrapped in geometry.
  • 951: Added support for external stored procedures
    This adds support for hooking functions into the stored procedure system.
    There were two considerations for the implementation, and I felt this implementation is superior (using the reflect package). The other primary consideration was to expect a specific function signature that takes a map[string]interface{} representing each parameter, and there'd be another map[string]sql.Type returned in the loading function that specifies the type of each parameter. I didn't like that the types were interfaces, and their definitions declared elsewhere, as I'd rather the engine handle as much as possible. I'd prefer to have this all statically-enforced, but Go's type system is sadly not flexible enough, so this is the next best thing.
    The reflection logic is fairly straightforward, and there are many comments, so I'm not too concerned with this being hard to maintain at all.
  • 948: Allow insertion of negative numbers into auto_increment columns
    Fix for: #3192
    Added an additional check to just not run auto_increment logic when value provided is less than the Zero() value for column.
    Small change to memory/table.go to stop incrementing the current autoIncVal when the provided value is strictly less than the current autoIncVal.
  • 943: Return correctly formatted column defaults in the information_schema.columns table
    The information_schema.columns contains the column column_default that represents the formatted string version of the column default. This correct representation is essential as tools (like table editors) use this column to generate representation of a table or their alter statements.
    This pr pushes the resolution of column defaults through the analyzer. Note that there are some open flaws
    1. The double quoting of literal column defaults
    2. The double parentheses for expressions due to improper parentheses handling in the codebase
    3. Missing backticks for columns. This is due to fact that all the way down to GetField for expressions we don't actually backtick the name. We should followup with a rewrite of the Column Default String method
      There should be subsequent followup work that simplifies string formatting with default values and expressions as a whole.
  • 939: ValidateJoinDepth rule; hard cutoff for > 12 table joins
    New analyzer rule validateJoinDepth that errors if we count more than 12 join leaves. Opaque node counting could be done more carefully.
    join search schema comparison was O(n^4) if i counted correctly, now should be more like O(n)
  • 935: update create view parsing and added definer var for create trigger stmt
    Updated CREATE VIEW parsing supporting algorithm, definer, security syntaxes, but does not support the functionality or affect create view query statement.
    Added Definer variable to Trigger.
    Added and updated engine tests covering these changes
  • 795: ComPrepare saves partial query plan
    Prepared statements hidden behind enable_prepared_statements config.
    Lacking:
    • Full support for versioned questions (select * asof '2021-03-21)). I fixed the panics, but many asof tests return incorrect results.
    • Window function parameters can't be bindVars currently (lag(x,?))
    • Needs a lot more insert ... select tests
      ComPrepare saves a partially optimized plan for prepared statements.
      Query execution will use the saved plan when possible. Connections have
      a private view of saved plans that are deleted on termination.
      All enginetests ran with prepared queries regarless of BindVar
      inclusion. Variety of bug fixes exposed by the prepared enginetests.

vitess

  • 153: Add additional syntax support for CREATE VIEW statement
    Added ALGORITHM=..., DEFINER=..., SQL SECURITY DEFINER|INVOKER syntaxes for CREATE VIEW statement.
    Fixed definer_opt to parse account_name instead of ID to support parsing of user@locahost syntax.
    Moved VIEW (non-reserved keyword) from non-reserved to reserved as non-reserved keywords are used for account_name parsing, so it creates shift/reduce conflict for view.
  • 152: support generated columns
    There is no functionality besides parsing.
    Fix for: #3089
  • 151: Parser support for show create table <table> as of <asof>
    Adding support for parsing show create table <table> as of <asof>.
    Removing the OnTable field in Show struct that was duplicating the Table field.
    Two minor formatting fixes.

Closed Issues

  • 3184: "optimistic lock failed on database Root update"
  • 3179: Combining dolt and git repositories
  • 3192: AUTO_INCREMENT changes integer column types from signed to unsigned
  • 3117: Unsupported CREATE VIEW syntax
  • 3045: column_default column value of information_schema.columns table is incorrect
  • 3091: Allow for full host name to appear in CREATE DEFINER= for Procedures and Triggers

Don't miss a new dolt release

NewReleases is sending notifications on new releases.