diff --git a/ChangeLog b/ChangeLog index 76b46fb75..ff8d4668c 100755 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,7 @@ $Source$ 2004-03-05 Marc Delisle * libraries/sqlparser.lib.php: bug 909752, floating point digit + * libraries/sqlparser.lib.php: bug 906551, GRANT...TO 2004-03-03 Marc Delisle * tbl_change.php, tbl_replace_fields.php: bug 907510, invalid diff --git a/libraries/sqlparser.lib.php b/libraries/sqlparser.lib.php index 8351d4aaa..b47f10ac6 100644 --- a/libraries/sqlparser.lib.php +++ b/libraries/sqlparser.lib.php @@ -1835,7 +1835,11 @@ if ($is_minimum_common == FALSE) { // // also we must not be inside a privilege list if ($i > 0) { - if (!$in_priv_list) { + // the alpha_identifier condition is there to + // catch cases like + // GRANT SELECT ON mydb.mytable TO myuser@localhost + // (else, we get mydb.mytableTO ) + if (!$in_priv_list || $typearr[1] == 'alpha_identifier') { $before .= $space_alpha_reserved_word; } } else {