feat(mariadb): UUID/INET4/INET6 types; reject FOR UPDATE/SHARE OF#318
Open
vsai12 wants to merge 4 commits into
Open
feat(mariadb): UUID/INET4/INET6 types; reject FOR UPDATE/SHARE OF#318vsai12 wants to merge 4 commits into
vsai12 wants to merge 4 commits into
Conversation
MariaDB-only non-reserved scalar types, recognised in type position only (UUID is also a function; INET4/INET6 usable as identifiers) so the words are not reserved. Closes part of the BYT-9135 add-surface; flows to bytebase MariaDB Diagnose on a dep bump (verified end-to-end: CREATE TABLE t (a UUID) RED->GREEN).
The OF object list on a locking clause is MySQL-only; MariaDB 11.4 removed it. omni mirrored MySQL and over-accepted it — a parser-fidelity bug. Gate the OF arm to a reject; FOR UPDATE / FOR SHARE (no OF) are unaffected. Also records a fidelity note in expr.go for the sibling JSON -> / ->> over-accept, deferred because its grammar one-liner ripples into inherited accept-tests + the routine-body audit (a multi-file cleanup, out of this surgical arm).
…tory The JSON arrow prune is deferred (ripples into inherited accept-tests + the routine-body audit). Pin the two over-accepts in subtractiveDivergences + categoryCaseSQLs so the inventory gate stays honest and the finding is tracked, not floating. Container-verified OVER vs mariadb:11.8.8 (TestMariaDBDivergenceInventory green).
The parser now rejects FOR UPDATE/SHARE ... OF (MariaDB 11.4 removal), so the deparse round-trip fixture for it no longer parses (deparse_test.go). Remove the fixture and the now-dead OF-emission in deparseForUpdate, so parse and deparse stay consistent — neither supports FOR UPDATE OF.
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.
Part of the BYT-9135 MariaDB add-surface. Two fidelity items, container-verified vs mariadb:11.8.8.
Add — UUID / INET4 / INET6 scalar types
Recognised in
parseDataTypein type position only, by identifier text — so they stay non-reserved (UUID is also a function; INET4/INET6 can be identifiers). Verified intact:UUID()as a function,uuid/inet6as identifiers,uuid/inet4as column names.Fix — reject
FOR UPDATE/SHARE ... OFThe
OFobject list on a locking clause is MySQL-only; MariaDB 11.4 removed it. omni mirrored MySQL and over-accepted it (a parser-fidelity bug). Gated theOFarm to a reject;FOR UPDATE/FOR SHAREwithoutOFare unaffected.Container verification (mdbcheck vs mariadb:11.8.8)
CREATE TABLE t (a UUID),(a INET4, b INET6)→ AGREE_ACCEPT... FOR UPDATE OF t,... FOR SHARE OF t→ AGREE_REJECTa -> '$.b'→ OVER (see deferral below)Deferred (tracked) — JSON
->/->>MariaDB has no arrow operators (uses
JSON_EXTRACT()/JSON_UNQUOTE()), so omni over-accepts them. The grammar fix is one line, but it ripples into inherited mysql accept-tests (compare_test.goTestParseJson{Extract,UnquoteExtract}) and the routine-body audit — a multi-file cleanup deferred from this surgical arm. Recorded as a fidelity note inexpr.go.Downstream
These flow to Bytebase MariaDB Diagnose (already on omni/mariadb) on a dep bump, zero Bytebase source change — verified end-to-end:
CREATE TABLE t (a UUID)goes RED→GREEN in Bytebase Diagnose against pinned vs. this branch.Tests
TestUUIDInetTypeAccept,TestUUIDInetNonReserved,TestForUpdateOfReject. Fullmariadb/parsersuite green (-short).