oracle-ee-19c
debezium 2.5.2 (oracle)
I created table like below.
=================================sql
create table t_cdc_multikey(
id number,
code char(2),
c1 varchar2(50),
constraint pk_cdc_multikey primary key (id, code)
);
==================================
there are some data in oracle.. and I updated a row for streaming test.
First, I update a row with only id not (id, code). oracle debezium made a message like this.
================================================ sql
update t_cdc_multikey set c1='who r u?' where id = 100001;
================================================= message
"payload": {
"before": {
"ID": {
"scale": 0,
"value": "AA=="
},
"CODE": "",
"C1": "Hello world!"
},
"after": {
"ID": {
"scale": 0,
"value": "AA=="
},
"CODE": "",
"C1": "who r u?"
},
====================================
as you can see, There is no code value on the message and id value is 0 not 100001..
on the other hand, I update the row with (id,.code). it's same..
================================ sql
"payload": {
"before": {
"ID": {
"scale": 0,
"value": "AA=="
},
"CODE": "",
"C1": "who r u?"
},
"after": {
"ID": {
"scale": 0,
"value": "AA=="
},
"CODE": "",
"C1": "exhausted.."
},
========================
And i deleted it. (id, code) value enter it normally.
===============================
delete from t_cdc_multikey where id=100001 and code='C';
==============================
"payload": {
"before": {
"ID": {
"scale": 0,
"value": "AYah"
},
"CODE": "C ",
"C1": "exhausted.."
},
"after": null,
=====================================
I am testing on more time.. insert & update
but this time i update with multi key.
=============================
insert into t_cdc_multikey values(100001, 'C', 'Hello world!')
=============================
"payload": {
"before": null,
"after": {
"ID": {
"scale": 0,
"value": "AYah"
},
"CODE": "C ",
"C1": "Hello world!"
},
==============================
update t_cdc_multikey set c1='one more time' where id = 100001 and code='C';
=============================
"payload": {
"before": {
"ID": {
"scale": 0,
"value": "AA=="
},
"CODE": "",
"C1": "Hello world!"
},
"after": {
"ID": {
"scale": 0,
"value": "AA=="
},
"CODE": "",
"C1": "one more time"
},
======================================
insert message was made successfully.
but, update query didn't make (id, code) value...
i don't think it's intended. it's bug or something and quite critical.
Did you test older version similar with this?
If i downgrade a debezium version, is it not happened?