Fix <sql> silent-failure bug; split /vst into overview + subpage; misc site fixes
- __mysql.cpp: <sql> never checked mysql_real_query's own return code, so a genuine query failure was indistinguishable from "ran fine, zero rows" - <try>/<catch> around a failing <sql> never actually caught anything anywhere. Now throws on a real failure. - spa.js: dynamically re-injected scripts now run in true sequential order (wait for each external script's load event before running the next), fixing checkout's Square card field never building on the first client-side navigation to /checkout (only after a refresh) - async=false alone only orders multiple external scripts relative to each other, it doesn't delay a plain inline sibling. - /vst split into a real overview + /vst/modular1 subpage with a left menu, reusing opensource.page's existing subpage-tier pattern (opensource.menu/main.css's submenuitem-active highlighting, and several other subpage-tier retirements, were already finished earlier this session but never committed - included here too). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
46ef67b735
commit
905fbafa5a
17 files changed
+474
-63
No files matched your search
+12
@@ -157,6 +157,18 @@ namespace jet {
|
||||
|
||||
void __mysql::query(coreutils::MString query) {
|
||||
int rc = mysql_real_query(mysql, query.getData(), query.getLength());
|
||||
// rc was captured but never checked - a genuinely failed query
|
||||
// (syntax error, constraint violation, etc.) fell straight into
|
||||
// the result==NULL branch below, which is ALSO the normal path
|
||||
// for a successful non-SELECT statement (INSERT/UPDATE/DELETE
|
||||
// have no result set to store either). That made every SQL error
|
||||
// in the whole codebase silently indistinguishable from "ran fine,
|
||||
// no rows" - <try>/<catch> around a failing <sql> never caught
|
||||
// anything, since no exception was ever thrown in the first place.
|
||||
// Only rc (mysql_real_query's own success/failure signal) can
|
||||
// actually tell the two cases apart; result's nullness can't.
|
||||
if(rc != 0)
|
||||
throw coreutils::Exception(std::string("mysql query failed: ") + mysql_error(mysql));
|
||||
result = mysql_store_result(mysql);
|
||||
if(result) {
|
||||
row = mysql_fetch_row(result);
|
||||
|
||||
Reference in new issue
Block a user