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

MDEV-23077: flashbacking the update/delete + join statements has some bugs #1674

Open
wants to merge 1 commit into
base: 10.5
Choose a base branch
from

Conversation

lukemakeit
Copy link

  1. Extend the --table --database option of mysqlbinlog to allow --table and --database to support plural values;
  2. Fix bug 2 and bug 3 described by MDEV-23077;

…le and --database to support plural values;

2. Fix bug 2 and bug 3 described by MDEV-23077(https://jira.mariadb.org/browse/MDEV-23077);
@CLAassistant
Copy link

CLAassistant commented Oct 4, 2020

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.

@lukemakeit
Copy link
Author

In 2016 we signed an MCA with the name of Tencent Game DBA Team, and I am one of the team members.
I confirm the code being submitted is offered under the terms of the MCA, and that I am authorized to contribute it.

Copy link
Collaborator

@robertbindar robertbindar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @lukexwang ! Many thanks for submitting a new PR :-) From the point of view of code structure and basic functionality, the patch looks good, all comments from the previous PR seem to be addressed. There are some more minor comments inline below. I'll again leave it to @andrelkin for checking the replication side of the patch, followed by me thoroughly testing it. Good job and thanks again for the contribution!

Indicates whether the given database should be filtered out,
according to the --database=X option.
Indicates whether the given databases should be filtered out,
according to the --database=X or --databases=X1,X2,X3 option.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a residual line from the previous version of the path. No need for --databases anymore right?

if(log_dbname == NULL)
return false;

if (one_database)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to me given your current implementation that we don't need this variable anymore. We can just replace its usage with std::set's .empty() function. Let me know if I'm mistaken.

return false;

if (one_database)
return filter_databases.count(log_dbname) == 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I know std::set's .count() overload that would take a const char* in this situation is only available starting with c++14. Pre c++14, .count() only takes Key type which is std::string in this case. I don't know if c++14 is available on all platforms for the server codebase. @andrelkin can you help me out here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @andrelkin ,I need your help.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Sorry for delay (I thought there's some amount of review work), to the question
https://en.cppreference.com/w/cpp/container/set/count
specifies as c++14 only the template version of the method:

template< class K > size_type count( const K& x ) const; | (2) | (since C++14)

@an3l
Copy link
Collaborator

an3l commented Mar 25, 2021

Hi @lukexwang any update regarding this patch?

@an3l an3l added this to the 10.5 milestone Mar 25, 2021
@LinuxJedi LinuxJedi self-assigned this Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants