mirror of https://github.com/sysown/proxysql
test_ssl_fast_forward-1-t.cpp:
- Fix a bug I introduced in the prior batch: my scripted wrapping of
braceless 'if (cond) return exit_status();' bodies skipped the one
'if' line that had a trailing '// comment' (it didn't end with ')').
The result was a misleading-indentation case where only close_all()
was inside the if body and return exit_status() ran unconditionally.
Added explicit { } around that block.
test_digest_umap_aux-t.cpp:
- Fix real logic bug: 'tests_failed == 0' (missing parentheses) compared
the *address* of the function against zero. The address is never NULL,
so the second operand of the '&&' was always false, and the
TRUNCATE TABLE stats.stats_mysql_query_digest cleanup at end of main
never actually ran. Fixed to 'tests_failed() == 0'. Surfaced by
-Waddress.
test_default_conn_collation-t.cpp:
- Fix NULL-deref UB: mysql_init was not checked for NULL before being
passed to mysql_real_connect.
- Fix 'admin' leak on mysql_real_connect failure.
- Remove the dead 'cleanup:' label: the label's cleanup code
(mysql_close + return exit_status) was unreachable because the
preceding happy-path flow was a plain fall-through into it. Moved
the cleanup body inline and deleted the label.
Compile-verified with -fsyntax-only (-Wall for the first two files).
lint-tap-tests-static-analysis
parent
a6b8afa1f2
commit
a3d7378ad0
Loading…
Reference in new issue