Add support for Apache Doris database detection#5940
Closed
lesignals wants to merge 4 commits intosqlmapproject:masterfrom
Closed
Add support for Apache Doris database detection#5940lesignals wants to merge 4 commits intosqlmapproject:masterfrom
lesignals wants to merge 4 commits intosqlmapproject:masterfrom
Conversation
- Add 'doris' to MYSQL_ALIASES in lib/core/settings.py - Add DORIS fork enum in lib/core/enums.py - Add Doris detection logic using BITMAP_UNION_COUNT() function in MySQL fingerprint - Apache Doris will now be properly identified as "MySQL (Doris fork)" instead of showing "MySQL version not found" error Apache Doris is highly compatible with MySQL syntax and protocol but has unique features like BITMAP functions that can be used for detection.
Member
- Use VERSION() = '5.7.99' as primary Doris fingerprint (more reliable than BITMAP functions) - Add @@VERSION_COMMENT checks for both Doris and StarRocks - Add StarRocks fork detection to avoid misidentification - Remove unreliable BITMAP_UNION_COUNT() as sole detection method This addresses the issue where BITMAP_UNION_COUNT() alone could misidentify StarRocks or other bitmap-compatible systems as Doris. The new multi-step detection logic provides more accurate database identification.
- Use VERSION()='5.7.99' as primary fingerprint (Apache Doris hardcoded value) - Add dual verification: VERSION()='5.7.99' AND @@VERSION_COMMENT LIKE '%Doris%' - Prioritize StarRocks detection to avoid confusion - Provide fallback detection for restricted environments - Based on official Doris documentation: version() always returns '5.7.99' This implementation follows best practices: 1. StarRocks checked first (returns real versions like 5.1.0) 2. Combined verification for Apache Doris (5.7.99 + banner) 3. Fallback to version-only detection when VERSION_COMMENT inaccessible 4. Leverages the fact that MySQL never released version 5.7.99
Member
|
sorry, looks messed. will refactor and push smth similar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Apache Doris is highly compatible with MySQL syntax and protocol but has unique features like BITMAP functions that can be used for detection.