-
-
Notifications
You must be signed in to change notification settings - Fork 234
Add row length guards #2342
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
Add row length guards #2342
Conversation
sql/types/size.go
Outdated
import "github.com/dolthub/go-mysql-server/sql" | ||
|
||
// SchemaAvgLength returns the expected storage length assuming | ||
// blobs and text will be ref'd out of band. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If blobs are always out of band, then this comment is misleading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's leaking a storage layer into the engine that won't be true for all integrators. alternatively I could have integrators do their own execution time checks, during CreateTable, AlterTable, ... etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually I might like that better, there's a ValidateForInsert(schema)
on the Dolt side that might be a more natural place to do this check. will update
Tests and basic engine-side guards similar to mysql's behavior.
re: dolthub/dolt#7524