MDL-69451 dml: use same temptables for both rw and ro database handle
moodle_read_slave_trait: when creating another handle, restore temptables property that is clobbered by raw_connect(). Also a better condition for temptable related queries detection in pgsql_native_moodle_database. dml_pgsql_read_slave_test::test_temp_table(): use real db connection if possible, otherwise skip the test.
This commit is contained in:
@@ -295,7 +295,7 @@ class pgsql_native_moodle_database extends moodle_database {
|
||||
}
|
||||
|
||||
// ... a nuisance - temptables use this.
|
||||
if (preg_match('/\bpg_constraint/', $sql) && $this->temptables->get_temptables()) {
|
||||
if (preg_match('/\bpg_catalog/', $sql) && $this->temptables->get_temptables()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user