[MDEV-25369] mysqlbinlog (mariadb-binlog) -T/--table option Created: 2021-04-08 Updated: 2023-09-11 Resolved: 2023-09-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | 10.4.18, 10.5.9 |
| Fix Version/s: | 10.4.32, 10.5.23, 10.6.16, 10.10.7, 10.11.6, 11.0.4, 11.1.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | V H Lemoine | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Ubuntu 18.04 / Ubuntu 20.04 |
||
| Description |
|
option --table=tablename for mysqlbinlog is shown in mysqlbinlog --help but not documented online. Specifying this option does not seem to select SQL statements for the specified table. What is the purpose of this option and what should it do? 2023 08 16 - If, according to the current documentation (--table (-T)), list entries for just this table (local log only). Then this is a straight-up bug rather than a documentation bug. Current behavior, when satisfying all conditions (using a local binary log file), is that it is failing to filter for the table given. It is effectively ignoring -T. |
| Comments |
| Comment by Alice Sherepa [ 2021-04-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This option was added to mysqlbinlog during the work on the flashback feature https://mariadb.com/kb/en/flashback/. (
So -vv --table=X will have dml for table X +all ddl, while --flashback --table=X only inverted dml for the table X (INSERT to DELETE, DELETE to INSERT, and for UPDATEs the before and after images are swapped). For example:
mysqlbinlog -v --table=t1
with --flashback --table=t1 we have update and then delete:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ian Gilfillan [ 2021-04-14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Added the brief mention in the man page on Knowlendge Base, I'll leave this open to incorporate a longer description at some point | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2023-08-17 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I've clarified the help text to match the alice comment above |