The main gotcha to this, is that if you're debugging a Mahara instance
that's running in MySQL, and you copy out one of the SQL queries
generated by Mahara and try to run it manually in a separate MySQL
client.
If you do that, and the query uses ||, it'll error out unless you have
first manually
As Robert mentioned, we do "SET SQL_MODE='POSTGRESQL'" when using MySQL.
This is equivalent to the "PIPES_AS_CONCAT" directive Ghada mentioned,
as well as several other options:
Equivalent to PIPES_AS_CONCAT, ANSI_QUOTES, IGNORE_SPACE,
NO_KEY_OPTIONS, NO_TABLE_OPTIONS, NO_FIELD_OPTIONS.
Back in commit 1a4c340b6959f7d1bd5bf2b6147686a0d627af8a (circa 2007)
the line
$db->_Execute("SET SQL_MODE='POSTGRESQL'");
was added to make mysql being used by Mahara act like postgres so that
it can do the pipes (||)
So this shouldn't be an issue.
I did not when I copied sql commands from
As there is a fine alternative, namely CONCAT(), for both MySQL and
Postgres, which I personally find easier to understand what is going on,
we should use that.
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching
** Changed in: mahara
Status: Incomplete => Confirmed
** Changed in: mahara
Importance: Undecided => High
** Changed in: mahara
Milestone: None => 16.10.0
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Ghada wants to take another look before deciding on whether anything
needs to be fixed.
** Changed in: mahara
Status: Triaged => Incomplete
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions:
** Changed in: mahara
Status: New => Triaged
--
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
7 matches
Mail list logo