Skip to content

Commit 40ff4c4

Browse files
authored
Merge pull request #1880 from dolthub/nicktobey-2afe4e10
[auto-bump] [no-release-notes] dependency by nicktobey
2 parents 516c6ba + bf3bd4b commit 40ff4c4

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ require (
66
github.com/PuerkitoBio/goquery v1.8.1
77
github.com/cockroachdb/apd/v2 v2.0.3-0.20200518165714-d020e156310a
88
github.com/cockroachdb/errors v1.7.5
9-
github.com/dolthub/dolt/go v0.40.5-0.20250918203941-09f7c7043be0
9+
github.com/dolthub/dolt/go v0.40.5-0.20250919235907-2afe4e108385
1010
github.com/dolthub/eventsapi_schema v0.0.0-20250915094920-eadfd39051ca
1111
github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2
12-
github.com/dolthub/go-mysql-server v0.20.1-0.20250918184337-1e27be84307a
12+
github.com/dolthub/go-mysql-server v0.20.1-0.20250919010705-b0670cfce79c
1313
github.com/dolthub/sqllogictest/go v0.0.0-20240618184124-ca47f9354216
1414
github.com/dolthub/vitess v0.0.0-20250918181259-ed0e1c5cb192
1515
github.com/fatih/color v1.13.0

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,8 @@ github.com/dolthub/aws-sdk-go-ini-parser v0.0.0-20250305001723-2821c37f6c12 h1:I
248248
github.com/dolthub/aws-sdk-go-ini-parser v0.0.0-20250305001723-2821c37f6c12/go.mod h1:rN7X8BHwkjPcfMQQ2QTAq/xM3leUSGLfb+1Js7Y6TVo=
249249
github.com/dolthub/dolt-mcp v0.2.2-0.20250917171427-13e4520d1c36 h1:1OJhO12aBkZG7WQzAbu1WKCLSPT4AeoSEYeRwCirIi4=
250250
github.com/dolthub/dolt-mcp v0.2.2-0.20250917171427-13e4520d1c36/go.mod h1:S8OtLV2B//aelmZlGnFO44q4YH+Tyfl7jQ9djb4gPJE=
251-
github.com/dolthub/dolt/go v0.40.5-0.20250918203941-09f7c7043be0 h1:mXvdg2gmPuGs+wuZYeSxtxn1aiWsv1GNSswLohMkGRI=
252-
github.com/dolthub/dolt/go v0.40.5-0.20250918203941-09f7c7043be0/go.mod h1:lv40Isuq1R2LDPnnbZpth81jakrByq938R8aeOotmzg=
251+
github.com/dolthub/dolt/go v0.40.5-0.20250919235907-2afe4e108385 h1:DW4Ey15+x6hPXxooNXsv3jj2h4rOiNxJu2eutlB3XmU=
252+
github.com/dolthub/dolt/go v0.40.5-0.20250919235907-2afe4e108385/go.mod h1:6n7es9VAbZghLYPVgetk1cCQ/6UKqQm4oxLgNBu9wiw=
253253
github.com/dolthub/eventsapi_schema v0.0.0-20250915094920-eadfd39051ca h1:BGFz/0OlKIuC6qHIZQbvPapFvdAJkeEyGXWVgL5clmE=
254254
github.com/dolthub/eventsapi_schema v0.0.0-20250915094920-eadfd39051ca/go.mod h1:CoDLfgPqHyBtth0Cp+fi/CmC4R81zJNX4wPjShdZ+Bw=
255255
github.com/dolthub/flatbuffers/v23 v23.3.3-dh.2 h1:u3PMzfF8RkKd3lB9pZ2bfn0qEG+1Gms9599cr0REMww=
@@ -258,8 +258,8 @@ github.com/dolthub/fslock v0.0.3 h1:iLMpUIvJKMKm92+N1fmHVdxJP5NdyDK5bK7z7Ba2s2U=
258258
github.com/dolthub/fslock v0.0.3/go.mod h1:QWql+P17oAAMLnL4HGB5tiovtDuAjdDTPbuqx7bYfa0=
259259
github.com/dolthub/go-icu-regex v0.0.0-20250916051405-78a38d478790 h1:zxMsH7RLiG+dlZ/y0LgJHTV26XoiSJcuWq+em6t6VVc=
260260
github.com/dolthub/go-icu-regex v0.0.0-20250916051405-78a38d478790/go.mod h1:F3cnm+vMRK1HaU6+rNqQrOCyR03HHhR1GWG2gnPOqaE=
261-
github.com/dolthub/go-mysql-server v0.20.1-0.20250918184337-1e27be84307a h1:/BpSv3PbnHv2HrJc8rHktE9Z2mIvYuCV/hykfX8B+JM=
262-
github.com/dolthub/go-mysql-server v0.20.1-0.20250918184337-1e27be84307a/go.mod h1:vYpsrVFnvdhCn3bD7Jsy7lcZsknq9HrqfNpi/DZOg18=
261+
github.com/dolthub/go-mysql-server v0.20.1-0.20250919010705-b0670cfce79c h1:0vvuSeatbCpxh7NgCti9mhZTDCgrgKwIh9YP39EgEBU=
262+
github.com/dolthub/go-mysql-server v0.20.1-0.20250919010705-b0670cfce79c/go.mod h1:vYpsrVFnvdhCn3bD7Jsy7lcZsknq9HrqfNpi/DZOg18=
263263
github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63 h1:OAsXLAPL4du6tfbBgK0xXHZkOlos63RdKYS3Sgw/dfI=
264264
github.com/dolthub/gozstd v0.0.0-20240423170813-23a2903bca63/go.mod h1:lV7lUeuDhH5thVGDCKXbatwKy2KW80L4rMT46n+Y2/Q=
265265
github.com/dolthub/ishell v0.0.0-20240701202509-2b217167d718 h1:lT7hE5k+0nkBdj/1UOSFwjWpNxf+LCApbRHgnCA17XE=

server/functions/char_length.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ var char_length_text = framework.Function1{
3737
Parameters: [1]*pgtypes.DoltgresType{pgtypes.Text},
3838
Strict: true,
3939
Callable: func(ctx *sql.Context, _ [2]*pgtypes.DoltgresType, val1 any) (any, error) {
40-
return int32(len([]rune(val1.(string)))), nil
40+
// We can't use Wrapper.MaxByteLength to avoid unwrapping because that gives byte length, not char length.
41+
valString, _, err := sql.Unwrap[string](ctx, val1)
42+
if err != nil {
43+
return nil, err
44+
}
45+
46+
return int32(len([]rune(valString))), nil
4147
},
4248
}

0 commit comments

Comments
 (0)