Conversation
There was a problem hiding this comment.
I'm Bonk, and I've done a quick review of your PR.
This PR adds warning logs to detect mixed-case _cf_ prefix usage in SQL identifiers and FTS5 virtual tables.
Issues
-
[High]
<strings.h>included unconditionally — breaks Windows/MSVC build.
strncasecmpis a POSIX function declared in<strings.h>, which doesn't exist on MSVC. Other files in the codebase handle this:form-data.c++guards the include with#if !_MSC_VER, andsqlite.c++uses#define strncasecmp _strnicmp. The new code insql.c++does neither. -
[Low] Log messages don't include the offending identifier.
SinceLOG_WARNING_PERIODICALLYis rate-limited to once per hour per call site, including the actual name would be much more useful for debugging when these fire in production. Both call sites have the name readily available.
|
Review posted successfully on PR #6448. Here's a summary of the findings:
All three issues have concrete suggestion comments on the PR. |
b3f85bb to
5fb5497
Compare
Add warning logs to detect SQL identifiers using mixed-case cf prefix variants (e.g. CF, Cf) and FTS5 virtual tables using any-case cf prefix.