Skip to content
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

tlp: add prepared statements #71216

Closed
mgartner opened this issue Oct 6, 2021 · 0 comments · Fixed by #71323
Closed

tlp: add prepared statements #71216

mgartner opened this issue Oct 6, 2021 · 0 comments · Fixed by #71323
Assignees
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-queries SQL Queries Team

Comments

@mgartner
Copy link
Collaborator

mgartner commented Oct 6, 2021

TLP should have been able to catch #71002, but it could not because the bug only reproduces with prepared statements and TLP does not generate prepared statements. We should:

  • Modify TLP to perform prepared statements where some of the values in the filter are replaced with placeholders that are filled-in during EXECUTE.
  • Modify sqlsmith to generate prepared statements when performing mutations.
@mgartner mgartner added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Oct 6, 2021
@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label Oct 6, 2021
@nehageorge nehageorge self-assigned this Oct 6, 2021
nehageorge pushed a commit to nehageorge/cockroach that referenced this issue Oct 8, 2021
Previously, we did not have statements with placeholders in TLP queries.
This could have caught a correctness bug (cockroachdb#71002).
In this PR, support for prepared queries is added.

Fixes cockroachdb#71216.

Release note: None
nehageorge pushed a commit to nehageorge/cockroach that referenced this issue Oct 8, 2021
Previously, we did not have statements with placeholders in TLP queries.
This could have caught a correctness bug (cockroachdb#71002).
In this PR, support for prepared queries is added.

Fixes cockroachdb#71216.

Release note: None
craig bot pushed a commit that referenced this issue Oct 15, 2021
71323: sqlsmith, tests, tree: add prepared queries to tlp r=nehageorge a=nehageorge

Previously, we did not have statements with placeholders in TLP queries.
This could have caught a correctness bug (#71002).
In this PR, support for prepared queries is added.

Fixes #71216.

Release note: None

Co-authored-by: Neha George <[email protected]>
@craig craig bot closed this as completed in c7c6de1 Oct 15, 2021
@mgartner mgartner moved this to Done in SQL Queries Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-queries SQL Queries Team
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants