Re: f3aa4d0a215: MDEV-29447 MDEV-26285 MDEV-31338 Refactor spider_db_mbase_util::open_item_func

Hi, Yuchen, On Jun 20, Yuchen Pei wrote:
As I wrote in the first review, please, don't mention transient commit hashes in a permanent commit comment. This commit will, supposedly, be pushed into the main branch. While 3836098c29ef1 will, on the other hand, disappear, as it's not in any of the main branches. You'll have a dangling pointer
Signed-off-by: Yuchen Pei <yuchen.pei@mariadb.com>
also, it looks strange to sign-off your own commits
Why did you removed this and not the #else part?
Regards, Sergei VP of MariaDB Server Engineering and security@mariadb.org

Hi Sergei, Thanks for the comments. See below see my response and I have posted the url to the updated patch in the ticket. On Tue 2023-06-20 17:04:50 +0200, Sergei Golubchik wrote:
Done.
Signed-off-by: Yuchen Pei <yuchen.pei@mariadb.com>
also, it looks strange to sign-off your own commits
I thought I needed this for gpg sign, but just learned they are two different things. So I have removed the sign-off. By the way why is it strange to sign-off own commits?
This is part of MDEV-29269. It was a done task with a fixversion 11.0+, but there's no reason the same change shouldn't be in earlier versions. This is one of the redundant #ifdefs, where the flag is deterministically 0 or 1 (see MDEV-26178 for more context). In this case ITEM_FUNC_TIMESTAMPDIFF_ARE_PUBLIC is always undefined, so we remove the #if part and keep the #else part.
Best, Yuchen

Hi, Yuchen, On Jun 21, Yuchen Pei wrote:
I somehow percieved it as someone prepares the commit and someone _else_ signs it off. But ok, whatever you prefer, we don't rely on Signed-off having any particular value, so you can use it as you want.
But it was *incorrectly* undefined. It was waiting for spider to have access to item_func_timestamp_diff->int_type, which was private at some point. It is private still, but there's an accessor and spider can perfectly use switch (item_func_timestamp_diff->get_int_type()) there's no reason to remove all that code neither in 10.4 nor in 11.0

Hi Sergei, Thanks for the comment, see the new comment in the ticket for the new patch url. On Wed 2023-06-21 15:11:01 +0200, Sergei Golubchik wrote:
I see, I have reinstated the ifdef and updated the check_item_func() accordingly. I will update the patch for other server versions after the review is done. Since this patch should focus on the conservative refactoring while fixing MDEV-29447 and MDEV-31338, I will do the removal of the flag and keeping the ifdef branch etc. in a separate patch, probably for MDEV-30504. Best, Yuchen
participants (2)
-
Sergei Golubchik
-
Yuchen Pei