Merge pull request #1934 from SamYaple/refix_bug_1226
Refix bug 1226 after revert
This commit is contained in:
commit
8841c85505
1 changed files with 4 additions and 6 deletions
|
@ -320,12 +320,10 @@ def privileges_unpack(priv):
|
|||
privs = []
|
||||
for item in priv.strip().split('/'):
|
||||
pieces = item.strip().split(':')
|
||||
if '.' in pieces[0]:
|
||||
pieces[0] = pieces[0].split('.')
|
||||
for idx, piece in enumerate(pieces):
|
||||
if pieces[0][idx] != "*":
|
||||
pieces[0][idx] = "`" + pieces[0][idx] + "`"
|
||||
pieces[0] = '.'.join(pieces[0])
|
||||
dbpriv = pieces[0].rsplit(".", 1)
|
||||
# Do not escape if privilege is for database '*' (all databases)
|
||||
if dbpriv[0].strip('`') != '*':
|
||||
pieces[0] = "`%s`.%s" % (dbpriv[0].strip('`'), dbpriv[1])
|
||||
|
||||
if '(' in pieces[1]:
|
||||
output[pieces[0]] = re.split(r',\s*(?=[^)]*(?:\(|$))', pieces[1].upper())
|
||||
|
|
Loading…
Add table
Reference in a new issue