Skip to content

Commit

Permalink
fix: empty definer when editing a view, fixes #437
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio286 committed Sep 15, 2022
1 parent 01f607c commit 498a9b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/libs/clients/MySQLClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ export class MySQLClient extends AntaresCore {

return {
algorithm: algorithm[0]['Create View'].match(/(?<=CREATE ALGORITHM=).*?(?=\s)/gs)[0],
definer: viewInfo[0].DEFINER,
definer: viewInfo[0].DEFINER.split('@').map((str: string) => `\`${str}\``).join('@'),
security: viewInfo[0].SECURITY_TYPE,
updateOption: viewInfo[0].CHECK_OPTION === 'NONE' ? '' : viewInfo[0].CHECK_OPTION,
sql: viewInfo[0].VIEW_DEFINITION,
Expand Down

0 comments on commit 498a9b4

Please sign in to comment.