1.29.1_arenadata6
deart2k
released this
04 Aug 11:22
·
281 commits
to master
since this release
Backup privilege statements as separate entries (#31) Before patch, all privilege statements placed in metadata file as one pre-data section entry. `editStatementsRedirectSchema()`, used by schema redirection, replace only first schema name occurrence in entry. This caused a bug - only first privilege statement was modifed. This, in turn, caused vaious errors. `gprestore`, used on same database, applied most of privilege statements to original schema. Or, when used on different database, caused `schema does not exist` error. From now, `GetPrivilegesStatements()` returns a set of separate statements, which later used as separate entries. `strings.TrimSpace()` was removed as all statements are already trimmed. Existed tests were modified as separate entries have different format. New test shows correct privilege applying.