Full Code of major/MySQLTuner-perl for AI

master 9b8617f2d72c cached
192 files
3.3 MB
876.7k tokens
16 symbols
1 requests
Download .txt
Showing preview only (3,504K chars total). Download the full file or copy to clipboard to get everything.
Repository: major/MySQLTuner-perl
Branch: master
Commit: 9b8617f2d72c
Files: 192
Total size: 3.3 MB

Directory structure:
gitextract_e1gxxgyv/

├── .agent/
│   ├── README.md
│   ├── rules/
│   │   ├── 00_constitution.md
│   │   ├── 01_objective.md
│   │   ├── 02_architecture.md
│   │   ├── 03_execution_rules.md
│   │   ├── 04_best_practices.md
│   │   ├── 05_memory_protocol.md
│   │   └── remembers.md
│   ├── skills/
│   │   ├── cli-execution-mastery/
│   │   │   └── SKILL.md
│   │   ├── db-version-rift/
│   │   │   └── SKILL.md
│   │   ├── legacy-perl-patterns/
│   │   │   └── SKILL.md
│   │   └── testing-orchestration/
│   │       └── SKILL.md
│   └── workflows/
│       ├── compliance-sentinel.md
│       ├── doc-sync.md
│       ├── docker-clean.md
│       ├── examples-cleanup.md
│       ├── git-flow.md
│       ├── git-rollback.md
│       ├── hey-agent.md
│       ├── lab-down.md
│       ├── lab-up.md
│       ├── markdown-lint.md
│       ├── plan.md
│       ├── release-manager.md
│       ├── release-notes-gen.md
│       ├── release-preflight.md
│       ├── run-tests.md
│       ├── snapshot-to-test.md
│       ├── specify.md
│       └── tasks.md
├── .commitlintrc.js
├── .czrc
├── .dockerignore
├── .github/
│   ├── FUNDING.yml
│   └── workflows/
│       ├── docker_publish.yml
│       ├── generate_mariadb_examples.yml
│       ├── generate_mysql_examples.yml
│       ├── publish_release.yml
│       ├── pull_request.yml
│       ├── run_mt_with_db.yml
│       └── update_cve_and_docs.yml
├── .husky/
│   ├── commit-msg
│   └── pre-commit
├── .perltidy
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── CURRENT_VERSION.txt
├── Changelog
├── Dockerfile
├── FEATURES.md
├── INTERNALS.md
├── JenkinsFile
├── LICENSE
├── Makefile
├── POTENTIAL_ISSUES
├── README.fr.md
├── README.it.md
├── README.md
├── README.ru.md
├── ROADMAP.md
├── SECURITY.md
├── USAGE.md
├── basic_passwords.txt
├── build/
│   ├── audit_logs.pl
│   ├── bashrc
│   ├── build_rpm.sh
│   ├── clean.sh
│   ├── clean_examples.sh
│   ├── clearContainer.sh
│   ├── configimg.conf
│   ├── createMassDockerImages.sh
│   ├── createTestEnvs.sh
│   ├── deployOn
│   ├── doc_sync.py
│   ├── endoflife.sh
│   ├── fetchSampleDatabases.sh
│   ├── genFeatures.sh
│   ├── installStaff.sh
│   ├── md_lint.py
│   ├── mysql_mariadb_cve_full.csv
│   ├── mysqltuner.spec.tpl
│   ├── publishtodockerhub.sh
│   ├── release_gen.py
│   ├── sync.sh
│   ├── test_envs.sh
│   ├── updateCVElist.pl
│   ├── updateCVElist.py
│   └── updateStaff.sh
├── documentation/
│   └── specifications/
│       ├── cli_execution_skill.md
│       ├── cli_metadata_refactor.md
│       ├── compliance_sentinel_remembers.md
│       ├── dumpdir_logic_fix.md
│       ├── error_log_pfs.md
│       ├── fix_password_column_detection.md
│       ├── index_checks_pfs.md
│       ├── issue_25_privilege_checks.md
│       ├── performance_schema_audit.md
│       ├── performance_schema_observability_warning.md
│       ├── perltidy_integration.md
│       ├── persistent_lab.md
│       ├── release_manager_specification.md
│       ├── schemadir_option_specification.md
│       ├── ssl_tls_security_checks.md
│       └── test_log_auditing.md
├── mariadb_support.md
├── mysql_support.md
├── mysqltuner.pl
├── mysqltuner.pl.tdy
├── mysqltuner.pl.tidy
├── package.json
├── releases/
│   ├── v2.8.0.md
│   ├── v2.8.1.md
│   ├── v2.8.10.md
│   ├── v2.8.11.md
│   ├── v2.8.12.md
│   ├── v2.8.13.md
│   ├── v2.8.15.md
│   ├── v2.8.16.md
│   ├── v2.8.17.md
│   ├── v2.8.18.md
│   ├── v2.8.2.md
│   ├── v2.8.20.md
│   ├── v2.8.21.md
│   ├── v2.8.22.md
│   ├── v2.8.23.md
│   ├── v2.8.24.md
│   ├── v2.8.26.md
│   ├── v2.8.27.md
│   ├── v2.8.28.md
│   ├── v2.8.29.md
│   ├── v2.8.3.md
│   ├── v2.8.30.md
│   ├── v2.8.31.md
│   ├── v2.8.32.md
│   ├── v2.8.33.md
│   ├── v2.8.34.md
│   ├── v2.8.35.md
│   ├── v2.8.36.md
│   ├── v2.8.37.md
│   ├── v2.8.38.md
│   ├── v2.8.4.md
│   ├── v2.8.5.md
│   ├── v2.8.6.md
│   ├── v2.8.7.md
│   ├── v2.8.8.md
│   └── v2.8.9.md
├── renovate.json
├── template_example.tpl
├── templates/
│   └── basic.html.j2
├── tests/
│   ├── check_release_files.sh
│   ├── cli_mod_keys.t
│   ├── cli_options.t
│   ├── cli_validation.t
│   ├── index_pfs_checks.t
│   ├── innodb_isolation.t
│   ├── issue_770.t
│   ├── issue_774.t
│   ├── issue_777.t
│   ├── issue_783.t
│   ├── issue_863_enhanced.t
│   ├── issue_869.t
│   ├── machine_type.t
│   ├── mariadb_modeling.t
│   ├── modeling_regression.t
│   ├── pfs_observability.t
│   ├── repro_issue_20.t
│   ├── repro_issue_22.t
│   ├── repro_issue_490.t
│   ├── repro_issue_605.t
│   ├── repro_issue_863.t
│   ├── repro_pfs_disabled.t
│   ├── schemadir.t
│   ├── sql_modeling.t
│   ├── sql_modeling_fk.t
│   ├── sql_quoting.t
│   ├── ssl_tls_validation.t
│   ├── test_audit_logs.t
│   ├── test_boolean_options.t
│   ├── test_forcemem.t
│   ├── test_ignore_tables.t
│   ├── test_issue_404.t
│   ├── test_issue_553.t
│   ├── test_issue_671.t
│   ├── test_issue_874.t
│   ├── test_issue_875.t
│   ├── test_version_regex.t
│   ├── test_vulnerabilities.t
│   ├── unit_formatting.t
│   ├── unit_utilities.t
│   ├── unit_versions.t
│   └── version_consistency.t
└── vulnerabilities.csv

================================================
FILE CONTENTS
================================================

================================================
FILE: .agent/README.md
================================================
---
trigger: always_on
description: Overview of project governance, skills, and workflows
category: governance
---
# .agent - Project Governance & Artificial Intelligence Intelligence

This directory contains the project's technical constitution, specialized skills, and operational workflows used by AI agents.

## Governance & Execution Constraints

| File | Description |
| :--- | :--- |
| [`00_constitution.md`](./rules/00_constitution.md) | Core mission and unique source of truth for the project. |
| [`01_objective.md`](./rules/01_objective.md) | Current project roadmap and success criteria. |
| [`02_architecture.md`](./rules/02_architecture.md) | Immutable project architecture and technology stack. |
| [`03_execution_rules.md`](./rules/03_execution_rules.md) | Core project constitution and hard execution constraints. |
| [`04_best_practices.md`](./rules/04_best_practices.md) | Technical best practices and recommended internal patterns. |
| [`05_memory_protocol.md`](./rules/05_memory_protocol.md) | Protocols for maintaining contextual consistency and history. |
| [`remembers.md`](./rules/remembers.md) | "Persistent memory for emerging patterns and session-specific dynamic rules" |


## Specialized Capabilities & Knowledge

| File | Description |
| :--- | :--- |
| [`cli-execution-mastery/`](./skills/cli-execution-mastery/SKILL.md) | Mastery of MySQLTuner CLI options for connection and authentication. |
| [`db-version-rift/`](./skills/db-version-rift/SKILL.md) | Mapping of critical differences between MySQL and MariaDB versions for cross-compatible diagnostics. |
| [`legacy-perl-patterns/`](./skills/legacy-perl-patterns/SKILL.md) | Guidelines and patterns for maintaining backward compatibility with older Perl versions (5.8+). |
| [`testing-orchestration/`](./skills/testing-orchestration/SKILL.md) | Knowledge on how to run, orchestrate, and validate tests in the MySQLTuner project. |


## Automation & Operational Workflows

| File | Description |
| :--- | :--- |
| [`compliance-sentinel.md`](./workflows/compliance-sentinel.md) | Automated audit to enforce project constitution rules |
| [`doc-sync.md`](./workflows/doc-sync.md) | Synchronize .agent/README.md with current Rules, Skills, and Workflows |
| [`docker-clean.md`](./workflows/docker-clean.md) | Reclaim disk space by removing unused containers and images |
| [`examples-cleanup.md`](./workflows/examples-cleanup.md) | Maintain only the 10 most recent results in the examples directory |
| [`git-flow.md`](./workflows/git-flow.md) | Automate git-flow release process |
| [`git-rollback.md`](./workflows/git-rollback.md) | Rollback a failed release (delete tags and revert commits) |
| [`hey-agent.md`](./workflows/hey-agent.md) | Unified management for Rules, Skills, and Workflows. |
| [`lab-down.md`](./workflows/lab-down.md) | Stops and cleans up the database laboratory. |
| [`lab-up.md`](./workflows/lab-up.md) | Starts a persistent database laboratory and injects data. |
| [`markdown-lint.md`](./workflows/markdown-lint.md) | Check markdown content for cleanliness and project standard compliance (AFF, keywords, links) |
| [`plan.md`](./workflows/plan.md) | Create or update an implementation plan (implementation_plan.md) |
| [`release-manager.md`](./workflows/release-manager.md) | High-level release orchestrator for the Release Manager role |
| [`release-notes-gen.md`](./workflows/release-notes-gen.md) | Generate detailed technical release notes for the current version |
| [`release-preflight.md`](./workflows/release-preflight.md) | Pre-flight checks before triggering a git-flow release |
| [`run-tests.md`](./workflows/run-tests.md) | Comprehensive test suite execution (Unit, Regression, and Multi-DB) |
| [`snapshot-to-test.md`](./workflows/snapshot-to-test.md) | Transform a running production issue into a reproducible test case |
| [`specify.md`](./workflows/specify.md) | Create or update a feature specification (specification.md) |
| [`tasks.md`](./workflows/tasks.md) | Break down an approved plan into actionable tasks (task.md) |


---
*Generated automatically by `/doc-sync` on Sat Feb 14 11:35:52 CET 2026*

================================================
FILE: .agent/rules/00_constitution.md
================================================
---
trigger: always_on
description: Core mission and unique source of truth for the project.
category: governance
---

# **AI CONTEXT SPECIFICATIONS & PROJECT CONSTITUTION**

## 🧠 Rationale

Establishing an absolute source of truth is critical for maintaining consistency and quality in an agentic coding environment. This constitution ensures all interventions align with the project's high-level goals.

## 🛠️ Implementation

$$SYSTEM\_CRITICAL$$  
Notice to the Agent: This document constitutes the unique and absolute source of truth for the project. Its prior consultation is imperative before any technical intervention.

**Core Mission:**
Make `mysqltuner.pl` the most stable, portable, and reliable performance tuning advisor for MySQL, MariaDB, and Percona Server.

**Key Pillars:**

- **Production Stability**: Every recommendation must be safe for production environments. Zero tolerance for destructive or experimental "hacks" without explicit user opt-in.
- **Single-File Architecture**: Strict enforcement of a single-file structure. Modules or splitting are prohibited to ensure maximum portability.
- **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.
- **Actionable Insights**: Provide clear, verified, and well-documented tuning advice.
- **Release Integrity**: Guarantee artifact consistency and multi-version validation through a formal Release Management protocol.

## 🏗️ Governance Hierarchy (7-Tier AFF)

This project follows a standardized governance structure:

