René's URL Explorer Experiment


Title: Share MySQL account names across CREATE USER and DEFINER by minleejae · Pull Request #2806 · JSQLParser/JSqlParser · GitHub

Open Graph Title: Share MySQL account names across CREATE USER and DEFINER by minleejae · Pull Request #2806 · JSQLParser/JSqlParser

X Title: Share MySQL account names across CREATE USER and DEFINER by minleejae · Pull Request #2806 · JSQLParser/JSqlParser

Description: Purpose Read MySQL account names (user[@host]) with one grammar rule wherever they appear. Today, CREATE USER and the view, trigger and routine DEFINER clause each repeat the same rule, and both miss spellings that MySQL accepts: CREATE USER app@'%' and CREATE USER 'app'@localhost fail. The lexer reads app@ and @localhost as single tokens, and neither rule splits them. Without a dialect, CREATE USER "app"@"%" IDENTIFIED BY 'x' renders as CREATE USER app@% IDENTIFIED BY 'x', which is not valid SQL. The double quotes are dropped. A backquoted part keeps its backquotes inside the value (`app`), while a single-quoted part keeps only its text (app). The account statements and GRANT/REVOKE changes that follow build on this rule. Current design (As-is) MySqlUserAccount() (CREATE USER) and MySqlDefiner() both read MySqlAccountNamePart() [@ MySqlAccountNamePart()]. MySqlAccountNamePart() turns an identifier into new StringValue(name). That constructor strips double quotes, and the result is then marked unquoted. Target design (To-be) Add one production, MySqlAccountName(), that returns a UserAccount with separate user and host parts. It accepts every spelling: each part unquoted or quoted with ', " or a backquote; the lexer-merged forms app@localhost, app@'%' and 'app'@localhost, which it splits into user and host. MySqlUserAccount() (CREATE USER) and MySqlDefiner() use it. Their models are unchanged: UserAccount and MySqlDefiner keep getUser()/getHost(). A double-quoted or backquoted part keeps its quote character in getQuoteStr() and its text in getValue(), the same way a single-quoted part already did. CREATE USER "app"@"%" now renders unchanged in every mode. DEFINER = CURRENT_USER[()] is unchanged. Document the account names in the usage guide. Compatibility: rendered SQL is unchanged, except for the double-quoted accounts that previously lost their quotes. In the AST: A backquoted part now has the value app with quote `, instead of the value `app`. An unquoted app@localhost is now split into user app and host localhost. Before, it was one user named app@localhost without a host. Validation New MySqlAccountNameTest, 25 cases. Ten spellings each go through CREATE USER (with Dialect.MYSQL and without a dialect), view DEFINER and trigger DEFINER, with exact toString() and StatementDeParser output and the user/host value and quote character. It also checks rejected forms (app@, @host, 'app'@) and the unchanged DEFINER = CURRENT_USER(). Java 17 offline Gradle spotlessApply check: 10,377 tests, 10,352 passed, 25 skipped, zero failures/errors. The grammar choice conflict check passes. MySQL 8.4: ran 12 CREATE USER, DEFINER view/trigger and lookup statements in original and rendered form on two identical servers. The results match, and the created accounts and definers are identical: app2@'%', 'app3'@localhost, `app4`@`%`, "app5"@"%", … A corpus of 635 MySQL 8.4 / PostgreSQL 18 DDL and DCL statements, each accepted by the server: parse results are unchanged from master. On two servers per database, the rendered SQL gives the same results as the original for all 205 MySQL and 327 PostgreSQL statements that render. Integration validation Applied #2806–#2819 together on master (bdf8ac31), with the stacked PRs on top of their bases (#2806 → #2807 → #2808, #2806 → #2809 → #2810 and #2811 → #2812). Each branch merges cleanly into master. Between the branches, conflicts are limited to adjacent additions (README/index rows, usage sections, imports, visitor and feature lists, one enum line and one alias guard). The integrated build passes Java 17 offline Gradle spotlessApply check: 11,494 tests, 11,469 passed, 25 skipped, zero failures/errors. The grammar choice conflict check passes. On a corpus of 635 MySQL 8.4 and PostgreSQL 18 DDL/DCL statements, each accepted by the server, the integrated build parses 265 of 271 MySQL statements (master: 206) and 363 of 364 PostgreSQL statements (master: 328). Every MySQL 8.4 non-reserved word and PostgreSQL 18 unreserved or column-name keyword parses as a column and table name. On paired MySQL 8.4 and PostgreSQL 18.3 servers, all 263 MySQL and 362 PostgreSQL statements rendered by the integrated build give the same results as the originals.

