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 hex string literal (x'...') parsing in CREATE TABLE DEFAULT values by predictor2718 · Pull Request #650 · phpmyadmin/sql-parser

Conversation

@predictor2718

@predictor2718 predictor2718 commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The lexer incorrectly tokenized x'...' hex string literals as two separate tokens (keyword x + string
    '...'), producing invalid SQL x AS '...' on rebuild
  • Added states 11-13 to the number parsing state machine (analogous to states 7-9 for b'...' binary literals) to
    recognize x'...' and X'...' as single hex string literal tokens
  • Added FLAG_NUMBER_HEX_STRING to prevent incorrect hexdec() conversion of the token value

Fixes #649

Sorry, something went wrong.

Uh oh!

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

All reactions
@predictor2718
Fix hex string literal (x'...') parsing in CREATE TABLE DEFAULT values
26b7d61
Signed-off-by: Nicolai Ehrhardt <[email protected]>
@codecov

codecov Bot commented Apr 12, 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.93%. Comparing base (4c45eac) to head (5081e1b).
⚠️ Report is 7 commits behind head on 5.11.x.

Additional details and impacted files
@@             Coverage Diff              @@
##             5.11.x     #650      +/-   ##
============================================
+ Coverage     96.92%   96.93%   +0.01%     
- Complexity     2316     2331      +15     
============================================
  Files            71       71              
  Lines          5110     5128      +18     
============================================
+ Hits           4953     4971      +18     
  Misses          157      157              
Flag Coverage Δ
unit-7.2-ubuntu-latest 96.93% <100.00%> (+0.01%) ⬆️
unit-7.3-ubuntu-latest 96.92% <100.00%> (+0.01%) ⬆️
unit-7.4-ubuntu-latest 96.90% <100.00%> (+0.01%) ⬆️
unit-8.0-ubuntu-latest 96.92% <100.00%> (+0.01%) ⬆️
unit-8.1-ubuntu-latest 96.92% <100.00%> (+0.01%) ⬆️
unit-8.2-ubuntu-latest 96.86% <95.00%> (-0.01%) ⬇️
unit-8.3-ubuntu-latest 96.86% <95.00%> (-0.01%) ⬇️
unit-8.4-ubuntu-latest 96.86% <95.00%> (-0.01%) ⬇️
unit-8.5-ubuntu-latest 96.86% <95.00%> (-0.01%) ⬇️

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 predictor2718 mentioned this pull request Apr 12, 2026
[Bug]: binary(16) DEFAULT value is incorrectly exported phpmyadmin/phpmyadmin#19679
Open
predictor2718 added 4 commits April 12, 2026 13:20
@predictor2718
Fix PHPStan and code style issues
8041ea3
Signed-off-by: Nicolai Ehrhardt <[email protected]>
@predictor2718
Fix code style, PHPStan and Psalm baselines
c04977e
Signed-off-by: Nicolai Ehrhardt <[email protected]>
@predictor2718
Update Psalm baseline for MixedArrayAccess count
c93959f
Signed-off-by: Nicolai Ehrhardt <[email protected]>
@predictor2718
Update PHPStan baseline for test assertions
5081e1b
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 !

Sorry, something went wrong.

Uh oh!

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

All reactions
@williamdes williamdes added this to the 5.11.3 milestone Oct 13, 2026
@williamdes williamdes self-assigned this Oct 13, 2026
@williamdes
williamdes merged commit 18d63ad into phpmyadmin:5.11.x Oct 13, 2026
23 checks passed

Uh oh!

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

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

@williamdes williamdes

Labels

None yet

Projects

None yet

Milestone

5.11.3

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.