diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 879da94a5..0e887ceb5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: matrix: go: [ "1.20", "1.19", "1.18" ] os: [ ubuntu-22.04, ubuntu-20.04 ] - name: Tests Go ${{ matrix.go }} # This name is used in main branch protection rules + name: Tests Go ${{ matrix.go }} on ${{ matrix.os }} # This name is used in main branch protection rules runs-on: ${{ matrix.os }} steps: @@ -31,7 +31,7 @@ jobs: run: | sudo apt-get install -y make gcc - name: Install Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v4 with: go-version: ${{ matrix.go }} - name: Checkout code diff --git a/Makefile b/Makefile index bab5efecc..44a0eb2b5 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ build: test: go test --race -timeout 2m ./... -MYSQL_VERSION ?= 5.7 +MYSQL_VERSION ?= 8.0 test-local: docker run --rm -d --network=host --name go-mysql-server \ -e MYSQL_ALLOW_EMPTY_PASSWORD=true \ diff --git a/client/conn_test.go b/client/conn_test.go index f3c1e4fae..e2091d50e 100644 --- a/client/conn_test.go +++ b/client/conn_test.go @@ -106,6 +106,9 @@ func (s *connTestSuite) TestExecuteMultiple() { `THIS IS BOGUS()`, } + _, err := s.c.Execute("USE " + *testDB) + require.Nil(s.T(), err) + count := 0 result, err := s.c.ExecuteMultiple(strings.Join(queries, "; "), func(result *mysql.Result, err error) { switch count { diff --git a/docker/resources/waitfor.sh b/docker/resources/waitfor.sh index 2aab35490..4442f2834 100755 --- a/docker/resources/waitfor.sh +++ b/docker/resources/waitfor.sh @@ -4,7 +4,7 @@ port=$2 echo "Waiting for mysql at $host:$port" while true; do - docker run --rm -it --network=host mysql:5.7 mysql -h$host -P$port -e "SELECT RAND()" >/dev/null + docker run --rm -it --network=host mysql:8.0 mysql -h$host -P$port -e "SELECT RAND()" >/dev/null if [[ $? -eq 0 ]]; then echo 'Connected' break