Reviewed: https://reviews.mahara.org/5577 Committed: https://git.nzoss.org.nz/mahara/mahara/commit/fb33d6de34785cf3d0b64445e2298ee37d83d31b Submitter: Aaron Wells ([email protected]) Branch: 1.10_STABLE
commit fb33d6de34785cf3d0b64445e2298ee37d83d31b Author: Yuliya Bozhko <[email protected]> Date: Fri Jan 30 11:34:58 2015 +1300 SQL error in ORDER BY clause in get_artefactchooser_artefacts (Bug #1416147) Change-Id: I3b94130c605592ef22e1d5d30f038d3aafe1e03a Signed-off-by: Yuliya Bozhko <[email protected]> (cherry picked from commit 9ed9a6326f85c1b0ee0465e5dc52945f2bccd570) -- 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 _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

