aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-05-27 18:17:07 +0200
committerJoas Schilling <nickvergessen@gmx.de>2013-05-27 18:17:07 +0200
commitcc68ea5f6ffb2b2932f495e8290977461c2393c7 (patch)
treee4c1273a09797f179eec80d2a57cee0fa9d584df
parent49149c0d41419767ee07489d3394a11a868cd75c (diff)
parent38022a6999c58b310bdad43021fa66195db7bf32 (diff)
downloadforums-cc68ea5f6ffb2b2932f495e8290977461c2393c7.tar
forums-cc68ea5f6ffb2b2932f495e8290977461c2393c7.tar.gz
forums-cc68ea5f6ffb2b2932f495e8290977461c2393c7.tar.bz2
forums-cc68ea5f6ffb2b2932f495e8290977461c2393c7.tar.xz
forums-cc68ea5f6ffb2b2932f495e8290977461c2393c7.zip
Merge remote-tracking branch 'bantu/ticket/11576' into develop-olympus
* bantu/ticket/11576: [ticket/11576] MySQL unit tests: Enable STRICT_TRANS_TABLES and others.
-rw-r--r--tests/test_framework/phpbb_database_test_connection_manager.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_framework/phpbb_database_test_connection_manager.php b/tests/test_framework/phpbb_database_test_connection_manager.php
index af7e6b1144..bcd52b1794 100644
--- a/tests/test_framework/phpbb_database_test_connection_manager.php
+++ b/tests/test_framework/phpbb_database_test_connection_manager.php
@@ -148,6 +148,20 @@ class phpbb_database_test_connection_manager
case 'mysql':
case 'mysqli':
$this->pdo->exec('SET NAMES utf8');
+
+ /*
+ * The phpBB MySQL drivers set the STRICT_ALL_TABLES and
+ * STRICT_TRANS_TABLES flags/modes, so as a minimum requirement
+ * we want to make sure those are set for the PDO side of the
+ * test suite.
+ *
+ * The TRADITIONAL flag implies STRICT_ALL_TABLES and
+ * STRICT_TRANS_TABLES as well as other useful strictness flags
+ * the phpBB MySQL driver does not set.
+ */
+ $this->pdo->exec("SET SESSION sql_mode='TRADITIONAL'");
+ break;
+
default:
}
}