Merge branch 'QA_4_7'
This commit is contained in:
commit
6b45f57e45
@ -32,6 +32,7 @@ phpMyAdmin - ChangeLog
|
||||
- issue #13234 Properly report not working sessions
|
||||
- issue #13256 Fixed password check on server replication
|
||||
- issue #13252 Fixed grid editing time column
|
||||
- issue #13258 Fixed detection of Amazon RDS
|
||||
|
||||
4.7.0 (2017-03-28)
|
||||
- patch #12233 [Display] Improve message when renaming database to same name
|
||||
|
||||
@ -2767,8 +2767,8 @@ class DatabaseInterface
|
||||
return Util::cacheGet('is_amazon_rds');
|
||||
}
|
||||
$sql = 'SELECT @@basedir';
|
||||
$result = $this->fetchResult($sql);
|
||||
$rds = ($result[0] == '/rdsdbbin/mysql/');
|
||||
$result = $this->fetchValue($sql);
|
||||
$rds = (substr($result, 0, 10) == '/rdsdbbin/');
|
||||
Util::cacheSet('is_amazon_rds', $rds);
|
||||
|
||||
return $rds;
|
||||
|
||||
@ -376,6 +376,43 @@ class DatabaseInterfaceTest extends PMATestCase
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests for DBI::isAmazonRds() method.
|
||||
*
|
||||
* @return void
|
||||
* @test
|
||||
* @dataProvider isAmazonRdsData
|
||||
*/
|
||||
public function atestIsAmazonRdsData($value, $expected)
|
||||
{
|
||||
Util::cacheUnset('is_amazon_rds');
|
||||
|
||||
$extension = new PMA\libraries\dbi\DBIDummy();
|
||||
$extension->setResult('SELECT @@basedir', $value);
|
||||
|
||||
$dbi = new PMA\libraries\DatabaseInterface($extension);
|
||||
|
||||
$this->assertEquals(
|
||||
$expected,
|
||||
$dbi->isAmazonRds()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Data provider for isAmazonRds() tests.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function isAmazonRdsData()
|
||||
{
|
||||
return array(
|
||||
array(array(array('/usr')), false),
|
||||
array(array(array('E:/mysql')), false),
|
||||
array(array(array('/rdsdbbin/mysql/')), true),
|
||||
array(array(array('/rdsdbbin/mysql-5.7.18/')), true),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for version parsing
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user