Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blob supports maximum storage64 m data 2.0 dev #20720

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/container/types/bytes.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ const (
MaxBinaryLen = 255
MaxEnumLen = 65535
MaxBitLen = 64
MaxBlobLen = 65535
MaxVarcharLen = MaxBlobLen
MaxVarBinaryLen = MaxBlobLen
MaxStringSize = MaxBlobLen
MaxBlobLen = 67108864 // 64 MB
MaxStringSize = 65535 // 64 KB
MaxVarcharLen = MaxStringSize
MaxVarBinaryLen = MaxStringSize
)

func (v *Varlena) UnsafePtr() unsafe.Pointer {
Expand Down
3 changes: 2 additions & 1 deletion pkg/sql/plan/function/func_unary.go
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,8 @@ func LoadFile(ivecs []*vector.Vector, result vector.FunctionResultWrapper, proc
if err != nil {
return err
}
if len(ctx) > 65536 /*blob size*/ {

if len(ctx) > types.MaxBlobLen /*blob size*/ {
return moerr.NewInternalError(proc.Ctx, "Data too long for blob")
}
if len(ctx) == 0 {
Expand Down
Loading