Open Graph Description: Purpose Read MySQL account names (user[@host]) with one grammar rule wherever they appear. Today, CREATE USER and the view, trigger and routine DEFINER clause each repeat the same rule, and both mi...

X Description: Purpose Read MySQL account names (user[@host]) with one grammar rule wherever they appear. Today, CREATE USER and the view, trigger and routine DEFINER clause each repeat the same rule, and both mi...

Opengraph URL: https://github.com/JSQLParser/JSqlParser/pull/2806

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:ebeae241-2c87-5f63-113a-c2c6fa858269
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idEAF0:73AE1:321720:434AFC:6B049731
html-safe-nonce2c6f8d24dfc213c2940a03640aee6db22c3af43f75fdccc38ab61d6e02f2d23d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQUYwOjczQUUxOjMyMTcyMDo0MzRBRkM6NkIwNDk3MzEiLCJ2aXNpdG9yX2lkIjoiMTQ4NTgxNDM5Mjc2NjYzMzc3NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf690ba648be62d9d819f1885f61481da79dab57bcca53c94c692cf3b2388ddd7
hovercard-subject-tagpull_request:4854547257
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/JSQLParser/JSqlParser/pull/2806/files
twitter:imagehttps://avatars.githubusercontent.com/u/55116920?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/55116920?s=400&v=4
og:image:altPurpose Read MySQL account names (user[@host]) with one grammar rule wherever they appear. Today, CREATE USER and the view, trigger and routine DEFINER clause each repeat the same rule, and both mi...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None9784b6f42e2d5eac4e394fa88cad134c0dc5b6662b4ff2787a1ed1ef5a96331d
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/JSQLParser/JSqlParser git https://github.com/JSQLParser/JSqlParser.git
octolytics-dimension-user_id4643847
octolytics-dimension-user_loginJSQLParser
octolytics-dimension-repository_id1944709
octolytics-dimension-repository_nwoJSQLParser/JSqlParser
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1944709
octolytics-dimension-repository_network_root_nwoJSQLParser/JSqlParser
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release3fd14143b75b2af7b76bbd23b069867d091adfcc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/JSQLParser/JSqlParser/pull/2806/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSQLParser%2FJSqlParser%2Fpull%2F2806%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FJSQLParser%2FJSqlParser%2Fpull%2F2806%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=JSQLParser%2FJSqlParser
Reloadhttps://github.com/JSQLParser/JSqlParser/pull/2806/files
Reloadhttps://github.com/JSQLParser/JSqlParser/pull/2806/files
Reloadhttps://github.com/JSQLParser/JSqlParser/pull/2806/files
JSQLParserhttps://github.com/JSQLParser
JSqlParserhttps://github.com/JSQLParser/JSqlParser
Codehttps://github.com/JSQLParser/JSqlParser
Issues2 (2)https://github.com/JSQLParser/JSqlParser/issues
Pull requests2 (2)https://github.com/JSQLParser/JSqlParser/pulls
Discussionshttps://github.com/JSQLParser/JSqlParser/discussions
Actionshttps://github.com/JSQLParser/JSqlParser/actions
Projectshttps://github.com/JSQLParser/JSqlParser/projects
Wikihttps://github.com/JSQLParser/JSqlParser/wiki
Security and qualityhttps://github.com/JSQLParser/JSqlParser/security
Insightshttps://github.com/JSQLParser/JSqlParser/insights
Sign up for GitHub https://github.com/signup?return_to=%2FJSQLParser%2FJSqlParser%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FJSQLParser%2FJSqlParser%2Fissues%2Fnew%2Fchoose
manticore-projectshttps://github.com/manticore-projects
JSQLParser:masterhttps://github.com/JSQLParser/JSqlParser/tree/master
minleejae:refactor/mysql-account-names-20261014https://github.com/minleejae/JSqlParser/tree/refactor/mysql-account-names-20261014
Conversation 1 https://github.com/JSQLParser/JSqlParser/pull/2806
Commits 1 https://github.com/JSQLParser/JSqlParser/pull/2806/commits
Checks 10 https://github.com/JSQLParser/JSqlParser/pull/2806/checks
Files changed https://github.com/JSQLParser/JSqlParser/pull/2806/files
Please reload this pagehttps://github.com/JSQLParser/JSqlParser/pull/2806/files
Share MySQL account names across CREATE USER and DEFINER https://github.com/JSQLParser/JSqlParser/pull/2806/files#top
Show all changes 1 commit https://github.com/JSQLParser/JSqlParser/pull/2806/files
1af2ff3 fix: share MySQL account names across CREATE USER and DEFINER minleejae Oct 14, 2026 https://github.com/JSQLParser/JSqlParser/pull/2806/commits/1af2ff3e8656992fca98f24fcfb06aec5a001278
Clear filters https://github.com/JSQLParser/JSqlParser/pull/2806/files
Please reload this pagehttps://github.com/JSQLParser/JSqlParser/pull/2806/files
Please reload this pagehttps://github.com/JSQLParser/JSqlParser/pull/2806/files
JSqlParserCC.jjt https://github.com/JSQLParser/JSqlParser/pull/2806/files#diff-d323df58a0300a038ac87b328bf05b8255ff06e6b5d0e9aeae641fa566e4068c
usage.rst https://github.com/JSQLParser/JSqlParser/pull/2806/files#diff-1d76e581381361db03988ab6bd07be336cb8129b61bda04ab3fe334209488c2c
MySqlAccountNameTest.java https://github.com/JSQLParser/JSqlParser/pull/2806/files#diff-a065ddf681a446dc75b58efcbe069fa10f2f0e75aeada3b5ba59a3e21da1f516
src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjthttps://github.com/JSQLParser/JSqlParser/pull/2806/files#diff-d323df58a0300a038ac87b328bf05b8255ff06e6b5d0e9aeae641fa566e4068c
View file https://github.com/minleejae/JSqlParser/blob/1af2ff3e8656992fca98f24fcfb06aec5a001278/src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/JSQLParser/JSqlParser/pull/2806/{{ revealButtonHref }}
https://github.com/JSQLParser/JSqlParser/pull/2806/files#diff-d323df58a0300a038ac87b328bf05b8255ff06e6b5d0e9aeae641fa566e4068c
https://github.com/JSQLParser/JSqlParser/pull/2806/files#diff-d323df58a0300a038ac87b328bf05b8255ff06e6b5d0e9aeae641fa566e4068c
https://github.com/JSQLParser/JSqlParser/pull/2806/files#diff-d323df58a0300a038ac87b328bf05b8255ff06e6b5d0e9aeae641fa566e4068c
https://github.com/JSQLParser/JSqlParser/pull/2806/files#diff-d323df58a0300a038ac87b328bf05b8255ff06e6b5d0e9aeae641fa566e4068c
https://github.com/JSQLParser/JSqlParser/pull/2806/files#diff-d323df58a0300a038ac87b328bf05b8255ff06e6b5d0e9aeae641fa566e4068c
https://github.com/JSQLParser/JSqlParser/pull/2806/files#diff-d323df58a0300a038ac87b328bf05b8255ff06e6b5d0e9aeae641fa566e4068c
https://github.com/JSQLParser/JSqlParser/pull/2806/files#diff-d323df58a0300a038ac87b328bf05b8255ff06e6b5d0e9aeae641fa566e4068c
src/site/sphinx/usage.rsthttps://github.com/JSQLParser/JSqlParser/pull/2806/files#diff-1d76e581381361db03988ab6bd07be336cb8129b61bda04ab3fe334209488c2c
View file https://github.com/minleejae/JSqlParser/blob/1af2ff3e8656992fca98f24fcfb06aec5a001278/src/site/sphinx/usage.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/JSQLParser/JSqlParser/pull/2806/{{ revealButtonHref }}
https://github.com/JSQLParser/JSqlParser/pull/2806/files#diff-1d76e581381361db03988ab6bd07be336cb8129b61bda04ab3fe334209488c2c
https://github.com/JSQLParser/JSqlParser/pull/2806/files#diff-1d76e581381361db03988ab6bd07be336cb8129b61bda04ab3fe334209488c2c
src/test/java/net/sf/jsqlparser/statement/create/user/MySqlAccountNameTest.javahttps://github.com/JSQLParser/JSqlParser/pull/2806/files#diff-a065ddf681a446dc75b58efcbe069fa10f2f0e75aeada3b5ba59a3e21da1f516
View file https://github.com/minleejae/JSqlParser/blob/1af2ff3e8656992fca98f24fcfb06aec5a001278/src/test/java/net/sf/jsqlparser/statement/create/user/MySqlAccountNameTest.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/JSQLParser/JSqlParser/pull/2806/{{ revealButtonHref }}
Please reload this pagehttps://github.com/JSQLParser/JSqlParser/pull/2806/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.