maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #11422
Re: Correct parsing of BINLOG 'XXX' with comment inside
Hi Sachin,
On 09/10/2018 03:47 PM, Sachin Setia wrote:
> Hi Bar,
>
> Currently if we have generated the sql file using mysqlbinlog -v and
> if we have big statement binlog
> , then mysqlbinlog add comment in between of Binlog 'XXX' statement ,
> but unfortunately base64_decode
> does not understands it, and it through error since # is not a base64 char
>
> This patches solves this.
Note, base64_decode() is used in at least two places:
- for the binary log
- for the SQL function FROM_BASE64()
I don't like that your patch changes the behavior of the SQL function
FROM_BASE64(). It should not recognize any '#' inside the base64 data
as comments.
So perhaps this should be fixed in some other place, not in base64_decode().
I checked the output of these commands:
./bin/mysqlbinlog ./data/retsina-bin.000003
./bin/mysqlbinlog -vvv ./data/retsina-bin.000003
It looks suspicious for me.
Can you please remind why mysqlbinlog prints multiple base64 chunks
inside the same BINLOG statement?
>From my understanding, it is "mysqlbinlog -vvv" who should be fixed
to print good base64 data inside the string literal that follows the
BINLOG keyword.
At least the additional comments printed by -vvv should be outside of
the BINLOG statement (presumably before), not inside.
Thanks.
Follow ups
References