• Applicable Software: General
  • Min Version Number: 00.01.00
  • Max Version Number: Not Applicable

Why it happens

A sql/updates/*.sql file uses PREPARE / EXECUTE / DEALLOCATE (often an "idempotent ADD INDEX" trick). Joomla 4+ runs every schema statement through mysqli::prepare(), which rejects those — so the install or update aborts.

How MokoJoomla helps

  1. Open a schema file under sql/updates. MokoJoomla underlines any prepared-statement DDL as a diagnostic.
  2. Use the quick-fix to no-op the offending statement.
  3. Move the conditional logic into your install script: check information_schema and run a plain ALTER … ADD … only when the column/index is missing — idempotent and fail-open, from a hook that runs on both install and update.

Part of the Moko VS Code suite.