Skip to content

Commit

Permalink
innodb_autoinc_lock_mode tests (#7637)
Browse files Browse the repository at this point in the history
  • Loading branch information
jycor authored Mar 22, 2024
1 parent 8a0c996 commit 676c7e9
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ require (
github.com/cespare/xxhash v1.1.0
github.com/creasty/defaults v1.6.0
github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2
github.com/dolthub/go-mysql-server v0.18.1-0.20240321173856-d25aa31467ad
github.com/dolthub/go-mysql-server v0.18.1-0.20240322215643-a37b5789fdfa
github.com/dolthub/swiss v0.1.0
github.com/goccy/go-json v0.10.2
github.com/google/go-github/v57 v57.0.0
Expand Down
4 changes: 2 additions & 2 deletions go/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ github.com/dolthub/fslock v0.0.3 h1:iLMpUIvJKMKm92+N1fmHVdxJP5NdyDK5bK7z7Ba2s2U=
github.com/dolthub/fslock v0.0.3/go.mod h1:QWql+P17oAAMLnL4HGB5tiovtDuAjdDTPbuqx7bYfa0=
github.com/dolthub/go-icu-regex v0.0.0-20230524105445-af7e7991c97e h1:kPsT4a47cw1+y/N5SSCkma7FhAPw7KeGmD6c9PBZW9Y=
github.com/dolthub/go-icu-regex v0.0.0-20230524105445-af7e7991c97e/go.mod h1:KPUcpx070QOfJK1gNe0zx4pA5sicIK1GMikIGLKC168=
github.com/dolthub/go-mysql-server v0.18.1-0.20240321173856-d25aa31467ad h1:giyvdsHaBbA4gCxEfDmp//DqxEuTP0RfOPDlnazepKk=
github.com/dolthub/go-mysql-server v0.18.1-0.20240321173856-d25aa31467ad/go.mod h1:QxRD0cXwzXR095E8YemBcGVMhE2UoHOdx4TOr7Yy8GU=
github.com/dolthub/go-mysql-server v0.18.1-0.20240322215643-a37b5789fdfa h1:0zCZ+swvNZyY3UoiDhFlE3P9d4/SPDlMDPQxI4kLzWw=
github.com/dolthub/go-mysql-server v0.18.1-0.20240322215643-a37b5789fdfa/go.mod h1:QxRD0cXwzXR095E8YemBcGVMhE2UoHOdx4TOr7Yy8GU=
github.com/dolthub/ishell v0.0.0-20221214210346-d7db0b066488 h1:0HHu0GWJH0N6a6keStrHhUAK5/o9LVfkh44pvsV4514=
github.com/dolthub/ishell v0.0.0-20221214210346-d7db0b066488/go.mod h1:ehexgi1mPxRTk0Mok/pADALuHbvATulTh6gzr7NzZto=
github.com/dolthub/jsonpath v0.0.2-0.20240227200619-19675ab05c71 h1:bMGS25NWAGTEtT5tOBsCuCrlYnLRKpbJVJkDbrTRhwQ=
Expand Down
33 changes: 33 additions & 0 deletions integration-tests/bats/sql-server.bats
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,39 @@ teardown() {
teardown_common
}

@test "sql-server: innodb_autoinc_lock_mode is set to 2" {
# assert that loglevel on command line is not case sensitive
cd repo1
PORT=$( definePORT )

# assert that innodb_autoinc_lock_mode is set to 2
cat > config.yml <<EOF
user:
name: dolt
listener:
host: "0.0.0.0"
port: $PORT
system_variables:
innodb_autoinc_lock_mode: 100
EOF
run dolt sql-server --config ./config.yml
[ $status -eq 1 ]
[[ "$output" =~ "Variable 'innodb_autoinc_lock_mode' can't be set to the value of '100'" ]] || false

cat > config.yml <<EOF
user:
name: dolt
listener:
host: "0.0.0.0"
port: $PORT
system_variables:
innodb_autoinc_lock_mode: 1
EOF
run dolt sql-server --config ./config.yml
[ $status -eq 1 ]
[[ "$output" =~ "Variable 'innodb_autoinc_lock_mode' can't be set to the value of '1'" ]] || false
}

@test "sql-server: sanity check" {
cd repo1
for i in {1..16};
Expand Down

0 comments on commit 676c7e9

Please sign in to comment.