diff --git a/.github/workflows/bump-dependency.yaml b/.github/workflows/bump-dependency.yaml index b5a6f49234..90d31d9f9b 100644 --- a/.github/workflows/bump-dependency.yaml +++ b/.github/workflows/bump-dependency.yaml @@ -9,7 +9,7 @@ jobs: name: Get Label outputs: label: ${{ steps.get-label.outputs.label }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - name: Get Label id: get-label @@ -29,7 +29,7 @@ jobs: needs: get-label outputs: stale-pulls: ${{ steps.get-stale-prs.outputs.open-pulls }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - name: Get Open Bump PRs id: get-stale-prs @@ -88,7 +88,7 @@ jobs: open-bump-pr: needs: [get-label, stale-bump-prs] name: Open Bump PR - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 outputs: latest-pr: ${{ steps.latest-pr.outputs.pr_url }} steps: @@ -144,7 +144,7 @@ jobs: comment-on-stale-prs: needs: [open-bump-pr, stale-bump-prs] if: ${{ needs.stale-bump-prs.outputs.stale-pulls != '' }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 strategy: matrix: pull: ${{ fromJson(needs.stale-bump-prs.outputs.stale-pulls) }} diff --git a/.github/workflows/cd-bump-homebrew.yaml b/.github/workflows/cd-bump-homebrew.yaml index d8e4e4af28..870a48fb8d 100644 --- a/.github/workflows/cd-bump-homebrew.yaml +++ b/.github/workflows/cd-bump-homebrew.yaml @@ -12,7 +12,7 @@ on: jobs: homebrew-bump: name: Bump Dolt Homebrew formula - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - name: Create Homebrew PR uses: mislav/bump-homebrew-formula-action@v1 diff --git a/.github/workflows/cd-bump-winget.yaml b/.github/workflows/cd-bump-winget.yaml index 0d49aacd45..0b80c1cab7 100644 --- a/.github/workflows/cd-bump-winget.yaml +++ b/.github/workflows/cd-bump-winget.yaml @@ -12,7 +12,7 @@ on: jobs: get-version: name: Get Version - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 outputs: version: ${{ steps.get_version.outputs.version }} steps: diff --git a/.github/workflows/cd-create-release-notes.yaml b/.github/workflows/cd-create-release-notes.yaml index aef4942d00..7ef4211247 100644 --- a/.github/workflows/cd-create-release-notes.yaml +++ b/.github/workflows/cd-create-release-notes.yaml @@ -11,7 +11,7 @@ on: jobs: create-release-notes: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - name: Get Vars id: get_vars diff --git a/.github/workflows/cd-release.yaml b/.github/workflows/cd-release.yaml index 68221639ba..c2dfb816dc 100644 --- a/.github/workflows/cd-release.yaml +++ b/.github/workflows/cd-release.yaml @@ -9,7 +9,7 @@ on: jobs: format-version: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 outputs: version: ${{ steps.format_version.outputs.version }} steps: @@ -26,7 +26,7 @@ jobs: create-release: needs: format-version name: Create release - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 outputs: release_id: ${{ steps.create_release.outputs.id }} steps: @@ -122,7 +122,7 @@ jobs: create-windows-msi: needs: [format-version, create-release] - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - name: Trigger Upload MSI uses: peter-evans/repository-dispatch@v1 @@ -134,7 +134,7 @@ jobs: create-release-notes: needs: [format-version, create-release] - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - name: Trigger Release Notes uses: peter-evans/repository-dispatch@v1 @@ -145,7 +145,7 @@ jobs: homebrew-bump: needs: [format-version, create-release] - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - name: Trigger Bump Homebrew uses: peter-evans/repository-dispatch@v1 @@ -156,7 +156,7 @@ jobs: trigger-performance-benchmark-email: needs: [format-version, create-release] - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - name: Trigger Performance Benchmarks uses: peter-evans/repository-dispatch@v1 diff --git a/.github/workflows/ci-bats-unix.yaml b/.github/workflows/ci-bats-unix.yaml index bbdb3b5a5c..5cac14e4f0 100644 --- a/.github/workflows/ci-bats-unix.yaml +++ b/.github/workflows/ci-bats-unix.yaml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: true matrix: - os: [ ubuntu-18.04, macos-latest ] + os: [ ubuntu-22.04, macos-latest ] dolt_fmt: [ "", "__DOLT_DEV__", "__DOLT__" ] exclude: - os: "macos-latest" @@ -87,15 +87,35 @@ jobs: dolt config --global --add user.name 'Dolthub Actions' dolt config --global --add user.email 'actions@dolthub.com' - name: Install expect - if: matrix.os == 'ubuntu-18.04' + if: matrix.os == 'ubuntu-22.04' run: sudo apt-get install -y expect - - name: Install Parquet-tools - run: brew install parquet-tools + - name: Install Maven + working-directory: ./.ci_bin + run: | + curl -LO https://dlcdn.apache.org/maven/maven-3/3.8.6/binaries/apache-maven-3.8.6-bin.tar.gz + tar -xf apache-maven-3.8.6-bin.tar.gz + echo "$(pwd)/apache-maven-3.8.6/bin" >> $GITHUB_PATH + - name: Install Hadoop + working-directory: ./.ci_bin + run: | + curl -LO https://downloads.apache.org/hadoop/common/hadoop-3.3.4/hadoop-3.3.4.tar.gz + tar xvf hadoop-3.3.4.tar.gz + echo "$(pwd)/hadoop-3.3.4/bin" >> $GITHUB_PATH + - name: Install parquet-cli + id: parquet_cli + working-directory: ./.ci_bin + run: | + git clone https://github.com/apache/parquet-mr.git + cd parquet-mr/parquet-cli + mvn clean install -DskipTests + runtime_jar="$(pwd)"/target/parquet-cli-1.13.0-SNAPSHOT-runtime.jar + echo "::set-output name=runtime_jar::$runtime_jar" - name: Check expect run: expect -v - name: Test all Unix env: DOLT_FMT: ${{ matrix.dolt_fmt }} + PARQUET_RUNTIME_JAR: ${{ steps.parquet_cli.outputs.runtime_jar }} run: | if [ -n "$DOLT_FMT" ]; then export DOLT_DEFAULT_BIN_FORMAT="$DOLT_FMT"; fi bats --tap . diff --git a/.github/workflows/ci-bats-windows.yaml b/.github/workflows/ci-bats-windows.yaml index ae7d343edc..c9ff4516eb 100644 --- a/.github/workflows/ci-bats-windows.yaml +++ b/.github/workflows/ci-bats-windows.yaml @@ -13,7 +13,7 @@ on: jobs: get-files: name: Get file list - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 outputs: files: ${{ steps.get_file_list.outputs.files }} steps: @@ -38,7 +38,7 @@ jobs: working-directory: ./integration-tests/bats format-files-output: name: Format files output - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 needs: get-files outputs: files: ${{ steps.format_files.outputs.files }} @@ -154,7 +154,7 @@ jobs: report-bats-failure: name: Report Bats Windows Failure via Email needs: test-per-file - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 if: always() && (needs.test-per-file.result == 'failure') steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/ci-check-repo.yaml b/.github/workflows/ci-check-repo.yaml index 777a2f650b..477bd732a4 100644 --- a/.github/workflows/ci-check-repo.yaml +++ b/.github/workflows/ci-check-repo.yaml @@ -11,7 +11,7 @@ concurrency: jobs: verify: name: Verify format and committers - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - name: Setup Go 1.x uses: actions/setup-go@v2 diff --git a/.github/workflows/ci-compatibility-tests.yaml b/.github/workflows/ci-compatibility-tests.yaml index 699320eef7..a180dc4177 100644 --- a/.github/workflows/ci-compatibility-tests.yaml +++ b/.github/workflows/ci-compatibility-tests.yaml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: true matrix: - os: [ ubuntu-18.04 ] + os: [ ubuntu-22.04 ] steps: - name: Setup Go 1.x uses: actions/setup-go@v2 diff --git a/.github/workflows/ci-data-dump-loading-tests.yaml b/.github/workflows/ci-data-dump-loading-tests.yaml index 57f1cbbdb8..bc9e3ff3d2 100644 --- a/.github/workflows/ci-data-dump-loading-tests.yaml +++ b/.github/workflows/ci-data-dump-loading-tests.yaml @@ -12,7 +12,7 @@ concurrency: jobs: data_dump_laoding_integrations_job: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 timeout-minutes: 30 name: Run tests steps: diff --git a/.github/workflows/ci-dolt1-format-go-tests.yaml b/.github/workflows/ci-dolt1-format-go-tests.yaml index f38087917d..fd6911bd67 100644 --- a/.github/workflows/ci-dolt1-format-go-tests.yaml +++ b/.github/workflows/ci-dolt1-format-go-tests.yaml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest, ubuntu-18.04, windows-latest] + os: [macos-latest, ubuntu-22.04, windows-latest] steps: - name: Set up Go 1.x uses: actions/setup-go@v2 diff --git a/.github/workflows/ci-format-repo.yaml b/.github/workflows/ci-format-repo.yaml index 2dc1a8ed8e..7c1db86de1 100644 --- a/.github/workflows/ci-format-repo.yaml +++ b/.github/workflows/ci-format-repo.yaml @@ -12,7 +12,7 @@ concurrency: jobs: format: name: Format PR - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - name: Setup Go 1.x uses: actions/setup-go@v2 diff --git a/.github/workflows/ci-go-race-enginetests.yaml b/.github/workflows/ci-go-race-enginetests.yaml index a03ded8d9e..7cc2e4b472 100644 --- a/.github/workflows/ci-go-race-enginetests.yaml +++ b/.github/workflows/ci-go-race-enginetests.yaml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-18.04 ] + os: [ ubuntu-22.04 ] dolt_fmt: [ "", "__DOLT_DEV__" ] steps: - name: Set up Go 1.x diff --git a/.github/workflows/ci-go-tests.yaml b/.github/workflows/ci-go-tests.yaml index b850f12ea7..653088b270 100644 --- a/.github/workflows/ci-go-tests.yaml +++ b/.github/workflows/ci-go-tests.yaml @@ -21,10 +21,10 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest, ubuntu-18.04, windows-latest] + os: [macos-latest, ubuntu-22.04, windows-latest] dolt_fmt: [ "" ] include: - - os: "ubuntu-18.04" + - os: "ubuntu-22.04" dolt_fmt: "__DOLT_DEV__" steps: - name: Set up Go 1.x @@ -45,7 +45,7 @@ jobs: for (( i=0; i<${#file_arr[@]}; i++ )) do echo "Testing Package: ${file_arr[$i]}" - if [ "$MATRIX_OS" == 'ubuntu-18.04' ] + if [ "$MATRIX_OS" == 'ubuntu-22.04' ] then if [[ "${file_arr[$i]}" != *enginetest* ]]; then go test -timeout 45m -race "${file_arr[$i]}" @@ -73,10 +73,10 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest, ubuntu-18.04, windows-latest] + os: [macos-latest, ubuntu-22.04, windows-latest] dolt_fmt: [ "" ] include: - - os: "ubuntu-18.04" + - os: "ubuntu-22.04" dolt_fmt: "__DOLT_DEV__" steps: - name: Set up Go 1.x diff --git a/.github/workflows/ci-mysql-client-tests.yaml b/.github/workflows/ci-mysql-client-tests.yaml index ebd31ac15b..e682410205 100644 --- a/.github/workflows/ci-mysql-client-tests.yaml +++ b/.github/workflows/ci-mysql-client-tests.yaml @@ -12,7 +12,7 @@ concurrency: jobs: mysql_client_integrations_job: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 timeout-minutes: 30 name: Run tests steps: diff --git a/.github/workflows/ci-sysbench-runner-tests.yaml b/.github/workflows/ci-sysbench-runner-tests.yaml index 9eb4bddb4d..7eba406ba9 100644 --- a/.github/workflows/ci-sysbench-runner-tests.yaml +++ b/.github/workflows/ci-sysbench-runner-tests.yaml @@ -13,7 +13,7 @@ concurrency: jobs: mysql_client_integrations_job: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 name: Test Sysbench Runner steps: - name: Checkout diff --git a/.github/workflows/email-report.yaml b/.github/workflows/email-report.yaml index 3910401d5d..ba21645064 100644 --- a/.github/workflows/email-report.yaml +++ b/.github/workflows/email-report.yaml @@ -6,7 +6,7 @@ on: jobs: email-team: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 name: Email Team Members steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/import-benchmarks-pull-report.yaml b/.github/workflows/import-benchmarks-pull-report.yaml index 4052cb6cc2..1443626895 100644 --- a/.github/workflows/import-benchmarks-pull-report.yaml +++ b/.github/workflows/import-benchmarks-pull-report.yaml @@ -8,7 +8,7 @@ on: jobs: validate-commentor: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 outputs: valid: ${{ steps.set_valid.outputs.valid }} steps: @@ -20,7 +20,7 @@ jobs: ACTOR: ${{ github.actor }} check-comments: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 needs: validate-commentor if: ${{ needs.validate-commentor.outputs.valid == 'true' }} outputs: @@ -42,7 +42,7 @@ jobs: echo "::set-output name=benchmark::true" performance: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 needs: [validate-commentor, check-comments] if: ${{ needs.check-comments.outputs.benchmark == 'true' }} name: Trigger Benchmark Import K8s Workflow diff --git a/.github/workflows/k8s-benchmark-import.yaml b/.github/workflows/k8s-benchmark-import.yaml index 5bee364d14..dc63778b7e 100644 --- a/.github/workflows/k8s-benchmark-import.yaml +++ b/.github/workflows/k8s-benchmark-import.yaml @@ -6,7 +6,7 @@ on: jobs: performance: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 name: Benchmark Performance strategy: matrix: diff --git a/.github/workflows/k8s-benchmark-latency.yaml b/.github/workflows/k8s-benchmark-latency.yaml index 1c455b8e52..16d79c385a 100644 --- a/.github/workflows/k8s-benchmark-latency.yaml +++ b/.github/workflows/k8s-benchmark-latency.yaml @@ -6,7 +6,7 @@ on: jobs: performance: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 name: Benchmark Performance strategy: matrix: diff --git a/.github/workflows/k8s-fuzzer.yaml b/.github/workflows/k8s-fuzzer.yaml index 59b8282133..46ca8f6fef 100644 --- a/.github/workflows/k8s-fuzzer.yaml +++ b/.github/workflows/k8s-fuzzer.yaml @@ -10,7 +10,7 @@ on: jobs: fuzzer: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 name: Run Fuzzer steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/k8s-sql-correctness.yaml b/.github/workflows/k8s-sql-correctness.yaml index 4518f49260..cd0eedbbab 100644 --- a/.github/workflows/k8s-sql-correctness.yaml +++ b/.github/workflows/k8s-sql-correctness.yaml @@ -6,7 +6,7 @@ on: jobs: correctness: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 name: Dolt SQL Correctness strategy: matrix: diff --git a/.github/workflows/nightly-performance-benchmarks-email-report.yaml b/.github/workflows/nightly-performance-benchmarks-email-report.yaml index 495f77cc26..a43902bc8d 100644 --- a/.github/workflows/nightly-performance-benchmarks-email-report.yaml +++ b/.github/workflows/nightly-performance-benchmarks-email-report.yaml @@ -7,7 +7,7 @@ on: jobs: perf: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 name: Trigger Benchmark Latency, Benchmark Import, and SQL Correctness K8s Workflows steps: - uses: peter-evans/repository-dispatch@v1 diff --git a/.github/workflows/performance-benchmarks-email-report.yaml b/.github/workflows/performance-benchmarks-email-report.yaml index f1d4691112..80e80d05e3 100644 --- a/.github/workflows/performance-benchmarks-email-report.yaml +++ b/.github/workflows/performance-benchmarks-email-report.yaml @@ -17,7 +17,7 @@ on: jobs: set-version-actor: name: Set Version and Actor - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 outputs: version: ${{ steps.set-vars.outputs.version }} actor: ${{ steps.set-vars.outputs.actor }} @@ -35,7 +35,7 @@ jobs: ACTOR_EMAIL: ${{ github.event.inputs.email }} benchmark-dolt-mysql: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 needs: set-version-actor name: Trigger Benchmark Latency and Benchmark Import K8s Workflows steps: diff --git a/.github/workflows/performance-benchmarks-pull-report.yaml b/.github/workflows/performance-benchmarks-pull-report.yaml index 1cf633729e..d126cdf14c 100644 --- a/.github/workflows/performance-benchmarks-pull-report.yaml +++ b/.github/workflows/performance-benchmarks-pull-report.yaml @@ -8,7 +8,7 @@ on: jobs: validate-commentor: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 outputs: valid: ${{ steps.set_valid.outputs.valid }} steps: @@ -20,7 +20,7 @@ jobs: ACTOR: ${{ github.actor }} check-comments: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 needs: validate-commentor if: ${{ needs.validate-commentor.outputs.valid == 'true' }} outputs: @@ -42,7 +42,7 @@ jobs: echo "::set-output name=benchmark::true" performance: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 needs: [validate-commentor, check-comments] if: ${{ needs.check-comments.outputs.benchmark == 'true' }} name: Trigger Benchmark Latency K8s Workflow diff --git a/.github/workflows/pull-report.yaml b/.github/workflows/pull-report.yaml index 77a5bd673d..30c3ec7d6e 100644 --- a/.github/workflows/pull-report.yaml +++ b/.github/workflows/pull-report.yaml @@ -7,7 +7,7 @@ on: jobs: report-pull-request: name: Report Performance Benchmarks on Pull Request - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 if: ${{ github.event.client_payload.issue_number != -1 }} steps: - name: Checkout diff --git a/.github/workflows/sql-correctness.yaml b/.github/workflows/sql-correctness.yaml index 661d164d00..fc93b74847 100644 --- a/.github/workflows/sql-correctness.yaml +++ b/.github/workflows/sql-correctness.yaml @@ -17,7 +17,7 @@ on: jobs: set-version-actor: name: Set Version and Actor - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 outputs: version: ${{ steps.set-vars.outputs.version }} actor: ${{ steps.set-vars.outputs.actor }} @@ -32,7 +32,7 @@ jobs: ACTOR: ${{ github.event.client_payload.actor || github.actor }} correctness: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 needs: set-version-actor name: Trigger SQL Correctness K8s Workflow steps: diff --git a/go/cmd/dolt/dolt.go b/go/cmd/dolt/dolt.go index 4b167885e1..762e1eb6ff 100644 --- a/go/cmd/dolt/dolt.go +++ b/go/cmd/dolt/dolt.go @@ -56,7 +56,7 @@ import ( ) const ( - Version = "0.40.22" + Version = "0.40.23" ) var dumpDocsCommand = &commands.DumpDocsCmd{} diff --git a/go/go.mod b/go/go.mod index cc8ebbb718..30d0efdea3 100644 --- a/go/go.mod +++ b/go/go.mod @@ -17,7 +17,7 @@ require ( github.com/dolthub/ishell v0.0.0-20220112232610-14e753f0f371 github.com/dolthub/mmap-go v1.0.4-0.20201107010347-f9f2a9588a66 github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81 - github.com/dolthub/vitess v0.0.0-20220805233523-ca38c3b23325 + github.com/dolthub/vitess v0.0.0-20220809164912-4bb30c793f1b github.com/dustin/go-humanize v1.0.0 github.com/fatih/color v1.13.0 github.com/flynn-archive/go-shlex v0.0.0-20150515145356-3f9db97f8568 @@ -58,7 +58,7 @@ require ( ) require ( - github.com/dolthub/go-mysql-server v0.12.1-0.20220808165327-b2d2409387d3 + github.com/dolthub/go-mysql-server v0.12.1-0.20220809165815-50f64185343e github.com/google/flatbuffers v2.0.6+incompatible github.com/gosuri/uilive v0.0.4 github.com/kch42/buzhash v0.0.0-20160816060738-9bdec3dec7c6 @@ -125,7 +125,6 @@ require ( go.opencensus.io v0.22.4 // indirect go.uber.org/atomic v1.6.0 // indirect go.uber.org/multierr v1.5.0 // indirect - golang.org/x/exp v0.0.0-20220713135740-79cabaa25d75 // indirect golang.org/x/image v0.0.0-20220302094943-723b81ca9867 // indirect golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect diff --git a/go/go.sum b/go/go.sum index 322311bc7f..5ba2661944 100644 --- a/go/go.sum +++ b/go/go.sum @@ -173,8 +173,8 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= 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-mysql-server v0.12.1-0.20220808165327-b2d2409387d3 h1:JNWpvvq5umQrCPBhY5YX0l/SaHQEwH4SwcAEGq11hWY= -github.com/dolthub/go-mysql-server v0.12.1-0.20220808165327-b2d2409387d3/go.mod h1:20p+tmiajL/ijhpQmolmNye28HaWMIgiq6r9bQjBMD4= +github.com/dolthub/go-mysql-server v0.12.1-0.20220809165815-50f64185343e h1:R3KwWZAz3F2+GFFnlwWVA0AwfmG89snvk2C1HhQfk50= +github.com/dolthub/go-mysql-server v0.12.1-0.20220809165815-50f64185343e/go.mod h1:w3cXKwms994cgMN7+rJr4kRzdzpPYkz6Vjl7CAnlpYE= github.com/dolthub/ishell v0.0.0-20220112232610-14e753f0f371 h1:oyPHJlzumKta1vnOQqUnfdz+pk3EmnHS3Nd0cCT0I2g= github.com/dolthub/ishell v0.0.0-20220112232610-14e753f0f371/go.mod h1:dhGBqcCEfK5kuFmeO5+WOx3hqc1k3M29c1oS/R7N4ms= github.com/dolthub/jsonpath v0.0.0-20210609232853-d49537a30474 h1:xTrR+l5l+1Lfq0NvhiEsctylXinUMFhhsqaEcl414p8= @@ -183,8 +183,8 @@ github.com/dolthub/mmap-go v1.0.4-0.20201107010347-f9f2a9588a66 h1:WRPDbpJWEnPxP github.com/dolthub/mmap-go v1.0.4-0.20201107010347-f9f2a9588a66/go.mod h1:N5ZIbMGuDUpTpOFQ7HcsN6WSIpTGQjHP+Mz27AfmAgk= github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81 h1:7/v8q9XGFa6q5Ap4Z/OhNkAMBaK5YeuEzwJt+NZdhiE= github.com/dolthub/sqllogictest/go v0.0.0-20201107003712-816f3ae12d81/go.mod h1:siLfyv2c92W1eN/R4QqG/+RjjX5W2+gCTRjZxBjI3TY= -github.com/dolthub/vitess v0.0.0-20220805233523-ca38c3b23325 h1:ru9Jq3dNtovpYwNCS8NlQMVulXBoYJizr4dLYs06394= -github.com/dolthub/vitess v0.0.0-20220805233523-ca38c3b23325/go.mod h1:oVFIBdqMFEkt4Xz2fzFJBNtzKhDEjwdCF0dzde39iKs= +github.com/dolthub/vitess v0.0.0-20220809164912-4bb30c793f1b h1:KDimfMuvlB0be3XhBBBF5QWIJGzazleccRlHyf/dXX8= +github.com/dolthub/vitess v0.0.0-20220809164912-4bb30c793f1b/go.mod h1:oVFIBdqMFEkt4Xz2fzFJBNtzKhDEjwdCF0dzde39iKs= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -819,9 +819,8 @@ golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 h1:QE6XYQK6naiK1EPAe1g/ILLxN5RBoH5xkJk3CqlMI/Y= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20220713135740-79cabaa25d75 h1:x03zeu7B2B11ySp+daztnwM5oBJ/8wGUSqrwcw9L0RA= -golang.org/x/exp v0.0.0-20220713135740-79cabaa25d75/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= diff --git a/integration-tests/bats/create-views.bats b/integration-tests/bats/create-views.bats index 82f7ba31bb..e2d4dcf48d 100644 --- a/integration-tests/bats/create-views.bats +++ b/integration-tests/bats/create-views.bats @@ -303,3 +303,23 @@ SQL [[ "${lines[1]}" =~ 'v1,int,YES,"",NULL,""' ]] || false [[ "${lines[2]}" =~ 'v2,int,YES,"",NULL,""' ]] || false } + +@test "create-views: can correctly alter a view" { + skip "ALTER VIEW is unsupported" + dolt sql -q "create table t(pk int primary key, val int)" + dolt sql -q "create view view1 as select * from t" + + dolt sql -q "alter view view1 as select val from t" +} + +@test "create-views: views get properly formatted in the information schema table" { + skip "views are not correctly formatted right now" + dolt sql -q "create table t(pk int primary key, val int)" + dolt sql -q "create view view1 as select pk from t" + + DATABASE=$(dolt sql -r csv -q "SELECT DATABASE()" | sed -n 2p) + run dolt sql -r csv -q "SELECT VIEW_DEFINITION FROM information_schema.views where TABLE_NAME='view1'" + [ "$status" -eq 0 ] + [[ "$output" =~ "VIEW_DEFINITION" ]] || false + [[ "$output" =~ "select $DATABASE.t from $DATABASE.t" ]] || false +} diff --git a/integration-tests/bats/export-tables.bats b/integration-tests/bats/export-tables.bats index 26fb0cb1ed..7b40831ea0 100644 --- a/integration-tests/bats/export-tables.bats +++ b/integration-tests/bats/export-tables.bats @@ -312,7 +312,7 @@ SQL [[ "$output" =~ "1,2021-06-02 15:37:24" ]] || false } -@test "export-tables: parquet file export check with parquet tools" { +@test "export-tables: parquet file export check with parquet cli" { skiponwindows "Missing dependencies" dolt sql -q "CREATE TABLE test_table (pk int primary key, col1 text, col2 int);" dolt sql -q "INSERT INTO test_table VALUES (1, 'row1', 22), (2, 'row2', 33), (3, 'row3', 22);" @@ -322,11 +322,11 @@ SQL [[ "$output" =~ "Successfully exported data." ]] || false [ -f result.parquet ] - run parquet-tools cat --json result.parquet > output.json + run parquet cat result.parquet > output.json [ "$status" -eq 0 ] - row1='{"pk":1,"col1":"row1","col2":22}' - row2='{"pk":2,"col1":"row2","col2":33}' - row3='{"pk":3,"col1":"row3","col2":22}' + row1='{"pk": 1, "col1": "row1", "col2": 22}' + row2='{"pk": 2, "col1": "row2", "col2": 33}' + row3='{"pk": 3, "col1": "row3", "col2": 22}' [[ "$output" =~ "$row1" ]] || false [[ "$output" =~ "$row2" ]] || false [[ "$output" =~ "$row3" ]] || false @@ -382,11 +382,11 @@ SQL [[ "$output" =~ "Successfully exported data." ]] || false [ -f dt.parquet ] - run parquet-tools cat --json dt.parquet + run parquet cat dt.parquet [ "$status" -eq 0 ] - [[ "$output" =~ '{"pk":1,"v1":1586304000000000,"v2":-40271000000000,"v3":2020,"v4":1586344271000000,"v5":1,"v6":"one"}' ]] || false - [[ "$output" =~ '{"pk":2,"v1":1586304000000000,"v2":43932000000000,"v3":2020,"v4":1586347932000000,"v5":0,"v6":"three"}' ]] || false - [[ "$output" =~ '{"pk":3,"v1":1633737600000000,"v2":15154000000000,"v3":2019,"v4":1570594354000000,"v5":1}' ]] || false + [[ "$output" =~ '{"pk": 1, "v1": 1586304000000000, "v2": -40271000000000, "v3": 2020, "v4": 1586344271000000, "v5": 1, "v6": "one"}' ]] || false + [[ "$output" =~ '{"pk": 2, "v1": 1586304000000000, "v2": 43932000000000, "v3": 2020, "v4": 1586347932000000, "v5": 0, "v6": "three"}' ]] || false + [[ "$output" =~ '{"pk": 3, "v1": 1633737600000000, "v2": 15154000000000, "v3": 2019, "v4": 1570594354000000, "v5": 1, "v6": null}' ]] || false run dolt sql -q "SELECT * FROM diffTypes" result=$output @@ -399,6 +399,7 @@ SQL df = pd.read_parquet('dt.parquet') print(df) " > pandas_test.py + run python3 pandas_test.py panda_result=$output @@ -438,11 +439,11 @@ SQL [[ "$output" =~ "Successfully exported data." ]] || false [ -f test.parquet ] - run parquet-tools cat --json test.parquet > output.json + run parquet cat test.parquet > output.json [ "$status" -eq 0 ] - row1='{"pk":0,"int":0,"string":"asdf","boolean":1,"float":0.0,"uint":0,"uuid":"00000000-0000-0000-0000-000000000000"}' - row2='{"pk":1,"int":-1,"string":"qwerty","boolean":0,"float":-1.0,"uint":1,"uuid":"00000000-0000-0000-0000-000000000001"}' - row3='{"pk":2,"int":1,"string":"","boolean":1,"float":0.0,"uint":0,"uuid":"123e4567-e89b-12d3-a456-426655440000"}' + row1='{"pk": 0, "int": 0, "string": "asdf", "boolean": 1, "float": 0.0, "uint": 0, "uuid": "00000000-0000-0000-0000-000000000000"}' + row2='{"pk": 1, "int": -1, "string": "qwerty", "boolean": 0, "float": -1.0, "uint": 1, "uuid": "00000000-0000-0000-0000-000000000001"}' + row3='{"pk": 2, "int": 1, "string": "", "boolean": 1, "float": 0.0, "uint": 0, "uuid": "123e4567-e89b-12d3-a456-426655440000"}' [[ "$output" =~ "$row1" ]] || false [[ "$output" =~ "$row2" ]] || false [[ "$output" =~ "$row3" ]] || false @@ -459,10 +460,10 @@ SQL [[ "$output" =~ "Successfully exported data." ]] || false [ -f more.parquet ] - run parquet-tools cat --json more.parquet > output.json + run parquet cat more.parquet > output.json [ "$status" -eq 0 ] - [[ "$output" =~ '{"pk":1,"v":"1234.56789","b":511}' ]] || false - [[ "$output" =~ '{"pk":2,"v":"5235.66789","b":514}' ]] || false + [[ "$output" =~ '{"pk": 1, "v": "1234.56789", "b": 511}' ]] || false + [[ "$output" =~ '{"pk": 2, "v": "5235.66789", "b": 514}' ]] || false } @test "export-tables: table export to sql with null values in different sql types" { diff --git a/integration-tests/bats/foreign-keys.bats b/integration-tests/bats/foreign-keys.bats index d6dfa45985..a3560fa7e9 100644 --- a/integration-tests/bats/foreign-keys.bats +++ b/integration-tests/bats/foreign-keys.bats @@ -1968,3 +1968,33 @@ SQL [[ ! "$output" =~ "panic:" ]] || false [[ "$output" =~ "cannot add or update a child row - Foreign key violation on fk: \`fk_b_a_id_refs_a\`, table: \`b\`, referenced table: \`a\`, key: \`[31337]\`" ]] || false } + +@test "foreign-keys: partial updates work against foreign key constraints" { + skip "Partial updates are unsupported" + dolt sql < /dev/null 2>&1 set_dolt_user "Bats Tests" "bats@email.fake" diff --git a/integration-tests/bats/keyless.bats b/integration-tests/bats/keyless.bats index 5b8eb7b441..d680c48fff 100644 --- a/integration-tests/bats/keyless.bats +++ b/integration-tests/bats/keyless.bats @@ -1193,3 +1193,12 @@ SQL run dolt table import -u mytable x.csv [ $status -eq 0 ] } + +@test "keyless: unique key should be represented as a primary key" { + skip "unique key is created, but it should be described as a primary key." + dolt sql -q "create table t(pk int not null auto_increment, UNIQUE KEY pk (pk));" + + run dolt sql -r csv -q "describe t" + [[ "$output" =~ "Field,Type,Null,Key,Default,Extra" ]] || false + [[ "$output" =~ "ai,int,NO,UNI,NULL,auto_increment" ]] || false +} diff --git a/integration-tests/bats/sql-conflicts.bats b/integration-tests/bats/sql-conflicts.bats index b8d980d36b..463b8643bf 100644 --- a/integration-tests/bats/sql-conflicts.bats +++ b/integration-tests/bats/sql-conflicts.bats @@ -17,7 +17,7 @@ CREATE TABLE two_pk ( c2 BIGINT, PRIMARY KEY (pk1,pk2) ); -CREATE TABLE empty ( +CREATE TABLE empty_table ( pk BIGINT NOT NULL, PRIMARY KEY (pk) ); @@ -31,7 +31,7 @@ teardown() { } @test "sql-conflicts: read from empty table" { - dolt sql -q "SELECT * FROM dolt_conflicts_empty" + dolt sql -q "SELECT * FROM dolt_conflicts_empty_table" } @test "sql-conflicts: add conflict" { diff --git a/integration-tests/bats/sql-create-tables.bats b/integration-tests/bats/sql-create-tables.bats index 34de867f38..e9cec97b48 100644 --- a/integration-tests/bats/sql-create-tables.bats +++ b/integration-tests/bats/sql-create-tables.bats @@ -767,3 +767,12 @@ SQL [ "$status" -eq 1 ] [[ "$output" =~ "table not found: myTempTable" ]] || false } + +@test "sql-create-tables: BINARY attributes" { + dolt sql < port_finder.py + + PORT=$(python3 port_finder.py) run dolt sql-server --port=$PORT [ "$status" -eq 1 ] [[ "$output" =~ "database locked by another sql-server; either clone the database to run a second server" ]] || false diff --git a/integration-tests/bats/sql-show.bats b/integration-tests/bats/sql-show.bats index c8dd41ffb0..cf21bd4d21 100644 --- a/integration-tests/bats/sql-show.bats +++ b/integration-tests/bats/sql-show.bats @@ -39,12 +39,12 @@ teardown() { @test "sql-show: show table status has number of rows correct" { dolt sql -q "CREATE TABLE test(pk int NOT NULL AUTO_INCREMENT, c1 int, PRIMARY KEY (pk))" - run dolt sql -q "show table status where Rows=0" + run dolt sql -q 'show table status where `Rows`=0' [ "$status" -eq 0 ] [[ "$output" =~ "test" ]] || false dolt sql -q "INSERT INTO test (c1) VALUES (0)" - run dolt sql -q "show table status where Rows=1;" + run dolt sql -q 'show table status where `Rows`=1;' [ "$status" -eq 0 ] [[ "$output" =~ "test" ]] || false } @@ -62,4 +62,4 @@ teardown() { # Looking for 32 bytes (2 cols * 2 * rows * 8 int bytes) [[ "$output" =~ "32" ]] || false -} \ No newline at end of file +}