Escape "vector" reserved keyword for MariaDB 11.6+ support - #12
Open
scotteuser wants to merge 1 commit into
Open
Escape "vector" reserved keyword for MariaDB 11.6+ support#12scotteuser wants to merge 1 commit into
scotteuser wants to merge 1 commit into
Conversation
Contributor
Author
|
Created related issue here: #13 |
mxr576
reviewed
Jul 29, 2026
| "CREATE TABLE %s %s ( | ||
| id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, | ||
| vector JSON, | ||
| `vector` JSON, |
There was a problem hiding this comment.
Using embedding_vector instead could be an alternative fix that eliminates reserved word usage.
Contributor
Author
There was a problem hiding this comment.
That'd need a migration path though to convert existing databases, it's far simpler to just wrap in backticks like this imo
There was a problem hiding this comment.
Agreed about the impact, was not sure about the BC policy here, just wanted to raise the alternative that removed reserved word usage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
"vector" became a reserved keyword in MariaDB 11.6+ resulting in errors like this:
See https://mariadb.com/docs/server/reference/sql-structure/sql-language-structure/reserved-words
This PR just surrounds all usage of vector with backticks.