[MDEV-10728] mysqlbinlog can't be input to mysql client Created: 2016-09-02 Updated: 2020-08-25 Resolved: 2017-11-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Character Sets |
| Affects Version/s: | 5.5, 10.0, 10.1 |
| Fix Version/s: | 10.1.29 |
| Type: | Bug | Priority: | Major |
| Reporter: | Zhoukai Lin | Assignee: | Vesa Pentti (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Sprint: | 10.1.29 |
| Description |
|
I can't replay any of my binlog files even the file have no user events.
|
| Comments |
| Comment by Elena Stepanova [ 2016-09-03 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Could you please run FLUSH BINARY LOGS and after that attach to this issue a couple of the empty binlogs that you cannot replay? Please also paste or attach your cnf file(s) and paste the versions of mysqlbinlog and mysql. Thanks. | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Zhoukai Lin [ 2016-09-05 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
mysql-bin.000018
And I tryed on 10.1.12 version,also can't replay it's own binlog. When I replace 'DELIMITER' to 'delimiter',I can sucessfully replay all binlog files:
| ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2016-09-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
All attached binary logs work just fine for me, without and substitution, both on 10.0.12 and 10.1.12 (and on the current 10.1, too). As I understand, you build your server from sources. Where did you get the source code (git or source tarball)? Are you sure it wasn't modified anyhow? Could you please provide all cmake/build options? Thanks. | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Zhoukai Lin [ 2016-09-07 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
I downloaded the source tarball from https://downloads.mariadb.org ,and haven't modified it. | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Zhoukai Lin [ 2016-09-07 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
When I "export LANG=C" ,binary log worked well
| ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2016-09-07 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks for this, I can reproduce the error now.
To reproduce, It's enough to feed this to MySQL client (built with the options as above, and run in environment with LANG=en_US.utf8):
I'll assign it to the charset expert bar to determine whether it's a bug or expected behavior. | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Julien Fritsch [ 2017-09-11 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
bar confirmed that this is indeed a bug. | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Richard Stracke [ 2017-09-11 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
This error happened with a not self compiled 10.0.21, too. I have the impression, that some byte combination will be interpreted as escape commands even if --binary-mode=1 will be used. | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2017-10-31 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
when fixing it, make sure that ĐĒĹĩḿîţEŘ doesn't suddenly become a valid command | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vesa Pentti (Inactive) [ 2017-11-02 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
To my understanding, in client/mysql.cc:is_delimiter_command(): "DELIMITER" from the input is compared to "delimiter" with utf8_bin collation, which makes the comparison case sensitive, failing to recognize the command. If I understand the code correctly, other commands are parsed always using &my_charset_latin1. It would seem reasonable to do the same for "delimiter". | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2017-11-03 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Vesa, your patch https://github.com/MariaDB/server/commit/9894f9d5a517c27a2c462addbd25bc42cba1749a looks fine. However, it seems find_command() should also be fixed to use &my_charset_latin1 instead of charset_info. Can you also please add tests into mysql-test/t/mysql.test | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2017-11-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Thanks! | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vesa Pentti (Inactive) [ 2017-11-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Result file added. Pushed to 10.1. | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Richard Stracke [ 2017-11-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Is 10.2 not affected ? https://github.com/MariaDB/server/commit/ef4fe2366fc631853f07e14601c3603774f2049b
Code 10.2.10
Richard | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vesa Pentti (Inactive) [ 2017-11-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
For now it's in 10.1, not yet in 10.2. I assume 10.1 fixes will be later merged to 10.2 and 10.3. | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2017-11-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Yes, they absolutely will be. | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Richard Stracke [ 2017-11-07 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
So it will be probably merged with 10.2.11 ? | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2017-11-07 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Yes. It is currently in 10.0-galera branch. |