Fix merge conflicts

This commit is contained in:
Marc Delisle 2013-11-27 12:41:01 -05:00
commit fbce9502e4
2 changed files with 10 additions and 1 deletions

View File

@ -69,6 +69,7 @@ phpMyAdmin - ChangeLog
- bug #4075 Support A10 Networks load balancer
- bug #4083 row deleting isn't binlogs friendly
- bug #4163 Setup script does not recognize manually-configured server
- bug #4158 Events page says no privileges with ALL PRIVILEGES
4.0.9.0 (2013-11-04)
- bug #4104 Can't edit updatable view when searching

View File

@ -3849,7 +3849,15 @@ class PMA_Util
// (wildcard characters appear as being quoted with a backslash
// when querying TABLE_SCHEMA.SCHEMA_PRIVILEGES)
$db = str_replace(array('%', '_'), array('\%', '\_'), $db);
$query .= " AND TABLE_SCHEMA='%s'";
/*
* This is to take into account a wildcard db privilege
* so we replace % by .* and _ by . to be able to compare
* with REGEXP.
*
* Also, we need to double the inner % to please sprintf().
*/
$query .= " AND '%s' REGEXP"
. " REPLACE(REPLACE(TABLE_SCHEMA, '_', '.'), '%%', '.*')";
$schema_privileges = $GLOBALS['dbi']->fetchValue(
sprintf(
$query,