GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: find tables in SET values instead of throwing by minleejae · Pull Request #2873 · JSQLParser/JSqlParser

Conversation

@minleejae

@minleejae minleejae commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

TablesNamesFinder threw UnsupportedOperationException for every SET statement except the SQL Server ON/OFF options. A subquery in a value, as in SET @a = (SELECT MAX(id) FROM t1), was never reached. A MySQL trigger whose body is or contains SET, such as CREATE TRIGGER trg BEFORE INSERT ON t1 FOR EACH ROW SET NEW.a = …, failed the same way, although its table is known. The trigger examples in the MySQL manual use this form.

The finder now visits the value expressions of each assignment, as it does for the values of UPDATE … SET. A subquery in a SET value reports its tables, and other SET statements report none. The deliberate UnsupportedOperationException for other statements, such as CREATE SYNONYM, is unchanged.

Public method signatures are retained.

Syntax reference: MySQL 8.4 SET for variables, trigger syntax.

Validation:

  • TablesNamesFinderTest adds a SET with a subquery, a SET without tables and two MySQL triggers, one with a SET body and one with SET inside BEGIN … END. Both new tests fail on master c84ad0ebc with UnsupportedOperationException: Finding tables from SetStatement is not supported.
  • MySQL 8.4.11 accepts the two triggers and the SET statement.
  • Java 17 Gradle check: 12,264 tests, 0 failures, 25 skipped. Grammar ambiguity, formatting (Spotless ratchet against upstream/master), Checkstyle, PMD, SpotBugs and JaCoCo pass. The grammar is unchanged.

AI assistance: prepared with Claude Code.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@minleejae
fix: find tables in SET values instead of throwing
364167f
TablesNamesFinder threw UnsupportedOperationException for every SET
statement except SQL Server ON/OFF options. A MySQL trigger whose body
is or contains SET, such as FOR EACH ROW SET NEW.a = ..., failed the
same way, although its table is known.

The finder now visits the value expressions of each assignment, so a
subquery in a SET value reports its tables and other SET statements
report none.

Signed-off-by: minleejae <[email protected]>
@manticore-projects
manticore-projects merged commit 4dff61a into JSQLParser:master Oct 29, 2026
10 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@minleejae minleejae mentioned this pull request Nov 3, 2026
feat: parse SET TRANSACTION, SET CONSTRAINTS, COMMIT RELEASE and PostgreSQL END and ABORT #2889
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@minleejae @manticore-projects
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.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.