Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dumping events is not skipping definer #276

Open
lugb2 opened this issue Feb 15, 2024 · 2 comments
Open

Dumping events is not skipping definer #276

lugb2 opened this issue Feb 15, 2024 · 2 comments
Assignees

Comments

@lugb2
Copy link

lugb2 commented Feb 15, 2024

We need to skip the definer information when dumping triggers, functions and events. But, when set 'events' to 'true' for event structure, it doesn't skip the definer. We found a solution by adjusting the regex in the function that creates events and made a pr with the fix (#274). We are also opening an issue to provide a clearer explanation. We hope this will be addressed soon.

Thanks!

@ifsnop
Copy link
Owner

ifsnop commented Sep 20, 2024

Thanks for your contribution, could you provide a test, so I can check the new regex does what is meant to do?

@ifsnop ifsnop self-assigned this Sep 20, 2024
@lugb2
Copy link
Author

lugb2 commented Sep 20, 2024

You're welcome! I reviewed the existing tests, and test012 closely resembles mine, but there was no event creation in the SQL. I edited the test012.src.sql file by adding a simple CREATE EVENT. When tested with the adjusted regex, the definer is correctly skipped; otherwise, it is still being set in the CREATE EVENT statement.

I noticed that test012 also deals with the definer, but it may not have caught the issue earlier because there was no event. With this change, I hope the test will now work as expected. Please let me know if you'd like further adjustments!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants