Skip to content

Add yamsql integration coverage for transaction-scoped local variables - #4568

Draft
arnaud-lacurie wants to merge 1 commit into
apple/arnaud-lacurie/local-vars/5-docsfrom
apple/arnaud-lacurie/local-vars/6-yamsql
Draft

Add yamsql integration coverage for transaction-scoped local variables#4568
arnaud-lacurie wants to merge 1 commit into
apple/arnaud-lacurie/local-vars/5-docsfrom
apple/arnaud-lacurie/local-vars/6-yamsql

Conversation

@arnaud-lacurie

Copy link
Copy Markdown
Collaborator

Add local-variables.yamsql exercising SET TRANSACTION VARIABLE / GET_VARIABLE
end-to-end through the real SQL planner/executor path: basic round trips,
overwriting and retyping a variable within one transaction, the NULL-vs-never-set
distinction, UNDEFINED_PARAMETER on an unset reference, use as a table-valued
function argument, and coexistence with CREATE TEMPORARY FUNCTION.

The inline setup:/setupReference: transaction-setup mechanism previously only
allowed CREATE TEMPORARY FUNCTION statements; extend the allow-list to also
accept SET TRANSACTION VARIABLE, since it has the same transaction-local,
never-committed safety property that motivated the original restriction. This is
required to exercise SET and GET_VARIABLE together within a single transaction
from a yamsql test.


Stack created with GitHub Stacks CLIGive Feedback 💬

Add local-variables.yamsql exercising SET TRANSACTION VARIABLE / GET_VARIABLE
end-to-end through the real SQL planner/executor path: basic round trips,
overwriting and retyping a variable within one transaction, the NULL-vs-never-set
distinction, UNDEFINED_PARAMETER on an unset reference, use as a table-valued
function argument, and coexistence with CREATE TEMPORARY FUNCTION.

The inline `setup:`/`setupReference:` transaction-setup mechanism previously only
allowed CREATE TEMPORARY FUNCTION statements; extend the allow-list to also
accept SET TRANSACTION VARIABLE, since it has the same transaction-local,
never-committed safety property that motivated the original restriction. This is
required to exercise SET and GET_VARIABLE together within a single transaction
from a yamsql test.
@arnaud-lacurie
arnaud-lacurie force-pushed the apple/arnaud-lacurie/local-vars/6-yamsql branch from 8110ca5 to 50f2983 Compare September 5, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing improvement Change that improves our testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant