[MDEV-23846] O_TMPFILE error in mysqlbinlog stream output breaks restore Created: 2020-09-29 Updated: 2021-08-25 Resolved: 2020-11-24 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Admin statements, Replication |
| Affects Version/s: | 10.4.11 |
| Fix Version/s: | 10.4.18, 10.5.9 |
| Type: | Bug | Priority: | Major |
| Reporter: | Kyle Joiner (Inactive) | Assignee: | Sujatha Sivakumar (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
RHEL |
||
| Issue Links: |
|
||||||||
| Description |
|
When O_TMPFILE is not supported mysqlbinlog outputs the error to standard stream as a warning which breaks PITR: ERROR 1064 (42000) at line 382: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mysqlbinlog: O_TMPFILE is not supported on /tmp (disabling future attempts) |
| Comments |
| Comment by Sujatha Sivakumar (Inactive) [ 2020-10-06 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Reproduced the issue on 10.5. test-10.5/bld/mysql-test$ ../client/mysqlbinlog ./var/mysqld.1/data/master-bin.000001 -v -v > test.sql Will have to reproduce the same on lower version as well. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sujatha Sivakumar (Inactive) [ 2020-10-08 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
During the process of decoding the binary log using 'mysqlbinlog', the client
The file creation is done without O_TMPFILE' flag, hence it doesn't alter
Restore operation also works fine. Please find the following test results
Generate 'test.sql' file:
Start mysql client and drop the table 't'. Restore the test.sql file.
Source 'test.sql' to mysql client.
From support case, found the following information:
Users should not use '2>&1'. With this redirection, the information displayed on screen gets written to 'test.sql'. Incorrect usage: mysqlbinlog -u**** -p --start-position=397 --base64-output=decode-rows bin_log.000404 > /mariadb/backup/test.sql 2>&1 Hence it is not a bug. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sujatha Sivakumar (Inactive) [ 2020-10-30 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hello ccalender I verified once again and observed that message '../client/mysqlbinlog: O_TMPFILE is not supported on /tmp (disabling future attempts)' doesn't break point-in-time recovery. Database is restored to expected state.
is an informative message which gets printed on output screen, it is not an error as mentioned in https://jira.mariadb.org/browse/MDEV-22202. Another observation from customer's data is "--base64-ouput=decode-rows" option is provided for 'mysqlbinlog' tool as shown below. This option suppresses BINLOG statements and does not print anything. Hence the resulting sql file cannot be used for point in time recovery.
Can you please let us know if customer observed any data loss during binlog replay? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sujatha Sivakumar (Inactive) [ 2020-11-19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hello Elkin I have implemented a patch to suppress the note, as per ccalender requirement. Please review the changes: https://github.com/MariaDB/server/commit/99e160d3ddf077ece968932e26f741a7a43f0243 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sujatha Sivakumar (Inactive) [ 2020-11-20 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hello danblack Can you please review the following changes for Patch: https://github.com/MariaDB/server/commit/99e160d3ddf077ece968932e26f741a7a43f0243 Thank you. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Black [ 2020-11-21 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Looks good to me. I accept this change. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sujatha Sivakumar (Inactive) [ 2020-11-24 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Fix implemented in 10.4.18 Patch tested on higher versions. 10.5: https://github.com/MariaDB/server/commit/41970d89d88ff318673414d4ae02f1a380415250 |