mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Use PDO for MySQL queries (#8935)
Gut dbFacile mres() now does nothing... could have some vulnerable queries, but most are ok TODO - [x] IRC client broke - [x] Install broke DO NOT DELETE THIS TEXT #### Please note > Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting. - [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/) #### Testers If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
This commit is contained in:
committed by
Neil Lathwood
parent
86c097574b
commit
a2e33efba8
@@ -113,21 +113,10 @@ class DBSetupTest extends DBTestCase
|
||||
|
||||
public function testSqlMode()
|
||||
{
|
||||
global $sql_mode;
|
||||
$this->assertNotNull($sql_mode, 'Query to save SQL Mode in bootstrap.php failed');
|
||||
|
||||
// sql_mode can only be set by users with access
|
||||
$access = array(
|
||||
'GRANT ALL PRIVILEGES ON *.*',
|
||||
'SUPER'
|
||||
$this->assertEquals(
|
||||
'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION',
|
||||
dbFetchCell("SELECT @@sql_mode")
|
||||
);
|
||||
|
||||
if (str_contains(join(PHP_EOL, dbFetchColumn('SHOW GRANTS')), $access)) {
|
||||
$this->assertEquals(
|
||||
array('ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'),
|
||||
dbFetchColumn("SELECT @@global.sql_mode")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function testValidateSchema()
|
||||
|
Reference in New Issue
Block a user