- 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
- 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.
- 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.