Commit f4e4b44f authored by Aaron Wells's avatar Aaron Wells Committed by Robert Lyon

Override MySQL's check for accidental large queries

Bug 1070046: MySQL has an optional server config option, "MAX_JOIN_SIZE",
which throws an error if you try to run a SQL query that MySQL's strategizer
thinks will require it to evaluate more than MAX_JOIN_SIZE rows. This is
intended to prevent the user from accidentally running giant queries that
will never finish, but some Mahara queries (which are large but will finish)
can trip it. Adding SQL_BIG_SELECTS=1 tels it that our queries are *not*
accidentally large.

Also has order change for bug 1184450

Change-Id: I6db4699ea765d3213d13eb93b8de098914db24e0
parent 05bd7f47
......@@ -1482,8 +1482,9 @@ function configure_dbconnection() {
$db->Execute("SET NAMES 'utf8'");
if (is_mysql()) {
$db->Execute("SET CHARACTER SET utf8");
$db->Execute("SET SQL_MODE='POSTGRESQL'");
$db->Execute("SET CHARACTER SET utf8");
$db->Execute("SET SQL_BIG_SELECTS=1");
// more later..
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment