Skip to content

Commit ec8944e

Browse files
committed
Merge remote-tracking branch 'origin/main' into taylor/dolt-schema
2 parents 1a1efcc + 6364199 commit ec8944e

File tree

9 files changed

+59
-12
lines changed

9 files changed

+59
-12
lines changed

go/cmd/dolt/commands/sql_statement_scanner.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,20 @@ func (s *streamScanner) Scan() bool {
9696
}
9797

9898
// discard leading whitespace
99-
for ; unicode.IsSpace(rune(s.buf[s.i])); s.i++ {
100-
if s.buf[s.i] == '\n' {
101-
s.lineNum++
102-
}
99+
for {
103100
if s.i >= s.fill {
104101
if err := s.read(); err != nil {
105102
s.err = err
106103
return false
107104
}
108105
}
106+
if !unicode.IsSpace(rune(s.buf[s.i])) {
107+
break
108+
}
109+
if s.buf[s.i] == '\n' {
110+
s.lineNum++
111+
}
112+
s.i++
109113
}
110114
s.truncate()
111115

go/cmd/dolt/commands/sql_statement_scanner_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,14 @@ insert into foo values (1,2,3)|`,
187187
},
188188
lineNums: []int{1, 2},
189189
},
190+
{
191+
// https://github.com/dolthub/dolt/issues/8495
192+
input: strings.Repeat(" ", 4096) + `insert into foo values (1,2,3)`,
193+
statements: []string{
194+
"insert into foo values (1,2,3)",
195+
},
196+
lineNums: []int{1, 2},
197+
},
190198
}
191199

192200
for _, tt := range testcases {

go/cmd/dolt/commands/sqlserver/queryist_utils.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ func BuildConnectionStringQueryist(ctx context.Context, cwdFS filesys.Filesys, c
6868
var lateBind cli.LateBindQueryist = func(ctx context.Context) (cli.Queryist, *sql.Context, func(), error) {
6969
sqlCtx := sql.NewContext(ctx)
7070
sqlCtx.SetCurrentDatabase(dbRev)
71-
return queryist, sqlCtx, func() { conn.Conn(ctx) }, nil
71+
return queryist, sqlCtx, func() {
72+
conn.Conn(ctx)
73+
}, nil
7274
}
7375

7476
return lateBind, nil

go/cmd/dolt/doltversion/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
package doltversion
1717

1818
const (
19-
Version = "1.43.8"
19+
Version = "1.43.9"
2020
)

go/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ require (
5757
github.com/cespare/xxhash/v2 v2.2.0
5858
github.com/creasty/defaults v1.6.0
5959
github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2
60-
github.com/dolthub/go-mysql-server v0.18.2-0.20241024233927-96a484368bea
60+
github.com/dolthub/go-mysql-server v0.18.2-0.20241028173746-a6973b5e90d6
6161
github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63
6262
github.com/dolthub/swiss v0.1.0
6363
github.com/goccy/go-json v0.10.2

go/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ github.com/dolthub/fslock v0.0.3 h1:iLMpUIvJKMKm92+N1fmHVdxJP5NdyDK5bK7z7Ba2s2U=
183183
github.com/dolthub/fslock v0.0.3/go.mod h1:QWql+P17oAAMLnL4HGB5tiovtDuAjdDTPbuqx7bYfa0=
184184
github.com/dolthub/go-icu-regex v0.0.0-20240916130659-0118adc6b662 h1:aC17hZD6iwzBwwfO5M+3oBT5E5gGRiQPdn+vzpDXqIA=
185185
github.com/dolthub/go-icu-regex v0.0.0-20240916130659-0118adc6b662/go.mod h1:KPUcpx070QOfJK1gNe0zx4pA5sicIK1GMikIGLKC168=
186-
github.com/dolthub/go-mysql-server v0.18.2-0.20241024233927-96a484368bea h1:bqHfelpj4LTC4RQnnFeC8KiXda90E0YfG0Elg5AqV0w=
187-
github.com/dolthub/go-mysql-server v0.18.2-0.20241024233927-96a484368bea/go.mod h1:z/GGuH2asedC+lkJA4sx+C3oyRH1HRx8ET6N9AGBVms=
186+
github.com/dolthub/go-mysql-server v0.18.2-0.20241028173746-a6973b5e90d6 h1:+RYghO025hK+Q2y9rPXv3mLOSnWOKllVjfg3vEJ4lfM=
187+
github.com/dolthub/go-mysql-server v0.18.2-0.20241028173746-a6973b5e90d6/go.mod h1:z/GGuH2asedC+lkJA4sx+C3oyRH1HRx8ET6N9AGBVms=
188188
github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63 h1:OAsXLAPL4du6tfbBgK0xXHZkOlos63RdKYS3Sgw/dfI=
189189
github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63/go.mod h1:lV7lUeuDhH5thVGDCKXbatwKy2KW80L4rMT46n+Y2/Q=
190190
github.com/dolthub/ishell v0.0.0-20240701202509-2b217167d718 h1:lT7hE5k+0nkBdj/1UOSFwjWpNxf+LCApbRHgnCA17XE=
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env bats
2+
load $BATS_TEST_DIRNAME/helper/common.bash
3+
4+
setup() {
5+
setup_common
6+
}
7+
8+
teardown() {
9+
teardown_common
10+
}
11+
12+
@test "processlist: kill query" {
13+
if [ "$SQL_ENGINE" != "remote-engine" ]; then
14+
skip "processlist is remote-engine specific"
15+
fi
16+
17+
dolt sql -q "select sleep(1000)" &
18+
sleep 1
19+
20+
run dolt sql -q "SHOW PROCESSLIST"
21+
[[ "$output" =~ "select sleep(1000)" ]] || false
22+
23+
qpid=$(dolt sql -q "show processlist" | grep --text "select sleep(1000)" | cut -d"|" -f2)
24+
run dolt sql -q "kill query $qpid"
25+
sleep 1
26+
27+
run dolt sql -q "SHOW PROCESSLIST"
28+
[[ ! "$output" =~ "select sleep(1000)" ]] || false
29+
}

proto/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ Dependencies are git submodules in //proto/third_party. Make sure you have all t
1010
submodules synced. If not, you can sync them initially with:
1111
git submodule update --init
1212

13-
* You need to build protoc in //proto/third_party/protobuf by running `bazel
14-
build //:protoc` from that directory. Currently tested with bazel version 3.1.0.
13+
* Get the 6.3.0 version of bazel from https://github.com/bazelbuild/bazel/releases/tag/6.3.0
14+
Later versions don't currently work. Verify the version and ensure it's first in your path.
15+
16+
* You need to build protoc in //proto/third_party/protobuf by running:
17+
`bazel build //:protoc` from that directory.
18+
WARNING: you may need to simplify your env with a prefix of `PATH=/usr/local/bin:/usr/bin:/bin`
1519

1620
* You need to run `go build -o ._protoc-gen-go ./cmd/protoc-gen-go` in
1721
`third_party/protobuf-go`.

proto/third_party/protobuf

Submodule protobuf updated 2670 files

0 commit comments

Comments
 (0)