test: Add descriptive diag messages to all test_ffto_* tests

Add multi-line descriptive messages at startup for:
- test_ffto_bypass-t.cpp: Tests FFTO bypass for large queries
- test_ffto_mysql-t.cpp: Tests FFTO for MySQL connections
- test_ffto_pgsql-t.cpp: Tests FFTO for PostgreSQL connections

Explains FFTO (Fast Forward To Optimization) purpose and what
each test validates regarding query digest tracking.
release-notes-3.0.6-4.0.6-draft
Rene Cannao 3 months ago
parent 96b1a8ff3b
commit 05b723c253

@ -17,6 +17,14 @@ int main(int argc, char** argv) {
plan(2);
diag("=== FFTO Bypass Test ===");
diag("This test validates that queries larger than the FFTO max buffer size");
diag("bypass the FFTO (Fast Forward To Optimization) mechanism entirely.");
diag("When a query exceeds the threshold, it should NOT be recorded in");
diag("stats_mysql_query_digest since FFTO processing is skipped.");
diag("Test sets mysql-ffto_max_buffer_size=100 bytes and sends a 200+ byte query.");
diag("========================");
MYSQL* admin = mysql_init(NULL);
if (!mysql_real_connect(admin, cl.host, cl.admin_username, cl.admin_password, NULL, cl.admin_port, NULL, 0)) {
diag("Admin connection failed");

@ -80,6 +80,15 @@ int main(int argc, char** argv) {
return -1;
}
diag("=== FFTO MySQL Test ===");
diag("This test validates FFTO (Fast Forward To Optimization) for MySQL.");
diag("FFTO enables fast_forward mode where queries are passed directly to");
diag("the backend without full result set buffering in ProxySQL.");
diag("Tests verify query digests are recorded in stats_mysql_query_digest");
diag("with correct count_star, sum_rows_affected, and sum_rows_sent metrics");
diag("for CREATE, INSERT, SELECT, UPDATE, and DELETE operations.");
diag("=======================");
plan(kPlannedTests); // 1 + 18 + 3 = 22
MYSQL* admin = mysql_init(NULL);

@ -81,7 +81,17 @@ int main(int argc, char** argv) {
return -1;
}
plan(kPlannedTests); // 1 (connect) + 18 (simple) + 3 (extended) = 22
plan(kPlannedTests); // 1 (connect) + 18 (simple) + 3 (extended) = 19
diag("=== FFTO PostgreSQL Test ===");
diag("This test validates FFTO (Fast Forward To Optimization) for PostgreSQL.");
diag("FFTO enables fast_forward mode where queries are passed directly to");
diag("the backend without full result set buffering in ProxySQL.");
diag("Tests cover both Simple Query Protocol (using ? placeholders) and");
diag("Extended Query Protocol (using $1, $2 named placeholders via PQprepare).");
diag("Verifies query digests are recorded with correct count_star,");
diag("sum_rows_affected, and sum_rows_sent metrics in stats_pgsql_query_digest.");
diag("============================");
MYSQL* admin = mysql_init(NULL);
PGconn* conn = NULL;

Loading…
Cancel
Save