Bug: MySQL-only GET_LOCK breaks PostgreSQL/SQLite compatibility #92

Open
opened 2026-05-29 05:30:28 +00:00 by jmiller · 1 comment
Owner

Audit Finding C-4

Severity: Critical (if targeting non-MySQL)

Issue:
QueueProcessor::acquireLock() uses SELECT GET_LOCK('mokojoomcross_queue', 0) which is MySQL-specific. If Joomla is configured with PostgreSQL or SQLite, this will throw a SQL error.

Current impact: Low — most Joomla sites use MySQL/MariaDB. But Joomla 5 officially supports PostgreSQL.

Suggested fix:
Wrap in a try/catch with fallback to the previous read-then-write pattern for non-MySQL databases, or use $db->getServerType() to branch.

Files: QueueProcessor.php

Label: priority: low, type: bug

## Audit Finding C-4 **Severity:** Critical (if targeting non-MySQL) **Issue:** `QueueProcessor::acquireLock()` uses `SELECT GET_LOCK('mokojoomcross_queue', 0)` which is MySQL-specific. If Joomla is configured with PostgreSQL or SQLite, this will throw a SQL error. **Current impact:** Low — most Joomla sites use MySQL/MariaDB. But Joomla 5 officially supports PostgreSQL. **Suggested fix:** Wrap in a try/catch with fallback to the previous read-then-write pattern for non-MySQL databases, or use `$db->getServerType()` to branch. **Files:** `QueueProcessor.php` **Label:** `priority: low`, `type: bug`
Author
Owner

Branch created: feature/92-bug-mysql-only-get-lock-breaks-postgresq

git fetch origin
git checkout feature/92-bug-mysql-only-get-lock-breaks-postgresq
Branch created: [`feature/92-bug-mysql-only-get-lock-breaks-postgresq`](https://git.mokoconsulting.tech/MokoConsulting/MokoJoomCross/src/branch/feature/92-bug-mysql-only-get-lock-breaks-postgresq) ```bash git fetch origin git checkout feature/92-bug-mysql-only-get-lock-breaks-postgresq ```
Sign in to join this conversation.
No labels
Type Bug
Status
Priority Critical
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoJoomCross#92