mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #30027
[Bug 1416147] Re: MySQL error in ORDER BY clause in get_artefactchooser_artefacts()
** Also affects: mahara/1.10
Importance: Undecided
Status: New
** Also affects: mahara/1.9
Importance: Undecided
Status: New
** Changed in: mahara/1.10
Importance: Undecided => Medium
** Changed in: mahara/1.9
Importance: Undecided => Medium
** Changed in: mahara/1.10
Status: New => In Progress
** Changed in: mahara/1.9
Status: New => In Progress
** Changed in: mahara/1.10
Milestone: None => 1.9.9
** Changed in: mahara/1.9
Milestone: None => 1.9.9
** Changed in: mahara/1.10
Milestone: 1.9.9 => 1.10.7
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1416147
Title:
MySQL error in ORDER BY clause in get_artefactchooser_artefacts()
Status in Mahara:
Fix Released
Status in Mahara 1.10 series:
In Progress
Status in Mahara 1.9 series:
In Progress
Bug description:
For some reason works fine on Postgres...
To reproduce:
1. Create a journal post.
2. Go to pages.
3. Create a page.
4. Add "Journal entry" block.
5. See this error:
Failed to get a recordset: mysqli error: [1064: You have an error in
your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near 'BY parent ASC, ctime
DESC LIMIT 10' at line 15] in EXECUTE("SELECT a.*, (a.owner IS NOT
NULL AND a.owner = '1') AS editable FROM "mhr_artefact" a WHERE (
a.owner = '1' OR a.id IN ( SELECT id FROM "mhr_artefact" WHERE (path =
'/5' OR path LIKE '/5/%') AND institution = 'mahara' ) OR a.id IN (
SELECT aar.artefact FROM "mhr_group_member" m JOIN "mhr_artefact" aa
ON m.group = aa.group JOIN "mhr_artefact_access_role" aar ON aar.role
= m.role AND aar.artefact = aa.id WHERE m.member = '1' AND
aar.can_republish = 1 ) OR a.id IN (SELECT artefact FROM
"mhr_artefact_access_usr" WHERE usr = '1' AND can_republish = 1) OR
a.institution IN ('mahara') ) AND artefacttype IN('blogpost') AND id =
6ORDER BY parent ASC, ctime DESC LIMIT 10") Command was: SELECT a.*,
(a.owner IS NOT NULL AND a.owner = ?) AS editable FROM "mhr_artefact"
a WHERE ( a.owner = ? OR a.id IN ( SELECT id FROM "mhr_artefact" WHERE
(path = ? OR path LIKE ?) AND institution = 'mahara' ) OR a.id IN (
SELECT aar.artefact FROM "mhr_group_member" m JOIN "mhr_artefact" aa
ON m.group = aa.group JOIN "mhr_artefact_access_role" aar ON aar.role
= m.role AND aar.artefact = aa.id WHERE m.member = ? AND
aar.can_republish = 1 ) OR a.id IN (SELECT artefact FROM
"mhr_artefact_access_usr" WHERE usr = ? AND can_republish = 1) OR
a.institution IN (?) ) AND artefacttype IN(?) AND id = 6ORDER BY
parent ASC, ctime DESC and values was
(1,1,/5,/5/%,1,1,mahara,blogpost)
SQL is missing space before ORDER BY...
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1416147/+subscriptions
References