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 thedolt login
command so that it can authenticate against remotes beyonddoltremoteapi.dolthub.com:443
. This supportsdolt login
's use with DoltLab instances. It also adds a dolt config optiondoltlab.insecure
, which iftrue
will establish an insecure gRPC connection to the remote authentication server (currently required for DoltLab's remote auth server).
dolt login
will continue to usedoltremoteapi.dolthub.com:443
as the default remoteauthEndpoint
andhttps://www.dolthub.com/settings/credentials
as theloginUrl
opened by the browser.
If a local or global dolt config file setsremotes.default_host
andremotes.default_port
, the values specified in the config will be used over the defaults. Ifcreds.add_url
is set in the config file, its value will be used instead of the defaultloginUrl
. 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 useEmptyWorkingSet()
(which has a TODO for it to be deleted/modified), instead ofsrcDB.ResolveWorkingSet()
.
can't include/c/...
before path on windows or it'll translate it toC:\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
for table with schema:> 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,""
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 thereflect
package). The other primary consideration was to expect a specific function signature that takes amap[string]interface{}
representing each parameter, and there'd be anothermap[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 runauto_increment
logic when value provided is less than theZero()
value for column.
Small change tomemory/table.go
to stop incrementing the currentautoIncVal
when the provided value is strictly less than the currentautoIncVal
. - 943: Return correctly formatted column defaults in the information_schema.columns table
The information_schema.columns contains the columncolumn_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- The double quoting of literal column defaults
- The double parentheses for expressions due to improper parentheses handling in the codebase
- 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 rulevalidateJoinDepth
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 addeddefiner
var forcreate trigger
stmt
UpdatedCREATE VIEW
parsing supportingalgorithm
,definer
,security
syntaxes, but does not support the functionality or affectcreate 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 behindenable_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.
- Full support for versioned questions (
vitess
- 153: Add additional syntax support for
CREATE VIEW
statement
AddedALGORITHM=...
,DEFINER=...
,SQL SECURITY DEFINER|INVOKER
syntaxes forCREATE VIEW
statement.
Fixed definer_opt to parseaccount_name
instead ofID
to support parsing ofuser@locahost
syntax.
MovedVIEW
(non-reserved keyword) from non-reserved to reserved as non-reserved keywords are used for account_name parsing, so it creates shift/reduce conflict forview
. - 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 parsingshow create table <table> as of <asof>
.
Removing theOnTable
field in Show struct that was duplicating theTable
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 ofinformation_schema.columns
table is incorrect - 3091: Allow for full host name to appear in
CREATE DEFINER=
for Procedures and Triggers