fix(mysql): advertise CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA in server greeting#5744
Conversation
… greeting ProxySQL already correctly parses the lenenc auth data format when clients send it in the handshake response (MySQL_Protocol.cpp:1708), but the server greeting packet never advertised the capability flag. Clients like Boost MySQL require this flag before they will even attempt a connection. Adding it to extended_capabilities makes ProxySQL compatible with such clients without any protocol behavior change. The existing test_greeting_capabilities-t test is updated to include the new flag in the baseline regression check. Closes: #4760
…_DATA New TAP test test_plugin_auth_lenenc_client_data-t that: - Connects via mariadb client library (which auto-negotiates lenenc auth when the server advertises it, same as Boost MySQL does) - Verifies server greeting contains CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA - Verifies client actually negotiated the flag (lenenc path exercised) - Executes a query to confirm the session is fully functional - Tests with deprecate_eof=ON and OFF Registered in groups.json alongside test_greeting_capabilities-t.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (3)**/*.{cpp,h,hpp}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
test/tap/tests/{test_*,-t}.cpp📄 CodeRabbit inference engine (CLAUDE.md)
Files:
test/tap/tests/*-t.cpp📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (1)📚 Learning: 2026-01-20T09:34:19.124ZApplied to files:
🔇 Additional comments (4)
📝 WalkthroughWalkthroughThis PR adds support for advertising the ChangesPlugin Auth Capability Advertisement
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly Related Issues
Possibly Related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
There was a problem hiding this comment.
Code Review
This pull request adds the CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA capability to the MySQL server greeting in lib/MySQL_Protocol.cpp, allowing ProxySQL to support length-encoded authentication data. The changes also include a new test suite and updates to existing test configurations. Feedback suggests adding a fallback definition for the new capability flag to ensure compatibility with older development headers and recommends adding a null check for query results in the test code to prevent potential crashes.
| CLIENT_MULTI_RESULTS, | ||
| CLIENT_PS_MULTI_RESULTS, | ||
| CLIENT_PLUGIN_AUTH, | ||
| CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA, |
There was a problem hiding this comment.
| } | ||
|
|
||
| MYSQL_ROW row = mysql_fetch_row(res); | ||
| if (!row || strcmp(row[0], "1") != 0) { |
|



Summary
CLIENT_PLUGIN_AUTH_LENENC_CLIENT_DATA(0x00200000) in the server greeting packet'sextended_capabilities, making ProxySQL compatible with clients like Boost MySQL that require this capability flag before connecting.MySQL_Protocol.cpp:1708); it just never advertised the flag, so strict clients refused to connect.test_greeting_capabilities-tbaseline regression check to include the new flag.test_plugin_auth_lenenc_client_data-tTAP test that exercises the full lenenc auth path end-to-end (server advertises flag, client negotiates it, query succeeds).Context
Closes #4760
Testing
lint_groups_json.pypasses.check_groups.py --sourceshows no regressions (pre-existingmysqlx_admin_alias_resolution_unit-tmissing from groups.json is unrelated).Summary by CodeRabbit
New Features
Tests