bug #1143528, Reload MySQL not shown on MySQL 4.1.2
This commit is contained in:
@@ -8,6 +8,7 @@ $Source$
|
|||||||
2005-02-26 Marc Delisle <lem9@users.sourceforge.net>
|
2005-02-26 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* Documentation.html: added FAQ 5.16 about various IE and Windows
|
* Documentation.html: added FAQ 5.16 about various IE and Windows
|
||||||
problems. Thanks to Michael Keck.
|
problems. Thanks to Michael Keck.
|
||||||
|
* main.php: bug #1143528, Reload MySQL not seen on MySQL 4.1.2
|
||||||
|
|
||||||
2005-02-24 Alexander M. Turek <me@derrabus.de>
|
2005-02-24 Alexander M. Turek <me@derrabus.de>
|
||||||
* libraries/grab_globals.lib.php: Fixed the fix, thanks to Marc. :-)
|
* libraries/grab_globals.lib.php: Fixed the fix, thanks to Marc. :-)
|
||||||
|
7
main.php
7
main.php
@@ -179,7 +179,7 @@ if ($server > 0) {
|
|||||||
// can do a 'USE mysql' (even if they cannot see the tables)
|
// can do a 'USE mysql' (even if they cannot see the tables)
|
||||||
$is_superuser = PMA_DBI_try_query('SELECT COUNT(*) FROM mysql.user', $userlink, PMA_DBI_QUERY_STORE);
|
$is_superuser = PMA_DBI_try_query('SELECT COUNT(*) FROM mysql.user', $userlink, PMA_DBI_QUERY_STORE);
|
||||||
|
|
||||||
function PMA_analyseShowGrant($rs_usr, &$is_create_priv, &$db_to_create) {
|
function PMA_analyseShowGrant($rs_usr, &$is_create_priv, &$db_to_create, &$is_reload_priv) {
|
||||||
|
|
||||||
$re0 = '(^|(\\\\\\\\)+|[^\])'; // non-escaped wildcards
|
$re0 = '(^|(\\\\\\\\)+|[^\])'; // non-escaped wildcards
|
||||||
$re1 = '(^|[^\])(\\\)+'; // escaped wildcards
|
$re1 = '(^|[^\])(\\\)+'; // escaped wildcards
|
||||||
@@ -190,6 +190,7 @@ function PMA_analyseShowGrant($rs_usr, &$is_create_priv, &$db_to_create) {
|
|||||||
if (($show_grants_str == 'ALL') || ($show_grants_str == 'ALL PRIVILEGES') || ($show_grants_str == 'CREATE') || strpos($show_grants_str, 'CREATE')) {
|
if (($show_grants_str == 'ALL') || ($show_grants_str == 'ALL PRIVILEGES') || ($show_grants_str == 'CREATE') || strpos($show_grants_str, 'CREATE')) {
|
||||||
if ($show_grants_dbname == '*') {
|
if ($show_grants_dbname == '*') {
|
||||||
$is_create_priv = TRUE;
|
$is_create_priv = TRUE;
|
||||||
|
$is_reload_priv = TRUE;
|
||||||
$db_to_create = '';
|
$db_to_create = '';
|
||||||
break;
|
break;
|
||||||
} // end if
|
} // end if
|
||||||
@@ -215,7 +216,7 @@ function PMA_analyseShowGrant($rs_usr, &$is_create_priv, &$db_to_create) {
|
|||||||
if (PMA_MYSQL_INT_VERSION >= 40102) {
|
if (PMA_MYSQL_INT_VERSION >= 40102) {
|
||||||
$rs_usr = PMA_DBI_try_query('SHOW GRANTS', $userlink, PMA_DBI_QUERY_STORE);
|
$rs_usr = PMA_DBI_try_query('SHOW GRANTS', $userlink, PMA_DBI_QUERY_STORE);
|
||||||
if ($rs_usr) {
|
if ($rs_usr) {
|
||||||
PMA_analyseShowGrant($rs_usr,$is_create_priv, $db_to_create);
|
PMA_analyseShowGrant($rs_usr,$is_create_priv, $db_to_create, $is_reload_priv);
|
||||||
PMA_DBI_free_result($rs_usr);
|
PMA_DBI_free_result($rs_usr);
|
||||||
unset($rs_usr);
|
unset($rs_usr);
|
||||||
}
|
}
|
||||||
@@ -275,7 +276,7 @@ function PMA_analyseShowGrant($rs_usr, &$is_create_priv, &$db_to_create) {
|
|||||||
}
|
}
|
||||||
unset($local_query);
|
unset($local_query);
|
||||||
if ($rs_usr) {
|
if ($rs_usr) {
|
||||||
PMA_analyseShowGrant($rs_usr,$is_create_priv, $db_to_create);
|
PMA_analyseShowGrant($rs_usr,$is_create_priv, $db_to_create, $is_reload_priv);
|
||||||
PMA_DBI_free_result($rs_usr);
|
PMA_DBI_free_result($rs_usr);
|
||||||
unset($rs_usr);
|
unset($rs_usr);
|
||||||
} // end if
|
} // end if
|
||||||
|
Reference in New Issue
Block a user