I know it's hard to believe this, I wish I'm wrong. But after looking into the code for one week, 
I didn't find any other code change the number. I will go through them again make sure I didn't miss anything.

Thanks for the reply.

On Fri, Jul 22, 2016 at 5:02 PM, Stefan Ring <stefanrin@gmail.com> wrote:
So to sum this up, you claim that PyLong_FromUnsignedLongLong can
somehow produce a number larger than the value range of a 64 bit
number (0x10000000000000180). I have a hard time believing this.

Most likely you are looking in the wrong place, mysql_affected_rows
returns 2^64-1, and some Python code later adds 0x181 to that number.



--
kenshin

http://kenbeit.com
Just Follow Your Heart