[MDEV-25222] mysqlbinlog --base64-output wrong option default drops BINLOG from output Created: 2021-03-22 Updated: 2021-05-25 Resolved: 2021-05-19 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Affects Version/s: | 10.2 |
| Fix Version/s: | 10.6.1, 10.5.11 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Xiyi Zhu | Assignee: | Brandon Nesterenko |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
CentOS 7 |
||
| Sub-Tasks: |
|
| Description |
|
Is this bug already fixed on 10.2.36? https://bugs.mysql.com/bug.php?id=20929 Thanks |
| Comments |
| Comment by Andrei Elkin [ 2021-03-23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
hyphen1370: Hi. Most probably it was fixed. I have not seen a similar stack for a long time. I could find anything that fits to the oracle bug stack in Jira. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2021-03-23 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MariaDB 10.2-10.6 with --base64-output option mysqlbinlog returns output, that cannot not be parsed by mysql client (will return syntax error). mysqlbinlog v.3.3 (in 10.2) returns a warning, but option is still not deprecated, while in 3.5 there is no warning, but otherwise the same behaviour. With --base64-output=auto works as expected
example of the output:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Xiyi Zhu [ 2021-04-02 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks. I am using 10.2.37 and tried to restore a binlog with -d option, which requested to use this option by the product call "CommVault". There is the command they use: mysqlbinlog -d "act" /opt/commvault/iDataAgent64/jobResults/test/mysql-bin.012176 --result-file="/tmp/test7.sql" However, when using same command without -d option, it contains the "BINLOG" keyword and I restored the result file. I have uploaded mysql-bin.012176 to the ftp private folder. Could you take a look? Thanks | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrei Elkin [ 2021-04-05 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
hyphen1370, -d option does not cause the loss of BINLOG ' prefix, the argument-less base64-output and base64-output=always do, as my colleague reported. To help you fast, make sure to not pass neither of the two to mysqlbinlog also implicitly through my.cnf. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrei Elkin [ 2021-04-05 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
sachin.setiya.007: --base64-output must have 'auto' default which is not the case now. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Xiyi Zhu [ 2021-05-03 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
mysqlbinlog -d "act" /opt/commvault/iDataAgent64/jobResults/test/mysql-bin.012176 --base64-output=auto --result-file="/tmp/test7.sql" still returned statement without binlog keyword, any other sugguestion? Thanks | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrei Elkin [ 2021-05-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
hyphen1370, To provide your version I have just tested against 10.2.36 that you were interested in the description, to NOT confirm --base64-output=auto works incorrectly. It works fine. Here is an example of well-formed output (I cut off unneeded head and tail parts of the total output).
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2021-05-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Elkin, is that a bug at all? I've run mysqlbinlog -vv --base64-output=auto mysql-bin.012176 — there were no row events in the database act, only table map events. So it's no surprise, that -d act shows nothing — because there is nothing. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrei Elkin [ 2021-05-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
serg, --base64-output=always, or just --base64-output - both has been planned for deprecation are buggy to produce unparsable output. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Brandon Nesterenko [ 2021-05-12 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Andrei, I have implemented your suggested MTR test to compare --base64-output=auto against no specification. The full patch is here The buildbot link is here | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrei Elkin [ 2021-05-14 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Could you please compose summaries for each of the remained option values for 10.6. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Brandon Nesterenko [ 2021-05-18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Fix is implemented in 10.5.11 with no merge conflict observed when cherry-picking to 10.6. 10.6 Patch: https://github.com/MariaDB/server/commit/13e782eb84441d0c2ba1ce9d0109a7534d1995fa Documentation updates for 10.6 to come. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Brandon Nesterenko [ 2021-05-19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MySQL 8.0 removed the 'always' option from --base64-output, and this fix follows that trend and removed the option from MariaDB. Additionally, now when --base64-output is specified, a value must be specified with it. When the flag is provided without a value, an error is presented. |