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 #627 - Accept ON as value in SET statements by predictor2718 · Pull Request #652 · phpmyadmin/sql-parser

Conversation

@predictor2718

@predictor2718 predictor2718 commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • SET @@variable = ON failed with "Missing expression" because ON is a reserved keyword that
    Expression::parse() rejected
  • OFF worked because it is not a reserved keyword
  • Fix: in SetOperation::parse(), after Expression::parse() returns null, accept ON as a literal value since
    it is valid in SET statements

Fixes #627

Sorry, something went wrong.

Uh oh!

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

All reactions
@predictor2718
Simplify ON keyword check to only needed case
166fa16
Signed-off-by: Nicolai Ehrhardt <[email protected]>
@codecov

codecov Bot commented Apr 13, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.51%. Comparing base (4c45eac) to head (a204ecd).
⚠️ Report is 38 commits behind head on 5.11.x.

Additional details and impacted files
@@             Coverage Diff              @@
##             5.11.x     #652      +/-   ##
============================================
- Coverage     96.92%   96.51%   -0.42%     
- Complexity     2316     2355      +39     
============================================
  Files            71       71              
  Lines          5110     5189      +79     
============================================
+ Hits           4953     5008      +55     
- Misses          157      181      +24     
Flag Coverage Δ
unit-7.2-ubuntu-latest 96.48% <100.00%> (-0.44%) ⬇️
unit-7.3-ubuntu-latest 96.50% <100.00%> (-0.42%) ⬇️
unit-7.4-ubuntu-latest 96.48% <100.00%> (-0.42%) ⬇️
unit-8.0-ubuntu-latest 96.50% <100.00%> (-0.42%) ⬇️
unit-8.1-ubuntu-latest 96.47% <100.00%> (-0.44%) ⬇️
unit-8.2-ubuntu-latest 96.43% <100.00%> (-0.44%) ⬇️
unit-8.3-ubuntu-latest 96.43% <100.00%> (-0.44%) ⬇️
unit-8.4-ubuntu-latest 96.43% <100.00%> (-0.44%) ⬇️
unit-8.5-ubuntu-latest 96.43% <100.00%> (-0.44%) ⬇️
unit-8.6-ubuntu-latest 96.43% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

All reactions

Sorry, something went wrong.

Uh oh!

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

@predictor2718
Fix phpcs: place if condition on single line
0bd40a6
Signed-off-by: Nicolai Ehrhardt <[email protected]>
williamdes
williamdes approved these changes Oct 13, 2026
View reviewed changes

@williamdes williamdes left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, can you add a test case please ?

Sorry, something went wrong.

Uh oh!

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

predictor2718 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@predictor2718
Add test for SET variable = ON (phpmyadmin#627)
a204ecd
@predictor2718
predictor2718 force-pushed the fix/627-set-variable-on branch from f97a3a3 to a204ecd Compare October 13, 2026 18:31
@predictor2718

predictor2718 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review! I added a test case: parseSetVariableOn covers SET @@sql_log_bin = ON, autocommit = OFF. It fails without the fix and passes with it, so it also covers the line Codecov flagged.

All reactions

Sorry, something went wrong.

Uh oh!

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

@predictor2718 predictor2718 changed the title Simplify ON keyword check to only needed case Fix #627 - Accept ON as value in SET statements Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@williamdes williamdes williamdes approved these changes

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

@predictor2718 @williamdes
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 01402503 — 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.