MariaDB error when creating secret URL

Bug #1877906 reported by Cecilia Vela Gurovic
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Cecilia Vela Gurovic
19.10
Fix Released
Medium
Unassigned
20.04
Fix Released
Medium
Unassigned
20.10
Fix Released
Medium
Cecilia Vela Gurovic

Bug Description

We have the following error on a site with MariaDB and elascticsearch set up if we want to create a new secret URL for a view:

mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'WHERE NOT EXISTS (
                        SELECT 1 FROM "search_elasticsearch_q' at line 2] in EXECUTE("INSERT INTO "search_elasticsearch_queue" (itemid, type)
                    SELECT '1234', 'view' WHERE NOT EXISTS (
                        SELECT 1 FROM "search_elasticsearch_queue" WHERE itemid = '1234' AND type = 'view'
                    )")Command was: INSERT INTO "search_elasticsearch_queue" (itemid, type)
                    SELECT ?, ? WHERE NOT EXISTS (
                        SELECT 1 FROM "search_elasticsearch_queue" WHERE itemid = ? AND type = ?
                    )

Changed in mahara:
importance: Undecided → Medium
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/10967

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/10967
Committed: https://git.mahara.org/mahara/mahara/commit/30e931239f234d121d6a0a96bac2cdd36cfd7940
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 30e931239f234d121d6a0a96bac2cdd36cfd7940
Author: Cecilia Vela Gurovic <email address hidden>
Date: Mon May 11 12:42:04 2020 +1200

Bug 1877906: MariaDB sql change for WHERE NOT EXISTS

behatnotneeded

Change-Id: I38ee481206068b380592d744eb1125382556b980

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "20.04_STABLE" branch: https://reviews.mahara.org/10969

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "19.10_STABLE" branch: https://reviews.mahara.org/10970

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/10970
Committed: https://git.mahara.org/mahara/mahara/commit/e0f783a334fd3328205d0f742d3be5e2008a0af6
Submitter: Robert Lyon (<email address hidden>)
Branch: 19.10_STABLE

commit e0f783a334fd3328205d0f742d3be5e2008a0af6
Author: Cecilia Vela Gurovic <email address hidden>
Date: Mon May 11 12:42:04 2020 +1200

Bug 1877906: MariaDB sql change for WHERE NOT EXISTS

behatnotneeded

Change-Id: I38ee481206068b380592d744eb1125382556b980
(cherry picked from commit 30e931239f234d121d6a0a96bac2cdd36cfd7940)

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/10969
Committed: https://git.mahara.org/mahara/mahara/commit/f8110c1393a7f26da19879c24c1f200358182538
Submitter: Robert Lyon (<email address hidden>)
Branch: 20.04_STABLE

commit f8110c1393a7f26da19879c24c1f200358182538
Author: Cecilia Vela Gurovic <email address hidden>
Date: Mon May 11 12:42:04 2020 +1200

Bug 1877906: MariaDB sql change for WHERE NOT EXISTS

behatnotneeded

Change-Id: I38ee481206068b380592d744eb1125382556b980
(cherry picked from commit 30e931239f234d121d6a0a96bac2cdd36cfd7940)

no longer affects: mahara/19.04
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 20.10.0 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.