Make mysqltuner.pl the most stable, portable, and reliable performance tuning advisor for MySQL, MariaDB, and Percona Server.
- Production Stability: Every recommendation must be safe for production environments.
- Single-File Architecture: Strict enforcement of a single-file structure. Modules or splitting are prohibited.
- Zero-Dependency Portability: The script must remain self-contained and executable on any server with a base Perl installation (Core modules only).
- Universal Compatibility: Support the widest possible range of MySQL-compatible versions (Legacy 5.5 to Modern 11.x).
- Regression Limit: Proactively identify and prevent regressions through exhaustive automated testing.
- SINGLE FILE: Spliting
mysqltuner.plinto modules is strictly prohibited. - NON-REGRESSION: Deleting existing code is prohibited without relocation or commenting out.
- TDD MANDATORY: Use a TDD approach. Validate solutions by creating test cases before final submission.
- SAFE COMMANDS: Always use absolute paths. Monitor every command for
exit code 0. - CREDENTIAL HYGIENE: NEVER hardcode credentials.
- VERSION CONSISTENCY: Version numbers MUST be synchronized across
CURRENT_VERSION.txt,Changelog, and all occurrences withinmysqltuner.pl. - CONVENTIONAL COMMITS: All commit messages MUST follow the Conventional Commits specification.
- NO DIRECT COMMIT: All changes SHOULD be committed via
npm run commitorgit cz.
- Multi-Version Validation: Test diagnostic logic changes against at least one "Legacy" version (e.g. MySQL 8.0) and one "Modern" version (e.g. MariaDB 11.4).
- System Call Resilience: Every external command MUST check for binary existence and handle non-zero exit codes. Use
execute_system_command. - "Zero-Dependency" CPAN Policy: Use ONLY Perl "Core" modules.
- Audit Trail: Every recommendation MUST be documented in code with a comment pointing to official documentation.
- Memory-Efficient Parsing: Process logs line-by-line; NEVER load large files into memory.
- SQL Modeling: Use the
Modelingarray to collect schema design findings (naming, constraints, data types).