MySQL Forums
Forum List  »  NDB clusters

A question about the source code for the developers
Posted by: David Smith
Date: March 25, 2016 03:29AM

Hi,I am currently reviewing the source code of DblqhMain.cpp and have found the following piece of code that I don't understand:

if (seqNoReplica == 0 || activeCreat == Fragrecord::AC_NR_COPY)
{
jam();
commitReplyLab(signal);
return;
}//if
if (seqNoReplica == 0)
{
jam();
completeTransLastLab(signal);
}

inside the function Dblqh::tupcommit_conf(Signal* signal,
TcConnectionrec * tcPtrP,
Fragrecord * regFragptr)

It seems the second 'if' never gets a chance to be executed unless the '||' operator in the first 'if' is not the regular Logical OR, but an overloaded operator defined by MySQL Cluster. I can't find such an definition in the file though.

Could the developer please explain what is going on here? I have seen similar construct in DbtcMain.cpp too, so it seems I have missed something...The version I am using is gpl-7.4.10

Thanks,
David

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.