Fix #13722 DisableIS is not fully honored
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
This commit is contained in:
parent
1621e1ab8a
commit
c0cabf95b8
@ -38,6 +38,7 @@ phpMyAdmin - ChangeLog
|
||||
- issue #13560 Add support for changing collation for all tables and columns in database
|
||||
- issue #13303 Add support for creating fulltext index from table structure
|
||||
- issue #13711 Lower default value for $cfg['MaxExactCount']
|
||||
- issue #13722 DisableIS is not fully honored
|
||||
|
||||
4.7.5 (not yet released)
|
||||
- issue #13615 Avoid problems with browsing unknown query types
|
||||
|
||||
@ -65,14 +65,20 @@ class Charsets
|
||||
return;
|
||||
}
|
||||
|
||||
$sql = 'SELECT * FROM information_schema.CHARACTER_SETS';
|
||||
if ($GLOBALS['cfg']['Server']['DisableIS']) {
|
||||
$sql = 'SHOW CHARACTER SET';
|
||||
} else {
|
||||
$sql = 'SELECT `CHARACTER_SET_NAME` AS `Charset`,'
|
||||
. ' `DESCRIPTION` AS `Description`'
|
||||
. ' FROM `information_schema`.`CHARACTER_SETS`';
|
||||
}
|
||||
$res = $GLOBALS['dbi']->query($sql);
|
||||
|
||||
self::$_charsets = array();
|
||||
while ($row = $GLOBALS['dbi']->fetchAssoc($res)) {
|
||||
$name = $row['CHARACTER_SET_NAME'];
|
||||
$name = $row['Charset'];
|
||||
self::$_charsets[] = $name;
|
||||
self::$_charsets_descriptions[$name] = $row['DESCRIPTION'];
|
||||
self::$_charsets_descriptions[$name] = $row['Description'];
|
||||
}
|
||||
$GLOBALS['dbi']->freeResult($res);
|
||||
|
||||
@ -91,13 +97,20 @@ class Charsets
|
||||
return;
|
||||
}
|
||||
|
||||
$sql = 'SELECT * FROM information_schema.COLLATIONS';
|
||||
if ($GLOBALS['cfg']['Server']['DisableIS']) {
|
||||
$sql = 'SHOW COLLATION';
|
||||
} else {
|
||||
$sql = 'SELECT `CHARACTER_SET_NAME` AS `Charset`,'
|
||||
. ' `COLLATION_NAME` AS `Collation`, `IS_DEFAULT` AS `Default`'
|
||||
. ' FROM `information_schema`.`COLLATIONS`';
|
||||
}
|
||||
|
||||
$res = $GLOBALS['dbi']->query($sql);
|
||||
while ($row = $GLOBALS['dbi']->fetchAssoc($res)) {
|
||||
$char_set_name = $row['CHARACTER_SET_NAME'];
|
||||
$name = $row['COLLATION_NAME'];
|
||||
$char_set_name = $row['Charset'];
|
||||
$name = $row['Collation'];
|
||||
self::$_collations[$char_set_name][] = $name;
|
||||
if ($row['IS_DEFAULT'] == 'Yes' || $row['IS_DEFAULT'] == '1') {
|
||||
if ($row['Default'] == 'Yes' || $row['Default'] == '1') {
|
||||
self::$_default_collations[$char_set_name] = $name;
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,6 +20,7 @@ class CharsetsTest extends TestCase
|
||||
public function setUp()
|
||||
{
|
||||
$GLOBALS['cfg']['DBG']['sql'] = false;
|
||||
$GLOBALS['cfg']['Server']['DisableIS'] = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -39,6 +39,7 @@ class NormalizationTest extends TestCase
|
||||
$GLOBALS['db'] = 'PMA_db';
|
||||
$GLOBALS['table'] = 'PMA_table';
|
||||
$GLOBALS['server'] = 1;
|
||||
$GLOBALS['cfg']['Server']['DisableIS'] = false;
|
||||
|
||||
//$_SESSION
|
||||
|
||||
|
||||
@ -40,6 +40,7 @@ class OperationsTest extends TestCase
|
||||
$GLOBALS['col_priv'] = true;
|
||||
$GLOBALS['proc_priv'] = true;
|
||||
$GLOBALS['flush_priv'] = true;
|
||||
$GLOBALS['cfg']['Server']['DisableIS'] = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -36,6 +36,7 @@ class RoutinesTest extends TestCase
|
||||
$GLOBALS['server'] = 0;
|
||||
$GLOBALS['PMA_Types'] = new TypesMySQL();
|
||||
$GLOBALS['pmaThemePath'] = $GLOBALS['PMA_Theme']->getPath();
|
||||
$GLOBALS['cfg']['Server']['DisableIS'] = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user