Skip to content

Conversation

max-hoffman
Copy link
Contributor

@max-hoffman max-hoffman commented Feb 22, 2024

Tests and basic engine-side guards similar to mysql's behavior.

re: dolthub/dolt#7524

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.
Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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

@max-hoffman max-hoffman merged commit a9f896c into main Feb 26, 2024
@max-hoffman max-hoffman deleted the max/row-length-errors branch February 26, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants