Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
305 commits
Select commit Hold shift + click to select a range
b487701
add json conv and \ch enginetests
elianddb Jun 13, 2025
bc36c09
distinguish between nil bc buffer is empty and nil bc the value is su…
angelamayxie Jun 13, 2025
53f66ae
add table query test
elianddb Jun 13, 2025
48f6247
Merge pull request #2994 from srabraham/fix-newserver-readme
zachmu Jun 13, 2025
b40db03
amend textt table name and check existence
elianddb Jun 13, 2025
90b1f48
fix if placement
elianddb Jun 13, 2025
5c70af8
fix query table ref
elianddb Jun 13, 2025
8dd259f
Merge pull request #3031 from dolthub/elianddb/fix-7998-json-escape-d…
elianddb Jun 13, 2025
2a472df
add defer on val
elianddb Jun 13, 2025
603321d
added GeneralizeTypes function
angelamayxie Jun 13, 2025
a9f8e32
Merge pull request #3029 from dolthub/elianddb/fix-9347-panic-case-st…
elianddb Jun 13, 2025
e169866
added test with more rows, primary key, and true/false groups
angelamayxie Jun 13, 2025
4434731
Merge pull request #3030 from dolthub/angela/groupby
angelamayxie Jun 13, 2025
c6cd9da
added tests
angelamayxie Jun 13, 2025
5d22a62
fix comment
angelamayxie Jun 13, 2025
6ecae23
update ifnull type in hander test
angelamayxie Jun 14, 2025
af9f681
modified GeneralizeType to match rules for Case statement, need to test
angelamayxie Jun 16, 2025
9fb5262
updated tests
angelamayxie Jun 16, 2025
c1e5dc8
make test less flakey (#3033)
jycor Jun 16, 2025
a8173e2
update expected types in handler test
angelamayxie Jun 16, 2025
c334f59
Adding skipped tests for UPDATE ... JOIN bugs
fulghum Jun 11, 2025
cd45932
Merge pull request #3032 from dolthub/angela/ifnull
angelamayxie Jun 16, 2025
cc8357c
Merge pull request #3024 from dolthub/fulghum/updatable
fulghum Jun 16, 2025
9d8e43b
Allow `drop trigger ...` when trigger is invalid (#3034)
jycor Jun 17, 2025
7e253ea
modified Update to be more similar to Delete, reduces need to UpdateJ…
angelamayxie Jun 17, 2025
336c07a
move new code in Update to bottom of file
angelamayxie Jun 17, 2025
e6d019a
implemented joinUpdater
angelamayxie Jun 17, 2025
f831e00
[ga-format-pr] Run ./format_repo.sh to fix formatting
angelamayxie Jun 17, 2025
591449b
no longer panics but fails tests and still doesn't enforce foreign keys
angelamayxie Jun 18, 2025
e03b11a
Merge branch 'updatejoin' of https://github.com/dolthub/go-mysql-serv…
angelamayxie Jun 18, 2025
4810ae9
make `sql.HashOf()` collation aware (#3027)
jycor Jun 18, 2025
7d22a78
Cache `REGEX` (#3036)
jycor Jun 18, 2025
4cf9d24
reverted most changes, modified UpdateJoin to contain Updatables inst…
angelamayxie Jun 18, 2025
c30dd34
modified UpdateJoin to contain target node
angelamayxie Jun 18, 2025
71b6191
apply foreign keys to UpdateJoin
angelamayxie Jun 18, 2025
07818e9
cleanup
angelamayxie Jun 18, 2025
d319c72
rename helper function
angelamayxie Jun 18, 2025
0146174
addressed some review comments
angelamayxie Jun 20, 2025
222fa00
get rid of nested switch in apply_foreign_keys
angelamayxie Jun 20, 2025
84dbdc8
lowercase updatableJoinTable
angelamayxie Jun 20, 2025
5b03b88
fix comments
angelamayxie Jun 20, 2025
bd4ba29
moved variables around
angelamayxie Jun 21, 2025
0270726
Fix schema for call to `hash.HashOf()` in `HashLookups` (#3038)
jycor Jun 21, 2025
220353c
Merge pull request #3037 from dolthub/updatejoin
angelamayxie Jun 21, 2025
cf1535b
backtick column names in check constraints (#3040)
jycor Jun 24, 2025
95929b1
apply multiple triggers to union joins
angelamayxie Jun 24, 2025
dc2d5d6
clean up
angelamayxie Jun 24, 2025
2f1daeb
missed case for nullable enums (#3043)
jycor Jun 25, 2025
a0af54c
remove duplicate getTableName function
angelamayxie Jun 26, 2025
a22a9f4
add ctrl+z as escape character
elianddb Jun 26, 2025
3323b7b
amend query tests regarding escape chars
elianddb Jun 26, 2025
07b76fa
fix extra space
elianddb Jun 26, 2025
94e279c
Added nested iter logic to Project node
zachmu Jun 26, 2025
dd846ab
fixed bug where column names conflict but only works when Project is …
angelamayxie Jun 26, 2025
9882720
Revert "fixed bug where column names conflict but only works when Pro…
angelamayxie Jun 26, 2025
49152d3
rm unused replaceAll for \Z
elianddb Jun 26, 2025
5a60e1b
fix alter table test
elianddb Jun 26, 2025
caed79c
Merge pull request #3045 from dolthub/elianddb/fix-9280-escape-ctrl-z…
elianddb Jun 26, 2025
12c2025
New RowIterExpression interface, subbing it into the expr tree
zachmu Jun 26, 2025
54f35df
Fix SET statements to return OkResult instead of empty rows
macneale4 Jun 26, 2025
aa12bb0
better iterator
zachmu Jun 26, 2025
fdfdc00
Small fixes
zachmu Jun 27, 2025
7a4d0e6
Update stored procedure tests to expect OkResult for SET statements
macneale4 Jun 27, 2025
12fb79e
added check for if schema contains columns with the same name
angelamayxie Jun 27, 2025
06090bc
updated comment for Delete joins
angelamayxie Jun 27, 2025
8bfebda
updated selector func comment
angelamayxie Jun 27, 2025
be71ca2
Fix TestCreateForeignKeys to expect OkResult for SET statements
macneale4 Jun 27, 2025
0b43125
Return a single element instead of a row
zachmu Jun 27, 2025
62b69ba
Fix multiple test suites to expect OkResult for SET statements
macneale4 Jun 27, 2025
5ffb12b
Bug fixes
zachmu Jun 27, 2025
5406fb2
Fix additional SET time_zone statements in TestScripts
macneale4 Jun 27, 2025
0d4e630
Added type info to set iterator
zachmu Jun 27, 2025
11a9487
Fix remaining SET time_zone statements in TestScripts
macneale4 Jun 27, 2025
622acbd
Fix transaction query tests to expect OkResult for SET statements
macneale4 Jun 27, 2025
73af7f1
Fix SET statement behavior differences between server and memory engines
macneale4 Jun 27, 2025
b527978
added field to ScriptTest to skip script test
angelamayxie Jun 27, 2025
e78f2c2
[ga-format-pr] Run ./format_repo.sh to fix formatting
angelamayxie Jun 27, 2025
85d666f
created skipScript helper function and updated skipAssertion helper f…
angelamayxie Jun 27, 2025
8bf77f0
Merge branch 'angela/keyless_subquery' of https://github.com/dolthub/…
angelamayxie Jun 27, 2025
f378e06
Fix CALL statement behavior in server engine tests
macneale4 Jun 27, 2025
49a2a28
[ga-format-pr] Run ./format_repo.sh to fix formatting
macneale4 Jun 27, 2025
2ed3ee0
fix `group_concat` with `order by` subquery clauses (#3041)
jycor Jun 27, 2025
064b824
Merge pull request #3048 from dolthub/angela/keyless_subquery
angelamayxie Jun 27, 2025
4c1e5c9
Update sql/analyzer/triggers.go with James's suggestion
angelamayxie Jun 27, 2025
ec2567a
fix validateNoConflictingColumnNames input and add test case for tabl…
angelamayxie Jun 27, 2025
4b2746a
add json tests
elianddb Jun 27, 2025
5b27bf7
fix exists subqueries in stored procedures (#3050)
jycor Jun 27, 2025
e1abac3
removed table joining itself test (getting different error case in do…
angelamayxie Jun 27, 2025
b2223ce
use IsJoin flag to check if keyless tables are allowed
angelamayxie Jun 27, 2025
b7ac1f3
Merge pull request #3052 from dolthub/angela/keyless_subquery
angelamayxie Jun 27, 2025
7615f0d
Merge pull request #3051 from dolthub/elianddb/fix-7201-non-json-data…
elianddb Jun 27, 2025
22622a0
Merge pull request #3042 from dolthub/angela/triggers
angelamayxie Jun 27, 2025
3049ad9
Simplify SET plan schema method implementation
macneale4 Jun 27, 2025
0828810
Merge pull request #3046 from dolthub/macneale4-claude/query-ok
macneale4 Jun 27, 2025
42f9587
moved keyless subquery test to correct place
angelamayxie Jun 27, 2025
f412af1
removed test in UpdateIgnoreScripts
angelamayxie Jun 27, 2025
7772fe0
[ga-format-pr] Run ./format_repo.sh to fix formatting
zachmu Jun 28, 2025
c43cfbe
Add regression test for when one index is strictly better than anothe…
nicktobey Jun 27, 2025
9b52dc7
Revert "Merge pull request #3046 from dolthub/macneale4-claude/query-…
macneale4 Jun 28, 2025
3ca53a1
Amend index_queries.go
nicktobey Jun 28, 2025
7f608c4
When selecting an index, detect when one produces strictly fewer rows…
nicktobey Jun 27, 2025
2061232
costIndexScanAnd no longer returns a single filter on success, it ret…
nicktobey Jun 27, 2025
3ac65e0
Update costed_index_scan_test.go to reflect fact that we no longer re…
nicktobey Jun 27, 2025
c44d2fb
Update query_plans.go
nicktobey Jun 27, 2025
635d803
Merge pull request #3053 from dolthub/angela/fix_test
angelamayxie Jun 30, 2025
e57ca0f
amend date, datetime, timestamp limits
elianddb Jun 26, 2025
4fa0e7c
add new layout, rm type check on time conv, fix range
elianddb Jun 27, 2025
8e2fede
amend correct func call for validateTime
elianddb Jun 27, 2025
a9aaff2
add test queries for underflow, overflow and formats
elianddb Jun 27, 2025
dc7518b
rm use of round in validate range funcs for specific types
elianddb Jun 27, 2025
7157226
fix leap year errs
elianddb Jun 27, 2025
5541a64
use old checks for Date, Datetime
elianddb Jun 27, 2025
30758f0
rm underflow/overflow on Convert
elianddb Jun 27, 2025
9fec304
reinstate timestamp lims
elianddb Jun 27, 2025
a0b7544
fix UNIX_TIMESTAMP issue
elianddb Jun 27, 2025
1f43ee8
cleanup extra funcs
elianddb Jun 27, 2025
b37fbd7
fix unix timestamps
elianddb Jun 27, 2025
679d4d6
Merge pull request #3049 from dolthub/elianddb/fix-7300-date-time-ove…
elianddb Jun 30, 2025
cf84c90
Added missing required discrimination function to RowIterExpression
zachmu Jun 30, 2025
95d8ed1
Fixes for type corruption in case statements
zachmu Jul 1, 2025
6195dab
Changing how NO_MERGE_JOIN hint is applied to fix panic
fulghum Jun 30, 2025
32df02c
Add variety of Enum tests (#3058)
jycor Jul 1, 2025
a836475
Merge pull request #3047 from dolthub/nicktobey/index
nicktobey Jul 1, 2025
8f7bd00
Merge pull request #3057 from dolthub/fulghum/join-planning
fulghum Jul 1, 2025
d3e7ae8
commented out validation skip for parent nodes
angelamayxie Jul 1, 2025
268fa4e
pull upstream
zachmu Jul 2, 2025
97605e7
Merge branch 'main' into zachmu/project-iters
zachmu Jul 2, 2025
dff2d00
[ga-format-pr] Run ./format_repo.sh to fix formatting
zachmu Jul 2, 2025
841f067
Bug fixes
zachmu Jul 2, 2025
a47ed0b
Better type picking for text types
zachmu Jul 2, 2025
75a4a56
Test fix
zachmu Jul 2, 2025
99e1fed
[ga-format-pr] Run ./format_repo.sh to fix formatting
zachmu Jul 2, 2025
1c7f94c
merge scope column types for setop subqueries
angelamayxie Jul 2, 2025
659d8d3
unioned columns should be nullable if one column is nullable
angelamayxie Jul 2, 2025
d66cd13
[ga-format-pr] Run ./format_repo.sh to fix formatting
angelamayxie Jul 2, 2025
f5a6e86
added tests
angelamayxie Jul 2, 2025
28f683a
Merge branch 'angela/union' of https://github.com/dolthub/go-mysql-se…
angelamayxie Jul 2, 2025
3e6afcc
Merge branch 'main' into angela/union
angelamayxie Jul 2, 2025
63cbe7d
[ga-format-pr] Run ./format_repo.sh to fix formatting
angelamayxie Jul 2, 2025
0e3ada8
Fix #9428: Allow default keyword as value for generated columns.
elianddb Jul 2, 2025
29ada93
skip generalizing type if two types are equal
angelamayxie Jul 2, 2025
66de91d
fix generalize types tests
angelamayxie Jul 2, 2025
4f63775
Merge pull request #3061 from dolthub/elianddb/9428-default-keyword
elianddb Jul 2, 2025
936afd9
add null case
angelamayxie Jul 2, 2025
ffdc4a9
Merge pull request #3060 from dolthub/angela/union
angelamayxie Jul 2, 2025
b7fdb1f
bug fix for conversion, some types aren't comparable with ==
zachmu Jul 2, 2025
8f23464
Merge branch 'zachmu/project-iters' of github.com:dolthub/go-mysql-se…
zachmu Jul 2, 2025
2158694
Added some docs, fixed a test
zachmu Jul 2, 2025
59c9bc9
merge main
zachmu Jul 2, 2025
96bb36c
[ga-format-pr] Run ./format_repo.sh to fix formatting
zachmu Jul 2, 2025
f2022cf
Allow DEFAULT keyword in UPDATE for generated columns (issue #9438)
elianddb Jul 2, 2025
0c9925a
[ga-format-pr] Run ./format_repo.sh to fix formatting
elianddb Jul 2, 2025
e9bfab1
find statistics table in table wrappers during replace count star
angelamayxie Jul 3, 2025
1276357
Abstracted the null type check
zachmu Jul 3, 2025
92f7a94
Merge branch 'zachmu/project-iters' of github.com:dolthub/go-mysql-se…
zachmu Jul 3, 2025
b45e7b8
[ga-format-pr] Run ./format_repo.sh to fix formatting
zachmu Jul 3, 2025
2cfb9cb
trunc if in sql/planbuilder/dml.go
elianddb Jul 3, 2025
abc950c
Merge pull request #3062 from dolthub/elianddb/9438-allow-default-upd…
elianddb Jul 3, 2025
7607636
replace count(*) in keyless tables
angelamayxie Jul 3, 2025
be6b2de
dependent columns were not getting matched because gf.Table is an emp…
angelamayxie Jul 3, 2025
1af0f6e
Merge pull request #3063 from dolthub/angela/generated_columns
angelamayxie Jul 3, 2025
247f89a
Fix enum columns cannot have auto_increment
elianddb Jul 3, 2025
d0ea2cc
rm explicit skip: false
elianddb Jul 3, 2025
f777d41
Prevent user and system variables in column default and generated values
elianddb Jul 3, 2025
17a77a5
Add comprehensive tests for preventing user and system variables in c…
elianddb Jul 3, 2025
bdeaafc
add alter table tests
elianddb Jul 3, 2025
4bae40b
add miss comma
elianddb Jul 3, 2025
ca2a237
don't prune VirtualColumnTable tables
angelamayxie Jul 3, 2025
984abdb
Merge pull request #3067 from dolthub/elianddb/9427-prevent-user-vari…
elianddb Jul 3, 2025
152a18a
Merge pull request #3065 from dolthub/Elian/issue9423
elianddb Jul 3, 2025
0cd84e2
add tests
angelamayxie Jul 3, 2025
ef4499d
Merge pull request #3054 from dolthub/zachmu/project-iters
zachmu Jul 3, 2025
d551d15
Merge pull request #3046 from dolthub/macneale4-claude/query-ok (#3059)
jycor Jul 5, 2025
de1be10
Merge pull request #3070 from dolthub/angela/generated_columns
angelamayxie Jul 7, 2025
07e7247
dolthub/dolt#9426 - Support enum string context in functions
elianddb Jul 3, 2025
d98e42a
dolthub/dolt#9426 - Expand enum string context support
elianddb Jul 3, 2025
ecaeea6
dolthub/dolt#9426 - Fix panic in ConvertToCollatedString
elianddb Jul 7, 2025
e8c7ebe
dolthub/dolt#9426 - Remove Skip attribute from enum conversion test
elianddb Jul 7, 2025
c92ed03
dolthub/dolt#9426 - Refactor ConvertToCollatedString to eliminate cod…
elianddb Jul 7, 2025
da613f1
impl review suggestions
elianddb Jul 7, 2025
270a87e
add sys var enum test
elianddb Jul 7, 2025
53f1886
Merge pull request #3068 from dolthub/elianddb/9426-enum-string-context
elianddb Jul 7, 2025
19bc4dc
Fix enum foreign key constraints to match MySQL behavior
elianddb Jul 8, 2025
009e470
Fix enum validation error messages for INSERT operations
elianddb Jul 8, 2025
03e82de
Work in progress: debugging enum FK constraint validation
elianddb Jul 8, 2025
a9b4f49
Fix enum error messages to match MySQL behavior
elianddb Jul 8, 2025
17e8eb1
Fix INSERT IGNORE enum test expectations
elianddb Jul 8, 2025
2032865
Fix enum error message to include row number to match MySQL exactly
elianddb Jul 8, 2025
af73949
[ga-format-pr] Run ./format_repo.sh to fix formatting
elianddb Jul 8, 2025
d198c59
Fix INSERT IGNORE test expecting old enum error format
elianddb Jul 8, 2025
511dd90
rm Skip variable
elianddb Jul 8, 2025
c5c4097
Merge pull request #3074 from dolthub/elianddb/9424-enum-foreign-keys
elianddb Jul 8, 2025
cddc0b6
Abstract IsNull and IsNotNull expression logic into an interface, so …
fulghum Jul 2, 2025
2296332
First draft of INSERT func, thanks claude
zachmu Jul 8, 2025
147340b
new tests
zachmu Jul 8, 2025
04ef5ae
[ga-format-pr] Run ./format_repo.sh to fix formatting
zachmu Jul 8, 2025
b38ec53
Add various `SET` type tests (#3077)
jycor Jul 8, 2025
566d5e9
Fixed tests
zachmu Jul 8, 2025
13e21c7
Merge branch 'zachmu/sql-funcs' of github.com:dolthub/go-mysql-server…
zachmu Jul 8, 2025
e311718
Fix for negative len
zachmu Jul 8, 2025
9d1bcdb
More out of bounds tests
zachmu Jul 8, 2025
0ea893b
New string func
zachmu Jul 8, 2025
1d50de4
renamed SelectedExprs to projectedDeps (SelectedExprs weren't actuall…
angelamayxie Jul 9, 2025
b823790
make set
zachmu Jul 9, 2025
b9d3599
Revert "renamed SelectedExprs to projectedDeps (SelectedExprs weren't…
angelamayxie Jul 9, 2025
7528777
abandoning this for now
angelamayxie Jul 9, 2025
e58117e
Merge pull request #3079 from dolthub/zachmu/sql-funcs
zachmu Jul 9, 2025
8c2ec97
Merge pull request #3064 from dolthub/fulghum/expr
fulghum Jul 9, 2025
2ebd419
[ga-format-pr] Run ./format_repo.sh to fix formatting
zachmu Jul 9, 2025
1d7ae50
allow group by pk, need to fix typing issue
angelamayxie Jul 9, 2025
40aa5fc
Merge pull request #3081 from dolthub/zachmu/sql-funcs
zachmu Jul 9, 2025
9d5902e
add `auto_increment` tests with various types (#3080)
jycor Jul 9, 2025
16d9260
tests convert decimals to strings
angelamayxie Jul 9, 2025
66798a4
test clean up
angelamayxie Jul 9, 2025
4ddbd50
Split up queries.txt
zachmu Jul 9, 2025
87ed65e
comments clean up
angelamayxie Jul 10, 2025
ae36e9f
More moved test cases
zachmu Jul 10, 2025
4217c71
[ga-format-pr] Run ./format_repo.sh to fix formatting
zachmu Jul 10, 2025
62fac20
Merge pull request #3082 from dolthub/angela/groupby
angelamayxie Jul 10, 2025
b81d549
dolthub/dolt#9425 - Fix enum zero validation in strict mode
elianddb Jul 8, 2025
5d8690a
Fix enum zero strict mode validation to match MySQL exactly
elianddb Jul 8, 2025
1f84fda
Fix CREATE TABLE enum default validation to return correct error type
elianddb Jul 8, 2025
3cb9fee
Fix CREATE TABLE enum default validation to show proper column names
elianddb Jul 8, 2025
049e017
[ga-format-pr] Run ./format_repo.sh to fix formatting
elianddb Jul 8, 2025
57d1bbb
Fix sql_mode detection in enum strict mode validation
elianddb Jul 8, 2025
1c9d6d9
Fix INSERT IGNORE enum zero handling in strict mode
elianddb Jul 8, 2025
dfe60a0
Eliminate fragile string-matching enum error enhancement
elianddb Jul 8, 2025
15d9142
Clean up redundant string comparisons and imports
elianddb Jul 8, 2025
1059493
[ga-format-pr] Run ./format_repo.sh to fix formatting
elianddb Jul 8, 2025
a135718
rm Skip var
elianddb Jul 8, 2025
5b77261
rm reduundant GetSessionVariable
elianddb Jul 9, 2025
997b8cb
Add STRICT_ALL_TABLES query test for enum zero validation
elianddb Jul 9, 2025
6069cfa
rm extra comment
elianddb Jul 9, 2025
dd2b3a9
fix format errs and redundant edits
elianddb Jul 9, 2025
82d22c0
Address PR review feedback from jycor
elianddb Jul 9, 2025
de3c27c
fix validateDefaultExprs()
elianddb Jul 9, 2025
a1cecc8
add str from e
elianddb Jul 9, 2025
121b5f3
Fix enum literal default validation to match MySQL behavior
elianddb Jul 9, 2025
16ef988
Fix enum default validation to use actual column names
elianddb Jul 9, 2025
24ee22c
cleanup code
elianddb Jul 10, 2025
8b0896d
Merge pull request #3076 from dolthub/elianddb/9425-enum-zero-strict-…
elianddb Jul 10, 2025
dbe2528
Removed weight_string
zachmu Jul 10, 2025
61fbb0b
Merge branch 'zachmu/split-queries' of github.com:dolthub/go-mysql-se…
zachmu Jul 10, 2025
82ed525
Merge pull request #3083 from dolthub/zachmu/split-queries
zachmu Jul 10, 2025
e8ea56b
Fix enum DEFAULT NULL validation in analyzer
elianddb Jul 10, 2025
3d587cb
Add query tests for enum import error and DEFAULT NULL validation
elianddb Jul 10, 2025
fb1f8d6
rm extra changes
elianddb Jul 10, 2025
b998d8a
[ga-format-pr] Run ./format_repo.sh to fix formatting
elianddb Jul 10, 2025
ead1e15
Add TODO comment for enum empty string test MySQL compatibility
elianddb Jul 10, 2025
af68faa
Merge pull request #3085 from dolthub/elianddb/9425-enum-zero-strict-…
elianddb Jul 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func main() {
Protocol: "tcp",
Address: fmt.Sprintf("%s:%d", address, port),
}
s, err := server.NewServer(config, engine, memory.NewSessionBuilder(pro), nil)
s, err := server.NewServer(config, engine, sql.NewContext, memory.NewSessionBuilder(pro), nil)
if err != nil {
panic(err)
}
Expand Down
23 changes: 20 additions & 3 deletions _integration/go/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
module github.com/dolthub/go-mysql-server/integration/go

go 1.14
go 1.22

toolchain go1.24.1

require (
github.com/go-mysql-org/go-mysql v1.12.0
github.com/go-sql-driver/mysql v1.7.1
)

require (
github.com/go-sql-driver/mysql v1.4.0
google.golang.org/appengine v1.2.0 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/Masterminds/semver v1.5.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/pingcap/errors v0.11.5-0.20240311024730-e056997136bb // indirect
github.com/pingcap/log v1.1.1-0.20230317032135-a0d097d16e22 // indirect
github.com/pingcap/tidb/pkg/parser v0.0.0-20241118164214-4f047be191be // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/text v0.20.0 // indirect
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
)
80 changes: 74 additions & 6 deletions _integration/go/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,75 @@
github.com/go-sql-driver/mysql v1.4.0 h1:7LxgVwFb2hIQtMm87NdgAVfXjnt4OePseqT1tKx+opk=
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-mysql-org/go-mysql v1.12.0 h1:tyToNggfCfl11OY7GbWa2Fq3ofyScO9GY8b5f5wAmE4=
github.com/go-mysql-org/go-mysql v1.12.0/go.mod h1:/XVjs1GlT6NPSf13UgXLv/V5zMNricTCqeNaehSBghs=
github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU=
github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/pingcap/errors v0.11.0/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
github.com/pingcap/errors v0.11.5-0.20240311024730-e056997136bb h1:3pSi4EDG6hg0orE1ndHkXvX6Qdq2cZn8gAPir8ymKZk=
github.com/pingcap/errors v0.11.5-0.20240311024730-e056997136bb/go.mod h1:X2r9ueLEUZgtx2cIogM0v4Zj5uvvzhuuiu7Pn8HzMPg=
github.com/pingcap/log v1.1.1-0.20230317032135-a0d097d16e22 h1:2SOzvGvE8beiC1Y4g9Onkvu6UmuBBOeWRGQEjJaT/JY=
github.com/pingcap/log v1.1.1-0.20230317032135-a0d097d16e22/go.mod h1:DWQW5jICDR7UJh4HtxXSM20Churx4CQL0fwL/SoOSA4=
github.com/pingcap/tidb/pkg/parser v0.0.0-20241118164214-4f047be191be h1:t5EkCmZpxLCig5GQA0AZG47aqsuL5GTsJeeUD+Qfies=
github.com/pingcap/tidb/pkg/parser v0.0.0-20241118164214-4f047be191be/go.mod h1:Hju1TEWZvrctQKbztTRwXH7rd41Yq0Pgmq4PrEKcq7o=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
google.golang.org/appengine v1.2.0 h1:S0iUepdCWODXRvtE+gcRDd15L+k+k1AiHlMiMjefH24=
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug=
golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=
gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
97 changes: 97 additions & 0 deletions _integration/go/mysql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import (
"reflect"
"testing"

"github.com/go-mysql-org/go-mysql/client"
"github.com/go-mysql-org/go-mysql/mysql"
_ "github.com/go-sql-driver/mysql"
)

Expand Down Expand Up @@ -120,6 +122,101 @@ func TestGrafana(t *testing.T) {
}
}

func TestMySQLStreaming(t *testing.T) {
conn, err := client.Connect("127.0.0.1:3306", "root", "", "mydb")
if err != nil {
t.Fatalf("can't connect to mysql: %s", err)
}
defer func() {
err = conn.Close()
if err != nil {
t.Fatalf("error closing mysql connection: %s", err)
}
}()

var result mysql.Result
var rows [][2]string
err = conn.ExecuteSelectStreaming("SELECT name, email FROM mytable ORDER BY name, email", &result, func(row []mysql.FieldValue) error {
if len(row) != 2 {
t.Fatalf("expected 2 columns, got %d", len(row))
}
rows = append(rows, [2]string{row[0].String(), row[1].String()})
return nil
}, nil)

expected := [][2]string{
{"Evil Bob", "evilbob@gmail.com"},
{"Jane Doe", "jane@doe.com"},
{"John Doe", "john@doe.com"},
{"John Doe", "johnalt@doe.com"},
}

if len(expected) != len(rows) {
t.Errorf("got %d rows, expecting %d", len(rows), len(expected))
}

for i := range rows {
if rows[i][0] != expected[i][0] || rows[i][1] != expected[i][1] {
t.Errorf(
"incorrect row %d, got: {%s, %s}, expected: {%s, %s}",
i,
rows[i][0], rows[i][1],
expected[i][0], expected[i][1],
)
}
}
}

func TestMySQLStreamingPrepared(t *testing.T) {
conn, err := client.Connect("127.0.0.1:3306", "root", "", "mydb")
if err != nil {
t.Fatalf("can't connect to mysql: %s", err)
}
defer func() {
err = conn.Close()
if err != nil {
t.Fatalf("error closing mysql connection: %s", err)
}
}()

stmt, err := conn.Prepare("SELECT name, email, ? FROM mytable ORDER BY name, email")
if err != nil {
t.Fatalf("error preparing statement: %s", err)
}

var result mysql.Result
var rows [][3]string
err = stmt.ExecuteSelectStreaming(&result, func(row []mysql.FieldValue) error {
if len(row) != 3 {
t.Fatalf("expected 3 columns, got %d", len(row))
}
rows = append(rows, [3]string{row[0].String(), row[1].String(), row[2].String()})
return nil
}, nil, "abc")

expected := [][3]string{
{"Evil Bob", "evilbob@gmail.com", "abc"},
{"Jane Doe", "jane@doe.com", "abc"},
{"John Doe", "john@doe.com", "abc"},
{"John Doe", "johnalt@doe.com", "abc"},
}

if len(expected) != len(rows) {
t.Errorf("got %d rows, expecting %d", len(rows), len(expected))
}

for i := range rows {
if rows[i][0] != expected[i][0] || rows[i][1] != expected[i][1] || rows[i][2] != expected[i][2] {
t.Errorf(
"incorrect row %d, got: {%s, %s, %s}, expected: {%s, %s, %s}",
i,
rows[i][0], rows[i][1], rows[i][2],
expected[i][0], expected[i][1], expected[i][2],
)
}
}
}

func getResult(t *testing.T, rs *sql.Rows) [][]string {
t.Helper()

Expand Down
54 changes: 43 additions & 11 deletions enginetest/enginetests.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,20 @@ func TestQueries(t *testing.T, harness Harness) {
})
}

for _, tt := range queries.FunctionQueryTests {
t.Run(tt.Query, func(t *testing.T) {
if sh, ok := harness.(SkippingHarness); ok {
if sh.SkipQueryTest(tt.Query) {
t.Skipf("Skipping query plan for %s", tt.Query)
}
}
if IsServerEngine(e) && tt.SkipServerEngine {
t.Skip("skipping for server engine")
}
TestQueryWithContext(t, ctx, e, harness, tt.Query, tt.Expected, tt.ExpectedColumns, nil, nil)
})
}

// TODO: move this into its own test method
if keyless, ok := harness.(KeylessTableHarness); ok && keyless.SupportsKeylessTables() {
for _, tt := range queries.KeylessQueries {
Expand Down Expand Up @@ -218,6 +232,17 @@ func TestQueriesPrepared(t *testing.T, harness Harness) {
}
})

t.Run("function query prepared tests", func(t *testing.T) {
for _, tt := range queries.FunctionQueryTests {
if tt.SkipPrepared {
continue
}
t.Run(tt.Query, func(t *testing.T) {
TestPreparedQueryWithEngine(t, harness, e, tt)
})
}
})

t.Run("keyless prepared tests", func(t *testing.T) {
harness.Setup(setup.MydbData, setup.KeylessData, setup.Keyless_idxData, setup.MytableData)
for _, tt := range queries.KeylessQueries {
Expand Down Expand Up @@ -487,6 +512,7 @@ func TestReadOnlyDatabases(t *testing.T, harness ReadOnlyDatabaseHarness) {

for _, querySet := range [][]queries.QueryTest{
queries.QueryTests,
queries.FunctionQueryTests,
queries.KeylessQueries,
} {
for _, tt := range querySet {
Expand All @@ -496,7 +522,7 @@ func TestReadOnlyDatabases(t *testing.T, harness ReadOnlyDatabaseHarness) {

for _, querySet := range [][]queries.WriteQueryTest{
queries.InsertQueries,
queries.UpdateTests,
queries.UpdateWriteQueryTests,
queries.DeleteTests,
queries.ReplaceQueries,
} {
Expand Down Expand Up @@ -1352,9 +1378,12 @@ func TestReplaceIntoErrors(t *testing.T, harness Harness) {

func TestUpdate(t *testing.T, harness Harness) {
harness.Setup(setup.MydbData, setup.MytableData, setup.Mytable_del_idxData, setup.FloattableData, setup.NiltableData, setup.TypestableData, setup.Pk_tablesData, setup.OthertableData, setup.TabletestData)
for _, tt := range queries.UpdateTests {
for _, tt := range queries.UpdateWriteQueryTests {
RunWriteQueryTest(t, harness, tt)
}
for _, tt := range queries.UpdateScriptTests {
TestScript(t, harness, tt)
}
}

func TestUpdateIgnore(t *testing.T, harness Harness) {
Expand Down Expand Up @@ -1421,9 +1450,12 @@ func TestDelete(t *testing.T, harness Harness) {

func TestUpdateQueriesPrepared(t *testing.T, harness Harness) {
harness.Setup(setup.MydbData, setup.MytableData, setup.Mytable_del_idxData, setup.OthertableData, setup.TypestableData, setup.Pk_tablesData, setup.FloattableData, setup.NiltableData, setup.TabletestData)
for _, tt := range queries.UpdateTests {
for _, tt := range queries.UpdateWriteQueryTests {
runWriteQueryTestPrepared(t, harness, tt)
}
for _, tt := range queries.UpdateScriptTests {
TestScriptPrepared(t, harness, tt)
}
}

func TestDeleteQueriesPrepared(t *testing.T, harness Harness) {
Expand Down Expand Up @@ -4112,7 +4144,7 @@ func TestVariables(t *testing.T, harness Harness) {
},
{
Query: "SET GLOBAL select_into_buffer_size = 9001",
Expected: []sql.Row{{}},
Expected: []sql.Row{{types.NewOkResult(0)}},
},
{
Query: "SELECT @@SESSION.select_into_buffer_size",
Expand All @@ -4124,7 +4156,7 @@ func TestVariables(t *testing.T, harness Harness) {
},
{
Query: "SET @@GLOBAL.select_into_buffer_size = 9002",
Expected: []sql.Row{{}},
Expected: []sql.Row{{types.NewOkResult(0)}},
},
{
Query: "SELECT @@GLOBAL.select_into_buffer_size",
Expand All @@ -4133,7 +4165,7 @@ func TestVariables(t *testing.T, harness Harness) {
{
// For boolean types, OFF/ON is converted
Query: "SET @@GLOBAL.activate_all_roles_on_login = 'ON'",
Expected: []sql.Row{{}},
Expected: []sql.Row{{types.NewOkResult(0)}},
},
{
Query: "SELECT @@GLOBAL.activate_all_roles_on_login",
Expand All @@ -4142,7 +4174,7 @@ func TestVariables(t *testing.T, harness Harness) {
{
// For non-boolean types, OFF/ON is not converted
Query: "SET @@GLOBAL.delay_key_write = 'OFF'",
Expected: []sql.Row{{}},
Expected: []sql.Row{{types.NewOkResult(0)}},
},
{
Query: "SELECT @@GLOBAL.delay_key_write",
Expand All @@ -4168,7 +4200,7 @@ func TestVariables(t *testing.T, harness Harness) {
},
{
Query: "SET GLOBAL select_into_buffer_size = 131072",
Expected: []sql.Row{{}},
Expected: []sql.Row{{types.NewOkResult(0)}},
},
} {
t.Run(assertion.Query, func(t *testing.T) {
Expand Down Expand Up @@ -5271,17 +5303,17 @@ func TestPersist(t *testing.T, harness Harness, newPersistableSess func(ctx *sql
}{
{
Query: "SET PERSIST max_connections = 1000;",
Expected: []sql.Row{{}},
Expected: []sql.Row{{types.NewOkResult(0)}},
ExpectedGlobal: int64(1000),
ExpectedPersist: int64(1000),
}, {
Query: "SET @@PERSIST.max_connections = 1000;",
Expected: []sql.Row{{}},
Expected: []sql.Row{{types.NewOkResult(0)}},
ExpectedGlobal: int64(1000),
ExpectedPersist: int64(1000),
}, {
Query: "SET PERSIST_ONLY max_connections = 1000;",
Expected: []sql.Row{{}},
Expected: []sql.Row{{types.NewOkResult(0)}},
ExpectedGlobal: int64(151),
ExpectedPersist: int64(1000),
},
Expand Down
Loading