Fixed bug #549887 - Db name with "\_" changed when granting

This commit is contained in:
Loïc Chapeaux 2002-04-29 19:34:16 +00:00
parent 4465f15544
commit 724ddddd51

View File

@ -1340,7 +1340,7 @@ else if (isset($grants) && $grants) {
// Escape wilcard characters if required
if (isset($dbgrant) && !$anydb && !$newdb) {
$re = '(^|(\\\\\\\\)+|[^\])(_|%)'; // non-escaped wildcards
$dbgrant = ereg_replace($re, '\\\\3', $dbgrant);
$dbgrant = ereg_replace($re, '\\1\\\\3', $dbgrant);
}
if (!$newdb) {