Skip to content

Conversation

subkanthi
Copy link
Collaborator

@subkanthi subkanthi commented May 20, 2025

closes: #445

Base automatically changed from 2.7.0 to develop July 1, 2025 16:47
@subkanthi subkanthi changed the base branch from develop to 2.8.0 July 21, 2025 01:56
@subkanthi
Copy link
Collaborator Author

In config.yml , set replication.history.enable and tablename_history table should be created.

id:           4365
k:            51
c:            99022307333-10188539766-42634368003-68656703148-26040804188-61448793114-98824255268-41634584544-82235413607-83885007617
pad:          07084203427-45451027820-39745528398-34769907825-31773967836
database:     chtest
table:        sbtest1_history
_raw:         {"pad":"07084203427-45451027820-39745528398-34769907825-31773967836","c":"99022307333-10188539766-42634368003-68656703148-26040804188-61448793114-98824255268-41634584544-82235413607-83885007617","id":4365,"k":51}
_time:        1755780070516
is_deleted:   0
operation:    C
_version:     1958509683341848248
host:         842
logfile:      mysql-bin.000005
position:     1993579
primary_host: 842

@subkanthi
Copy link
Collaborator Author

subkanthi commented Aug 21, 2025

Update
mysql> update sbtest1 set k=58 where id=10898;

SELECT *
FROM sbtest1_history
WHERE operation = 'U'
FORMAT Vertical

Query id: 2be563e4-1a90-4c58-aa0f-acb87e10dc16

Row 1:
──────
id:           10898
k:            58
c:            72616493611-37639515120-39176354221-58117893876-55043098657-86928244787-89375086090-38556584325-80717369548-13870408451
pad:          05618765886-23396323074-56299848176-69078125393-67528062378
database:     chtest
table:        sbtest1_history
_raw:         {"pad":"05618765886-23396323074-56299848176-69078125393-67528062378","c":"72616493611-37639515120-39176354221-58117893876-55043098657-86928244787-89375086090-38556584325-80717369548-13870408451","id":10898,"k":58}
_time:        1755780550582
is_deleted:   1
operation:    U
_version:     1958511696884598991
host:         842
logfile:      mysql-bin.000005
position:     5192829
primary_host: 842

Row 2:
──────
id:           10898
k:            58
c:            72616493611-37639515120-39176354221-58117893876-55043098657-86928244787-89375086090-38556584325-80717369548-13870408451
pad:          05618765886-23396323074-56299848176-69078125393-67528062378
database:     chtest
table:        sbtest1_history
_raw:         {"pad":"05618765886-23396323074-56299848176-69078125393-67528062378","c":"72616493611-37639515120-39176354221-58117893876-55043098657-86928244787-89375086090-38556584325-80717369548-13870408451","id":10898,"k":58}
_time:        1755780550582
is_deleted:   1
operation:    U
_version:     1958511696884598991
host:         842
logfile:      mysql-bin.000005
position:     5192829
primary_host: 842

BINLOG TABLE
history tables will reside in a separate database(history) with the same source table.
Binlog table(1 single table) will have the columns (ddl)

database, table, _raw , _time, is_deleted, _operation,  _version, _host, log_file, _position, _primary_host

@subkanthi
Copy link
Collaborator Author

Delete

mysql> delete from sbtest1 where id=10898;

SELECT *
FROM sbtest1_history
WHERE operation = 'D'
FORMAT Vertical

Query id: 129e686b-92d9-45f9-82b5-34f779112782

Row 1:
──────
id:           10898
k:            58
c:            72616493611-37639515120-39176354221-58117893876-55043098657-86928244787-89375086090-38556584325-80717369548-13870408451
pad:          05618765886-23396323074-56299848176-69078125393-67528062378
database:     chtest
table:        sbtest1_history
_raw:         {"pad":"05618765886-23396323074-56299848176-69078125393-67528062378","c":"72616493611-37639515120-39176354221-58117893876-55043098657-86928244787-89375086090-38556584325-80717369548-13870408451","id":10898,"k":58}
_time:        1755781045612
is_deleted:   255
operation:    D
_version:     1958513773190908112
host:         842
logfile:      mysql-bin.000005
position:     5193499
primary_host: 842

1 row in set. Elapsed: 0.003 sec. Processed 71.00 thousand rows, 710.56 KB (23.33 million rows/s., 233.45 MB/s.)
Peak memory usage: 388.96 KiB.

@subkanthi subkanthi closed this Sep 7, 2025
@subkanthi subkanthi reopened this Sep 7, 2025
@subkanthi subkanthi closed this Sep 8, 2025
@subkanthi subkanthi reopened this Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant