server
server copied to clipboard
MDEV-7451: Duplicate log messages when creating table with partitions
- [x] The Jira issue number for this PR is: MDEV-7451
Description
Prevent duplicate log entries when creating partitioned tables by adding a boolean flag, is_partition, to the notify function. Avoid calling auditing for each partition to eliminate redundant TABLE event logs.
All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc.
Release Notes
N/A
How can this PR be tested?
Added tests in server_audit.test that ensure that creating tables with partitions results in no more than 1 log message. All mtr tests pass.
Basing the PR against the correct MariaDB version
- [x] This is a bug fix and the PR is based against the earliest maintained branch in which the bug can be reproduced.
PR quality check
- [x] I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
- [x] For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Looks good for me. As this is a bug fix, it should go into the oldest maintained release, which is 10.5.
Can you please rebase to that? (we might be able to do it if you cannot)
I have just rebased it to 10.5. Thank you for the clarification.
@holyfoot we have handler::is_root_handler for that
Dear Hashim! We'd like to have this issue fixed in the next release, so if you won't update this patch with my last suggestion, after July 15-th i'm going to do that myself otherwise it'll miss the release.
We couldn't have waited any longer and implemented a fix ourselves