server icon indicating copy to clipboard operation
server copied to clipboard

MDEV-7451: Duplicate log messages when creating table with partitions

Open HashimSyedUBC opened this issue 1 year ago • 2 comments
trafficstars

  • [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.

HashimSyedUBC avatar Jul 17 '24 19:07 HashimSyedUBC

CLA assistant check
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.

CLAassistant avatar Jul 17 '24 19:07 CLAassistant

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.

HashimSyedUBC avatar Jul 19 '24 18:07 HashimSyedUBC

@holyfoot we have handler::is_root_handler for that

FooBarrior avatar Jun 03 '25 13:06 FooBarrior

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.

holyfoot avatar Jun 23 '25 21:06 holyfoot

We couldn't have waited any longer and implemented a fix ourselves

vuvova avatar Oct 02 '25 11:10 vuvova