- **Tier 00**: [00_constitution.md](file:///.agent/rules/00_constitution.md) (Absolute Truth)
- **Tier 01**: [01_objective.md](file:///.agent/rules/01_objective.md) (Identity & Mission)
- **Tier 02**: [02_architecture.md](file:///.agent/rules/02_architecture.md) (Environment)
- **Tier 03**: [03_execution_rules.md](file:///.agent/rules/03_execution_rules.md) (Constraints)
- **Tier 04**: [04_best_practices.md](file:///.agent/rules/04_best_practices.md) (Implementation)
- **Tier 05**: [05_memory_protocol.md](file:///.agent/rules/05_memory_protocol.md) (History)
- **Dynamic**: [remembers.md](file:///.agent/rules/remembers.md) (Session Buffer)

## ✅ Verification

- All technical decisions must be cross-referenced with this document.
- Use `/compliance-sentinel` to audit deviations.


================================================
FILE: .agent/rules/01_objective.md
================================================
---
trigger: always_on
description: Current project roadmap and success criteria.
category: governance
---

# **2\. 🎯 OPERATIONAL OBJECTIVE**

## 🧠 Rationale

Dynamic context tracking allows the agent to maintain focus on current priorities and measure success against defined criteria.

## 🛠️ Implementation

$$DYNAMIC\_CONTEXT$$

* **Status:** \[IN PROGRESS\]  
* **Priority Task:** Maintain and enhance `mysqltuner.pl` as a production-grade tuning advisor. Focus on regression testing and broad version compatibility for MySQL, MariaDB, and Percona Server.

**Success Criteria:**

1. **Architecture:** Strict single-file architecture. No external non-core Perl dependencies.
2. **Quality (Zero Regression):** 100% of new features and fixes validated through TDD and regression suits (Legacy 8.0 to Modern 11.x).
3. **Stability:** All recommendations must be traceable to official documentation and verified safe for production use.
4. **Docs:** Maintain automated synchronization between `mysqltuner.pl` capabilities and `README.md` / translations.
5. **Efficiency:** Optimized execution for large databases (minimal memory footprint and execution time).

**Roadmap / Evolution Paths:**

1. **CI/CD Regression Suite**: Automate testing across 10+ major DB versions (MySQL 5.6-8.4, MariaDB 10.3-11.8).
2. **Automated Documentation Sync**: Ensure `INTERNALS.md` and `README.md` are always in sync with internal indicator count.
3. **Advanced Container Support**: Refine detection and tuning recommendations for Docker/K8s/Cloud environments.
4. **Enhanced Security Auditing**: Improve detection of common security misconfigurations and weak credentials.

## ✅ Verification

* Review [task.md](file:///brain/2fa184f4-13e1-4c64-bf13-57b4addd2797/task.md) for current status.
* Periodic roadmap reviews during `/release-preflight`.


================================================
FILE: .agent/rules/02_architecture.md
================================================
---
trigger: always_on
description: Immutable project architecture and technology stack.
category: governance
---
# **3\. 🏗️ TECHNICAL ENVIRONMENT & ARCHITECTURE**

## 🧠 Rationale

Preserving the single-file architecture of `mysqltuner.pl` is a core technical constraint that ensures maximum portability and ease of deployment.

## 🛠️ Implementation

$$IMMUTABLE$$  
Component Map:  

| File/Folder | Functionality | Criticality |
| :--- | :--- | :--- |
| mysqltuner.pl | **Main script - SINGLE FILE ARCHITECTURE ENFORCED** | 🔴 CRITICAL |
| Makefile | Command orchestrator (Test, Build, Lint) | LOW |
| Dockerfile | Containerized execution environment | 🟡 MEDIUM |
| .agent/ | Agent-specific rules and workflows | LOW |
| documentation/ | Technical documentation and reports | 🟡 HIGH |
| tests/ | Test suite for validator and tuning logic | 🟡 HIGH |

**Technology Stack:**

- **Language:** Perl (Core script)
- **Testing:** Perl (prove, Test::More)
- **Automation:** Makefile, Bash, Docker, Python
- **DBMS Compatibility:** MySQL, MariaDB, Percona, AWS, AWS Aurora, GCP, Azure

## ✅ Verification

- `/compliance-sentinel` must fail if `mysqltuner.pl` is split or if non-core dependencies are added.
- All builds must pass via `make docker_build`.


================================================
FILE: .agent/rules/03_execution_rules.md
================================================
---
trigger: always_on
description: Core project constitution and hard execution constraints.
category: governance
---

# **AI CONTEXT SPECIFICATIONS & PROJECT CONSTITUTION**

## **4\. ⚙️ EXECUTION RULES & CONSTRAINTS**

### **4.1. Formal Prohibitions (Hard Constraints)**

1. **SINGLE FILE:** Spliting `mysqltuner.pl` into modules is **strictly prohibited**.
2. **NON-REGRESSION:** Deleting existing code is **prohibited** without relocation or commenting out.
3. **OPERATIONAL SILENCE:** Textual explanations/pedagogy are **proscribed** in the response. Only code blocks, commands, and technical results.
4. **TDD MANDATORY:** Use a TDD approach. _Do not assume_ that your solution is correct. Validate it by creating a test case and running it to _prove_ the solution works before final submission.
5. **SAFE COMMANDS:** Always use absolute paths. Monitor every command for `exit code 0`. Non-zero exit codes must trigger immediate diagnostics.
6. **CREDENTIAL HYGIENE:** NEVER hardcode credentials. Ensure metadata (reports/logs) does not leak sensitive info.
7. **ARTIFACT ROTATION:** Keep the `brain/` directory lean. Rotate old plans/walkthroughs after integration.
8. **WEB SEARCH:** Assume world knowledge is out of date. Use web search for up-to-date documentation.

9. **VERSION CONSISTENCY:** Version numbers MUST be synchronized across `CURRENT_VERSION.txt`, `Changelog`, and all occurrences within `mysqltuner.pl` (Header, internal variable, and POD documentation) before any release. Use `/release-preflight` to verify.
10. **CONVENTIONAL COMMITS:** All commit messages MUST follow the [Conventional Commits](https://www.conventionalcommits.org/) specification. Use `npm run commit` for interactive commit creation. Compliance is enforced via `commitlint` and Git hooks.
11. **NO DIRECT COMMIT:** All changes MUST be committed via `npm run commit` or `git cz` to ensure metadata quality and automated changelog compatibility.
12. **VERSION SUPPORT POLICY:** Automated test example generation (via `run-tests`) MUST only target "Supported" versions of MySQL and MariaDB as defined in `mysql_support.md` and `mariadb_support.md`.

### **4.2. Spec-Driven Development (SDD) Lifecycle**

To ensure quality and clarity in every development cycle, all non-trivial features MUST follow the SDD lifecycle:

1. **Specify (`/specify`)**: Define the feature requirements, user scenarios, and stories in `documentation/specifications/`.
2. **Plan (`/plan`)**: Create a technical implementation plan in `implementation_plan.md`.
3. **Tasks (`/tasks`)**: Break down the plan into granular, ID-tracked tasks in `task.md`.
4. **Implement**: Proceed with the code changes based on the approved plan and tasks.
5. **Verify**: Validate the implementation through TDD and regression suites.

### **4.3. Coding Guidelines**

- **SOLID Principles**: Follow Single Responsibility, Open-Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion principles.
- **DRY (Don't Repeat Yourself)**: Avoid code duplication; extract common logic into reusable functions within the single file.
- **KISS (Keep It Simple, Stupid)**: Strive for simplicity. Avoid over-engineering.
- **Clean Code**: Write readable, self-documenting code with meaningful names and small functions.
- **Perl Tidy**: Use `perltidy` with the project's specific configuration to ensure consistent formatting across the single-file architecture.
- **Error Handling**: Implement robust error handling and logging. Use low-cardinality logging with stable message strings.

#### **Core Best Practices:**

1. **Validation Multi-Version Systématique**: Tout changement dans la logique de diagnostic doit être testé contre au moins une version "Legacy" (ex: MySQL 8.0) et une version "Moderne" (ex: MariaDB 11.4) via la suite de tests Docker (`make test-it`).
2. **Résilience des Appels Système**: Chaque commande externe (`sysctl`, `ps`, `free`, `mysql`) doit impérativement être protégée par une vérification de l'existence du binaire et une gestion d'erreur (exit code non nul) pour éviter les sorties "polluées" dans le rapport final.
3. **Politique "Zéro-Dépendance" CPAN**: Interdire l'usage de modules Perl qui ne font pas partie du "Core" (distribution standard Perl) afin que `mysqltuner.pl` reste un script unique, copiable et exécutable instantanément sur n'importe quel serveur sans installation préalable.
4. **Traçabilité des Conseils (Audit Trail)**: Chaque recommandation ou conseil affiché par le script doit être documenté dans le code par un commentaire pointant vers la source officielle (Documentation MySQL/MariaDB ou KB) pour justifier le seuil choisi.
5. **Efficience Mémoire (Parsing de Log)**: Pour le traitement des fichiers de logs (souvent volumineux), privilégier systématiquement le traitement ligne par ligne plutôt que le chargement complet en mémoire, surtout lors de la récupération via `--container`.
6. **Standardisation @Changelog et Release Notes**: Maintenir le `@Changelog` et les notes de version (`releases/`) en suivant strictement le format des _Conventional Commits_ et l'ordre de priorité (chore, feat, fix, test, ci) pour permettre une extraction automatisée et propre.
7. **Traçabilité des Tests**: Toute exécution de test en laboratoire doit impérativement capturer les logs d'infrastructure (docker start, db injection, container logs/inspect) et les lier dans le rapport HTML final.
8. **Reproductibilité des Rapports**: Les rapports HTML doivent inclure une section "Reproduce" listant l'intégralité des commandes (git clone, setup, injection, exécution) permettant de rejouer le test à l'identique.
9. **KISS & Context**: Les recommandations de tuning noyau (kernel tuning) doivent être ignorées en mode container ou via l'option `--container` pour éviter des conseils non pertinents.

### **4.3. Output & Restitution Format**

1. **NO CHATTER:** No intro or conclusion sentences.
2. **CODE ONLY:** Use Search_block / replace_block format for files > 50 lines.
3. **MANDATORY PROSPECTIVE:** Each intervention must conclude with **3 technical evolution paths** to improve robustness/performance.
4. **Compliance Sentinel Mandatory**: The `/compliance-sentinel` workflow MUST be successful before any major commit or release, ensuring adherence to the core constitution and dynamic rules from `remembers.md`.
5. **MEMORY UPDATE:** Include the JSON MEMORY_UPDATE_PROTOCOL block at the very end.

### **4.4. Development Workflow**

1. **Validation by Proof:** All changes must be verifiable via `make test-*` or dedicated test scripts.
2. **Git Protocol:**

- **STRICT PROHIBITION:** No `git commit`, `git push`, or `git tag` without using `/git-flow` or an explicit user order.
- **Conventional Commits:** Use `feat:`, `fix:`, `chore:`, `docs:`, `perf:`, `refactor:`, `style:`, `test:`, `ci:`. Breaking changes must be marked with `!` after type/scope or `BREAKING CHANGE:` in footer.
- **Commit Validation:** Commits are automatically linted via `commitlint`. Non-compliant messages will be rejected by the pre-commit hook.
- **History Documentation:** Use `npm run commit` to generate structured history.

1. **Changelog:** All changes MUST be traced and documented inside `@Changelog`.
    - _Exception_: Documentation-only updates (`docs:`) following Conventional Commits may skip the manual `@Changelog` entry if they are primarily intended for README synchronization.
    - _Requirement_: Adding a new test MUST have a `test:` entry in the `@Changelog`.
    - _Requirement_: Changing test scripts or updating infrastructure MUST have a `ci:` entry in the `@Changelog`.
    - _Requirement_: Changing `Makefile` or files under `build/` MUST be traced in the `@Changelog` (usually via `ci:` or `chore:`).
    - _Ordering_: Changelog entries MUST be ordered by category: `chore`, `feat`, `fix`, `test`, `ci`, then others.
    - _Release Notes_: All release notes generated in `releases/` MUST follow the same category ordering in their "Executive Summary" section.
    - _Requirement_: The `/git-flow` workflow MUST always be preceded by a successful `/release-preflight` execution.
    - _Requirement_: Report files (HTML and logs) MUST NOT contain negative keywords (error, warning, fatal, failed) unless they are expected as part of a reproduction test case.


================================================
FILE: .agent/rules/04_best_practices.md
================================================
---
trigger: always_on
description: Technical best practices and recommended internal patterns.
category: governance
---
# **4\. 🌟 CORE BEST PRACTICES**

## 🧠 Rationale

Beyond hard constraints, following established patterns ensures code durability, resilience, and consistent user experience across different platforms.

## 🛠️ Implementation

### 1. Multi-Version Validation

- Every diagnostic logic change MUST be tested against:
  - **Legacy**: MySQL 8.0+
  - **Modern**: MariaDB 11.4+
- **Example Generation**: Automated test reports in `examples/` MUST only be generated for "Supported" versions as defined in project support documentation (`mysql_support.md`, `mariadb_support.md`).
- Use `make test-it` for automated lab validation.

### 2. System Call Resilience

- Every external command (`sysctl`, `ps`, `free`, `mysql`) MUST:
  - Check for binary existence.
  - Handle non-zero exit codes.
  - Use `execute_system_command` to ensure transport abstraction.

### 3. "Zero-Dependency" CPAN Policy

- Use ONLY Perl "Core" modules.
- `mysqltuner.pl` must remain a single, copyable script executable on any server without CPAN installs.

### 4. Audit Trail (Advice Traceability)

- Every recommendation MUST be documented in code with a comment pointing to official documentation (MySQL/MariaDB KB).

### 5. Memory-Efficient Parsing

- Process logs line-by-line using `while` loops.
- NEVER load entire large files into memory.

### 6. Test Infrastructure Traceability

- All test runs MUST capture:
  - **Docker Logs** (`docker logs [id]`)
  - **Infrastructure events** (DB injection, startup)
  - **Reproducibility script**: Provide exact commands to replay the test.
  - **Capture level**: All test infrastructure logs (docker start, db injection, container logs, container inspect) MUST be captured and linked in HTML reports.

### 7. Unified Laboratory Reporting

- HTML reports MUST be self-sufficient and follow the standard structure:
  - **Horizontal Scenario Selector**: Support tripartite test cases (Standard, Container, Dumpdir).
  - **Embedded Logs**: Embed all relevant logs (Docker, DB injection, etc.).
  - **Reproduce Section**: Full sequence of commands to replay the test.
  - **Output Placement**: MySQLTuner output MUST be at the bottom for consolidated sharing.
- Testing MUST encompass 3 specific scenarios: Standard (`--verbose`), Container (`--verbose --container`), and Dumpdir (`--verbose --dumpdir=dumps`).
- The `examples/` directory MUST only retain the 10 most recent laboratory execution results to optimize storage.

### 8. Advanced Test Log Auditing

- Post-execution of any test suite (Standard, Container, Dumpdir), the `execution.log` MUST be audited.
- The auditor MUST look for:
  - Perl warnings (uninitialized values, deprecated syntax).
  - SQL execution failures ("FAIL Execute SQL").
  - Transport or connection errors.
  - Performance Schema status (search for "✘ Performance_schema should be activated.").
- Any anomaly discovered MUST be recorded in the `POTENTIAL_ISSUES` file at the project root for further investigation, including the path to the relevant `execution.log`.
- Cleanup `POTENTIAL_ISSUES` file as soon as the reported issue is handled, tested, or fixed.

### 9. SQL Modeling Findings

- The `Modeling` array in `mysqltuner.pl` MUST be used to collect schema design findings (naming, constraints, data types), while `@generalrec` remains for operational tuning.
- All modeling-related subroutines MUST push findings to both `@generalrec` (for CLI visibility) and `@modeling` (for structured HTML/JSON reporting).

### 10. Kernel Tuning in Containers

- Kernel tuning recommendations MUST be skipped in container mode or when running in Docker to avoid non-pertinent advice.

### 11. Release Integrity & Tagging

- Release workflows (via `/git-flow`) MUST force push tags to the origin at each release to ensure synchronization with GitHub.
- The `/git-flow` workflow MUST always be preceded by a successful `/release-preflight` execution.
- Only the Release Manager is authorized to decide when to increment version numbers, or incrementing occurs automatically after a `git-flow` commit.

### 13. Release Artifact Integrity

- Every release MUST be accompanied by a technical release note in `releases/v[VERSION].md`.
- The `/release-preflight` workflow MUST verify the existence of this file before allowing a release to proceed.
- Omission of release artifacts is considered a regression in project governance.

### 14. Artifact Hygiene (Workstation Abstraction)

- File links in artifacts MUST be cleaned up to remove workstation-specific absolute paths.
- Replace `file:///home/jmren/GIT_REPOS/` with `file:///` to ensure portability of documentation.

### 15. Release Note Integrity

- Release notes MUST be verified in `/release-preflight` to prevent omission on the remote repository.
- Ensure `releases/v[VERSION].md` exists and is synchronized with the current release.

## ✅ Verification

- Manual code review.
- Automated audit via `build/test_envs.sh`.
- Run `/compliance-sentinel` after any structural change.


================================================
FILE: .agent/rules/05_memory_protocol.md
================================================
---
trigger: always_on
description: Protocols for maintaining contextual consistency and history.
category: governance
---

# **5\. 📜 STATE MEMORY & HISTORY**

## **Contextual Consistency Protocols**

1. **History Update:** Add new entries to the top of `Changelog` if the action is correct and tested.

- Ensure consistency between `CURRENT_VERSION.txt`
- Check MySQLTuner version inside `mysqltuner.pl` (header, internal variable, and POD documentation)
- Match `Changelog` last version

1. **Git Sync:** Consult `git log -n 15` to synchronize context.
2. **Rotation:** FIFO Rotation (Max 600 lines). Remove oldest entries beyond 600 lines.

3. All changes must be added to the latest version in `Changelog`.
4. No version increment unless explicit git commit/tag/push via `/git-flow` or specific user order has been made.
5. After Git tag and push, version management is handled by the Release Manager or via `/git-flow`. The agent MUST NOT increment version numbers autonomously.

### **History Entry example**

1.0.9 2026-01-16

- chore: migrate HISTORY.md into Changelog and remove HISTORY.md.


================================================
FILE: .agent/rules/remembers.md
================================================
---
trigger: "emerging_patterns"
description: "Persistent memory for emerging patterns and session-specific dynamic rules"
category: "governance"
---

# **🧠 REMEMBERS & DYNAMIC RULES**

## 🧠 Rationale

High-density agentic development requires a persistent memory of emerging patterns and constraints that haven't yet been formalized in the core constitution.

## 🛠️ Implementation

If new rules are identified during a session, invoke the `/hey-agent` workflow to formalize them in this file.

**REMEMBER LOG:**

- (No active rules - all patterns promoted to Tier 04)

## ✅ Verification

- Periodically migrate stabilized rules from here to `04_best_practices.md` using the `/hey-agent` workflow.


================================================
FILE: .agent/skills/cli-execution-mastery/SKILL.md
================================================
---
trigger: explicit_call
description: Mastery of MySQLTuner CLI options for connection and authentication.
category: skill
---
# CLI Execution Mastery Skill

## 🧠 Rationale

Mastering the CLI options of `mysqltuner.pl` allows for seamless execution across diverse environments while maintaining security and leveraging existing configurations.

## 🛠️ Implementation

### 1. Connection Discovery & Targeting

| Target Type | Primary Command/Options |
| :--- | :--- |
| **Local Socket** | `perl mysqltuner.pl` (Default) \| `--socket=/path/to/mysql.sock` |
| **Remote Host** | `perl mysqltuner.pl --host=1.2.3.4 --port=3306` |
| **Container** | `perl mysqltuner.pl --container=container_name_or_id` |
| **Cloud/Azure** | `perl mysqltuner.pl --cloud --azure` |

### 2. Authentication Strategies

> [!IMPORTANT]
> Avoid passing passwords directly via `--pass` on the command line to prevent exposure in process lists.

- **Preferred: `.my.cnf` Usage**
  - Use `--defaults-file=/path/to/.my.cnf` to point to a specific configuration file.
  - The script automatically respects common paths if not specified.

- **Environment Variables**
  - Use `--userenv=MY_USER_VAR` and `--passenv=MY_PASS_VAR` to leverage pre-set credentials.

- **Password Files**
  - Use `--passwordfile=/path/to/passwords.txt` for batch security auditing.

### 3. Execution Contexts

- **Standard Verbose Run**: `perl mysqltuner.pl --verbose` (Recommended for full diagnostics).
- **Silent Mode**: `perl mysqltuner.pl --silent` (Useful for automated data collection).
- **JSON Output**: `perl mysqltuner.pl --json` or `--prettyjson` (For integration with other tools).

### 4. Debugging Connections

If connection fails, use these flags to diagnose:

- `--debug`: Enables full debug output.
- `--dbgpattern='.*'`: Filters debug information with regex.
- Verify `mysqlcmd` path if custom binaries are used: `--mysqlcmd=/usr/local/bin/mysql`.

## ✅ Verification

- Run `perl mysqltuner.pl --help` to confirm availability of these options.
- Use `execute_system_command` to test connectivity with specific flags in the target environment.


================================================
FILE: .agent/skills/db-version-rift/SKILL.md
================================================
---
trigger: always_on
description: Mapping of critical differences between MySQL and MariaDB versions for cross-compatible diagnostics.
category: skill
---
# Database Version Rift Skill

## Description

This skill maps critical differences between MySQL and MariaDB versions to help developers implement cross-compatible diagnostics in MySQLTuner.

## Replication Commands

| Feature | MySQL < 8.0.22 / MariaDB < 10.5 | MySQL >= 8.0.22 | MariaDB >= 10.5 |
| :--- | :--- | :--- | :--- |
| **Show Slave Status** | `SHOW SLAVE STATUS` | `SHOW REPLICA STATUS` (Preferred) | `SHOW REPLICA STATUS` (Preferred) |
| **Show Slave Hosts** | `SHOW SLAVE HOSTS` | `SHOW REPLICA HOSTS` | `SHOW REPLICA HOSTS` |

**Strategy:**
Detect version first. If version >= breakpoint, try `REPLICA`, fall back to `SLAVE` if error or empty (though strictly version check is safer).

## Authentication & Security

| Feature | MySQL 5.7 / MariaDB | MySQL 8.0+ |
| :--- | :--- | :--- |
| **PASSWORD() function**| Available | **REMOVED** (Use SHA2 functions or app-side hashing) |
| **User table** | `mysql.user` (authentication_string since 5.7) | `mysql.user` (authentication_string) |

**Strategy:**
For password checks in MySQL 8.0+, do strictly SQL-based checks (e.g., length of auth string) or avoid logic that depends on hashing input strings via SQL.

## Information Schema Differences

### `information_schema.TABLES`

- Usually stable, but check `Data_free` interpretation across engines.

### `performance_schema`

- **MySQL 5.6+**: Defaults enabled (mostly).
- **MariaDB 10.0+**: Defaults varying.
- **Check**: Always verify `performance_schema = ON` before querying tables.

## System Variables (Renames)

| Legacy Name | Modern Name (MySQL 8.0+) | Note |
| :--- | :--- | :--- |
| `tx_isolation` | `transaction_isolation` | Check both or `||` them. |
| `query_cache_size` | *Removed* | Removed in MySQL 8.0 |

**Strategy:**
Use the `mysqltuner.pl` valid variable abstraction or check for existence before using.

## MariaDB vs MySQL Divergence

- **Thread Pool**:
  - **MariaDB**: Built-in, specific vars (`thread_pool_size`, `thread_pool_oversubscribe`).
  - **MySQL**: Enterprise only or Percona specific.
  - **Action**: Check `version_comment` or `version` string for "MariaDB" before recommending thread pool settings.

- **Aria Engine**:
  - Specific to MariaDB (replacement for MyISAM for system tables).
  - Don't tune `aria_pagecache_buffer_size` on Oracle MySQLand Percona version.


================================================
FILE: .agent/skills/legacy-perl-patterns/SKILL.md
================================================
---
trigger: always_on
description: Guidelines and patterns for maintaining backward compatibility with older Perl versions (5.8+).
category: skill
---
# Legacy Perl Patterns Skill

## Description

This skill provides guidelines and patterns for writing Perl code that maintains backward compatibility with older Perl versions (down to 5.8) as required by the MySQLTuner project constitution.

## Anti-Patterns (Avoid)

### 1. `say` (Perl 5.10+)

**Wrong:**

```perl
use feature 'say';
say "Hello";
```

**Right:**

```perl
print "Hello\n";
```

### 2. `state` variables (Perl 5.10+)

**Wrong:**

```perl
use feature 'state';
sub foo {
    state $x = 0;
    $x++;
}
```

**Right:**

```perl
{
    my $x = 0;
    sub foo {
        $x++;
    }
}
```

### 3. Defined-or operator `//` (Perl 5.10+)

**Wrong:**

```perl
my $a = $b // $c;
```

**Right:**

```perl
my $a = defined($b) ? $b : $c;
```

### 4. `given` / `when` (Switch statements)

**Wrong:**

```perl
given ($foo) { when(1) { ... } }
```

**Right:**

```perl
if ($foo == 1) { ... }
elsif ($foo == 2) { ... }
```

## Safe Patterns (Recommended)

### 1. Three-argument `open`

Always use the 3-arg form of open for safety, but check support if targeting extremely old perl (pre-5.6), though 5.8 is our floor.

```perl
open(my $fh, '<', $filename) or die "Cannot open $filename: $!";
```

### 2. Modular compatibility

Avoid `use Module::Name` if the module wasn't core in 5.8.
Check `corelist` if unsure.
Example: `Time::HiRes` is core since 5.8.

### 3. Regex

Avoid 5.10+ regex extensions (e.g. named capture groups `(?<name>...)` unless you are sure). Use standard capturing parentheses `(...)`.

## Validation

Always test syntax with a lower version of perl if available, or rely on strict `make test` environment containers that might emulate older setups.


================================================
FILE: .agent/skills/testing-orchestration/SKILL.md
================================================
---
trigger: explicit_call
description: Knowledge on how to run, orchestrate, and validate tests in the MySQLTuner project.
category: skill
---
# Testing Orchestration Skill

## 🧠 Rationale

Centralizing test execution knowledge ensures consistency across different workflows (CI, manual testing, git-flow) and provides a single source of truth for test patterns and mandates.

## 🛠️ Implementation

### 1. Test Discovery & Execution

MySQLTuner uses Perl's `Test::More` framework. Tests are located in the `tests/` directory and have the `.t` extension.

| Method | Command | Context |
| :--- | :--- | :--- |
| **Prove (Standard)** | `prove -r tests/` | Fastest way to run all unit tests recursively. |
| **Prove (Verbose)** | `prove -v -r tests/` | Use for debugging specific failures. |
| **Makefile** | `make unit-tests` | Standardized entry point for CI/CD. |
| **Docker Lab** | `make test-it` | Run tests against multiple DB configurations (Legacy/Modern). |

### 2. Tripartite Testing Standard

For any logic change, testing MUST encompass:

1. **Standard**: `--verbose`
2. **Container**: `--container`
3. **Dumpdir**: `--dumpdir=dumps`

- **Verification Mandates**:
  - Zero Regression: 100% pass rate required.
  - **Clean Reports**: Output files (HTML/logs) MUST NOT contain `error`, `warning`, `fatal`, or `failed` keywords.
  - Infrastructure Logs: Capture Docker logs, DB injections, etc.
- **Reproducibility**: Every test run MUST be reproducible via provided commands or scripts.

## ✅ Verification

- Run `prove -r tests/` to verify the testing environment.
- Validate that `make unit-tests` executes the expected suite.


================================================
FILE: .agent/workflows/compliance-sentinel.md
================================================
---
trigger: explicit_call
description: Automated audit to enforce project constitution rules
category: governance
---

# Compliance Sentinel

This workflow acts as a static analysis guardrail to ensure "Constitution" compliance.

## 1. Core Check: Single File Architecture

Ensure no additional Perl modules (.pm) have been added to the root or lib dirs intended for distribution.

```bash
if [ $(find . -maxdepth 2 -name "*.pm" | wc -l) -gt 0 ]; then
  echo "FAIL: No .pm files allowed. Architecture must remain Single File."
  exit 1
fi
```

## 2. Core Check: Zero Dependency (Standard Core Only)

Scan for non-core CPAN modules.

```bash
# Allow-list (examples of standard modules)
# strict, warnings, Getopt::Long, File::Basename, Data::Dumper, POSIX, etc.
# Grep for 'use' and manually review or verify against `corelist`.
grep "^use " mysqltuner.pl | sort | uniq
```

## 3. Core Check: Syscall Protection

Verify that system calls are safe.

```bash
# Look for potential unsafe system calls (qx, ``, system)
grep -nE "qx/|`|system\(" mysqltuner.pl
# Manual Review: Ensure each is wrapped or checked.
```

## 4. Changelog Compliance

Verify the format of the latest Changelog entries.

```bash
head -n 20 Changelog
# Must follow:
# X.Y.Z YYYY-MM-DD
# - type: description
```

## 5. Dynamic Rules Compliance (remembers.md)

Verify that laboratory logs are free of regressions and anomalies, and that any findings are recorded.

```bash
# 1. Run laboratory logs audit
perl build/audit_logs.pl --dir=examples --verbose

# 2. Verify POTENTIAL_ISSUES exists if anomalies found
if [ -s POTENTIAL_ISSUES ]; then
  echo "Audit check: POTENTIAL_ISSUES is documented."
else
  echo "WARNING: POTENTIAL_ISSUES is empty, ensure all audit findings are handled."
fi
```

## 6. Execution

Run these checks before any major commit or release.


================================================
FILE: .agent/workflows/doc-sync.md
================================================
---
trigger: explicit_call
description: Synchronize .agent/README.md with current Rules, Skills, and Workflows
category: tool
---

# Documentation Synchronization Workflow

1. Execute the documentation synchronization script:
// turbo

```bash
python3 build/doc_sync.py
```

1. Review the updated summary in [.agent/README.md](file://.agent/README.md).


================================================
FILE: .agent/workflows/docker-clean.md
================================================
---
trigger: explicit_call
description: Reclaim disk space by removing unused containers and images
category: tool
---

# Docker Cleanup Workflow

1. **Check Current Usage**:
   - See how much space Docker is using.
   // turbo
   - Run `docker system df`

2. **Run Prune**:
   - ⚠️ **WARNING**: This will remove all stopped containers and unused images!
   - Remove all stopped containers, unused networks, and dangling images.
   // turbo
   - Run `docker system prune -a`

3. **Verify Space Reclaimed**:
   - Check the new disk usage.
   // turbo
   - Run `docker system df`

4. **Pro Tips**:
   - Add `--volumes` to also delete unused volumes (DATA LOSS WARNING!).
   - To remove only dangling images: `docker image prune`.
   - Set up automatic cleanup: add `"log-opts": {"max-size": "10m"}` to Docker daemon config.


================================================
FILE: .agent/workflows/examples-cleanup.md
================================================
---
trigger: explicit_call
description: Maintain only the 10 most recent results in the examples directory
category: tool
---

1. Execute the cleanup logic from the build script:
// turbo

```bash
bash build/test_envs.sh --cleanup
```

1. Verify that the `examples/` directory count is reduced to 10.


================================================
FILE: .agent/workflows/git-flow.md
================================================
---
trigger: explicit_call
description: Automate git-flow release process
category: tool
---

# Git-Flow Release Workflow

This workflow MUST be orchestrated by the **Release Manager**.

1. **Run Release Preflight Workflow**
   - Execute the `/release-preflight` workflow to ensure full consistency and test passing.
   - **CRITICAL**: Do NOT proceed if `/release-preflight` fails.

   ```bash
   # Trigger preflight checks
   /release-preflight
   ```

   // turbo
2. **Commit Current Changes**
   - Commit all pending changes including `Changelog` updates for the current version.

   ```bash
   git add .
   npm run commit  # Select 'feat' and enter "release $CURRENT_VER"
   ```

   // turbo
3. **Create Tag for Current Version with Changelog content**
   - Extract the latest release notes and create an annotated tag.

   ```bash
   # Extract content between the first version header and the next one
   TAG_MSG=$(awk "/^$CURRENT_VER/,/^([0-9]+\.[0-9]+\.[0-9]+)/ {if (\$0 !~ /^([0-9]+\.[0-9]+\.[0-9]+)/) print}" Changelog | sed '/^$/d')
   git tag -a v$CURRENT_VER -m "Release $CURRENT_VER" -m "$TAG_MSG"
   ```

   // turbo
4. **Push Branch and Tag**
   - Push to the remote repository.

   ```bash
   git push origin main
   git push origin v$CURRENT_VER
   ```

   // turbo
5. **Post-Push: Increment Version for Next Cycle**
   - Calculate the next patch version and update files.

   ```bash
   NEW_VER=$(echo $CURRENT_VER | awk -F. '{print $1"."$2"."($3+1)}')
   echo $NEW_VER > CURRENT_VERSION.txt
   # Update all version occurrences in mysqltuner.pl
   perl -pi -e "s/\Q$CURRENT_VER\E/$NEW_VER/g" mysqltuner.pl
   
   DATE=$(date +%Y-%m-%d)
   echo -e "$NEW_VER $DATE\n\n- \n" > tmp_changelog && cat Changelog >> tmp_changelog && mv tmp_changelog Changelog
   ```

   // turbo
6. **Commit Version Bump**
   - Commit the incremented version for the next development cycle.

   ```bash
   git add CURRENT_VERSION.txt mysqltuner.pl Changelog
   npx commitlint --from=HEAD~1 # Or simply use npm run commit if not automated
   git commit -m "chore: bump version to $NEW_VER"
   git push origin main
   ```

   // turbo


================================================
FILE: .agent/workflows/git-rollback.md
================================================
---
trigger: explicit_call
description: Rollback a failed release (delete tags and revert commits)
category: tool
---

# Git Rollback Workflow

1. **Delete Local and Remote Tag**
   - Identify the tag to remove from `CURRENT_VERSION.txt`.

   ```bash
   VERSION_TO_ROLLBACK=$(cat CURRENT_VERSION.txt)
   echo "Rolling back version v$VERSION_TO_ROLLBACK"
   
   git tag -d v$VERSION_TO_ROLLBACK
   git push --delete origin v$VERSION_TO_ROLLBACK
   ```

   // turbo
2. **Revert Release Commits**
   - Reset the branch to the state before the release commit.
   - **WARNING**: This uses `git reset --hard`. Ensure you don't have uncommitted work you want to keep.

   ```bash
   # Identify the commit before the release commit (assuming the last commit was the version bump)
   # We might want to revert the last 2 commits: the bump and the release tag commit.
   
   # Reset to 2 commits ago
   git reset --hard HEAD~2
   
   # Force push to clean remote main branch
   # git push origin main --force
   ```

   // turbo
3. **Notify User**
   - The rollback is completed locally. Remote sync may require a force push.

   > [!CAUTION]
   > The local branch has been reset. If you had already pushed the version bump, you may need to run `git push origin main --force` to synchronize the remote branch.


================================================
FILE: .agent/workflows/hey-agent.md
================================================
---
description: Unified management for Rules, Skills, and Workflows.
---
# Hey-Agent Workflow (The Core Orchestrator)

## 🧠 Rationale

High-density agentic development requires a unified way to manage project governance. The `hey-agent` workflow centralizes the creation, update, and auditing of all `.agent` assets.

## 🛠️ Implementation

### 1. Management Modes

- **ADD**: Insert new items (Rules/Skills/Workflows) in AFF format.
- **EDIT**: Update existing items while maintaining consistency.
- **AUDIT**: Reveal contradictions or outdated rules.
- **MERGE**: Integrate fragmented logic into unified high-level workflows.

### 2. Standardization (AFF - Agent-Friendly Format)

Every governance file MUST follow this header/structure:

```markdown
---
trigger: [always_on | explicit_call]
description: [one-line summary]
category: [governance | tool | skill]
---
# Title
## 🧠 Rationale
## 🛠️ Implementation
## ✅ Verification
```

### 3. Execution Steps (The "Nuclear" Protocol)

1. **Trigger**: Invoke `/hey-agent` for any structural change.
2. **Specify (`/specify`)**: Define requirements for new features or structural changes in `documentation/specifications/`.
3. **Plan (`/plan`)**: Draft a technical strategy for the implementation.
4. **Tasks (`/tasks`)**: Break down the plan into trackable units.
5. **Analysis**: Scan existing files for contradictions (Audit Mode).
6. **Execution**: Apply changes using `replace_file_content` or `multi_replace`.
7. **Synchronization**: Immediately update `03_execution_rules.md` (constraints) and `04_best_practices.md` if necessary.
8. **Autolearning**: Update `remembers.md` as the session-level memory buffer.
9. **Documentation Sync**: Execute `/doc-sync` to refresh the project's technical summary.

## ✅ Verification

- Validate header frontmatter.
- Run `/compliance-sentinel` to ensure no two rules contradict each other.


================================================
FILE: .agent/workflows/lab-down.md
================================================
---
trigger: /lab-down
description: Stops and cleans up the database laboratory.
category: tool
---
# Lab Down

## 🧠 Rationale

Resources cleanup after debugging sessions.

## 🛠️ Implementation

// turbo

1. Stop the lab

```bash
make lab-down
```

## ✅ Verification

- Validate with `docker ps` that no containers are running.


================================================
FILE: .agent/workflows/lab-up.md
================================================
---
trigger: /lab-up
description: Starts a persistent database laboratory and injects data.
category: tool
---
# Lab Up

## 🧠 Rationale

Speeds up iterative debugging by keeping containers running.

## 🛠️ Implementation

// turbo

1. Start the lab for a specific configuration (e.g., CONFIGS="mysql84")

```bash
make lab-up CONFIGS="${CONFIGS:-mysql84}"
```

1. Run MySQLTuner directly against the lab

```bash
perl mysqltuner.pl --host 127.0.0.1 --user root --pass mysqltuner_test
```

## ✅ Verification

- Validate with `docker ps` that the container is running.


================================================
FILE: .agent/workflows/markdown-lint.md
================================================
---
trigger: explicit_call
description: Check markdown content for cleanliness and project standard compliance (AFF, keywords, links)
category: tool
---

1. Execute the markdown linting script:
// turbo

```bash
python3 build/md_lint.py --all
```

1. Review the audit results and fix any identified issues (broken links, forbidden keywords, or missing AFF metadata).


================================================
FILE: .agent/workflows/plan.md
================================================
---
trigger: explicit_call
description: Create or update an implementation plan (implementation_plan.md)
category: governance
---

# Planning Workflow (SDD)

## 🧠 Rationale

A well-defined plan bridges the gap between requirements and code. It allows for early identification of technical risks, architectural debt, and performance bottlenecks.

## 🛠️ Implementation

### 1. Artifact Definition

The principal artifact is `implementation_plan.md`. It must contain:

- **Summary**: High-level overview of the proposed technical changes.
- **Technical Context**: Language, core dependencies (Base Perl only!), and storage/memory impacts.
- **Proposed Architecture**: Detailed list of files to be modified/created.
- **Risks & Limitations**: Performance impact, regression risks, or compatibility constraints.
- **Open Questions**: Points requiring user clarification.

### 2. Execution Steps

1. **Prerequisite**: Ensure a `specification.md` has been approved.
2. **Initialize**: Call `/plan` to generate the technical strategy.
3. **Audit**: Check the plan against the **Project Constitution** (Single File, Core-only).
4. **Review**: Submit for user approval via `notify_user`.

## ✅ Verification

- Validate the plan follows the "Single File" architecture constraint.
- Ensure all technical risks are addressed or documented.


================================================
FILE: .agent/workflows/release-manager.md
================================================
---
trigger: explicit_call
description: High-level release orchestrator for the Release Manager role
category: governance
---
# Release Manager Workflow

This workflow orchestrates the full release lifecycle. It MUST be executed by the **Release Manager**.

## 🧠 Rationale

Release integrity is guaranteed through a formal, guided protocol that minimizes manual error and ensures 100% logic validation across all transports (Standard, Container, Dumpdir).

## 🛠️ Implementation

### 1. Preparation & Validation

Before cutting a release, ensure the environment and code are stable.

// turbo

```bash
# 1. Synchronize documentation
/doc-sync

# 2. Run comprehensive pre-flight checks
/release-preflight
```

### 2. Multi-Version Testing

Execute the industrial-grade test suite against multiple DB versions.

// turbo

```bash
# 3. Validating against all core versions
make test-all
```

### 3. Artifact Generation

Generate technical documents for the new version.

// turbo

```bash
# 4. Generate release notes
/release-notes-gen
```

### 4. Git-Flow Execution

If all previous steps pass (Exit Code 0), proceed with the formal release.

// turbo

```bash
# 5. Execute git-flow
/git-flow
```

## ✅ Verification

- All workflows must return Success.
- Final version consistency check in `v2.9.0` release notes.
- Tag and Push verified in remote repository.


================================================
FILE: .agent/workflows/release-notes-gen.md
================================================
---
trigger: explicit_call
description: Generate detailed technical release notes for the current version
category: tool
---

# Release Notes Generation Workflow

1. Run the release notes generator script for the current version:
// turbo

```bash
python3 build/release_gen.py
```

1. For bulk historical generation (e.g. since 2.8.0):
// turbo

```bash
python3 build/release_gen.py --since 2.8.0
```

1. Review the generated files in the `releases/` directory.


================================================
FILE: .agent/workflows/release-preflight.md
================================================
---
trigger: explicit_call
description: Pre-flight checks before triggering a git-flow release
category: tool
---

# Release Preflight Workflow

Ensure consistency across versioning artifacts before cutting a release.

## 1. Extract Versions

```bash
# 1. CURRENT_VERSION.txt
TXT_VER=$(cat CURRENT_VERSION.txt | tr -d '[:space:]')

# 2. mysqltuner.pl internal variable
SCRIPT_VAR_VER=$(grep "our \$tunerversion =" mysqltuner.pl | cut -d'"' -f2)

# 3. mysqltuner.pl header version
SCRIPT_HEAD_VER=$(grep "# mysqltuner.pl - Version" mysqltuner.pl | head -n 1 | awk '{print $NF}')

# 4. mysqltuner.pl POD Name version
SCRIPT_POD_NAME_VER=$(grep "MySQLTuner [0-9.]* - MySQL High Performance" mysqltuner.pl | awk '{print $2}')

# 5. mysqltuner.pl POD Version section
SCRIPT_POD_VER=$(grep "^Version [0-9.]*" mysqltuner.pl | awk '{print $2}')

# 6. Changelog latest version
LOG_VER=$(head -n 1 Changelog | awk '{print $1}')
```

## 2. Validate Consistency

All version occurrences must match `CURRENT_VERSION.txt`.

```bash
FAILED=0
for VER in "$SCRIPT_VAR_VER" "$SCRIPT_HEAD_VER" "$SCRIPT_POD_NAME_VER" "$SCRIPT_POD_VER" "$LOG_VER"; do
    if [ "$VER" != "$TXT_VER" ]; then
        FAILED=1
    fi
done

if [ $FAILED -eq 0 ]; then
    echo "SUCCESS: All versions match ($TXT_VER)."
else
    echo "FAIL: Version Mismatch detected!"
    echo "Txt:              $TXT_VER"
    echo "Script Variable:  $SCRIPT_VAR_VER"
    echo "Script Header:    $SCRIPT_HEAD_VER"
    echo "Script POD Name:  $SCRIPT_POD_NAME_VER"
    echo "Script POD Ver:   $SCRIPT_POD_VER"
    echo "Changelog:        $LOG_VER"
    exit 1
fi

## 2.1. Verify Release Notes

Every release must have a corresponding markdown file in `releases/`.

```bash
REL_NOTES="releases/v$TXT_VER.md"
if [ ! -f "$REL_NOTES" ]; then
    echo "FAIL: Release notes missing: $REL_NOTES"
    echo "Run '/release-notes-gen' to generate them."
    exit 1
else
    echo "SUCCESS: Release notes found: $REL_NOTES"
fi


## 3. Automated Consistency Test

Run the dedicated test to ensure all version strings are synchronized.

```bash
prove tests/version_consistency.t
```

## 4. Commit Log Validation

Ensure all commits since the last release follow Conventional Commits.

```bash
LAST_TAG=$(git describe --tags --abbrev=0)
echo "Validating commits since $LAST_TAG..."
npx commitlint --from=$LAST_TAG --to=HEAD
```

## 5. Markdown Integrity

Audit project documentation for cleanliness and standard compliance.

```bash
# Executing markdown linting across .agent and documentation
python3 build/md_lint.py --all
```

## 6. Code Style Validation

Ensure `mysqltuner.pl` is properly formatted.

```bash
make check-tidy
```

## 7. Smoke Test

Run the primary test suite to ensure the build isn't broken.

```bash
# Assuming make test exists and runs the suite
make test
```

## 5. Proceed to Release

If all checks pass, proceed with `/git-flow`.


================================================
FILE: .agent/workflows/run-tests.md
================================================
---
trigger: explicit_call
description: Comprehensive test suite execution (Unit, Regression, and Multi-DB)
category: tool
---

# 🧪 Unified Test Orchestration

This workflow provides a single entry point for all testing activities, from local unit tests to industrial-grade multi-DB integration tests.

## 🧠 Rationale

Consistency and coverage are paramount. By unifying all testing entry points, we ensure that both core logic and multi-version compatibility are systematically verified following the **Testing Orchestration Skill** patterns.

## 🛠️ Implementation

### 1. Unit & Regression Tests (Local)

Execute the standard Perl test suite to verify core logic.

// turbo

```bash
# Using prove
prove -r tests/

# OR via Makefile
make unit-tests
```

### 2. Multi-DB Integration Tests (Docker)

Validate compatibility across multiple database versions using the tripartite scenario laboratoy.

// turbo

```bash
# Example: Run against MySQL 8.4 and MariaDB 11.4
bash build/test_envs.sh mysql84 mariadb114

# OR via Makefile
make test-it
```

### 3. Advanced Diagnostic & Audit Scenarios

#### Existing Container

```bash
bash build/test_envs.sh --existing-container <container_id>
# OR: make test-container CONTAINER=<container_id>
```

#### Remote Audit (SSH)

```bash
bash build/test_envs.sh --remote <host> --audit
# OR: make audit HOST=<host>
```

## ✅ Verification

Ensure all commands return an exit code of 0. Review reports in `examples/` for detailed multi-DB analysis results:

> [!NOTE]
> Automated example generation in `examples/` is limited to "Supported" versions of MySQL and MariaDB to ensure relevance and stability.

- `report.html`: Consolidated dashboard.
- `raw_mysqltuner.txt`: Complete analysis output.
- `execution.log`: Full system execution trace.


================================================
FILE: .agent/workflows/snapshot-to-test.md
================================================
---
trigger: explicit_call
description: Transform a running production issue into a reproducible test case
category: tool
---

# Snapshot to Test Workflow

This workflow helps capture the state of a running database (where a bug is observed) and converts it into a standalone Perl test case for TDD.

## 1. Context Acquisition

Identify the target container or host where the issue is reproducible.

```bash
# Example: Define target
TARGET_CONTAINER="mysql_8_0" 
```

## 2. Capture Variables and Status

Extract the raw data required by MySQLTuner to mock the environment.

```bash
# Extract Global Variables
docker exec -i $TARGET_CONTAINER mysql -NBe "SHOW GLOBAL VARIABLES" > /tmp/vars.txt

# Extract Global Status
docker exec -i $TARGET_CONTAINER mysql -NBe "SHOW GLOBAL STATUS" > /tmp/status.txt
```

## 3. Generate Test Skeleton

Create a new test file in `tests/` (e.g., `tests/repro_issue_XXX.t`).

Use the following template:

```perl
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Data::Dumper;

# 1. Load MySQLTuner logic
# (Adjust path if needed to load specific subroutines)
require 'mysqltuner.pl';

# 2. Mock Data
# Insert data captured from /tmp/vars.txt and /tmp/status.txt
my %mock_variables = (
    # ... content from vars.txt formatted as hash ...
    'version' => '8.0.32',
    'innodb_buffer_pool_size' => '1073741824',
);

my %mock_status = (
    # ... content from status.txt formatted as hash ...
    'Uptime' => '3600',
    'Questions' => '500',
);

# 3. Setup Environment
# Overlay mock data onto the script's global hashes
*main::myvar = \%mock_variables;
*main::mystat = \%mock_status;

# 4. Execute Logic
# Call the specific subroutine under test
# e.g., setup_innodb_buffer_pool();

# 5. Assertions
# Verify the expected behavior (bug reproduction or fix verification)
ok(1, "Placeholder assertion");

done_testing();
```

## 4. Run and Refine

Run the test to confirm it fails (if reproducing a bug) or passes (if verifying logic).

```bash
prove tests/repro_issue_XXX.t
```


================================================
FILE: .agent/workflows/specify.md
================================================
---
trigger: explicit_call
description: Create or update a feature specification (specification.md)
category: governance
---

# Specification Workflow (SDD)

## 🧠 Rationale

Before writing any code or even planning the technical implementation, we must define **what** we are building and **why**. Spec-Driven Development ensures that features are grounded in real user needs and have clear, testable success criteria.

## 🛠️ Implementation

### 1. Artifact Definition

The principal artifact is a specific file in `documentation/specifications/`. It must contain:

- **Metadata**: Feature Name, Status (Draft/Approved), Created Date.
- **User Scenarios**: Narratives describing how users will interact with the feature.
- **User Stories**: A table mapping needs to requirements.

| Title | Priority | Description | Rationale | Test Case |
| :--- | :--- | :--- | :--- | :--- |
| [Story Name] | [P1-P3] | I want to... | So that... | GIVEN... WHEN... THEN... |

### 2. Execution Steps

1. **Initialize**: Call `/specify` to start a new feature or refine an existing one.
2. **Gather Scenarios**: Define at least 2 relevant user scenarios.
3. **Draft Stories**: Break scenarios into atomic user stories with testable criteria.
4. **Review**: Submit for user approval via `notify_user`.

## ✅ Verification

- Check for presence of all mandatory sections in the specification file.
- Ensure every story has a corresponding test case.


================================================
FILE: .agent/workflows/tasks.md
================================================
---
trigger: explicit_call
description: Break down an approved plan into actionable tasks (task.md)
category: governance
---

# Task Management Workflow (SDD)

## 🧠 Rationale

Complexity management requires breaking large technical changes into atomic, trackable units. This improves predictability and provides transparency into implementation progress.

## 🛠️ Implementation

### 1. Artifact Definition

The principal artifact is `task.md`. Each task must follow the format:

- `[ ] [ID] [Priority] [Story Reference] Description`

Example:

- `[ ] [0] [P1] [STORY:PK_DETECTION] Implement missing PK check in mysql_table_structures`

### 2. Execution Steps

1. **Prerequisite**: Ensure an `implementation_plan.md` has been approved.
2. **Initialize**: Call `/tasks` to populate `task.md`.
3. **Synchronization**: Ensure tasks map directly to the proposed architecture in the plan.
4. **Tracking**: Update task status from `[ ]` to `[/]` (in-progress) and `[x]` (completed).

## ✅ Verification

- Ensure `task.md` is updated and reflects the current state of work.
- Validate that all mandatory ID and Priority metadata are present.


================================================
FILE: .commitlintrc.js
================================================
module.exports = {
  extends: ['@commitlint/config-conventional'],
};


================================================
FILE: .czrc
================================================
{
  "path": "cz-conventional-changelog"
}


================================================
FILE: .dockerignore
================================================
*.md
build/**
Makefile
.perltidy
*.json
*.png


================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: jmrenouard
thanks_dev: # Replace with a single thanks.dev username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']


================================================
FILE: .github/workflows/docker_publish.yml
================================================
name: Docker Publish

on:
  push:
    tags: ["v*"]
  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

jobs:
  build-and-push:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v6

      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3

      - name: Log in to Docker Hub
        uses: docker/login-action@v3
        with:
          username: ${{ secrets.DOCKER_USER_LOGIN }}
          password: ${{ secrets.DOCKER_USER_PASSWORD }}

      - name: Extract version from mysqltuner.pl
        id: version
        run: echo "VERSION=$(grep '\- Version ' mysqltuner.pl | awk '{ print $NF}')" >> $GITHUB_ENV

      - name: Pre-publish validation
        run: |
          echo "Checking for critical files..."
          CRITICAL_FILES=("mysqltuner.pl" "Dockerfile" "LICENSE" "vulnerabilities.csv" "basic_passwords.txt")
          for file in "${CRITICAL_FILES[@]}"; do
            if [ ! -f "$file" ]; then
              echo "ERROR: Critical file missing: $file"
              exit 1
            fi
            echo "✔ Found: $file"
          done

          echo "Checking for release notes: releases/v${{ env.VERSION }}.md..."
          if [ ! -f "releases/v${{ env.VERSION }}.md" ]; then
            echo "ERROR: Release notes missing: releases/v${{ env.VERSION }}.md"
            exit 1
          fi
          echo "✔ Found release notes"

          TAG=${GITHUB_REF#refs/tags/}
          echo "Checking tag consistency (Tag: $TAG vs Version: v${{ env.VERSION }})..."
          if [ "v${{ env.VERSION }}" != "$TAG" ]; then
            echo "ERROR: Tag $TAG does not match version in mysqltuner.pl (v${{ env.VERSION }})"
            exit 1
          fi
          echo "✔ Tag matches script version"

      - name: Extract release notes
        id: release_notes
        run: |
          {
            echo 'RELEASE_NOTES<<EOF'
            cat "releases/v${{ env.VERSION }}.md"
            echo 'EOF'
          } >> $GITHUB_ENV

      - name: Build and push Docker image
        uses: docker/build-push-action@v6
        with:
          context: .
          push: true
          tags: |
            jmrenouard/mysqltuner:latest
            jmrenouard/mysqltuner:${{ env.VERSION }}
          labels: |
            org.opencontainers.image.title=MySQLTuner
            org.opencontainers.image.description=**MySQLTuner** is a script written in Perl that allows you to review a MySQL installation quickly and make adjustments to increase performance and stability. The current configuration variables and status data is retrieved and presented in a brief format along with some basic performance suggestions. **MySQLTuner** supports ~300 indicators for MySQL/MariaDB/Percona Server in this latest version.
            org.opencontainers.image.version=${{ env.VERSION }}
            org.opencontainers.image.licenses=GPL-3.0
            com.mysqltuner.release-notes=${{ env.RELEASE_NOTES }}


================================================
FILE: .github/workflows/generate_mariadb_examples.yml
================================================
# This is a basic workflow to help you get started with Actions

name: Compile MT examples for MariaDB

# Controls when the workflow will run
on:
  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  mysql_examples:
    # This workflow contains a single job called "build"
    strategy:
        matrix:
          MARIADB_VERSION: [10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9]
    # The type of runner that the job will run on
    runs-on: ubuntu-latest
    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      - name: Setup MySQL Tuner repository
        uses: actions/checkout@v6

      - name: Set up MySQL
        uses: shogo82148/actions-setup-mysql@v1
        with:
          distribution: 'mariadb'
          root-password: "root"
          mysql-version: "${{ matrix.MARIADB_VERSION }}"

      - name: Injecting credentials
        run: |
          echo -e "[client]\nuser=root\npassword=root\nhost=127.0.0.1\nprotocol=TCP" > $HOME/.my.cnf

      - name: Cloning test_db dataset
        run: |
          git clone https://github.com/datacharmer/test_db.git

      - name: Test database is Up and Running
        run: |
          sleep 5s
          sudo netstat -ltpn
          mysql -e 'select version();'

      - name: Injecting test_db dataset
        run: |
          cd test_db
          mysql -e 'CREATE DATABASE data;'
          mysql data< ./employees.sql
          cd -
          rm -rf test_db
      # Runs a single command using the runners shell
      - name: Json Run verbose mode with dumpdir result
        run: |
          mkdir -p ./examples/github/result/mariadb/${{ matrix.MARIADB_VERSION }}
          sudo perl ./mysqltuner.pl --user=root --pass=root --protocol tcp --verbose --dumpdir=./examples/github/result/mariadb/${{ matrix.MARIADB_VERSION }} --json | tee -a ./examples/github/result/mariadb/${{ matrix.MARIADB_VERSION }}/result.json

      - name: Standard Run verbose mode without dumpdir result
        run: |
          sudo perl ./mysqltuner.pl --user=root --pass=root --protocol tcp --verbose | tee -a ./examples/github/result/mariadb/${{ matrix.MARIADB_VERSION }}/result.txt

      - name: Adding examples to Git
        run: |
          git add ./examples/github/result/mariadb/${{ matrix.MARIADB_VERSION }}/* || true

      - name: Run the Action Commit
        uses: devops-infra/action-commit-push@master
        with:
          github_token: "${{ secrets.GITHUB_TOKEN }}"
          add_timestamp: true
          commit_prefix: "[AUTO]"
          commit_message: "Updates MariaDb result examples (via Actions)"
          force: false
          target_branch: examples-mariadb-${{ matrix.MARIADB_VERSION }}

================================================
FILE: .github/workflows/generate_mysql_examples.yml
================================================
# This is a basic workflow to help you get started with Actions

name: Compile MT examples For MySQL

# Controls when the workflow will run
on:
  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  mysql_examples:
    # This workflow contains a single job called "build"
    strategy:
        matrix:
          MYSQL_VERSION: [5.6, 5.7, 8.0]
    # The type of runner that the job will run on
    runs-on: ubuntu-latest
    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      - name: Setup MySQL Tuner repository
        uses: actions/checkout@v6

      - name: Set up MySQL
        uses: shogo82148/actions-setup-mysql@v1
        with:
          distribution: 'mysql'
          root-password: "root"
          mysql-version: "${{ matrix.MYSQL_VERSION }}"

      - name: Injecting credentials
        run: |
          echo -e "[client]\nuser=root\npassword=root\nhost=127.0.0.1\nprotocol=TCP" > $HOME/.my.cnf

      - name: Cloning test_db dataset
        run: |
          git clone https://github.com/datacharmer/test_db.git

      - name: Test database is Up and Running
        run: |
          sleep 5s
          sudo netstat -ltpn
          mysql -e 'select version();'

      - name: Injecting test_db dataset
        run: |
          cd test_db
          mysql -e 'CREATE DATABASE data;'
          mysql data< ./employees.sql
          cd -
          rm -rf test_db
      # Runs a single command using the runners shell
      - name: Json Run verbose mode with dumpdir result
        run: |
          mkdir -p ./examples/github/result/mysql/${{ matrix.MYSQL_VERSION }}
          sudo perl ./mysqltuner.pl --user=root --pass=root --protocol tcp --verbose --dumpdir=./examples/github/result/mysql/${{ matrix.MYSQL_VERSION }} --json | tee -a ./examples/github/result/mysql/${{ matrix.MYSQL_VERSION }}/result.json

      - name: Standard Run verbose mode without dumpdir result
        run: |
          sudo perl ./mysqltuner.pl --user=root --pass=root --protocol tcp --verbose | tee -a ./examples/github/result/mysql/${{ matrix.MYSQL_VERSION }}/result.txt

      - name: Adding examples to Git
        run: |
          git add ./examples/github/result/mysql/${{ matrix.MYSQL_VERSION }}/* || true

      - name: Run the Action Commit
        uses: devops-infra/action-commit-push@master
        with:
          github_token: "${{ secrets.GITHUB_TOKEN }}"
          add_timestamp: true
          commit_prefix: "[AUTO]"
          commit_message: "Updates MySQL result examples (via Actions)"
          force: false
          target_branch: examples-mysql-${{ matrix.MYSQL_VERSION }}

================================================
FILE: .github/workflows/publish_release.yml
================================================
on:
  push:
    # Sequence of patterns matched against refs/tags
    tags:
      - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10

name: Create Release

jobs:
  build:
    name: Create Release
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v6

      - name: Create Release and Upload Assets
        uses: softprops/action-gh-release@v2
        with:
          files: |
            mysqltuner.pl
          body: |
            Changes in this Release:
            Please consult commit log and issue tracker on Github for more information.
          draft: true
          prerelease: false
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


================================================
FILE: .github/workflows/pull_request.yml
================================================
# This is a basic workflow to help you get started with Actions

name: CI for MySQL Tuner for MySQL 5.7 and 8.0

# Controls when the workflow will run
on:
  # Triggers the workflow on push or pull request events but only for the master branch
  push:
    branches: [master]
  pull_request:
    branches: [master]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  test_help:
    strategy:
      matrix:
        MYSQL_VERSION: [5.7, 8.0]
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    services:
      mysql:
        image: mysql:${{ matrix.MYSQL_VERSION }}
        env:
          MYSQL_ROOT_PASSWORD: root
        ports:
          - 3306:3306
        options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      - name: Setup MySQL Tuner repository
        uses: actions/checkout@v6

      - name: Injecting credentials
        run: |
          echo -e "[client]\nuser=root\npassword=root\nhost=127.0.0.1\nprotocol=TCP" > $HOME/.my.cnf

      - name: waiting database
        run: |
          sleep 20s

      - name: Run help mode
        run: |
          sudo perl ./mysqltuner.pl --help

  test_with_empty_db:
    needs: test_help
    strategy:
      matrix:
        MYSQL_VERSION: [5.7, 8.0]
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    services:
      mysql:
        image: mysql:${{ matrix.MYSQL_VERSION }}
        env:
          MYSQL_ROOT_PASSWORD: root
        ports:
          - 3306:3306
        options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      - name: Setup MySQL Tuner repository
        uses: actions/checkout@v6

      - name: Injecting credentials
        run: |
          echo -e "[client]\nuser=root\npassword=root\nhost=127.0.0.1\nprotocol=TCP" > $HOME/.my.cnf

      - name: waiting database
        run: |
          sleep 20s

      # Runs a single command using the runners shell
      - name: Run verbose mode
        run: sudo perl ./mysqltuner.pl --user=root --pass=root --protocol tcp --verbose


================================================
FILE: .github/workflows/run_mt_with_db.yml
================================================
# This is a basic workflow to help you get started with Actions

name: Test with databases

# Controls when the workflow will run
on:
  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  run_mt_with_db:
    strategy:
      matrix:
        MYSQL_VERSION: [5.7, 8.0]
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    services:
      mysql:
        image: mysql:${{ matrix.MYSQL_VERSION }}
        env:
          MYSQL_ROOT_PASSWORD: root
        ports:
          - 3306:3306
        options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      - name: Setup MySQL Tuner repository
        uses: actions/checkout@v6

      - name: Injecting credentials
        run: |
          echo -e "[client]\nuser=root\npassword=root\nhost=127.0.0.1\nprotocol=TCP" > $HOME/.my.cnf

      - name: Cloning test_db dataset
        run: |
          git clone https://github.com/datacharmer/test_db.git

      - name: Injecting test_db dataset
        run: |
          sleep 5s
          cd test_db
          netstat -ltpn
          mysql -e 'select version();'
          mysql -e 'CREATE DATABASE data;'
          mysql data< ./employees.sql
          cd -
          rm -rf test_db

      # Runs a single command using the runners shell
      - name: Run help mode
        run: perl ./mysqltuner.pl --help

      # Runs a single command using the runners shell
      - name: Run verbose mode
        run: sudo perl ./mysqltuner.pl --user=root --pass=root --protocol tcp --verbose


================================================
FILE: .github/workflows/update_cve_and_docs.yml
================================================
# This is a basic workflow to help you get started with Actions

name: CVE and Docs update

# Controls when the workflow will run
on:
  # Scheudle every sunday at 00:00
  #schedule:
  #  - cron: '0 0 * * 0'

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  build:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      - name: Setup MySQL Tuner repository
        uses: actions/checkout@v6

      - name: Install dependencies
        run: |
          pwd
          cd build
          pwd
          sudo bash ./installStaff.sh

      - name: Update CVE and docs
        run: |
          pwd
          cd ./build
          pwd
          sudo bash ./updateStaff.sh

      - name: Run the Action
        uses: devops-infra/action-commit-push@master
        with:
          github_token: "${{ secrets.GITHUB_TOKEN }}"
          add_timestamp: true
          commit_prefix: "[AUTO]"
          commit_message: "Updates CVE and docs (via Actions)"
          force: false
          target_branch: "cve-docs"

================================================
FILE: .husky/commit-msg
================================================
npx --no-install commitlint --edit "$1"


================================================
FILE: .husky/pre-commit
================================================
npm test


================================================
FILE: .perltidy
================================================
--backup-and-modify-in-place
--backup-file-extension=beforeTidy
--block-brace-tightness=2
--brace-tightness=2
--closing-token-indentation=1
--continuation-indentation=4
--indent-columns=4
--maximum-line-length=134
--cuddled-else
--opening-sub-brace-on-new-line
--noopening-brace-on-new-line
--nooutdent-labels
--paren-tightness=2
--square-bracket-tightness=2
--vertical-tightness=0
--vertical-tightness-closing=0
--break-at-old-comma-breakpoints
--entab-leading-whitespace=4
--tabs


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Code of Conduct

As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.

Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)



================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to this project

Please take a moment to review this document in order to make the contribution
process easy and effective for everyone involved.

Following these guidelines will help us get back to you more quickly, and will
show that you care about making MySQLTuner better just like we do. In return, we'll
do our best to respond to your issue or pull request as soon as possible with
the same respect.

_**Please Note:** These guidelines are adapted from [@necolas](https://github.com/necolas)'s
[issue-guidelines](https://github.com/necolas/issue-guidelines) and serve as
an excellent starting point for contributing to any open source project._


## Using the issue tracker

The [issue tracker](https://github.com/jmrenouard/MySQLTuner-perl/issues) is the
preferred channel for [bug reports](#bugs), [features requests](#features)
and [submitting pull requests](#pull-requests), but please respect the
following restrictions:

* Support issues or usage question that are not bugs should be posted on
[Stack Overflow, using the `mysqltuner`](http://stackoverflow.com/questions/tagged/mysqltuner) tag.

* Please **do not** derail or troll issues. Keep the discussion on topic and
  respect the opinions of others.


## Before submitting an issue

1. Upgrade to the latest version of MySQLTuner and see if the problem remains

2. Look at the [closed issues](https://github.com/major/mysqltuner-perl/issues?state=closed), we may have already answered a similar problem.

3. Post new features or bugs you have found at [Issue tracker](https://github.com/major/mysqltuner-perl/issues)

4. [Read the doc](https://github.com/major/mysqltuner-perl/). It is short and useful.

5. [Read the internal doc](https://github.com/jmrenouard/MySQLTuner-perl/blob/master/INTERNALS.md). It is a complete and detailed documentation of all checks performed by this tool and this organization.

<a name="bugs"></a>
## Bug reports

A bug is a _demonstrable problem_ that is caused by the code in the repository.
Good bug reports are extremely helpful &mdash; thank you!

Guidelines for bug reports:

1. **Use the [GitHub issue search]** &mdash; check if the issue has already been
   reported.

2. **Check if the bug has already been fixed** &mdash; try to reproduce it using the
   repository's latest `master` changes.

3. **Isolate the problem** &mdash; ideally create a [reduced test
   case](http://css-tricks.com/6263-reduced-test-cases/) and a live example
   (perhaps a [fiddle](http://jsfiddle.net)).

A good bug report shouldn't leave others needing to contact you for more
information. Please try to be as detailed as possible in your report. What is
your environment? What steps will reproduce the issue? What browser(s) and OS
experience the problem? What outcome did you expect, and how did it differ from
what you actually saw? All these details will help people to fix any potential
bugs.

Example:

> Short and descriptive example bug report title
>
> A summary of the issue and the browser/OS environment in which it occurs. If
> suitable, include the steps required to reproduce the bug.
>
> 1. This is the first step
> 2. This is the second step
> 3. Further steps, etc.
>
> `<url>` - a link to the reduced test case
>
> Any other information you want to share that is relevant to the issue being
> reported. This might include the lines of code that you have identified as
> causing the bug, and potential solutions (and your opinions on their
> merits).

**Note:** In an effort to keep open issues to a manageable number, we will close any issues
that do not provide enough information for us to be able to work on a solution.
You will be encouraged to provide the necessary details, after which we will reopen the issue.

<a name="features"></a>
## Feature requests

Feature requests are welcome. But take a moment to find out whether your idea
fits with the scope and aims of the project. It's up to *you* to make a strong
case to convince the project's developers of the merits of this feature. Please
provide as much detail and context as possible.

Building something great means choosing features carefully especially because it
is much, much easier to add features than it is to take them away. Additions
to MySQLTuner will be evaluated on a combination of scope (how well it fits into the
project), maintenance burden and general usefulness.

Creating something great often means saying no to seemingly good ideas. Don't
despair if your feature request isn't accepted, take action! Fork the
repository, build your idea and share it with others. We released MySQLTuner under
the MIT License for this purpose precisely. Open source works best when smart
and dedicated people riff off of each others' ideas to make even greater things.

## New feature request
You can find Enhancement asked by community at [Enhancement issue]

<a name="pull-requests"></a>
## Pull requests

Good pull requests &mdash; patches, improvements, new features &mdash; are a fantastic help.
They should remain focused in scope and avoid containing unrelated commits.

**Please ask first** before embarking on any significant pull request (e.g.
implementing features, refactoring code, porting to a different language),
otherwise you risk spending a lot of time working on something that the
project's developers might not want to merge into the project. You can solicit
feedback and opinions in an open feature request thread or create a new one.

Please use the [git flow for pull requests](#git-flow) and follow MySQLTuner's
[code conventions](#code-conventions) before submitting your work. Adhering to
these guidelines is the best way to get your work included in MySQLTuner.

<a name="git-flow"></a>
#### Git Flow for pull requests

1. [Fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) the project, clone your fork,
   and configure the remotes:

   ```bash
   # Clone your fork of the repo into the current directory
   git clone git@github.com:<YOUR_USERNAME>/MySQLTuner-perl.git
   # Navigate to the newly cloned directory
   cd MySQLTuner-perl
   # Assign the original repo to a remote called "upstream"
   git remote add upstream https://github.com/jmrenouard/MySQLTuner-perl/
   ```

2. If you cloned a while ago, get the latest changes from upstream:

   ```bash
   git checkout master
   git pull upstream master
   ```

3. Create a new topic branch (off the main project development branch) to
   contain your feature, change, or fix:

   ```bash
   git checkout -b <topic-branch-name>
   ```

4. Commit your changes in logical chunks. Please adhere to these [git commit message guidelines]
   or your code is unlikely be merged into the main project. Use Git's
   [interactive rebase](https://help.github.com/articles/interactive-rebase)
   feature to tidy up your commits before making them public.

5. Locally merge (or rebase) the upstream development branch into your topic branch:

   ```bash
   git pull [--rebase] upstream master
   ```

6. Push your topic branch up to your fork:

   ```bash
   git push origin <topic-branch-name>
   ```

7. [Open a Pull Request] with a clear title and description.

**IMPORTANT**: By submitting a patch, you agree to allow the project owner to
license your work under the [GPLv3 License].

Copy of the license is available at [LICENSE]

<a name="code-conventions"></a>
## MySQLTuner Code Conventions

1. Check code convention using **perltidy** and **perlcritic**
2. Don't manually update the version number in `mysqltuner.pl`.


[Enhancement issue]:https://github.com/jmrenouard/MySQLTuner-perl/labels/enhancement
[GitHub issue search]:https://github.com/jmrenouard/MySQLTuner-perl/search?type=Issues
[git commit message guidelines]:http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[Open a Pull Request]:https://help.github.com/articles/using-pull-requests/
[GPLv3 License]:https://en.wikipedia.org/wiki/GNU_General_Public_License
[LICENSE]:https://github.com/jmrenouard/MySQLTuner-perl/blob/master/LICENSE


================================================
FILE: CURRENT_VERSION.txt
================================================
2.8.38


================================================
FILE: Changelog
================================================
2.8.38 2026-02-14

- fix: prevent creation of unauthorized directory "0" when --dumpdir is not explicitly set or set to 0 (Issue #20).
- fix: robust, version-agnostic detection of password column in mysql.user via schema inspection (Issue #22).
- refactor: replace massive system calls (awk, grep, uname, getconf, sysctl) with native Core Perl functions for Linux.
- feat: implement native parsing for /proc/cpuinfo, /proc/meminfo, /proc/sys/vm/swappiness and /etc/resolv.conf.
- refactor: optimize CPU core count, logical CPU detection, and OS memory setup for local environments.
- refactor: use POSIX::uname and POSIX::sysconf for standardized system and architecture reporting.
- fix: resolve MariaDB socket authentication regression and restore automatic credential discovery (Issue #875).
- fix: remediate Prototype Pollution vulnerability in lodash (CVE-2021-23341) by forcing update to 4.17.23.
- test: add reproduction test for authentication discovery chain (tests/issue_875_regression.t).
- test: add comprehensive test suite for password column detection (tests/repro_issue_22.t).
- chore: bump version to 2.8.38.

2.8.36 2026-02-13

- fix: migrate CI workflows to native GitHub services to resolve Docker API version mismatch.
- fix: modernize release workflow using softprops/action-gh-release@v2.
- fix: enhance Docker publishing with Buildx setup for reliable multi-platform builds.
- fix: robust, version-agnostic detection of password column in mysql.user via schema inspection (Issue #22).
- fix: correct regression in tests/test_issue_875.t by updating database mocks.
- test: add comprehensive test suite for password column detection (tests/repro_issue_22.t).
- test: add reproduction test for Performance Schema disabled diagnostic (tests/repro_pfs_disabled.t).
- fix: prevent creation of directory "0" when --dumpdir is not specified or set to 0 (Issue #20).
- docs: fix broken endoflife.date links in README files (Issue #877).
- test: add reproduction test for Performance Schema disabled scenario (repro_pfs_disabled.t).
- ci: fix Docker API mismatch in GitHub Actions by migrating to native services.

2.8.35 2026-02-02

- feat: modernize version check using `HTTP::Tiny` with robust fallback to `curl`/`wget` (PR #18 and #17).
- feat: integrate `perltidy` in `release-preflight` workflow and enforce script formatting (issue #19).
- fix: resolve inaccurate `innodb_log_file_size` recommendations caused by integer rounding (issue #770).
- fix: ensure percentage returns 100.00% instead of 0% on idle or fresh servers, preventing unwarranted `innodb_log_buffer_size` recommendations (issue #783).
- docs: replace generic `SECURITY.md` template with project-specific policy and contact info (Issue #771, credit @bfontaine).
- style: run `perltidy` on `mysqltuner.pl` to ensure code consistency.
- test: add dedicated unit test `tests/test_version_regex.t` for version extraction verification.
- test: add regression test `tests/issue_770.t` to verify `innodb_log_file_size` recommendation precision.
- test: add regression test `tests/issue_783.t` to verify `innodb_log_buffer_size` recommendation on idle servers.

# MySQLTuner Changelog

2.8.33 2026-01-31

- fix: improved cPanel/Flex detection and refined `skip-name-resolve` recommendation (issue #863).
- test: add enhanced unit test `tests/issue_863_enhanced.t` for cPanel detection verification.
- docs: consolidate project governance rules and resolve backwards compatibility contradiction (00_constitution.md, 03_execution_rules.md).
- style: promote session-discovered rules to Tier 04 Best Practices and reset `remembers.md`.

- feat: add automated validation (regex/coderef) for CLI options like `--port` and `--defaultarch`.
- feat: implement option implications (e.g., `--feature` implies `--verbose`) in metadata.
- feat: add SSL/TLS security checks for missing configuration, insecure protocols (TLSv1.0, TLSv1.1), and secure transport enforcement.
- feat: add automated detection of current session encryption status.
- feat: add observability warning and explicit recommendation when `performance_schema` is disabled.
- fix: resolve numeric comparison warnings and prevent full workstation path leakage in CLI output.
- fix: resolve contradictory key_buffer_size recommendations by adding a usage threshold to the increase recommendation (issue #774).
- test: add unit test `tests/cli_validation.t` for comprehensive option validation verification.
- test: add unit test `tests/ssl_tls_validation.t` for comprehensive SSL/TLS verification.
- test: add unit test `tests/pfs_observability.t` to verify `performance_schema` diagnostics.
- test: add unit test `tests/issue_774.t` to verify key_buffer_size recommendation logic.
- docs: cleanup MongoDB and PostgreSQL references from `ROADMAP.md` and README files.
- refactor: implement metadata-driven CLI option parsing to centralize defaults, validation, and documentation.

2.8.32 2026-01-30

- feat: remove `--skippassword` from test laboratory to enable security checks.
- fix: resolve false positive weak password warnings on MariaDB socket authentication (issue #875) and prevent dictionary corruption by silencing `curl`/`wget` output.
- test: add unit test [tests/test_issue_875.t](file:///tests/test_issue_875.t) to verify socket authentication detection.
- style: enforce artifact path hygiene (hide absolute workstation paths) in agent-generated reports.
- chore: rename release manager specification to a more generic name.
- chore: update `multi-db-docker-env` and `test_db` vendors.

2.8.31 2026-01-27

- feat: add `--schemadir <path>` option to generate per-schema markdown documentation.
- feat: support independent schema documentation generation without requiring `--dumpdir`.
- feat: restructure specifications into `documentation/specifications/` (/hey-agent).
- feat: add specification for Performance Schema Error Log analysis.
- feat: add unused and redundant index checks via Performance Schema (sys schema) with recommendations and modeling findings.
- feat: modernize CVE retrieval script `build/updateCVElist.pl` with NVD API 2.0 (JSON-based) (Fix #867).
- feat: implement SQL modeling best practice checks (Primary Keys, Foreign Keys, Naming Conventions, Data Types).
- feat: add MySQL 8.0+ specific modeling checks (JSON indexing, Invisible Indexes).
- fix: resolve CLI option ambiguity and duplicate specification errors via unified Getopt::Long binding.
- fix: resolve tab delimiter mismatch in `tests/sql_modeling.t` mock data.
- fix: noisy system command failures when absolute paths are used for whitelisted commands (issue #874).
- fix: resolve syntax error and Perl compilation warnings in `mysqltuner.pl`.
- fix: ensure shell commands (pipes, redirections) work correctly in containers using `sh -c`.
- test: add unit test `tests/schemadir.t` to verify schema documentation logic.
- test: add unit test [tests/index_pfs_checks.t](file:///home/jmren/GIT_REPOS/MySQLTuner-perl/tests/index_pfs_checks.t) for Performance Schema index verification.
- test: add unit test [tests/sql_modeling.t](file:///home/jmren/GIT_REPOS/MySQLTuner-perl/tests/sql_modeling.t) for comprehensive schema analysis verification.
- ci: update `build/test_envs.sh` with `Schemadir` test scenario and fix logic ordering.
- ci: establish formal "Advanced Test Log Auditing" protocol and anomaly tracking.
- ci: enhance lab reports with integrated `execution.log` and collapsible panels for better readability.
- ci: harden testing suite with rigorous return code checking across all test modes (lab, container, remote).
- ci: improve laboratory error reporting to generate diagnostic reports even on startup failures.
- ci: verify MySQL 8.0 integration post-CLI refactoring.
- ci: reintroduce CVE analysis in Dockerfile with `--cvefile` support.
- ci: cleanup all `examples/` and execute full LTS test suite (MySQL, MariaDB, Percona).
- ci: update package.json test script and create remember workflow.
- ci: consolidate testing laboratory scripts into unified [build/test_envs.sh](file:///home/jmren/GIT_REPOS/MySQLTuner-perl/build/test_envs.sh) and update Makefile.
- chore: uncomment examples directory in .gitignore.
- chore: bump version to 2.8.31.
- docs: formalize tracking of Makefile and build script changes
- docs: formalize test and ci requirements in Changelog and rules
- docs: update Changelog and relax rules for docs-only updates
- chore: decommission MySQL 5.7 from testing laboratory and build scripts.

2.8.30 2026-01-24

- feat: auto-generate `raw_mysqltuner.txt` report in `dumps/` directory when using `--dumpdir`
- feat: add InnoDB transaction isolation levels and metrics (active count, longest duration)
- feat: add MariaDB innodb_snapshot_isolation detection and recommendation
- feat: implement robust container transport support (--container)
- feat: skip kernel tuning recommendations in container mode or when running in Docker
- feat: dynamic MySQL/MariaDB client detection in containers/remote hosts
- feat: automatic database password retrieval from container environment (MYSQL_ROOT_PASSWORD/MARIADB_ROOT_PASSWORD)
- fix: incorrect skip-name-resolve recommendations for cPanel systems (issue #863)
- docs: synchronize all README files with authentication mismatch troubleshooting guide
- ci: enhance `build/test_envs.sh` to capture and link all infrastructure logs (Docker start, DB injection, container logs, inspect data) in HTML reports for full audit traceability
- ci: make HTML reports self-sufficient by embedding logs directly and reordering sections
- ci: implement tripartite testing scenarios (Standard, Container, Dumpdir) per configuration with horizontal scenario selector in HTML reports
- ci: normalize HTML log panels with consistent Raw/Log links and improved UI layout
- ci: harden laboratory execution script with rigorous return code checking and log portability (copy vs symlink)
- ci: automate cleanup of `examples/` directory to keep only the 10 most recent results
- ci: add `/examples-cleanup` workflow for manual laboratory maintenance
- ci: implement automated technical release notes system via `build/release_gen.py` and `/release-notes-gen` workflow
- ci: add automated `.agent/README.md` synchronization via `build/doc_sync.py` and `/doc-sync` workflow
- test: add unit test tests/innodb_isolation.t for new transaction metrics
- test: add regression test tests/repro_issue_863.t for cPanel name resolution logic
- test: add unit test tests/test_issue_874.t to verify system command whitelisting and unix_socket logic
- test: add unit test tests/issue_869.t to verify InnoDB chunk breakdown on MariaDB 11.4+ (issue #869)
- test: validate MySQLTuner compatibility with MariaDB 11.8 (detected 11.8.5)

2.8.29 2026-01-24

- fix: synchronize all version occurrences in mysqltuner.pl and update release workflows (issue #15)
- feat: add version consistency check to release-preflight and git-flow workflows
- docs: update copyright years to 2026
2.8.28 2026-01-22

- feat: ajoute l'option --no-pfstat pour la partie performance schema
- feat: ajoute l'option --no-colstat pour la partie colonne stat
- fix: skip innodb_buffer_stats during sys schema dump to avoid performance issues

2.8.27 2026-01-18

- refactor: replace massive raw backtick usage with execute_system_command wrapper for better security and compliance (Compliance Sentinel)

2.8.26 2026-01-18

- fix: inverted replication command logic causing wrong SQL on MySQL 8.0+/MariaDB 10.5+ (issue #553)
- feat: add MySQL/MariaDB version detection to prevent version number conflicts in replication logic
- test: add comprehensive test suite (test_issue_553.t) for replication command compatibility
- chore: bump version to 2.8.26

2.8.24 2026-01-18

- fix: improve MariaDB 11+ detection by checking version_comment (issue #869)
- fix: handle innodb_buffer_pool_chunk_size=0 (autosize) in MariaDB 10.8+ (#869)
- chore: bump version to 2.8.24

2.8.23 2026-01-18

- feat: add --ignore-tables CLI option to filter specific tables from analysis (#749)
- chore: bump version to 2.8.23

2.8.22 2026-01-18

- feat: update all repository links from 'major' to 'jmrenouard' (issue #410)
- docs: add Changelog information and Useful Links to all README files (issue #411)
- feat: improve thread_pool_size recommendations based on logical CPU count (issue #404)
- feat: suggest enabling thread pool for servers with max_connections >= 512 (issue #404)
- fix: hide ThreadPool metrics when thread pool is not enabled to avoid noise (issue #404)
- feat: add logical_cpu_cores function to accurately detect threads including HT
- chore: bump version to 2.8.22

2.8.21 2026-01-18

- fix: remove contradictory query_cache_limit recommendation when disabling query cache (issue #671)
- fix: cap join_buffer_size recommendation at 4MB and prefer index optimization (issue #671)
- chore: bump version to 2.8.21

2.8.20 2026-01-18

- feat: add automated regression test for forcemem MB interpretation (issues #780, #810)
- chore: bump version to 2.8.20

2.8.18 2026-01-18

- feat: add --max-password-checks option to limit dictionary checks (default: 100)
- fix: ensure Machine type is reported as 'Container' when --container option is used
- chore: bump version to 2.8.18

2.8.17 2026-01-18

- feat: implementation of issue #403 to check weak passwords on MySQL 8.0+ and flush hosts every 100 attempts
- chore: bump version to 2.8.17

2.8.16 2026-01-18

- chore: bump version to 2.8.16

2.8.15 2026-01-18

- feat: update all GitHub links from 'major' to 'jmrenouard' organization
- feat: refactor plugin information to filter ACTIVE status and display specific columns grouped by type
- chore: bump version to 2.8.15

2.8.13 2026-01-18

- docs: add Useful Links section to all README files (English, French, Russian, Italian)
- chore: bump version to 2.8.13

2.8.12 2026-01-17

- feat: update is_docker() to detect containerd and podman runtimes
- chore: bump version to 2.8.12

2.8.11 2026-01-17

- docs: update INTERNALS.md with information about Cloud, SSH, Containers, and Plugins
- chore: bump version to 2.8.11

2.8.10 2026-01-17

- feat: add dates and commands to log files in test_envs.sh
- feat: add separators (=) at the end of log files in test_envs.sh
- chore: synchronize version strings across script, POD, and version file

2.8.9 2026-01-17

- feat: improve container log detection by excluding proxy containers (traefik, haproxy, maxscale, proxy)
- feat: prioritize database-related container names (mysql, mariadb, percona, db, database)
- chore: bump version to 2.8.9

2.8.8 2026-01-17

- feat: add -d/--database parameter to test_envs.sh to tune specific databases
- feat: add -c/--configs parameter to test_envs.sh for easier configuration selection
- feat: add timestamps to major steps in test_envs.sh logs
- feat: add execution header to test_envs.sh output showing the full command
- chore: bump version to 2.8.8

2.8.7 2026-01-17

- docs: add standardized comment headers to all build shell scripts
- chore: synchronize version strings across script, POD, and version file
- fix: ensure version consistency between Changelog and CURRENT_VERSION.txt

2.8.6 2026-01-17

- feat: add Plugin Information section and --plugininfo flag (#794)
- fix: memory calculation bug in system_recommendations (1.5GB check)
- fix: ensure forcemem is correctly interpreted and displayed as MB in os_setup
- chore: synchronize version strings across script, POD, and version file

2.8.5 2026-01-17

- fix: noisy sysctl errors for sunrpc parameters when kernel module is not loaded
- fix: refactor get_kernel_info to handle missing sysctl parameters gracefully

2.8.4 2026-01-17

- fix: database injection failing to find dump files due to incorrect working directory
- fix: ensure correct path handling for 'source' commands in employees.sql

2.8.3 2026-01-17

- feat: detect docker/podman environment and automatically grab logs from container if local log file is not found
- feat: add --container option to manually specify a container for log retrieval

2.8.2 2026-01-17

- fix: system command failures (ping/ifconfig/redirection) on modern Linux (Ubuntu 22.04/WSL2)
- feat: integrate external test dependencies (multi-db-docker-env, test_db) and automated employees database injection

2.8.1 2026-01-17

- fix: resilient memory checks with /proc fallback on Linux and silencing expected ps failures

2.8.0 2026-01-17

- Bump version to 2.8.0
- enhance user hostname restriction checks
- feat: Translate comments and messages in updateCVElist.py to English
- chore: ignore VS Code workspace files
- build: update Debian File::Util dependency installation
- cleanup: MariaDB and MySQL support documentation (focus on LTS)


================================================
FILE: Dockerfile
================================================
FROM ubuntu:latest

LABEL maintainer="jmrenouard@gmail.com"

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt upgrade -y && apt-get install -yq --no-install-recommends \
  apt-utils \
  curl \
  wget \
  perl \
  perl-doc \
  mysql-client \
  libjson-perl \
  libtext-template-perl \
  && apt-get clean \
  && rm -rf /var/lib/apt/lists/* \
  && mkdir -p /results
RUN apt clean all
WORKDIR /
COPY ./mysqltuner.pl /mysqltuner.pl 
COPY ./basic_passwords.txt /basic_passwords.txt
COPY ./template_example.tpl /template.tpl

#Problem with generateion of CVE files
COPY ./vulnerabilities.csv /vulnerabilities.txt

ENTRYPOINT [ "perl", "/mysqltuner.pl", "--passwordfile", "/basic_passwords.txt",\
  "--nosysstat", "--defaults-file", "--cvefile", "/vulnerabilities.txt", \
  "/defaults.cnf", "--dumpdir", "/results", "--outputfile", \
  "/results/mysqltuner.txt", "--template", "/template.tpl", \
  "--reportfile", "/results/mysqltuner.html" , "--verbose" ]


================================================
FILE: FEATURES.md
================================================
Features list for option: --feature (dev only)
---


* build_mysql_connection_command
* cloud_setup
* cve_recommendations
* execute_system_command
* execute_system_command;
* log_file_recommendations
* make_recommendations
* mariadb_aria
* mariadb_connect
* mariadb_galera
* mariadb_rockdb
* mariadb_spider
* mariadb_threadpool
* mariadb_tokudb
* mariadb_xtradb
* mysql_80_modeling_checks
* mysql_databases
* mysql_datatype_optimization
* mysql_foreign_key_checks
* mysql_indexes
* mysql_innodb
* mysql_myisam
* mysql_naming_conventions
* mysql_pfs
* mysql_plugins
* mysql_routines
* mysql_schema_sanitization
* mysql_setup
* mysql_stats
* mysql_table_structures
* mysql_tables
* mysql_triggers
* mysql_views
* parse_cli_args
* push_recommendation
* security_recommendations
* setup_environment
* show_help
* show_help;
* ssl_tls_recommendations
* system_recommendations
* validate_mysql_version
* validate_tuner_version


================================================
FILE: INTERNALS.md
================================================
## MySQLTuner Internals

[!["Buy Us A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/jmrenouard)

## Table of contents

- [MySQLTuner Internals](#mysqltuner-internals)
- [Table of contents](#table-of-contents)
- [MySQLTuner steps](#mysqltuner-steps)
- [MySQLTuner get login information steps](#mysqltuner-get-login-information-steps)
- [MySQLTuner system checks](#mysqltuner-system-checks)
- [MySQLTuner Server version checks](#mysqltuner-server-version-checks)
- [Mysql error log file analysis](#mysql-error-log-file-analysis)
- [MySQL Storage engine general information](#mysql-storage-engine-general-information)
- [MySQLTuner security checks](#mysqltuner-security-checks)
- [MySQLTuner CVE vulnerabilities detection](#mysqltuner-cve-vulnerabilities-detection)
- [MySQLTuner database information](#mysqltuner-database-information)
- [MySQLTuner index information](#mysqltuner-index-information)
- [MySQLTuner Connections information](#mysqltuner-connections-information)
- [MySQLTuner server information](#mysqltuner-server-information)
- [MySQLTuner sort, join and temp table information](#mysqltuner-sort-join-and-temp-table-information)
- [MySQLTuner global buffer information](#mysqltuner-global-buffer-information)
- [MySQLTuner query cache checks](#mysqltuner-query-cache-checks)
- [MySQLTuner memory checks](#mysqltuner-memory-checks)
- [MySQLTuner slow queries checks](#mysqltuner-slow-queries-checks)
- [MySQLTuner replication checks](#mysqltuner-replication-checks)
- [MySQLTuner InnoDB information](#mysqltuner-innodb-information)
- [MySQLTuner AriaDB information](#mysqltuner-ariadb-information)
- [MySQLTuner MyISAM information](#mysqltuner-myisam-information)
- [MySQLTuner Galera information](#mysqltuner-galera-information)
- [MySQLTuner TokuDB information](#mysqltuner-tokudb-information)
- [MySQLTuner XtraDB information](#mysqltuner-xtradb-information)
- [MySQLTuner Connect information](#mysqltuner-connect-information)
- [MySQLTuner Spider information](#mysqltuner-spider-information)
- [MySQLTuner RocksDb information](#mysqltuner-rocksdb-information)
- [MySQLTuner Thread pool information](#mysqltuner-thread-pool-information)
- [MySQLTuner performance schema and sysschema information](#mysqltuner-performance-schema-and-sysschema-information)
- [MySQLTuner Cloud and SSH integration](#mysqltuner-cloud-and-ssh-integration)
- [MySQLTuner Container and Systemd log integration](#mysqltuner-container-and-systemd-log-integration)

## MySQLTuner steps

- Header Print
- Validate MySQLTuner version (check for updates)
- Setup Cloud mode (Azure/AWS) and SSH if needed
- Setup OS variables and commands (SSH prefixing)
- Get login information and setup MySQL connection
- Toss variables/status into hashes
- Validate MySQL and MariaDB versions (EOL check)
- Suggest 64-bit upgrade and architecture check
- Analyze mysqld error log file (Local, Docker, Podman, Kubectl, Systemd)
- Show parameters impacting performance during analysis
- Show information about databases (option: --dbstat)
- Show information about tables (option: --tbstat)
- Show information about indexes (option: --idxstat)
- Show information about views, triggers, and routines
- Show information about plugins (option: --plugininfo)
- Show enabled storage engines
- Display some security recommendations
- CVE vulnerabilities detection
- Calculate everything we need
- Print the server stats
- Print MyISAM stats
- Print InnoDB stats
- Print AriaDB stats
- Print Galera cluster stats
- Print replication info
- Print Storage Engine specific stats (TokuDB, RocksDB, Spider, etc.)
- Print Performance Schema stats
- Make recommendations based on stats
- Close reportfile if needed
- Dump result if debug is on

## MySQLTuner get login information steps

- Is a login possible?
  - Cloud setup (Azure/AWS)?
  - SSH prefixing?
  - Force socket, pipe, or specific protocol?
  - Remote connection?
    - _Specifying available RAM/Swap is required_
    - _Automatic detection if SSH is used_
  - SSL CA certificate?
  - Got user/pass on command line?
  - mysql-quickbackup credentials available?
  - Plesk credentials available?
  - DirectAdmin credentials available?
  - Debian maintenance account credentials available?
  - Defaults file or defaults extra file?
  - Just try a login
    - If working, and .my.cnf isn't there, **WARNING**
    - If working, and .my.cnf is there, okay
  - Prompt for creds on the console

## MySQLTuner system checks

* Check whether more than 2GB RAM present if on 32-bit OS
- Check number of opened ports (warn when more than 9 ports opened)
- Check 80, 8080, 443 and 8443 ports if warning is raised if they are opened
- Check if some banned ports are not opened (option --bannedports separated by comma)
- Check if non kernel and user process except mysqld are not using more than 15% of total physical memory
- Check vm.swapiness
- Check /etc/security/limit.conf
- Check sysctl entries: sunrpc.tcp_slot_entries, vm.swappiness, fs.aio-fs-nr
- Check mount point
- Check Ethernet card
- Check load average

## MySQLTuner Server version checks

* EOL MySQL version check
- Currently MySQL < 5.1 are considered EOL
- Using 5.5+ version of MySQL for performance issue (asynchronous IO)

## Mysql error log file analysis

* Look for potential current error log file name
- Automatic detection for:
  - Docker containers
  - Podman containers
  - Kubectl/Kubernetes pods
  - Systemd journal (journalctl)
- Check permission on error log file
- Check size on error log file (warning if > 32MB)
- Check error and warning on error log file
- Find last start and shutdown on error log file

## MySQL Storage engine general information

- Get storage engine counts/stats
  - Check for DB engines that are enabled but unused
  - Look for fragmented tables
  - Look for auto-increments near capacity
    - Look for tables with auto-increment with value near max capacity

## MySQLTuner security checks

- Is anonymous user present?
- Users without passwords
- Users with username as password
- Users without host restriction
- Weak password check (possibly using cracklib later?)
- Using basic_passwords.txt as password database
- Password list checks can be avoided (option: --skippassword)

## MySQLTuner CVE vulnerabilities detection

- option: --cvefile
- Check if your MariaDB or MySQL version contains CVE entries.

## MySQLTuner database information

* Performance analysis parameter checks (metadata performance)
- Per database information
        * Tables number
   - Rows number
   - Total size
   - Data size
   - Percentage of data size
   - Index size
   - Percentage of index size
    - Views number
    - Triggers number
    - Routines number
    - Collation number
    - Check that there is only one collation for all tables in database
    - Check that there is only one collation for all table columns in database
    - Check that there is only one storage engine per user database

## MySQLTuner index information

- Top 10 worth selectivity index
- Per index information
   - Index Cardinality
   - Index Selectivity
   - Misc information about index definition
   - Misc information about index size

## MySQLTuner Connections information

- Highest usage of available connections
- Percentage of used connections (<85%)
- Percentage of aborted connections (<3%)

## MySQLTuner server information

- Uptime: whether MySQL started within last 24 hours
- Bytes received and sent
- Number of connections
- Percentage between reads and writes
- Is binary log activated?
  - Is GTID mode activated?

## MySQLTuner sort, join and temp table information

- Max memory temporary table size allowed.
- Percentage of sort using temporary table (<10%)
- Number of join performed without using indexes (<250)
- Percentage of temporary table written on disk (<25%)
- Thread cache (=4)
- Thread cache hit ratio (>50%) if thread_handling is different of pools-of-threads
- Table cache hit ratio (>2°%)
- Table cache definition should be upper that total number of tables or in autoresizing mode
- Percentage of open file and open file limit (<85%)
- Percentage of table locks (<95%)
- Percentage of binlog cache lock (<90%)

## MySQLTuner global buffer information

- Key Buffer
- Max Tmp Table
- Per Thread Buffer
  - Read Buffer
  - Read RND Buffer
   - Sort Buffer
   - Thread stack
   - Join Buffer
   - Binlog Cache Buffers size if activated

## MySQLTuner query cache checks

- Is Query cache activated?
  - Query Cache Buffers
  - Query Cache DISABLED, ALL REQUEST or ON DEMAND
  - Query Cache Size
  - Query cache hit ratio (cache efficiency)

## MySQLTuner memory checks

- Get total RAM/swap
- Is there enough memory for max connections reached by MySQL?
- Is there enough memory for max connections allowed by MySQL?
- Max percentage of memory used (<85%)

## MySQLTuner slow queries checks

- Percentage of Slow queries (<5%)

## MySQLTuner replication checks

- Is server replication configured as slave?
- SQL replication thread running?
- IO replication thread running?
- Replication lag in seconds (Seconds_behind_master)
- Is Slave configured in read only?
- Replication type ROW, MIX, STMT
- Replication Semisync master
- Replication Semisync slave
- XA support activated
- Replication started?

## MySQLTuner InnoDB information

- InnoDB Buffer Pool Size
  - If possible, innodb_buffer_pool_size should be greater than data and index size for Innodb Table
  - Innodb_buffer_pool_size should be around 75% to 80% of the available system memory.
- InnoDB Buffer Pool Instances
  - MySQL needs 1 instance per 1Go of Buffer Pool
  - innodb_buffer_pool instances = round(innodb_buffer_pool_size / 1Go)
  - innodb_buffer_pool instances must be equal to or lower than 64

  - A bug in MySQL 5.6 causes SHOW VARIABLES to report an innodb_buffer_pool_instances value of 8 when innodb_buffer_pool_size is less than 1GB and only one buffer pool instance is present (Bug #18343670).

- InnoDB Buffer Pool Usage
  - If more than 20% of InnoDB buffer pool is not used, raise an alert.
- InnoDB Buffer Pool Log Size
  - InnoDB total log file size should be 25% of innodb_buffer_pool_size
- InnoDB Read efficiency
  - Ratio of read without locks
- InnoDB Write efficiency
  - Ratio of write without locks
- InnoDB Log Waits
  - Checks that no lock is used on Innodb Log.
- InnoDB Chunk Size
  - Check InnoDB Buffer Pool size is a multiple of InnoDB Buffer Pool chunk size * InnoDB Buffer Pool instances

## MySQLTuner AriaDB information

- Is Aria indexes size greater than page cache size?
- Page cache read hit ratio (>95%)
- Page cache write hit ratio (>95%)

## MySQLTuner MyISAM information

- Key buffer usage (>90%)
- Is MyISAM indexes size is greater than key buffer size ?
- Key buffer read hit ratio (>95%)
- Key buffer write hit ratio (>95%)

## MySQLTuner Galera information

- wsrep_ready cluster is ready
- wsrep_connected node is connected to other nodes
- wsrep_cluster_name is defined.
- wsrep_node_name is defined.
- Check thet notification script wsrep_notify_cmd is defined
- wsrep_cluster_status PRIMARY /NON PRIMARY.
   - PRIMARY : Coherent cluster
   - NO PRIMARY : cluster gets several states
- wsrep_local_state_comment: Node state
   - SYNCED (uptodate),
   - DONOR (sending information to another node)
   - Joiner (try to reach cluster group)
   - SYNCED state able to read/write
- wsrep_cluster_conf_id configuration level must be identical in all nodes
- wsrep_slave_thread is between 3 or 4 times number of CPU core.
- gcs.limit should be equal to wsrep_slave_threads * 5
- gcs.fc_factor should be equal to 0.8
- Flow control fraction should be lower than 0.02 (wsrep_flow_control_paused < 0.02)
- wsrep_last_commited committed level must be identical in all nodes
- Look for tables without primary keys
- Look for non InnoDB tables for Galera
- Variable innodb_flush_log_at_trx_commit should be set to 0.
- Check that there are 3 or 5 members in Galera cluster.
- Check that xtrabackup is used for SST method with wsrep_sst_method variable.
- Check variables wsrep_OSU_method is defined to TOI for updates.
- Check that there is no certification failures controlling wsrep_local_cert_failures status.

## MySQLTuner TokuDB information

- tokudb_cache_size
- tokudb_directio
- tokudb_empty_scan
- tokudb_read_block_size
- tokudb_commit_sync
- tokudb_checkpointing_period
- tokudb_block_size
- tokudb_cleaner_iterations
- tokudb_fanout

## MySQLTuner XtraDB information

- wsrep_node_name
- wsrep_cluster_name
- wsrep_cluster_address

## MySQLTuner Connect information

- connect_type
- connect_user
- connect_host

## MySQLTuner Spider information

- spider_nodes
- spider_direct_io

## MySQLTuner RocksDb information

- rocksdb_block_cache_size
- rocksdb_max_open_files

## MySQLTuner Thread pool information

- thread_pool_size between 16 to 36 for Innodb usage
- thread_pool_size between 4 to 8 for MyISAM usage

## MySQLTuner performance schema and sysschema information

- Check that Performance schema is activated for 5.6+ version
- Check that Performance schema is deactivated for 5.5- version
- Check that Sys schema is installed
- Sys Schema version
- Top user per connection
- Top user per statement
- Top user per statement latency
- Top user per lock latency
- Top user per full scans
- Top user per row_sent
- Top user per row modified
- Top user per io
- Top user per io latency
- Top host per connection
- Top host per statement
- Top host per statement latency
- Top host per lock latency
- Top host per full scans
- Top host per rows sent
- Top host per rows modified
- Top host per io
- Top 5 host per io latency
- Top IO type order by total io
- Top IO type order by total latency
- Top IO type order by max latency
- Top Stages order by total io
- Top Stages order by total latency
- Top Stages order by avg latency
- Top host per table scans
- InnoDB Buffer Pool by schema
- InnoDB Buffer Pool by table
- Process per allocated memory
- InnoDB Lock Waits
- Threads IO Latency
- High Cost SQL statements
- Top 5% slower queries
- Top 10 nb statement type
- Top statement by total latency
- Top statement by lock latency
- Top statement by full scans
- Top statement by rows sent
- Top statement by rows modified
- Use temporary tables
- Unused Indexes
- Full table scans
- Latest file IO by latency
- File by IO read bytes
- File by IO written bytes
- File per IO total latency
- File per IO read latency
- File per IO write latency
- Event Wait by read bytes
- Event Wait by write bytes
- Event per wait total latency
- Event per wait read latency
- Event per wait write latency
- Top 15 most read indexes
- Top 15 most modified indexes
- Top 15 high select latency index
- Top 15 high insert latency index
- Top 15 high update latency index
- Top 15 high delete latency index
- Top 15 most read tables
- Top 15 most modified tables
- Top 15 high select latency tables
- Top 15 high insert latency tables
- Top 15 high update latency tables
- Top 15 high delete latency tables
- Redundant indexes
- Tables not using InnoDb buffer
- Top 15 Tables using InnoDb buffer
- Top 15 Tables with InnoDb buffer free
- Top 15 Most executed queries
- Latest SQL queries in errors or warnings
- Top 20 queries with full table scans
- Top 15 reader queries (95% percentile)
- Top 15 row look queries (95% percentile)
- Top 15 total latency queries (95% percentile)
- Top 15 max latency queries (95% percentile)
- Top 15 average latency queries (95% percentile)
- Top 20 queries with sort
- Last 50 queries with sort
- Top 15 row sorting queries with sort
- Top 15 total latency queries with sort
- Top 15 merge queries with sort
- Top 15 average sort merges queries with sort
- Top 15 scans queries with sort
- Top 15 range queries with sort
- Top 20 queries with temp table
- Last 50 queries with temp table
- Top 15 total latency queries with temp table
- Top 15 queries with temp table to disk
- Top 15 class events by number
- Top 30 events by number
- Top 15 class events by total latency
- Top 30 events by total latency
- Top 15 class events by max latency
- Top 30 events by max latency

## MySQLTuner Cloud and SSH integration

- **Cloud mode**: Activated with `--cloud` or `--azure`.
- **SSH Support**: Allows running system commands on a remote host via SSH.
- **SSH Authentication**: Supports identity files (`--ssh-identity-file`) and passwords (`--ssh-password` using `sshpass`).
- **Remote Resource Detection**: Automatically detects RAM and Swap on the remote host if SSH is used.

## MySQLTuner Container and Systemd log integration

- **Docker/Podman**: Automatically detects logs from the most relevant database container based on ports and names.
- **Kubectl**: Supports retrieving logs from Kubernetes pods.
- **Systemd**: Supports retrieving logs from the systemd journal using `journalctl`.
- **Explicit Container**: Can be specified using `--container <type>:<name>`.


================================================
FILE: JenkinsFile
================================================


================================================
FILE: LICENSE
================================================
                    GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

    <program>  Copyright (C) <year>  <name of author>
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.


================================================
FILE: Makefile
================================================
VERSION=$(shell grep '\- Version ' mysqltuner.pl | awk '{ print $$NF}')
UPDATE_SUB_VERSION=$(shell echo $(VERSION) | awk -F. '{ print $$1"."$$2"."$$3+1 }')
UPDATE_MINOR_VERSION=$(shell echo $(VERSION) | awk -F. '{ print $$1"."$$2+1".0" }')
UPDATE_MAJOR_VERSION=$(shell echo $(VERSION) | awk -F. '{ print $$1+1".0.0" }')

all: generate_cve generate_features generate_usage tidy increment_sub_version 

help:
	@echo "Usage: make <target>"
	@echo "  help:              Show this help"
	@echo "  generate_usage:    Generate USAGE.md"
	@echo "  generate_cve:      Generate vulnerabilities.csv"
	@echo "  generate_features: Generate FEATURES.md"
	@echo "  tidy:              Tidy mysqltuner.pl"
	@echo "  check-tidy:        Check if mysqltuner.pl is tidy"
	@echo "  installdep_debian: Install dependencies on Debian"
	@echo "  increment_sub_version: Increment sub version"
	@echo "  increment_minor_version: Increment minor version"
	@echo "  increment_major_version: Increment major version"
	@echo "  push:              Push to GitHub"
	@echo "  vendor_setup:      Setup external test repositories (multi-db-docker-env, test_db)"
	@echo "  test:              Run database lab tests (mysql84, mariadb1011, percona80)"
	@echo "  test-all:          Run all database lab tests"
	@echo "  test-container:    Run tests against a specific CONTAINER (e.g. CONTAINER=my_db)"
	@echo "  audit:             Run audit on remote HOST (e.g. HOST=db-server.com)"
	@echo "  audit-logs:        Run local audit on laboratory logs (examples/ directory)"
	@echo "  unit-tests:        Run unit and regression tests in tests/ directory"
	@echo "  clean_examples:    Cleanup examples directory (KEEP=n, default 5)"
	@echo "  setup_commits:     Install Conventional Commits tools (Node.js)"


installdep_debian: setup_commits
	sudo apt install -y cpanminus libfile-util-perl libpod-markdown-perl libwww-mechanize-gzip-perl perltidy dos2unix
	curl -sL https://raw.githubusercontent.com/slimtoolkit/slim/master/scripts/install-slim.sh | sudo -E bash -

setup_commits:
	@echo "Installing Conventional Commits tools..."
	npm install

tidy:
	dos2unix ./mysqltuner.pl
	perltidy -b ./mysqltuner.pl
	git add ./mysqltuner.pl
	git commit -m "style: tidy mysqltuner.pl" || echo "No changes to commit"

check-tidy:
	perltidy -st mysqltuner.pl | diff -q - mysqltuner.pl

generate_usage:
	pod2markdown mysqltuner.pl >USAGE.md
	git add ./USAGE.md
	git commit -m "docs: generate USAGE.md" || echo "No changes to commit"

generate_cve:
	perl ./build/updateCVElist.pl
	git add ./vulnerabilities.csv
	git commit -m "docs: generate vulnerabilities list" || echo "No changes to commit"

generate_version_file:
	rm -f CURRENT_VERSION.txt
	grep "# mysqltuner.pl - Version" ./mysqltuner.pl | awk '{ print $$NF}' > CURRENT_VERSION.txt
	git add ./CURRENT_VERSION.txt
	git commit -m "chore: generate CURRENT_VERSION.txt" || echo "No changes to commit"

generate_eof_files:
	bash ./build/endoflife.sh mariadb 
	bash ./build/endoflife.sh mysql
	git add ./*_support.md
	git commit -m "docs: generate end-of-life status files" || echo "No changes to commit"

generate_features:
	perl ./build/genFeatures.sh
	git add ./FEATURES.md
	git commit -m "docs: generate FEATURES.md" || echo "No changes to commit"

increment_sub_version:
	@echo "Incrementing sub version from $(VERSION) to $(UPDATE_SUB_VERSION)"
	sed -i "s/$(VERSION)/$(UPDATE_SUB_VERSION)/" mysqltuner.pl *.md .github/workflows/*.yml
	git add ./*.md ./mysqltuner.pl
	git commit -m "Generate $(UPDATE_SUB_VERSION) sub version at $(shell date --iso=seconds)"
	git tag -a v$(UPDATE_SUB_VERSION) -m "Generate $(UPDATE_SUB_VERSION) sub version at $(shell date --iso=seconds)"
	git push --tags

increment_minor_version:
	@echo "Incrementing minor version from $(VERSION) to $(UPDATE_MINOR_VERSION)"
	sed -i "s/$(VERSION)/$(UPDATE_MINOR_VERSION)/" mysqltuner.pl *.md .github/workflows/*.yml
	git add ./*.md ./mysqltuner.pl
	git commit -m "Generate $(UPDATE_MINOR_VERSION) minor version at $(shell date --iso=seconds)"
	git tag -a v$(UPDATE_MINOR_VERSION) -m "Generate $(UPDATE_MINOR_VERSION) minor version at $(shell date --iso=seconds)"
	git push --tags

increment_major_version:
	@echo "Incrementing major version from $(VERSION) to $(UPDATE_MAJOR_VERSION)"
	sed -i "s/$(VERSION)/$(UPDATE_MAJOR_VERSION)/" mysqltuner.pl *.md .github/workflows/*.yml
	git add ./*.md ./mysqltuner.pl
	git commit -m "Generate $(UPDATE_SUB_VERSION) major version at $(shell date --iso=seconds)"
	git tag -a v$(UPDATE_MINOR_VERSION) -m "Generate $(UPDATE_MAJOR_VERSION) major version at $(shell date --iso=seconds)"
	git push --tags

docker_build:
	docker build . -t jmrenouard/mysqltuner:latest -t jmrenouard/mysqltuner:$(VERSION)

docker_slim:
	docker run --rm -it --privileged -v /var/run/docker.sock:/var/run/docker.sock -v $(PWD):/root/app -w /root/app jmrenouard/mysqltuner:latest slim build

docker_push: docker_build
	bash build/publishtodockerhub.sh $(VERSION)
	

vendor_setup:
	@echo "Setting up vendor repositories..."
	mkdir -p vendor
	if [ ! -d "vendor/multi-db-docker-env" ]; then \
		git clone https://github.com/jmrenouard/multi-db-docker-env vendor/multi-db-docker-env; \
	else \
		cd vendor/multi-db-docker-env && git pull; \
	fi
	if [ ! -d "vendor/test_db" ]; then \
		git clone https://github.com/jmrenouard/test_db vendor/test_db; \
	else \
		cd vendor/test_db && git pull; \
	fi

test: vendor_setup
	@echo "Running MySQLTuner Lab Tests..."
	bash build/test_envs.sh $(CONFIGS)

test-all: vendor_setup
	@echo "Running all MySQLTuner Lab Tests..."
	bash build/test_envs.sh

test-container:
	@echo "Running MySQLTuner against container: $(CONTAINER)..."
	bash build/test_envs.sh -e "$(CONTAINER)"

lab-up: vendor_setup
	@echo "Starting Persistent MySQLTuner Lab..."
	bash build/test_envs.sh --keep-alive $(CONFIGS)

lab-down:
	@echo "Stopping MySQLTuner Lab..."
	cd vendor/multi-db-docker-env && make stop

audit:
	@echo "Running MySQLTuner Audit on host: $(HOST)..."
	bash build/test_envs.sh -r "$(HOST)" -a

audit-logs:
	@echo "Running laboratory logs audit..."
	perl build/audit_logs.pl --dir=examples --verbose

unit-tests:
	@echo "Running unit and regression tests..."
	prove -r tests/

clean_examples:
	@echo "Cleaning up examples..."
	bash build/clean_examples.sh $(KEEP)

push:
	git push

pull:
	git pull


================================================
FILE: POTENTIAL_ISSUES
================================================
# POTENTIAL ISSUES AUDIT

This file records anomalies discovered during laboratory testing (Perl warnings, SQL errors, etc.).

## [2026-01-27 00:32] Session Start (v2.8.31)

### Logic Anomalies

- [x] **SQL Check Syntax Error**: `sh: 1: Syntax error: "(" unexpected` during `select CONCAT(...) from sys.schema_redundant_indexes`.
  - Found in: MySQL 8.x and Percona 8.x laboratory logs.
  - Fix: Escaped double quotes in `select_array` and `select_array_with_headers` to ensure safe transport in container mode.
- [x] **MariaDB LTS Stability**: Verified clean for 11.4, 10.11, 10.6.
- [x] **Performance Schema Disabled**: `Performance_schema should be activated.` reported during audit. Verified fix in lab tests.
  - **How to fix**:
    - **MySQL/MariaDB**: Add `performance_schema=ON` under `[mysqld]` in your `my.cnf` or `server.cnf` and restart the service.
    - **Cloud/Managed**: Enable via your cloud provider console (e.g., AWS Parameter Group, GCP Flags).
    - **Verification**: Run `SHOW VARIABLES LIKE 'performance_schema';` (should be `ON`).

### Environment/Lab Issues

## [Bug #783 Audit] 2026-02-02

Pre-existing anomalies found in examples/ directory:

- SQL Execution Failure (return code 256) found in:
  - examples/20260201_021412_mariadb118/Dumpdir/execution.log
  - examples/20260201_021550_mysql84/Standard/execution.log
  - examples/20260201_022737_mariadb118/Container/execution.log
  - examples/20260201_021043_percona80/Standard/execution.log
- [x] **Perl Warnings (uninitialized value $opt{"colstat"})**: Fixed by normalizing CLI metadata key extraction in `%opt` hash.
  - Found in: `examples/20260201_020318_mariadb1011/Standard/execution.log` etc.
  - Fix: Stripped `Getopt::Long` modifiers (`!`, `+`, `=`, `:`) during `%opt` initialization and CLI parsing.

## [2026-02-02 Audit] Release v2.8.35/v2.8.36

### Logic Anomalies

- [x] **Perl Warning ($opt{"colstat"})**: `Use of uninitialized value $opt{"colstat"}` in MariaDB 10.11 and 10.6.
  - Found in: `examples/20260202_231425_mariadb1011/Standard/execution.log`
  - Fix: Normalized CLI primary key extraction to strip modifiers. Verified with `tests/cli_mod_keys.t`.

### Environment/Lab Issues

- [x] **SQL Execution Failure (return code 256)**: Persistent across MySQL 8.x, 9.6 and Percona 8.0.
  - Found in: `examples/20260202_230352_mysql84/Standard/execution.log`, `examples/20260202_230050_mysql96/Standard/execution.log`.
  - Fix: Issue #22 (Robust password column detection).
  - Reproduce: `tests/repro_issue_22.t`.

## [2026-02-02 Audit] System Call & Core Perl Optimization

### Systemic Findings

The following external commands are currently used via `execute_system_command` but have native Core Perl equivalents (no external dependencies required). Migrating these will reduce fork overhead and improve portability.

#### High Priority Replacements (Low Complexity)

- [x] **Command**: `whoami` (line 701)
  - **Replacement**: `(getpwuid($<))[0]` (Native core Perl used).
- [x] **Command**: `env` / `printenv` (lines 1673, 1890, 1955)
  - **Replacement**: Access the `%ENV` hash directly.
- [x] **Command**: `hostname` (line 3051)
  - **Replacement**: `use Sys::Hostname; hostname();` (Core since Perl 5.6).
- [x] **Command**: `grep ... /proc/meminfo` (lines 1399, 1414, 3099)
  - **Replacement**: Open `/proc/meminfo` and parse line-by-line (Core file handles).
- [x] **Command**: `grep -c ^processor /proc/cpuinfo` (line 949)
  - **Replacement**: Open `/proc/cpuinfo` and count lines starting with `processor`.
- [x] **Command**: `which` (lines 1552, 1576)
  - **Replacement**: Iterate through `split(/:/, $ENV{PATH})` and check file existence with `-x`.
- [x] **Command**: `getconf PAGESIZE` (line 2718)
  - **Replacement**: `use POSIX; POSIX::sysconf(POSIX::_SC_PAGESIZE);`
- [x] **Command**: `uname` (lines 1108, 1395, 3044, 3049, 3117)
  - **Replacement**: `use POSIX; POSIX::uname();` or `$^O`.

#### Medium Priority Replacements (Environmental Specifics)

- [x] **Command**: `stty -echo` / `stty echo` (lines 1701, 1925)
  - **Replacement**: Use `POSIX::Termios` for terminal attribute control (avoids `stty` binary dependency).
- [x] **Command**: `uptime` (line 3107)
  - **Replacement**: Read `/proc/uptime` (Linux-only) or calculate via `$^T` (script start time) for script uptime. System uptime requires `POSIX` / `/proc`.
- [ ] **Command**: `df` (lines 2790, 2791)
  - **Replacement**: No cross-platform Core Perl replacement. Keep for now or use `statvfs` where available.
- [x] **Command**: `grep -Ec '^flags.*\ hypervisor\ ' /proc/cpuinfo` (line 2981)
  - **Replacement**: Native Perl parsing of `/proc/cpuinfo`.
- [x] **Command**: `sysctl -n vm.swappiness` (line 3052)
  - **Replacement**: Native Perl parsing of `/proc/sys/vm/swappiness`.


================================================
FILE: README.fr.md
================================================
![MySQLTuner-perl](mtlogo2.png)

[!["Offrez-nous un café"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/jmrenouard)

[![État du projet](https://opensource.box.com/badges/active.svg)](https://opensource.box.com/badges)
[![État des tests](https://github.com/anuraghazra/github-readme-stats/workflows/Test/badge.svg)](https://github.com/anuraghazra/github-readme-stats/)
[![Temps moyen de résolution d'un problème](https://isitmaintained.com/badge/resolution/jmrenouard/MySQLTuner-perl.svg)](https://isitmaintained.com/project/jmrenouard/MySQLTuner-perl "Temps moyen de résolution d'un problème")
[![Pourcentage de problèmes ouverts](https://isitmaintained.com/badge/open/jmrenouard/MySQLTuner-perl.svg)](https://isitmaintained.com/project/jmrenouard/MySQLTuner-perl "Pourcentage de problèmes encore ouverts")
[![Licence GPL](https://badges.frapsoft.com/os/gpl/gpl.png?v=103)](https://opensource.org/licenses/GPL-3.0/)

**MySQLTuner** est un script écrit en Perl qui vous permet d'examiner rapidement une installation MySQL et de faire des ajustements pour augmenter les performances et la stabilité. Les variables de configuration actuelles et les données d'état sont récupérées et présentées dans un bref format avec quelques suggestions de performances de base.

**MySQLTuner** prend en charge environ 300 indicateurs pour MySQL/MariaDB/Percona Server dans cette dernière version.

**MySQLTuner** est activement maintenu et prend en charge de nombreuses configurations telles que [Galera Cluster](https://galeracluster.com/), [TokuDB](https://www.percona.com/software/mysql-database/percona-tokudb), [Schéma de performance](https://github.com/mysql/mysql-sys), les métriques du système d'exploitation Linux, [InnoDB](https://dev.mysql.com/doc/refman/5.7/en/innodb-storage-engine.html), [MyISAM](https://dev.mysql.com/doc/refman/5.7/en/myisam-storage-engine.html), [Aria](https://mariadb.com/docs/server/server-usage/storage-engines/aria/aria-storage-engine), ...

Vous pouvez trouver plus de détails sur ces indicateurs ici :
[Description des indicateurs](https://github.com/jmrenouard/MySQLTuner-perl/blob/master/INTERNALS.md).

![MysqlTuner](https://github.com/jmrenouard/MySQLTuner-perl/blob/master/mysqltuner.png)

Liens utiles
==

* **Développement actif :** [https://github.com/jmrenouard/MySQLTuner-perl](https://github.com/jmrenouard/MySQLTuner-perl)
* **Versions/Tags :** [https://github.com/jmrenouard/MySQLTuner-perl/tags](https://github.com/jmrenouard/MySQLTuner-perl/tags)
* **Changelog :** [https://github.com/jmrenouard/MySQLTuner-perl/blob/master/Changelog](https://github.com/jmrenouard/MySQLTuner-perl/blob/master/Changelog)
* **Images Docker :** [https://hub.docker.com/repository/docker/jmrenouard/mysqltuner/tags](https://hub.docker.com/repository/docker/jmrenouard/mysqltuner/tags)

MySQLTuner a besoin de vous
===

**MySQLTuner** a besoin de contributeurs pour la documentation, le code et les commentaires :

* Veuillez nous rejoindre sur notre outil de suivi des problèmes sur [le suivi GitHub](https://github.com/jmrenouard/MySQLTuner-perl/issues).
* Le guide de contribution est disponible en suivant [le guide de contribution de MySQLTuner](https://github.com/jmrenouard/MySQLTuner-perl/blob/master/CONTRIBUTING.md)
* Mettez une étoile au **projet MySQLTuner** sur [le projet Git Hub de MySQLTuner](https://github.com/jmrenouard/MySQLTuner-perl/)
* Support payant pour LightPath ici : [jmrenouard@lightpath.fr](jmrenouard@lightpath.fr)
* Support payant pour Releem disponible ici : [Application Releem](https://releem.com/)

![Statistiques GitHub d'Anurag](https://github-readme-stats.vercel.app/api?username=anuraghazra&show_icons=true&theme=radical)

## Stargazers au fil du temps

[![Stargazers au fil du temps](https://starchart.cc/jmrenouard/MySQLTuner-perl.svg)](https://starchart.cc/jmrenouard/MySQLTuner-perl)

Compatibilité
====

Les résultats des tests sont disponibles ici uniquement pour les versions LTS :

* MySQL (prise en charge complète)
* Percona Server (prise en charge complète)
* MariaDB (prise en charge complète)
* Réplication Galera (prise en charge complète)
* Cluster Percona XtraDB (prise en charge complète)
* Réplication MySQL (prise en charge partielle, pas d'environnement de test)

Merci à [endoflife.date](https://endoflife.date/)

* Reportez-vous aux [versions prises en charge de MariaDB](https://github.com/jmrenouard/MySQLTuner-perl/blob/master/mariadb_support.md).
* Reportez-vous aux [versions prises en charge de MySQL](https://github.com/jmrenouard/MySQLTuner-perl/blob/master/mysql_support.md).

***La prise en charge de Windows est partielle***

* Windows est maintenant pris en charge à ce moment
* Exécution réussie de MySQLtuner sur WSL2 (sous-système Windows pour Linux)
* [https://docs.microsoft.com/en-us/windows/wsl/](https://docs.microsoft.com/en-us/windows/wsl/)

***ENVIRONNEMENTS NON PRIS EN CHARGE - BESOIN D'AIDE POUR CELA***

* Le cloud n'est pas pris en charge pour le moment (aide souhaitée ! Prise en charge de GCP, AWS, Azure demandée)

***Moteurs de stockage non pris en charge : les PR sont les bienvenues***
--

* NDB n'est pas pris en charge, n'hésitez pas à créer une demande d'extraction
* Archive
* Spider
* ColummStore
* Connexion

Éléments non maintenus de MySQL ou MariaDB
--

* MyISAM est trop ancien et n'est plus actif
* RockDB n'est plus maintenu
* TokuDB n'est plus maintenu
* XtraDB n'est plus maintenu

* Prise en charge de la détection des vulnérabilités CVE depuis [https://cve.mitre.org](https://cve.mitre.org)

***EXIGENCES MINIMALES***

* Perl 5.6 ou version ultérieure (avec le package [perl-doc](https://metacpan.org/release/DAPM/perl-5.14.4/view/pod/perldoc.pod))
* Système d'exploitation basé sur Unix/Linux (testé sur Linux, les variantes BSD et les variantes Solaris)
* Accès en lecture illimité au serveur MySQL (voir Privilèges ci-dessous)

***PRIVILÈGES***
--

Pour exécuter MySQLTuner avec toutes les fonctionnalités, les privilèges suivants sont requis :

**MySQL 8.0+**:

```sql
GRANT SELECT, PROCESS, SHOW DATABASES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, SHOW VIEW ON *.* TO 'mysqltuner'@'localhost';
```

**MariaDB 10.5+**:

```sql
GRANT SELECT, PROCESS, SHOW DATABASES, EXECUTE, BINLOG MONITOR, SHOW VIEW, REPLICATION MASTER ADMIN, SLAVE MONITOR ON *.* TO 'mysqltuner'@'localhost';
```

**Versions héritées (Legacy)**:

```sql
GRANT SELECT, PROCESS, EXECUTE, REPLICATION CLIENT, SHOW DATABASES, SHOW VIEW ON *.* TO 'mysqltuner'@'localhost';
```

Accès root au système d'exploitation recommandé pour MySQL < 5.1

***AVERTISSEMENT***
--

Il est **important** que vous compreniez parfaitement chaque modification
que vous apportez à un serveur de base de données MySQL. Si vous ne comprenez pas certaines parties
de la sortie du script, ou si vous ne comprenez pas les recommandations,
**vous devriez consulter** un DBA ou un administrateur système compétent
en qui vous avez confiance. **Testez toujours** vos modifications sur des environnements de préproduction, et
gardez toujours à l'esprit que les améliorations dans un domaine peuvent **affecter négativement**
MySQL dans d'autres domaines.

Il est **également important** d'attendre au moins 24 heures de temps de disponibilité pour obtenir des résultats précis. En fait, exécuter
**mysqltuner** sur un serveur fraîchement redémarré est complètement inutile.

**Veuillez également consulter la section FAQ ci-dessous.**

Recommandations de sécurité
--

Salut l'utilisateur de directadmin !
Nous avons détecté que vous exécutez mysqltuner avec les informations d'identification de da_admin extraites de `/usr/local/directadmin/conf/my.cnf`, ce qui pourrait entraîner une découverte de mot de passe !
Lisez le lien pour plus de détails [Problème n°289](https://github.com/jmrenouard/MySQLTuner-perl/issues/289).

Que vérifie exactement MySQLTuner ?
--

Toutes les vérifications effectuées par **MySQLTuner** sont documentées dans la documentation [MySQLTuner Internals](https://github.com/jmrenouard/MySQLTuner-perl/blob/master/INTERNALS.md).

Téléchargement/Installation
--

Choisissez l'une de ces méthodes :

1) Téléchargement direct du script (la méthode la plus simple et la plus courte) :

```bash
wget http://mysqltuner.pl/ -O mysqltuner.pl
wget https://raw.githubusercontent.com/jmrenouard/MySQLTuner-perl/master/basic_passwords.txt -O basic_passwords.txt
wget https://raw.githubusercontent.com/jmrenouard/MySQLTuner-perl/master/vulnerabilities.csv -O vulnerabilities.csv
```

1) Vous pouvez télécharger l'intégralité du référentiel en utilisant `git clone` ou `git clone --depth 1 -b master` suivi de l'URL de clonage ci-dessus.

Installation facultative de Sysschema pour MySQL 5.6
--

Sysschema est installé par défaut sous MySQL 5.7 et MySQL 8 d'Oracle.
Par défaut, sur MySQL 5.6/5.7/8, le schéma de performance est activé.
Pour la version précédente de MySQL 5.6, vous pouvez suivre cette commande pour créer une nouvelle base de données sys contenant une vue très utile sur le schéma de performance :

Sysschema for MySQL old version
--

```bash
curl "https://codeload.github.com/mysql/mysql-sys/zip/master" > sysschema.zip
# check zip file
unzip -l sysschema.zip
unzip sysschema.zip
cd mysql-sys-master
mysql -uroot -p < sys_56.sql
```

Sysschema pour l'ancienne version de MariaDB
--

```bash
curl "https://github.com/FromDual/mariadb-sys/archive/refs/heads/master.zip" > sysschema.zip
# check zip file
unzip -l sysschema.zip
unzip sysschema.zip
cd mariadb-sys-master
mysql -u root -p < ./sys_10.sql
```

Configuration du schéma de performance
--

Par défaut, performance_schema est activé et sysschema est installé sur la dernière version.

Par défaut, sur MariaDB, le schéma de performance est désactivé (MariaDB<10.6).

Envisagez d'activer le schéma de performance dans votre fichier de configuration my.cnf :

```ini
[mysqld]
performance_schema = on
performance-schema-consumer-events-statements-history-long = ON
performance-schema-consumer-events-statements-history = ON
performance-schema-consumer-events-statements-current = ON
performance-schema-consumer-events-stages-current=ON
performance-schema-consumer-events-stages-history=ON
performance-schema-consumer-events-stages-history-long=ON
performance-schema-consumer-events-transactions-current=ON
performance-schema-consumer-events-transactions-history=ON
performance-schema-consumer-events-transactions-history-long=ON
performance-schema-consumer-events-waits-current=ON
performance-schema-consumer-events-waits-history=ON
performance-schema-consumer-events-waits-history-long=ON
performance-schema-instrument='%=ON'
max-digest-length=2048
performance-schema-max-digest-length=2018
```

Installation de Sysschema pour MariaDB < 10.6
--

Sysschema n'est pas installé par défaut sous MariaDB avant la version 10.6 [MariaDB sys](https://mariadb.com/kb/en/sys-schema/)

Vous pouvez suivre cette commande pour créer une nouvelle base de données sys contenant une vue utile sur le schéma de performance :

```bash
curl "https://codeload.github.com/FromDual/mariadb-sys/zip/master" > mariadb-sys.zip
# check zip file
unzip -l mariadb-sys.zip
unzip mariadb-sys.zip
cd mariadb-sys-master/
mysql -u root -p < ./sys_10.sql
```

Erreurs et solutions pour l'installation du schéma de performance
--

ERREUR 1054 (42S22) à la ligne 78 dans le fichier : './views/p_s/metrics_56.sql' : Colonne inconnue 'STATUS' dans la liste des champs
--

Cette erreur peut être ignorée en toute sécurité
Envisagez d'utiliser une version récente de MySQL/MariaDB pour éviter ce genre de problème lors de l'installation de sysschema

Dans les versions récentes, sysschema est installé et intégré par défaut en tant que schéma sys (SHOW DATABASES)

ERREUR à la ligne 21 : Impossible d'ouvrir le fichier './tables/sys_config_data_10.sql -- ported', erreur : 2
Jetez un œil à la solution n°452 proposée par @ericx
--

Correction de la configuration de sysctl (/etc/sysctl.conf)

--
Il s'agit d'un paramètre à l'échelle du système et non d'un paramètre de base de données : [Paramètres du noyau FS Linux](https://www.kernel.org/doc/html/latest/admin-guide/sysctl/fs.html#id1)

Vous pouvez vérifier ses valeurs via :

```bash
$ cat /proc/sys/fs/aio-*
65536
2305
```

Par exemple, pour définir la valeur aio-max-nr, ajoutez la ligne suivante au fichier /etc/sysctl.conf :

```bash
fs.aio-max-nr = 1048576
```

Pour activer le nouveau paramètre :

```bash
sysctl -p /etc/sysctl.conf
```

Utilisation spécifique
--

**Utilisation :** Utilisation minimale localement

```bash
perl mysqltuner.pl --host 127.0.0.1
```

Bien sûr, vous pouvez ajouter le bit d'exécution (`chmod +x mysqltuner.pl`) pour pouvoir l'exécuter sans appeler Perl directement.

**Utilisation :** Utilisation minimale à distance

Dans la version précédente, --forcemem devait être défini manuellement, afin de pouvoir exécuter une analyse MySQLTuner

Depuis la version 2.1.10, la mémoire et la permutation sont définies à 1 Go par défaut.

Si vous souhaitez une valeur plus précise en fonction de votre serveur distant, n'hésitez pas à configurer --forcemem et --forceswap sur la valeur réelle de la RAM

```bash
perl mysqltuner.pl --host targetDNS_IP --user admin_user --pass admin_password
```

**Utilisation :** Activer la sortie maximale d'informations sur MySQL/MariaDb sans débogage

```bash
perl mysqltuner.pl --verbose
perl mysqltuner.pl --buffers --dbstat --idxstat --sysstat --pfstat --tbstat
```

**Utilisation :** Activer la vérification des vulnérabilités CVE pour votre version de MariaDB ou MySQL

```bash
perl mysqltuner.pl --cvefile=vulnerabilities.csv
```

**Utilisation :** Écrire votre résultat dans un fichier avec les informations affichées

```bash
perl mysqltuner.pl --outputfile /tmp/result_mysqltuner.txt
```

**Utilisation :** Écrire votre résultat dans un fichier **sans afficher d'informations**

```bash
perl mysqltuner.pl --silent --outputfile /tmp/result_mysqltuner.txt
```

**Utilisation :** Utilisation d'un modèle pour personnaliser votre fichier de rapport basé sur la syntaxe [Text::Template](https://metacpan.org/pod/Text::Template).

```bash
perl mysqltuner.pl --silent --reportfile /tmp/result_mysqltuner.txt --template=/tmp/mymodel.tmpl
```

**Important** : le module [Text::Template](https://metacpan.org/pod/Text::Template) est obligatoire pour les options `--reportfile` et/ou `--template`, car ce module est nécessaire pour générer une sortie appropriée basée sur un modèle de texte.

**Utilisation :** Vidage de toutes les vues information_schema et sysschema sous forme de fichier csv dans le sous-répertoire des résultats

```bash
perl mysqltuner.pl --verbose --dumpdir=./result
```

**Utilisation :** Activer les informations de débogage

```bash
perl mysqltuner.pl --debug
```

**Utilisation :** Mettre à jour MySQLTuner et les fichiers de données (mot de passe et cve) si nécessaire

```bash
perl mysqltuner.pl --checkversion --updateversion
```

Prise en charge du cloud
--

MySQLTuner dispose désormais d'une prise en charge expérimentale des services MySQL basés sur le cloud.

* `--cloud` : activez le mode cloud. Il s'agit d'un indicateur générique pour tout fournisseur de cloud.
* `--azure` : activez la prise en charge spécifique à Azure.
* `--ssh-host <hostname>` : l'hôte SSH pour les connexions cloud.
* `--ssh-user <username>` : l'utilisateur SSH pour les connexions cloud.
* `--ssh-password <password>` : le mot de passe SSH pour les connexions cloud.
* `--ssh-identity-file <path>` : le chemin d'accès au fichier d'identité SSH pour les connexions cloud.

Rapports HTML basés sur Python Jinja2
--

La génération de HTML est basée sur Python/Jinja2

**Procédure de génération de HTML**

* Générer le rapport mysqltuner.pl au format JSON (--json)
* Générer un rapport HTML à l'aide des outils Python j2

**Les modèles Jinja2 se trouvent dans le sous-répertoire des modèles**

Un exemple de base s'appelle basic.html.j2

**Installation de Python j2**

```bash
python -mvenv j2
source ./j2/bin/activate
(j2) pip install j2
```

**Utilisation de la génération de rapports HTML**

```bash
perl mysqltuner.pl --verbose --json > reports.json
cat reports.json  j2 -f json MySQLTuner-perl/templates/basic.html.j2 > variables.html
```

ou

```bash
perl mysqltuner.pl --verbose --json | j2 -f json MySQLTuner-perl/templates/basic.html.j2 > variables.html
```

Rapports HTML basés sur AHA
--

La génération de HTML est basée sur AHA

**Procédure de génération de HTML**

* Générer le rapport mysqltuner.pl à l'aide de rapports texte standard
* Générer un rapport HTML à l'aide d'aha

**Installation d'Aha**

Suivez les instructions du dépôt Github

[Dépôt principal de GitHub AHA](https://github.com/theZiz/aha)

**Utilisation de la génération de rapports HTML AHA**

 perl mysqltuner.pl --verbose --color > reports.txt
 aha --black --title "MySQLTuner" -f "reports.txt" > "reports.html"

ou

 perl mysqltuner.pl --verbose --color | aha --black --title "MySQLTuner" > reports.html

FAQ
--

**Question : Quels sont les prérequis pour exécuter MySQL tuner ?**

Avant d'exécuter MySQL tuner, vous devez disposer des éléments suivants :

* Une installation du serveur MySQL
* Perl installé sur votre système
* Un accès administratif à votre serveur MySQL

**Question : MySQL tuner peut-il apporter des modifications à ma configuration automatiquement ?**

**Non.**, MySQL tuner ne fournit que des recommandations. Il n'apporte aucune modification à vos fichiers de configuration automatiquement. Il appartient à l'utilisateur d'examiner les suggestions et de les mettre en œuvre au besoin.

**Question : À quelle fréquence dois-je exécuter MySQL tuner ?**

Il est recommandé d'exécuter périodiquement MySQL tuner, en particulier après des modifications importantes de votre serveur MySQL ou de sa charge de travail.

Pour des résultats optimaux, exécutez le script après que votre serveur a fonctionné pendant au moins 24 heures pour recueillir suffisamment de données de performance.

**Question : Comment interpréter les résultats de MySQL tuner ?**

MySQL tuner fournit une sortie sous forme de suggestions et d'avertissements.

Examinez chaque recommandation et envisagez de mettre en œuvre les modifications dans votre fichier de configuration MySQL (généralement « my.cnf » ou « my.ini »).

Soyez prudent lorsque vous apportez des modifications et sauvegardez toujours votre fichier de configuration avant d'apporter des modifications.

**Question : MySQL tuner peut-il endommager ma base de données ou mon serveur ?**

Bien que MySQL tuner lui-même n'apporte aucune modification à votre serveur, la mise en œuvre aveugle de ses recommandations sans en comprendre l'impact peut entraîner des problèmes.

Assurez-vous toujours de bien comprendre les implications de chaque suggestion avant de l'appliquer à votre serveur.

**Question : MySQL tuner prend-il en charge MariaDB et Percona Server ?**

Oui, MySQL tuner prend en charge MariaDB et Percona Server car ce sont des dérivés de MySQL et partagent une architecture similaire. Le script peut également analyser et fournir des recommandations pour ces systèmes.

**Question : Que dois-je faire si j'ai besoin d'aide avec MySQL tuner ou si j'ai des questions sur les recommandations ?**

Si vous avez besoin d'aide avec MySQL tuner ou si vous avez des questions sur les recommandations fournies par le script, vous pouvez consulter la documentation de MySQL tuner, demander conseil sur des forums en ligne ou consulter un expert MySQL.

Soyez prudent lorsque vous mettez en œuvre des modifications pour assurer la stabilité et les performances de votre serveur.

**Question : MySQLTuner réparera-t-il mon serveur MySQL lent ?**

**Non.** MySQLTuner est un script en lecture seule. Il n'écrira dans aucun fichier de configuration, ne modifiera l'état d'aucun démon. Il vous donnera un aperçu des performances de votre serveur et fera quelques recommandations de base pour les améliorations que vous pourrez apporter une fois qu'il aura terminé.

**Question : Puis-je licencier mon DBA maintenant ?**

**MySQLTuner ne remplacera votre DBA sous aucune forme.**

Si votre DBA prend constamment votre place de parking et vole votre déjeuner dans le réfrigérateur, vous voudrez peut-être y réfléchir - mais c'est votre décision.

Une fois que vous l'avez créé, assurez-vous qu'il appartient à votre utilisateur et que le mode du fichier est 0600. Cela devrait empêcher les regards indiscrets d'obtenir vos informations de connexion à la base de données dans des conditions normales.

**Question : J'obtiens "ERROR 1524 (HY000): Plugin 'unix_socket' is not loaded" même avec unix_socket=OFF. Comment corriger ?**

Cela se produit car le client MariaDB tente d'utiliser le plugin `unix_socket` par défaut lorsqu'aucun utilisateur/mot de passe n'est fourni.

* **Solution 1 (Recommandée) :** Utilisez un fichier `~/.my.cnf` comme décrit ci-dessus pour fournir des identifiants explicites.
* **Solution 2 :** Passez les identifiants directement : `perl mysqltuner.pl --user root --pass votre_mot_de_passe`.

**Question : Comment réactiver l'authentification `unix_socket` de manière sécurisée ?**

Si vous décidez d'utiliser `unix_socket` (qui permet à l'utilisateur `root` de l'OS de se connecter à `root` MariaDB sans mot de passe), suivez ces étapes :

1. Assurez-vous que le plugin est activé dans `/etc/my.cnf` : `unix_socket=ON` (ou supprimez `OFF`).
2. Dans MariaDB, définissez le plugin d'authentification pour l'utilisateur root :

   ```sql
   ALTER USER 'root'@'localhost' IDENTIFIED VIA unix_socket;
   ```

3. Vérifiez que le plugin `auth_socket` ou `unix_socket` est `ACTIVE` dans `SHOW PLUGINS`.

**Question : Existe-t-il un autre moyen de sécuriser les informations d'identification sur les dernières distributions MySQL et MariaDB ?**

Vous pouvez utiliser les utilitaires mysql_config_editor.

~~~bash
 $ mysql_config_editor set --login-path=client --user=someusername --password --host=localhost
 Enter password: ********
~~~

Après quoi, `~/.mylogin.cnf` sera créé avec l'accès approprié.

Pour obtenir des informations sur les informations d'identification stockées, utilisez la commande suivante :

```bash
$mysql_config_editor print
[client]
user = someusername
password = *****
host = localhost
```

**Question : Ça ne marche pas sur mon OS ! Qu'est-ce qui se passe ?!**

Ce genre de choses est voué à arriver. Voici les détails dont j'ai besoin de votre part pour enquêter sur le problème :

* OS et version de l'OS
* Architecture (x86, x86_64, IA64, Commodore 64)
* Version exacte de MySQL
* Où vous avez obtenu votre version de MySQL (package OS, source, etc.)
* Le texte intégral de l'erreur
* Une copie de la sortie de SHOW VARIABLES et SHOW GLOBAL STATUS (si possible)

**Question : Comment effectuer des vérifications de vulnérabilité CVE ?**

* Téléchargez vulnerabilities.csv depuis ce dépôt.
* utilisez l'option --cvefile pour effectuer des vérifications CVE

**Question : Comment utiliser mysqltuner depuis un hôte distant ?**
Merci à [@rolandomysqldba](https://dba.stackexchange.com/users/877/rolandomysqldba)

* Vous devrez toujours vous connecter comme un client mysql :

Connexion et authentification

 --host <hostname> Se connecter à un hôte distant pour effectuer des tests (par défaut : localhost)
 --socket <socket> Utiliser un socket différent pour une connexion locale
 --port <port>     Port à utiliser pour la connexion (par défaut : 3306)
 --user <username> Nom d'utilisateur à utiliser pour l'authentification
 --pass <password> Mot de passe à utiliser pour l'authentification
 --defaults-file <path> fichier de valeurs par défaut pour les informations d'identification

Étant donné que vous utilisez un hôte distant, utilisez des paramètres pour fournir des valeurs à partir du système d'exploitation

 --forcemem <size>  Quantité de RAM installée en mégaoctets
 --forceswap <size> Quantité de mémoire de pagination configurée en mégaoctets

* Vous devrez peut-être contacter votre administrateur système distant pour lui demander la quantité de RAM et de pagination dont vous disposez

Si la base de données a trop de tables, ou une très grande table, utilisez ceci :

 --skipsize           Ne pas énumérer les tables et leurs types/tailles (par défaut : activé)
                      (Recommandé pour les serveurs avec de nombreuses tables)

**Question : Puis-je installer ce projet à l'aide de homebrew sur Apple Macintosh ?**

Oui ! `brew install mysqltuner` peut être utilisé pour installer cette application à l'aide de [homebrew](https://brew.sh/) sur Apple Macintosh.

MySQLTuner et Vagrant
--

**MySQLTuner** contient les configurations Vagrant suivantes :

* Fedora Core 30 / Docker

**Le fichier Vagrant** est stocké dans le sous-répertoire Vagrant.

* Suivez les étapes suivantes après l'installation de Vagrant :
    $ vagrant up

**MySQLTuner** contient une configuration Vagrant à des fins de test et de développement

* Installez VirtualBox et Vagrant
  * <https://www.virtualbox.org/wiki/Downloads>
  * <https://www.vagrantup.com/downloads.html>
* Clonez le dépôt
  * git clone <https://github.com/jmrenouard/MySQLTuner-perl/.git>
* Installez les plugins Vagrant vagrant-hostmanager et vagrant-vbguest
  * vagrant plugin install vagrant-hostmanager
  * vagrant plugin install vagrant-vbguest
* Ajoutez la boîte Fedora Core 30 depuis le site de téléchargement officiel de Fedora
  * vagrant box add --name generic/fedora30
* Créez un répertoire de données
  * mkdir data

## configurer les environnements de test

    $ sh build/createTestEnvs.sh

    $ source build/bashrc
    $ mysql_percona80 sakila
    sakila> ...

    $ docker images
    mariadb                  10.1                fc612450e1f1        12 days ago         352MB
    mariadb                  10.2                027b7c57b8c6        12 days ago         340MB
    mariadb                  10.3                47dff68107c4        12 days ago         343MB
    mariadb                  10.4                92495405fc36        12 days ago         356MB
    mysql                    5.6                 95e0fc47b096        2 weeks ago         257MB
    mysql                    5.7                 383867b75fd2        2 weeks ago         373MB
    mysql                    8.0                 b8fd9553f1f0        2 weeks ago         445MB
    percona/percona-server   5.7                 ddd245ed3496        5 weeks ago         585MB
    percona/percona-server   5.6                 ed0a36e0cf1b        6 weeks ago         421MB
    percona/percona-server   8.0                 390ae97d57c6        6 weeks ago         697MB
    mariadb                  5.5                 c7bf316a4325        4 months ago        352MB
    mariadb                  10.0                d1bde56970c6        4 months ago        353MB
    mysql                    5.5                 d404d78aa797        4 months ago        205MB

    $ docker ps
    CONTAINER ID        IMAGE                        COMMAND                  CREATED             STATUS              PORTS                               NAMES
    da2be9b050c9        mariadb:5.5                  "docker-entrypoint.s…"   7 hours ago         Up 7 hours          0.0.0.0:5311->3306/tcp              mariadb55
    5deca25d5ac8        mariadb:10.0                 "docker-entrypoint.s…"   7 hours ago         Up 7 hours          0.0.0.0:5310->3306/tcp              mariadb100
    73aaeb37e2c2        mariadb:10.1                 "docker-entrypoint.s…"   7 hours ago         Up 7 hours          0.0.0.0:5309->3306/tcp              mariadb101
    72ffa77e01ec        mariadb:10.2                 "docker-entrypoint.s…"   7 hours ago         Up 7 hours          0.0.0.0:5308->3306/tcp              mariadb102
    f5996f2041df        mariadb:10.3                 "docker-entrypoint.s…"   7 hours ago         Up 7 hours          0.0.0.0:5307->3306/tcp              mariadb103
    4890c52372bb        mariadb:10.4                 "docker-entrypoint.s…"   7 hours ago         Up 7 hours          0.0.0.0:5306->3306/tcp              mariadb104
    6b9dc078e921        percona/percona-server:5.6   "/docker-entrypoint.…"   7 hours ago         Up 7 hours          0.0.0.0:4308->3306/tcp              percona56
    3a4c7c826d4c        percona/percona-server:5.7   "/docker-entrypoint.…"   7 hours ago         Up 7 hours          0.0.0.0:4307->3306/tcp              percona57
    3dda408c91b0        percona/percona-server:8.0   "/docker-entrypoint.…"   7 hours ago         Up 7 hours          33060/tcp, 0.0.0.0:4306->3306/tcp   percona80
    600a4e7e9dcd        mysql:5.5                    "docker-entrypoint.s…"   7 hours ago         Up 7 hours          0.0.0.0:3309->3306/tcp              mysql55
    4bbe54342e5d        mysql:5.6                    "docker-entrypoint.s…"   7 hours ago         Up 7 hours          0.0.0.0:3308->3306/tcp              mysql56
    a49783249a11        mysql:5.7                    "docker-entrypoint.s…"   7 hours ago         Up 7 hours          33060/tcp, 0.0.0.0:3307->3306/tcp   mysql57
    d985820667c2        mysql:8.0                    "docker-entrypoint.s…"   7 hours ago         Up 7 hours          0.0.0.0:3306->3306/tcp, 33060/tcp   mysql 8    0

Les contributions sont les bienvenues
--

Comment contribuer à l'aide d'une demande d'extraction ? Suivez ce guide : [Création d'une demande d'extraction](https://opensource.com/article/19/7/create-pull-request-github)

Étapes simples pour créer une demande d'extraction
--

* Forker ce projet Github
* Clonez-le sur votre système local
* Créez une nouvelle branche
* Apportez vos modifications
* 
Download .txt
gitextract_e1gxxgyv/

├── .agent/
│   ├── README.md
│   ├── rules/
│   │   ├── 00_constitution.md
│   │   ├── 01_objective.md
│   │   ├── 02_architecture.md
│   │   ├── 03_execution_rules.md
│   │   ├── 04_best_practices.md
│   │   ├── 05_memory_protocol.md
│   │   └── remembers.md
│   ├── skills/
│   │   ├── cli-execution-mastery/
│   │   │   └── SKILL.md
│   │   ├── db-version-rift/
│   │   │   └── SKILL.md
│   │   ├── legacy-perl-patterns/
│   │   │   └── SKILL.md
│   │   └── testing-orchestration/
│   │       └── SKILL.md
│   └── workflows/
│       ├── compliance-sentinel.md
│       ├── doc-sync.md
│       ├── docker-clean.md
│       ├── examples-cleanup.md
│       ├── git-flow.md
│       ├── git-rollback.md
│       ├── hey-agent.md
│       ├── lab-down.md
│       ├── lab-up.md
│       ├── markdown-lint.md
│       ├── plan.md
│       ├── release-manager.md
│       ├── release-notes-gen.md
│       ├── release-preflight.md
│       ├── run-tests.md
│       ├── snapshot-to-test.md
│       ├── specify.md
│       └── tasks.md
├── .commitlintrc.js
├── .czrc
├── .dockerignore
├── .github/
│   ├── FUNDING.yml
│   └── workflows/
│       ├── docker_publish.yml
│       ├── generate_mariadb_examples.yml
│       ├── generate_mysql_examples.yml
│       ├── publish_release.yml
│       ├── pull_request.yml
│       ├── run_mt_with_db.yml
│       └── update_cve_and_docs.yml
├── .husky/
│   ├── commit-msg
│   └── pre-commit
├── .perltidy
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── CURRENT_VERSION.txt
├── Changelog
├── Dockerfile
├── FEATURES.md
├── INTERNALS.md
├── JenkinsFile
├── LICENSE
├── Makefile
├── POTENTIAL_ISSUES
├── README.fr.md
├── README.it.md
├── README.md
├── README.ru.md
├── ROADMAP.md
├── SECURITY.md
├── USAGE.md
├── basic_passwords.txt
├── build/
│   ├── audit_logs.pl
│   ├── bashrc
│   ├── build_rpm.sh
│   ├── clean.sh
│   ├── clean_examples.sh
│   ├── clearContainer.sh
│   ├── configimg.conf
│   ├── createMassDockerImages.sh
│   ├── createTestEnvs.sh
│   ├── deployOn
│   ├── doc_sync.py
│   ├── endoflife.sh
│   ├── fetchSampleDatabases.sh
│   ├── genFeatures.sh
│   ├── installStaff.sh
│   ├── md_lint.py
│   ├── mysql_mariadb_cve_full.csv
│   ├── mysqltuner.spec.tpl
│   ├── publishtodockerhub.sh
│   ├── release_gen.py
│   ├── sync.sh
│   ├── test_envs.sh
│   ├── updateCVElist.pl
│   ├── updateCVElist.py
│   └── updateStaff.sh
├── documentation/
│   └── specifications/
│       ├── cli_execution_skill.md
│       ├── cli_metadata_refactor.md
│       ├── compliance_sentinel_remembers.md
│       ├── dumpdir_logic_fix.md
│       ├── error_log_pfs.md
│       ├── fix_password_column_detection.md
│       ├── index_checks_pfs.md
│       ├── issue_25_privilege_checks.md
│       ├── performance_schema_audit.md
│       ├── performance_schema_observability_warning.md
│       ├── perltidy_integration.md
│       ├── persistent_lab.md
│       ├── release_manager_specification.md
│       ├── schemadir_option_specification.md
│       ├── ssl_tls_security_checks.md
│       └── test_log_auditing.md
├── mariadb_support.md
├── mysql_support.md
├── mysqltuner.pl
├── mysqltuner.pl.tdy
├── mysqltuner.pl.tidy
├── package.json
├── releases/
│   ├── v2.8.0.md
│   ├── v2.8.1.md
│   ├── v2.8.10.md
│   ├── v2.8.11.md
│   ├── v2.8.12.md
│   ├── v2.8.13.md
│   ├── v2.8.15.md
│   ├── v2.8.16.md
│   ├── v2.8.17.md
│   ├── v2.8.18.md
│   ├── v2.8.2.md
│   ├── v2.8.20.md
│   ├── v2.8.21.md
│   ├── v2.8.22.md
│   ├── v2.8.23.md
│   ├── v2.8.24.md
│   ├── v2.8.26.md
│   ├── v2.8.27.md
│   ├── v2.8.28.md
│   ├── v2.8.29.md
│   ├── v2.8.3.md
│   ├── v2.8.30.md
│   ├── v2.8.31.md
│   ├── v2.8.32.md
│   ├── v2.8.33.md
│   ├── v2.8.34.md
│   ├── v2.8.35.md
│   ├── v2.8.36.md
│   ├── v2.8.37.md
│   ├── v2.8.38.md
│   ├── v2.8.4.md
│   ├── v2.8.5.md
│   ├── v2.8.6.md
│   ├── v2.8.7.md
│   ├── v2.8.8.md
│   └── v2.8.9.md
├── renovate.json
├── template_example.tpl
├── templates/
│   └── basic.html.j2
├── tests/
│   ├── check_release_files.sh
│   ├── cli_mod_keys.t
│   ├── cli_options.t
│   ├── cli_validation.t
│   ├── index_pfs_checks.t
│   ├── innodb_isolation.t
│   ├── issue_770.t
│   ├── issue_774.t
│   ├── issue_777.t
│   ├── issue_783.t
│   ├── issue_863_enhanced.t
│   ├── issue_869.t
│   ├── machine_type.t
│   ├── mariadb_modeling.t
│   ├── modeling_regression.t
│   ├── pfs_observability.t
│   ├── repro_issue_20.t
│   ├── repro_issue_22.t
│   ├── repro_issue_490.t
│   ├── repro_issue_605.t
│   ├── repro_issue_863.t
│   ├── repro_pfs_disabled.t
│   ├── schemadir.t
│   ├── sql_modeling.t
│   ├── sql_modeling_fk.t
│   ├── sql_quoting.t
│   ├── ssl_tls_validation.t
│   ├── test_audit_logs.t
│   ├── test_boolean_options.t
│   ├── test_forcemem.t
│   ├── test_ignore_tables.t
│   ├── test_issue_404.t
│   ├── test_issue_553.t
│   ├── test_issue_671.t
│   ├── test_issue_874.t
│   ├── test_issue_875.t
│   ├── test_version_regex.t
│   ├── test_vulnerabilities.t
│   ├── unit_formatting.t
│   ├── unit_utilities.t
│   ├── unit_versions.t
│   └── version_consistency.t
└── vulnerabilities.csv
Download .txt
SYMBOL INDEX (16 symbols across 4 files)

FILE: build/doc_sync.py
  function parse_aff (line 9) | def parse_aff(file_path):
  function generate_readme (line 26) | def generate_readme():

FILE: build/md_lint.py
  function lint_file (line 10) | def lint_file(file_path):
  function main (line 38) | def main():

FILE: build/release_gen.py
  function get_current_version (line 15) | def get_current_version():
  function get_changelog_blocks (line 19) | def get_changelog_blocks():
  function get_git_commits (line 41) | def get_git_commits(version):
  function get_cli_options (line 54) | def get_cli_options(content):
  function analyze_indicators (line 58) | def analyze_indicators(content):
  function extract_diagnostic_names (line 68) | def extract_diagnostic_names(content):
  function analyze_tech_details (line 78) | def analyze_tech_details(version):
  function sort_changelog_lines (line 124) | def sort_changelog_lines(changelog_text):
  function generate_version_note (line 157) | def generate_version_note(version, block):
  function version_to_tuple (line 222) | def version_to_tuple(v):

FILE: build/updateCVElist.py
  function get_cvss_score (line 19) | def get_cvss_score(cve_data_metrics, version):
  function extract_affected_versions (line 32) | def extract_affected_versions(node):
Condensed preview — 192 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,540K chars).
[
  {
    "path": ".agent/README.md",
    "chars": 4130,
    "preview": "---\ntrigger: always_on\ndescription: Overview of project governance, skills, and workflows\ncategory: governance\n---\n# .ag"
  },
  {
    "path": ".agent/rules/00_constitution.md",
    "chars": 2605,
    "preview": "---\ntrigger: always_on\ndescription: Core mission and unique source of truth for the project.\ncategory: governance\n---\n\n#"
  },
  {
    "path": ".agent/rules/01_objective.md",
    "chars": 1830,
    "preview": "---\ntrigger: always_on\ndescription: Current project roadmap and success criteria.\ncategory: governance\n---\n\n# **2\\. 🎯 OP"
  },
  {
    "path": ".agent/rules/02_architecture.md",
    "chars": 1247,
    "preview": "---\ntrigger: always_on\ndescription: Immutable project architecture and technology stack.\ncategory: governance\n---\n# **3\\"
  },
  {
    "path": ".agent/rules/03_execution_rules.md",
    "chars": 8283,
    "preview": "---\ntrigger: always_on\ndescription: Core project constitution and hard execution constraints.\ncategory: governance\n---\n\n"
  },
  {
    "path": ".agent/rules/04_best_practices.md",
    "chars": 5095,
    "preview": "---\ntrigger: always_on\ndescription: Technical best practices and recommended internal patterns.\ncategory: governance\n---"
  },
  {
    "path": ".agent/rules/05_memory_protocol.md",
    "chars": 1100,
    "preview": "---\ntrigger: always_on\ndescription: Protocols for maintaining contextual consistency and history.\ncategory: governance\n-"
  },
  {
    "path": ".agent/rules/remembers.md",
    "chars": 698,
    "preview": "---\ntrigger: \"emerging_patterns\"\ndescription: \"Persistent memory for emerging patterns and session-specific dynamic rule"
  },
  {
    "path": ".agent/skills/cli-execution-mastery/SKILL.md",
    "chars": 2105,
    "preview": "---\ntrigger: explicit_call\ndescription: Mastery of MySQLTuner CLI options for connection and authentication.\ncategory: s"
  },
  {
    "path": ".agent/skills/db-version-rift/SKILL.md",
    "chars": 2477,
    "preview": "---\ntrigger: always_on\ndescription: Mapping of critical differences between MySQL and MariaDB versions for cross-compati"
  },
  {
    "path": ".agent/skills/legacy-perl-patterns/SKILL.md",
    "chars": 1819,
    "preview": "---\ntrigger: always_on\ndescription: Guidelines and patterns for maintaining backward compatibility with older Perl versi"
  },
  {
    "path": ".agent/skills/testing-orchestration/SKILL.md",
    "chars": 1637,
    "preview": "---\ntrigger: explicit_call\ndescription: Knowledge on how to run, orchestrate, and validate tests in the MySQLTuner proje"
  },
  {
    "path": ".agent/workflows/compliance-sentinel.md",
    "chars": 1832,
    "preview": "---\ntrigger: explicit_call\ndescription: Automated audit to enforce project constitution rules\ncategory: governance\n---\n\n"
  },
  {
    "path": ".agent/workflows/doc-sync.md",
    "chars": 353,
    "preview": "---\ntrigger: explicit_call\ndescription: Synchronize .agent/README.md with current Rules, Skills, and Workflows\ncategory:"
  },
  {
    "path": ".agent/workflows/docker-clean.md",
    "chars": 822,
    "preview": "---\ntrigger: explicit_call\ndescription: Reclaim disk space by removing unused containers and images\ncategory: tool\n---\n\n"
  },
  {
    "path": ".agent/workflows/examples-cleanup.md",
    "chars": 301,
    "preview": "---\ntrigger: explicit_call\ndescription: Maintain only the 10 most recent results in the examples directory\ncategory: too"
  },
  {
    "path": ".agent/workflows/git-flow.md",
    "chars": 2127,
    "preview": "---\ntrigger: explicit_call\ndescription: Automate git-flow release process\ncategory: tool\n---\n\n# Git-Flow Release Workflo"
  },
  {
    "path": ".agent/workflows/git-rollback.md",
    "chars": 1300,
    "preview": "---\ntrigger: explicit_call\ndescription: Rollback a failed release (delete tags and revert commits)\ncategory: tool\n---\n\n#"
  },
  {
    "path": ".agent/workflows/hey-agent.md",
    "chars": 1881,
    "preview": "---\ndescription: Unified management for Rules, Skills, and Workflows.\n---\n# Hey-Agent Workflow (The Core Orchestrator)\n\n"
  },
  {
    "path": ".agent/workflows/lab-down.md",
    "chars": 328,
    "preview": "---\ntrigger: /lab-down\ndescription: Stops and cleans up the database laboratory.\ncategory: tool\n---\n# Lab Down\n\n## 🧠 Rat"
  },
  {
    "path": ".agent/workflows/lab-up.md",
    "chars": 565,
    "preview": "---\ntrigger: /lab-up\ndescription: Starts a persistent database laboratory and injects data.\ncategory: tool\n---\n# Lab Up\n"
  },
  {
    "path": ".agent/workflows/markdown-lint.md",
    "chars": 367,
    "preview": "---\ntrigger: explicit_call\ndescription: Check markdown content for cleanliness and project standard compliance (AFF, key"
  },
  {
    "path": ".agent/workflows/plan.md",
    "chars": 1327,
    "preview": "---\ntrigger: explicit_call\ndescription: Create or update an implementation plan (implementation_plan.md)\ncategory: gover"
  },
  {
    "path": ".agent/workflows/release-manager.md",
    "chars": 1358,
    "preview": "---\ntrigger: explicit_call\ndescription: High-level release orchestrator for the Release Manager role\ncategory: governanc"
  },
  {
    "path": ".agent/workflows/release-notes-gen.md",
    "chars": 462,
    "preview": "---\ntrigger: explicit_call\ndescription: Generate detailed technical release notes for the current version\ncategory: tool"
  },
  {
    "path": ".agent/workflows/release-preflight.md",
    "chars": 2880,
    "preview": "---\ntrigger: explicit_call\ndescription: Pre-flight checks before triggering a git-flow release\ncategory: tool\n---\n\n# Rel"
  },
  {
    "path": ".agent/workflows/run-tests.md",
    "chars": 1779,
    "preview": "---\ntrigger: explicit_call\ndescription: Comprehensive test suite execution (Unit, Regression, and Multi-DB)\ncategory: to"
  },
  {
    "path": ".agent/workflows/snapshot-to-test.md",
    "chars": 2026,
    "preview": "---\ntrigger: explicit_call\ndescription: Transform a running production issue into a reproducible test case\ncategory: too"
  },
  {
    "path": ".agent/workflows/specify.md",
    "chars": 1429,
    "preview": "---\ntrigger: explicit_call\ndescription: Create or update a feature specification (specification.md)\ncategory: governance"
  },
  {
    "path": ".agent/workflows/tasks.md",
    "chars": 1133,
    "preview": "---\ntrigger: explicit_call\ndescription: Break down an approved plan into actionable tasks (task.md)\ncategory: governance"
  },
  {
    "path": ".commitlintrc.js",
    "chars": 70,
    "preview": "module.exports = {\n  extends: ['@commitlint/config-conventional'],\n};\n"
  },
  {
    "path": ".czrc",
    "chars": 42,
    "preview": "{\n  \"path\": \"cz-conventional-changelog\"\n}\n"
  },
  {
    "path": ".dockerignore",
    "chars": 46,
    "preview": "*.md\nbuild/**\nMakefile\n.perltidy\n*.json\n*.png\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 883,
    "preview": "# These are supported funding model platforms\n\ngithub: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [u"
  },
  {
    "path": ".github/workflows/docker_publish.yml",
    "chars": 2997,
    "preview": "name: Docker Publish\n\non:\n  push:\n    tags: [\"v*\"]\n  # Allows you to run this workflow manually from the Actions tab\n  w"
  },
  {
    "path": ".github/workflows/generate_mariadb_examples.yml",
    "chars": 2825,
    "preview": "# This is a basic workflow to help you get started with Actions\n\nname: Compile MT examples for MariaDB\n\n# Controls when "
  },
  {
    "path": ".github/workflows/generate_mysql_examples.yml",
    "chars": 2758,
    "preview": "# This is a basic workflow to help you get started with Actions\n\nname: Compile MT examples For MySQL\n\n# Controls when th"
  },
  {
    "path": ".github/workflows/publish_release.yml",
    "chars": 712,
    "preview": "on:\n  push:\n    # Sequence of patterns matched against refs/tags\n    tags:\n      - \"v*\" # Push events to matching v*, i."
  },
  {
    "path": ".github/workflows/pull_request.yml",
    "chars": 2476,
    "preview": "# This is a basic workflow to help you get started with Actions\n\nname: CI for MySQL Tuner for MySQL 5.7 and 8.0\n\n# Contr"
  },
  {
    "path": ".github/workflows/run_mt_with_db.yml",
    "chars": 1821,
    "preview": "# This is a basic workflow to help you get started with Actions\n\nname: Test with databases\n\n# Controls when the workflow"
  },
  {
    "path": ".github/workflows/update_cve_and_docs.yml",
    "chars": 1312,
    "preview": "# This is a basic workflow to help you get started with Actions\n\nname: CVE and Docs update\n\n# Controls when the workflow"
  },
  {
    "path": ".husky/commit-msg",
    "chars": 40,
    "preview": "npx --no-install commitlint --edit \"$1\"\n"
  },
  {
    "path": ".husky/pre-commit",
    "chars": 9,
    "preview": "npm test\n"
  },
  {
    "path": ".perltidy",
    "chars": 482,
    "preview": "--backup-and-modify-in-place\n--backup-file-extension=beforeTidy\n--block-brace-tightness=2\n--brace-tightness=2\n--closing-"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 1422,
    "preview": "# Contributor Code of Conduct\n\nAs contributors and maintainers of this project, we pledge to respect all people who cont"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 8050,
    "preview": "# Contributing to this project\n\nPlease take a moment to review this document in order to make the contribution\nprocess e"
  },
  {
    "path": "CURRENT_VERSION.txt",
    "chars": 7,
    "preview": "2.8.38\n"
  },
  {
    "path": "Changelog",
    "chars": 16683,
    "preview": "2.8.38 2026-02-14\n\n- fix: prevent creation of unauthorized directory \"0\" when --dumpdir is not explicitly set or set to "
  },
  {
    "path": "Dockerfile",
    "chars": 962,
    "preview": "FROM ubuntu:latest\n\nLABEL maintainer=\"jmrenouard@gmail.com\"\n\nENV DEBIAN_FRONTEND=noninteractive\n\nRUN apt-get update && a"
  },
  {
    "path": "FEATURES.md",
    "chars": 921,
    "preview": "Features list for option: --feature (dev only)\n---\n\n\n* build_mysql_connection_command\n* cloud_setup\n* cve_recommendation"
  },
  {
    "path": "INTERNALS.md",
    "chars": 16907,
    "preview": "## MySQLTuner Internals\n\n[![\"Buy Us A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](ht"
  },
  {
    "path": "JenkinsFile",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "LICENSE",
    "chars": 35147,
    "preview": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
  },
  {
    "path": "Makefile",
    "chars": 6303,
    "preview": "VERSION=$(shell grep '\\- Version ' mysqltuner.pl | awk '{ print $$NF}')\nUPDATE_SUB_VERSION=$(shell echo $(VERSION) | awk"
  },
  {
    "path": "POTENTIAL_ISSUES",
    "chars": 4759,
    "preview": "# POTENTIAL ISSUES AUDIT\n\nThis file records anomalies discovered during laboratory testing (Perl warnings, SQL errors, e"
  },
  {
    "path": "README.fr.md",
    "chars": 29776,
    "preview": "![MySQLTuner-perl](mtlogo2.png)\n\n[![\"Offrez-nous un café\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_"
  },
  {
    "path": "README.it.md",
    "chars": 28490,
    "preview": "![MySQLTuner-perl](mtlogo2.png)\n\n[![\"Offrici un caffè\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img"
  },
  {
    "path": "README.md",
    "chars": 26182,
    "preview": "![MySQLTuner-perl](mtlogo2.png)\n\n[![\"Buy Us A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img."
  },
  {
    "path": "README.ru.md",
    "chars": 28030,
    "preview": "![MySQLTuner-perl](mtlogo2.png)\n\n[![\"Купите нам кофе\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img."
  },
  {
    "path": "ROADMAP.md",
    "chars": 3835,
    "preview": "# MySQLTuner-perl Roadmap\n\nThis document outlines the strategic direction and future development plans for MySQLTuner-pe"
  },
  {
    "path": "SECURITY.md",
    "chars": 2650,
    "preview": "# Security Policy\n\nMySQLTuner is committed to providing a secure and reliable experience for all users. This document ou"
  },
  {
    "path": "USAGE.md",
    "chars": 2847,
    "preview": "# NAME\n\n    MySQLTuner 2.8.38 - MySQL High Performance Tuning Script\n\n# IMPORTANT USAGE GUIDELINES\n\nTo run the script wi"
  },
  {
    "path": "basic_passwords.txt",
    "chars": 3988,
    "preview": "1\n123456\nporsche\nfirebird\nprince\nrosebud\n2\npa#sword\nguitar\nbutter\nbeach\njaguar\n3\n12345678\nchelsea\nunited\namateur\ngreat\n4"
  },
  {
    "path": "build/audit_logs.pl",
    "chars": 2347,
    "preview": "#!/usr/bin/env perl\n\nuse strict;\nuse warnings;\nuse File::Find;\nuse Getopt::Long;\n\n# MySQLTuner Audit Log Script\n# Purpos"
  },
  {
    "path": "build/bashrc",
    "chars": 3028,
    "preview": "# Some Alias\nalias h=history\nalias s=sudo\nalias rsh='ssh -l root'\nalias lh='ls -lsh'\nalias ll='ls -ls'\nalias la='ls -lsa"
  },
  {
    "path": "build/build_rpm.sh",
    "chars": 1113,
    "preview": "#!/bin/sh\n# ==================================================================================\n# Script: build_rpm.sh\n# "
  },
  {
    "path": "build/clean.sh",
    "chars": 364,
    "preview": "#!/bin/sh\n# ==================================================================================\n# Script: clean.sh\n# Desc"
  },
  {
    "path": "build/clean_examples.sh",
    "chars": 1100,
    "preview": "#!/bin/bash\n# ==================================================================================\n# Script: clean_example"
  },
  {
    "path": "build/clearContainer.sh",
    "chars": 607,
    "preview": "#!/bin/sh\n# ==================================================================================\n# Script: clearContainer."
  },
  {
    "path": "build/configimg.conf",
    "chars": 594,
    "preview": "3306;mysql80;/var/lib/mysql8;mysql:8.0\n3308;mysql56;/var/lib/mysql56;mysql:5.6\n3309;mysql55;/var/lib/mysql55;mysql:5.5\n\n"
  },
  {
    "path": "build/createMassDockerImages.sh",
    "chars": 3075,
    "preview": "#!/bin/sh\n# ==================================================================================\n# Script: createMassDocke"
  },
  {
    "path": "build/createTestEnvs.sh",
    "chars": 1151,
    "preview": "#!/bin/sh\n# ==================================================================================\n# Script: createTestEnvs."
  },
  {
    "path": "build/deployOn",
    "chars": 282,
    "preview": "#!/bin/bash\nset -xv\n\n_DIR=$(dirname `readlink -f $0`)\n\n\nssh $1 mkdir /images/mysqltuner\nrsync -avz ${_DIR}/.. $1:/images"
  },
  {
    "path": "build/doc_sync.py",
    "chars": 2855,
    "preview": "#!/usr/bin/env python3\nimport os\nimport re\n\nPROJECT_ROOT = os.getcwd()\nAGENT_DIR = os.path.join(PROJECT_ROOT, '.agent')\n"
  },
  {
    "path": "build/endoflife.sh",
    "chars": 1825,
    "preview": "#!/bin/bash\n# ==================================================================================\n# Script: endoflife.sh\n"
  },
  {
    "path": "build/fetchSampleDatabases.sh",
    "chars": 1326,
    "preview": "#!/bin/sh\n# ==================================================================================\n# Script: fetchSampleData"
  },
  {
    "path": "build/genFeatures.sh",
    "chars": 920,
    "preview": "#!/bin/bash\n# ==================================================================================\n# Script: genFeatures.s"
  },
  {
    "path": "build/installStaff.sh",
    "chars": 453,
    "preview": "#!/bin/bash\n# ==================================================================================\n# Script: installStaff."
  },
  {
    "path": "build/md_lint.py",
    "chars": 3014,
    "preview": "#!/usr/bin/env python3\nimport os\nimport re\nimport sys\n\nPROJECT_ROOT = os.getcwd()\nAGENT_DIR = os.path.join(PROJECT_ROOT,"
  },
  {
    "path": "build/mysql_mariadb_cve_full.csv",
    "chars": 1814445,
    "preview": "cve_id,published_date,last_modified,cvss_v3_score,cvss_v3_severity,cvss_v2_score,cvss_v2_severity,summary,vendor,product"
  },
  {
    "path": "build/mysqltuner.spec.tpl",
    "chars": 1652,
    "preview": "Summary:\tHigh Performance MySQL Tuning Script\nName:\t\tmysqltuner\nVersion:\t%VERSION%\nRelease:\t1\nLicense:\tGPL v3+\nGroup:\t\tA"
  },
  {
    "path": "build/publishtodockerhub.sh",
    "chars": 642,
    "preview": "#!/bin/bash\n# ==================================================================================\n# Script: publishtodock"
  },
  {
    "path": "build/release_gen.py",
    "chars": 9873,
    "preview": "#!/usr/bin/env python3\nimport os\nimport subprocess\nimport re\nfrom datetime import datetime\nimport sys\nimport argparse\n\nP"
  },
  {
    "path": "build/sync.sh",
    "chars": 746,
    "preview": "#!/bin/sh\n# ==================================================================================\n# Script: sync.sh\n# Descr"
  },
  {
    "path": "build/test_envs.sh",
    "chars": 28154,
    "preview": "#!/bin/bash\n# ==================================================================================\n# Script: test_envs.sh\n"
  },
  {
    "path": "build/updateCVElist.pl",
    "chars": 5073,
    "preview": "#!/usr/bin/env perl\r\nuse strict;\r\nuse warnings;\r\nuse LWP::UserAgent;\r\nuse JSON;\r\nuse Data::Dumper;\r\n\r\n# Configuration\r\nm"
  },
  {
    "path": "build/updateCVElist.py",
    "chars": 7353,
    "preview": "import requests\nimport json\nimport csv\nimport zipfile\nimport io\nimport os\nfrom datetime import datetime\n\n# Range of year"
  },
  {
    "path": "build/updateStaff.sh",
    "chars": 777,
    "preview": "#!/bin/sh\n# ==================================================================================\n# Script: updateStaff.sh\n"
  },
  {
    "path": "documentation/specifications/cli_execution_skill.md",
    "chars": 1411,
    "preview": "---\ntitle: CLI Execution Mastery Skill Specification\nstatus: proposed\nauthor: Antigravity\ndate: 2026-01-25\n---\n\n# Specif"
  },
  {
    "path": "documentation/specifications/cli_metadata_refactor.md",
    "chars": 1789,
    "preview": "# Specification: Metadata-Driven CLI Options Refactor (Phase 6)\n\n## Overview\n\nThis specification covers the enhancement "
  },
  {
    "path": "documentation/specifications/compliance_sentinel_remembers.md",
    "chars": 879,
    "preview": "# Specification: Compliance Sentinel - Remembers Integration\n\n## Goal\n\nEnsure the `compliance-sentinel` workflow validat"
  },
  {
    "path": "documentation/specifications/dumpdir_logic_fix.md",
    "chars": 2263,
    "preview": "# Specification: Fix --dumpdir TRUE/FALSE logic\n\n- **Feature Name**: --dumpdir logic fix\n- **Status**: Draft\n- **Created"
  },
  {
    "path": "documentation/specifications/error_log_pfs.md",
    "chars": 2203,
    "preview": "# Specification - Performance Schema `Error Log` Analysis\n\n## 🧠 Rationale\n\nTraditional `error log` analysis requires fil"
  },
  {
    "path": "documentation/specifications/fix_password_column_detection.md",
    "chars": 1802,
    "preview": "# Specification: Robust Password Column Detection in mysqltuner.pl\n\n## Problem\n\n`mysqltuner.pl` fails to detect the corr"
  },
  {
    "path": "documentation/specifications/index_checks_pfs.md",
    "chars": 1905,
    "preview": "# Specification: Index Checks via Performance Schema\n\n## Goal\n\nEnhance `mysqltuner.pl` to provide actionable recommendat"
  },
  {
    "path": "documentation/specifications/issue_25_privilege_checks.md",
    "chars": 1856,
    "preview": "# Specification: Warn if current user does not have minimum privileges\n\n## Goal\n\nMySQLTuner should verify that the datab"
  },
  {
    "path": "documentation/specifications/performance_schema_audit.md",
    "chars": 671,
    "preview": "# Specification: Performance Schema Audit Logic\n\n## Goal\n\nAutomatically detect and report if `performance_schema` is dis"
  },
  {
    "path": "documentation/specifications/performance_schema_observability_warning.md",
    "chars": 806,
    "preview": "# Specification: Performance Schema Observability Warning\n\n## Goal\n\nImprove user awareness of observability gaps when `p"
  },
  {
    "path": "documentation/specifications/perltidy_integration.md",
    "chars": 1316,
    "preview": "# Specification: Perltidy Integration in Release Preflight\n\n## Goal\n\nEnsure that `mysqltuner.pl` is always properly form"
  },
  {
    "path": "documentation/specifications/persistent_lab.md",
    "chars": 1380,
    "preview": "# Specification: Persistent Lab Environment\n\n## 🧠 Rationale\n\nCurrent testing (via `build/test_envs.sh`) restarts contain"
  },
  {
    "path": "documentation/specifications/release_manager_specification.md",
    "chars": 1396,
    "preview": "# Specification - Release Manager\n\n## 🧠 Rationale\n\nTo ensure high-density development and production stability, a formal"
  },
  {
    "path": "documentation/specifications/schemadir_option_specification.md",
    "chars": 2556,
    "preview": "# Specification: --schemadir option for Schema Documentation\n\n- **Feature Name**: --schemadir option\n- **Status**: Draft"
  },
  {
    "path": "documentation/specifications/ssl_tls_security_checks.md",
    "chars": 2200,
    "preview": "# Specification: SSL/TLS Security Checks\n\n## Goal\n\nImplement automated checks for SSL/TLS configuration in `mysqltuner.p"
  },
  {
    "path": "documentation/specifications/test_log_auditing.md",
    "chars": 1679,
    "preview": "---\ntrigger: after_test_run\ndescription: Post-execution audit of laboratory logs to detect subtle regressions and diagno"
  },
  {
    "path": "mariadb_support.md",
    "chars": 1129,
    "preview": "# Version Support for mariadb\n\n| Version | End of Support Date | LTS | Status |\n|---------|------------------------|----"
  },
  {
    "path": "mysql_support.md",
    "chars": 645,
    "preview": "# Version Support for mysql\n\n| Version | End of Support Date | LTS | Status |\n|---------|------------------------|-----|"
  },
  {
    "path": "mysqltuner.pl",
    "chars": 348791,
    "preview": "#!/usr/bin/env perl\n# mysqltuner.pl - Version 2.8.38\n# High Performance MySQL Tuning Script\n# Copyright (C) 2015-2026 Je"
  },
  {
    "path": "mysqltuner.pl.tdy",
    "chars": 349015,
    "preview": "#!/usr/bin/env perl\n# mysqltuner.pl - Version 2.8.37\n# High Performance MySQL Tuning Script\n# Copyright (C) 2015-2026 Je"
  },
  {
    "path": "mysqltuner.pl.tidy",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "package.json",
    "chars": 929,
    "preview": "{\n  \"name\": \"mysqltuner-perl\",\n  \"version\": \"1.0.0\",\n  \"description\": \"![MySQLTuner-perl](mtlogo2.png)\",\n  \"main\": \"inde"
  },
  {
    "path": "releases/v2.8.0.md",
    "chars": 1316,
    "preview": "# Release Notes - v2.8.0\n\n**Date**: 2026-01-17\n\n## 📝 Executive Summary\n\n```text\n2.8.0 2026-01-17\n\n- Bump version to 2.8."
  },
  {
    "path": "releases/v2.8.1.md",
    "chars": 481,
    "preview": "# Release Notes - v2.8.1\n\n**Date**: 2026-01-17\n\n## 📝 Executive Summary\n\n```text\n2.8.1 2026-01-17\n\n- fix: resilient memor"
  },
  {
    "path": "releases/v2.8.10.md",
    "chars": 643,
    "preview": "# Release Notes - v2.8.10\n\n**Date**: 2026-01-17\n\n## 📝 Executive Summary\n\n```text\n2.8.10 2026-01-17\n\n- feat: add dates an"
  },
  {
    "path": "releases/v2.8.11.md",
    "chars": 934,
    "preview": "# Release Notes - v2.8.11\n\n**Date**: 2026-01-17\n\n## 📝 Executive Summary\n\n```text\n2.8.11 2026-01-17\n\n- docs: update INTER"
  },
  {
    "path": "releases/v2.8.12.md",
    "chars": 527,
    "preview": "# Release Notes - v2.8.12\n\n**Date**: 2026-01-17\n\n## 📝 Executive Summary\n\n```text\n2.8.12 2026-01-17\n\n- feat: update is_do"
  },
  {
    "path": "releases/v2.8.13.md",
    "chars": 663,
    "preview": "# Release Notes - v2.8.13\n\n**Date**: 2026-01-18\n\n## 📝 Executive Summary\n\n```text\n2.8.13 2026-01-18\n\n- docs: add Useful L"
  },
  {
    "path": "releases/v2.8.15.md",
    "chars": 717,
    "preview": "# Release Notes - v2.8.15\n\n**Date**: 2026-01-18\n\n## 📝 Executive Summary\n\n```text\n2.8.15 2026-01-18\n\n- feat: update all G"
  },
  {
    "path": "releases/v2.8.16.md",
    "chars": 420,
    "preview": "# Release Notes - v2.8.16\n\n**Date**: 2026-01-18\n\n## 📝 Executive Summary\n\n```text\n2.8.16 2026-01-18\n\n- chore: bump versio"
  },
  {
    "path": "releases/v2.8.17.md",
    "chars": 530,
    "preview": "# Release Notes - v2.8.17\n\n**Date**: 2026-01-18\n\n## 📝 Executive Summary\n\n```text\n2.8.17 2026-01-18\n\n- feat: implementati"
  },
  {
    "path": "releases/v2.8.18.md",
    "chars": 589,
    "preview": "# Release Notes - v2.8.18\n\n**Date**: 2026-01-18\n\n## 📝 Executive Summary\n\n```text\n2.8.18 2026-01-18\n\n- feat: add --max-pa"
  },
  {
    "path": "releases/v2.8.2.md",
    "chars": 825,
    "preview": "# Release Notes - v2.8.2\n\n**Date**: 2026-01-17\n\n## 📝 Executive Summary\n\n```text\n2.8.2 2026-01-17\n\n- fix: system command "
  },
  {
    "path": "releases/v2.8.20.md",
    "chars": 500,
    "preview": "# Release Notes - v2.8.20\n\n**Date**: 2026-01-18\n\n## 📝 Executive Summary\n\n```text\n2.8.20 2026-01-18\n\n- feat: add automate"
  },
  {
    "path": "releases/v2.8.21.md",
    "chars": 614,
    "preview": "# Release Notes - v2.8.21\n\n**Date**: 2026-01-18\n\n## 📝 Executive Summary\n\n```text\n2.8.21 2026-01-18\n\n- fix: remove contra"
  },
  {
    "path": "releases/v2.8.22.md",
    "chars": 1059,
    "preview": "# Release Notes - v2.8.22\n\n**Date**: 2026-01-18\n\n## 📝 Executive Summary\n\n```text\n2.8.22 2026-01-18\n\n- feat: update all r"
  },
  {
    "path": "releases/v2.8.23.md",
    "chars": 506,
    "preview": "# Release Notes - v2.8.23\n\n**Date**: 2026-01-18\n\n## 📝 Executive Summary\n\n```text\n2.8.23 2026-01-18\n\n- feat: add --ignore"
  },
  {
    "path": "releases/v2.8.24.md",
    "chars": 1099,
    "preview": "# Release Notes - v2.8.24\n\n**Date**: 2026-01-18\n\n## 📝 Executive Summary\n\n```text\n2.8.24 2026-01-18\n\n- fix: improve Maria"
  },
  {
    "path": "releases/v2.8.26.md",
    "chars": 782,
    "preview": "# Release Notes - v2.8.26\n\n**Date**: 2026-01-18\n\n## 📝 Executive Summary\n\n```text\n2.8.26 2026-01-18\n\n- fix: inverted repl"
  },
  {
    "path": "releases/v2.8.27.md",
    "chars": 860,
    "preview": "# Release Notes - v2.8.27\n\n**Date**: 2026-01-18\n\n## 📝 Executive Summary\n\n```text\n2.8.27 2026-01-18\n\n- refactor: replace "
  },
  {
    "path": "releases/v2.8.28.md",
    "chars": 757,
    "preview": "# Release Notes - v2.8.28\n\n**Date**: 2026-01-22\n\n## 📝 Executive Summary\n\n```text\n2.8.28 2026-01-22\n\n- feat: ajoute l'opt"
  },
  {
    "path": "releases/v2.8.29.md",
    "chars": 643,
    "preview": "# Release Notes - v2.8.29\n\n**Date**: 2026-01-24\n\n## 📝 Executive Summary\n\n```text\n2.8.29 2026-01-24\n\n- fix: synchronize a"
  },
  {
    "path": "releases/v2.8.3.md",
    "chars": 582,
    "preview": "# Release Notes - v2.8.3\n\n**Date**: 2026-01-17\n\n## 📝 Executive Summary\n\n```text\n2.8.3 2026-01-17\n\n- feat: detect docker/"
  },
  {
    "path": "releases/v2.8.30.md",
    "chars": 4812,
    "preview": "# Release Notes - v2.8.30\n\n**Date**: 2026-01-24\n\n## 📝 Executive Summary\n\n```text\n2.8.30 2026-01-24\n\n- feat: add InnoDB t"
  },
  {
    "path": "releases/v2.8.31.md",
    "chars": 4008,
    "preview": "# Release Notes - v2.8.31\n\n**Date**: 2026-01-27\n\n## 📝 Executive Summary\n\n```text\n2.8.31 2026-01-27\n\n- chore: uncomment e"
  },
  {
    "path": "releases/v2.8.32.md",
    "chars": 2801,
    "preview": "# Release Notes - v2.8.32\n\n**Date**: 2026-01-30\n\n## 📝 Executive Summary\n\n```text\n2.8.32 2026-01-30\n\n- chore: rename rele"
  },
  {
    "path": "releases/v2.8.33.md",
    "chars": 4168,
    "preview": "# Release Notes - v2.8.33\n\n**Date**: 2026-01-31\n\n## 📝 Executive Summary\n\n```text\n2.8.33 2026-01-31\n\n- feat: add automate"
  },
  {
    "path": "releases/v2.8.34.md",
    "chars": 1370,
    "preview": "# Release Notes - v2.8.34\n\n**Date**: 2026-02-02\n\n## 📝 Executive Summary\n\n```text\n2.8.34 2026-02-02\n\n- feat: modernize ve"
  },
  {
    "path": "releases/v2.8.35.md",
    "chars": 2179,
    "preview": "# Release Notes - v2.8.35\n\n**Date**: 2026-02-02\n\n## 📝 Executive Summary\n\n```text\n2.8.35 2026-02-02\n\n- feat: modernize ve"
  },
  {
    "path": "releases/v2.8.36.md",
    "chars": 2489,
    "preview": "# Release Notes - v2.8.36\n\n**Date**: 2026-02-13\n\n## 📝 Executive Summary\n\n```text\n2.8.36 2026-02-13\n\n- fix: migrate CI wo"
  },
  {
    "path": "releases/v2.8.37.md",
    "chars": 1147,
    "preview": "# Release Notes - v2.8.37\n\n**Date**: 2026-02-14\n\n## 📝 Executive Summary\n\n```text\n2.8.37 2026-02-14\n\n- chore: bump versio"
  },
  {
    "path": "releases/v2.8.38.md",
    "chars": 3315,
    "preview": "# Release Notes - v2.8.38\n\n**Date**: 2026-02-14\n\n## 📝 Executive Summary\n\n```text\n2.8.38 2026-02-14\n\n- chore: bump versio"
  },
  {
    "path": "releases/v2.8.4.md",
    "chars": 917,
    "preview": "# Release Notes - v2.8.4\n\n**Date**: 2026-01-17\n\n## 📝 Executive Summary\n\n```text\n2.8.4 2026-01-17\n\n- fix: database inject"
  },
  {
    "path": "releases/v2.8.5.md",
    "chars": 547,
    "preview": "# Release Notes - v2.8.5\n\n**Date**: 2026-01-17\n\n## 📝 Executive Summary\n\n```text\n2.8.5 2026-01-17\n\n- fix: noisy sysctl er"
  },
  {
    "path": "releases/v2.8.6.md",
    "chars": 1023,
    "preview": "# Release Notes - v2.8.6\n\n**Date**: 2026-01-17\n\n## 📝 Executive Summary\n\n```text\n2.8.6 2026-01-17\n\n- chore: synchronize v"
  },
  {
    "path": "releases/v2.8.7.md",
    "chars": 949,
    "preview": "# Release Notes - v2.8.7\n\n**Date**: 2026-01-17\n\n## 📝 Executive Summary\n\n```text\n2.8.7 2026-01-17\n\n- chore: synchronize v"
  },
  {
    "path": "releases/v2.8.8.md",
    "chars": 1140,
    "preview": "# Release Notes - v2.8.8\n\n**Date**: 2026-01-17\n\n## 📝 Executive Summary\n\n```text\n2.8.8 2026-01-17\n\n- chore: bump version "
  },
  {
    "path": "releases/v2.8.9.md",
    "chars": 960,
    "preview": "# Release Notes - v2.8.9\n\n**Date**: 2026-01-17\n\n## 📝 Executive Summary\n\n```text\n2.8.9 2026-01-17\n\n- chore: bump version "
  },
  {
    "path": "renovate.json",
    "chars": 126,
    "preview": "{\n  \"extends\": [\n    \"config:recommended\"\n  ],\n  \"git-submodules\": {\n    \"enabled\": true\n  },\n  \"dependencyDashboard\": t"
  },
  {
    "path": "template_example.tpl",
    "chars": 4184,
    "preview": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <!-- Required meta tags -->\n    <meta charset=\"utf-8\">\n    <meta name=\"vie"
  },
  {
    "path": "templates/basic.html.j2",
    "chars": 11444,
    "preview": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <!-- Required meta tags -->\n    <meta charset=\"utf-8\">\n    <meta name=\"vie"
  },
  {
    "path": "tests/check_release_files.sh",
    "chars": 1434,
    "preview": "#!/bin/bash\n# Local verification script for MySQLTuner release artifacts\n\necho \"Checking for critical files...\"\nCRITICAL"
  },
  {
    "path": "tests/cli_mod_keys.t",
    "chars": 1522,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\nuse File::Basename;\nuse File::Spec;\n\n# Mocking the environ"
  },
  {
    "path": "tests/cli_options.t",
    "chars": 1141,
    "preview": "use strict;\nuse warnings;\nuse Test::More;\nuse File::Basename;\nuse File::Spec;\n\nmy $script = File::Spec->catfile(dirname("
  },
  {
    "path": "tests/cli_validation.t",
    "chars": 1143,
    "preview": "use strict;\nuse warnings;\nuse Test::More;\nuse File::Basename;\nuse File::Spec;\n\nmy $script = File::Spec->catfile(dirname("
  },
  {
    "path": "tests/index_pfs_checks.t",
    "chars": 3154,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\nuse File::Basename;\nuse File::Spec;\n\n# Mock these before l"
  },
  {
    "path": "tests/innodb_isolation.t",
    "chars": 3119,
    "preview": "use strict;\nuse warnings;\nuse Test::More;\n\n# Mocking variables and functions from mysqltuner.pl\nour %myvar;\nour %mystat;"
  },
  {
    "path": "tests/issue_770.t",
    "chars": 2045,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\nuse File::Basename;\nuse File::Spec;\n\n# Setup environment f"
  },
  {
    "path": "tests/issue_774.t",
    "chars": 2387,
    "preview": "#!/usr/bin/perl\nuse strict;\nuse warnings;\nuse Test::More;\n\n# We will extract and test the logic of sub mysql_myisam\n# To"
  },
  {
    "path": "tests/issue_777.t",
    "chars": 2665,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\nuse File::Basename;\nuse File::Spec;\n\n# Setup environment f"
  },
  {
    "path": "tests/issue_783.t",
    "chars": 2534,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\nuse File::Basename;\nuse File::Spec;\n\n# Setup environment f"
  },
  {
    "path": "tests/issue_863_enhanced.t",
    "chars": 2799,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\n\n# Mocking variables and functions from mysqltuner.pl\nour "
  },
  {
    "path": "tests/issue_869.t",
    "chars": 4148,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\n\n# Test Case for Issue #869\n# Cannot calculate InnoDB Buff"
  },
  {
    "path": "tests/machine_type.t",
    "chars": 1155,
    "preview": "use strict;\nuse warnings;\nuse Test::More;\n\n# Mocking the logic that will be in mysqltuner.pl\nsub mock_get_system_info_lo"
  },
  {
    "path": "tests/mariadb_modeling.t",
    "chars": 2994,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\n\n# Load the script first to get the subroutines\n{\n    loca"
  },
  {
    "path": "tests/modeling_regression.t",
    "chars": 4207,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\n\n# 1. Global mocks before loading\nBEGIN {\n    *CORE::GLOBA"
  },
  {
    "path": "tests/pfs_observability.t",
    "chars": 2161,
    "preview": "use strict;\nuse warnings;\nno warnings 'once';\nuse Test::More;\nuse File::Basename;\nuse File::Spec;\nuse Cwd 'abs_path';\n\n#"
  },
  {
    "path": "tests/repro_issue_20.t",
    "chars": 2225,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\nuse File::Basename;\nuse File::Spec;\nuse Cwd 'abs_path';\n\n#"
  },
  {
    "path": "tests/repro_issue_22.t",
    "chars": 2147,
    "preview": "use strict;\nuse warnings;\nuse Test::More;\nuse File::Basename;\nuse File::Spec;\nuse Cwd 'abs_path';\n\n# Load mysqltuner.pl "
  },
  {
    "path": "tests/repro_issue_490.t",
    "chars": 1948,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\nuse File::Temp qw(tempfile);\nuse File::Basename;\n\n# Mock e"
  },
  {
    "path": "tests/repro_issue_605.t",
    "chars": 5284,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\nuse File::Basename;\nuse File::Spec;\n\nmy $script = File::Sp"
  },
  {
    "path": "tests/repro_issue_863.t",
    "chars": 2894,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\n\n# Mocking variables and functions from mysqltuner.pl\nour "
  },
  {
    "path": "tests/repro_pfs_disabled.t",
    "chars": 1978,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\nuse File::Basename;\nuse File::Spec;\nuse Cwd 'abs_path';\n\n#"
  },
  {
    "path": "tests/schemadir.t",
    "chars": 5383,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\nuse File::Temp qw(tempdir);\nuse File::Spec;\nuse Cwd qw(abs"
  },
  {
    "path": "tests/sql_modeling.t",
    "chars": 9483,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\n\n# Load the script first to get the subroutines\n{\n    loca"
  },
  {
    "path": "tests/sql_modeling_fk.t",
    "chars": 1166,
    "preview": "use strict;\nuse warnings;\nuse Test::More;\nuse File::Basename;\nuse Cwd 'abs_path';\n\nmy $script = abs_path(dirname(__FILE_"
  },
  {
    "path": "tests/sql_quoting.t",
    "chars": 2453,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\n\n# Mocking variables and functions from mysqltuner.pl\nour "
  },
  {
    "path": "tests/ssl_tls_validation.t",
    "chars": 3508,
    "preview": "use strict;\nuse warnings;\nno warnings 'once';\nuse Test::More;\nuse File::Basename;\nuse File::Spec;\nuse Cwd 'abs_path';\n\n#"
  },
  {
    "path": "tests/test_audit_logs.t",
    "chars": 2672,
    "preview": "#!/usr/bin/env perl\n\nuse strict;\nuse warnings;\nuse Test::More;\nuse File::Temp qw(tempdir);\nuse File::Spec;\n\n# Regression"
  },
  {
    "path": "tests/test_boolean_options.t",
    "chars": 1171,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\nuse File::Basename;\nuse Cwd 'abs_path';\n\nmy $script = abs_"
  },
  {
    "path": "tests/test_forcemem.t",
    "chars": 1963,
    "preview": "use strict;\nuse warnings;\nuse Test::More;\n\n# Mocking variables from mysqltuner.pl\nour %opt;\nour $physical_memory;\nour $s"
  },
  {
    "path": "tests/test_ignore_tables.t",
    "chars": 4240,
    "preview": "use strict;\nuse warnings;\nuse Test::More;\n\n# Mocking variables and functions from mysqltuner.pl\nour %opt = (\n    \"ignore"
  },
  {
    "path": "tests/test_issue_404.t",
    "chars": 3957,
    "preview": "use strict;\nuse warnings;\nuse Test::More;\n\n# Mocking variables and functions from mysqltuner.pl\nour %myvar;\nour %mystat;"
  },
  {
    "path": "tests/test_issue_553.t",
    "chars": 5018,
    "preview": "use strict;\nuse warnings;\nuse Test::More;\n\n# Test for issue #553: Replication command compatibility\n# https://github.com"
  },
  {
    "path": "tests/test_issue_671.t",
    "chars": 2721,
    "preview": "use strict;\nuse warnings;\nuse Test::More;\n\n# Mocking variables and functions from mysqltuner.pl\nour %myvar;\nour %mystat;"
  },
  {
    "path": "tests/test_issue_874.t",
    "chars": 2596,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\n\n# Test Case for Issue #874\n# MySQLTuner 2.8.28 - System c"
  },
  {
    "path": "tests/test_issue_875.t",
    "chars": 3293,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\nuse File::Basename;\nuse File::Spec;\n\n# Setup environment f"
  },
  {
    "path": "tests/test_version_regex.t",
    "chars": 1879,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\n\n# Mocking HTTP::Tiny for testing validate_tuner_version l"
  },
  {
    "path": "tests/test_vulnerabilities.t",
    "chars": 2831,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\n\n# Load the script first to get the subroutines\n{\n    loca"
  },
  {
    "path": "tests/unit_formatting.t",
    "chars": 1179,
    "preview": "use strict;\nuse warnings;\nuse Test::More;\nuse File::Basename;\nuse File::Spec;\nuse Cwd 'abs_path';\n\n# Suppress warnings f"
  },
  {
    "path": "tests/unit_utilities.t",
    "chars": 2773,
    "preview": "use strict;\nuse warnings;\nuse Test::More;\nuse File::Basename;\nuse File::Spec;\n\n# Suppress warnings from mysqltuner.pl in"
  },
  {
    "path": "tests/unit_versions.t",
    "chars": 1119,
    "preview": "use strict;\nuse warnings;\nno warnings 'once';\nuse Test::More;\nuse File::Basename;\nuse File::Spec;\nuse Cwd 'abs_path';\n\n#"
  },
  {
    "path": "tests/version_consistency.t",
    "chars": 2224,
    "preview": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\nuse File::Basename;\nuse Cwd 'abs_path';\n\n# Test for versio"
  },
  {
    "path": "vulnerabilities.csv",
    "chars": 385568,
    "preview": "5.7.26;5;7;26;CVE-2019-3822;Modified;libcurl versions from 7.36.0 to before 7.64.0 are vulnerable to a stack-based buffe"
  }
]

About this extraction

This page contains the full source code of the major/MySQLTuner-perl GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 192 files (3.3 MB), approximately 876.7k tokens, and a symbol index with 16 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!