-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
Hi, i have a table where i storing IDs as binary UUIDs:
CREATE TABLE `test` (`id` binary(16) NOT NULL, PRIMARY KEY (`id`));When i insert a new row with binary UUID which has a zero at the end:
INSERT INTO test (id) VALUES (UUID_TO_BIN('1f0727b7-2cc9-6910-920c-b12f2d100600'));Maxwell provides a following JSON:
{"database":"app","table":"test","type":"insert","ts":1756363904,"xid":97707,"commit":true,"data":{"id":"HwcntyzJaRCSDLEvLRAG"}}Notice the value HwcntyzJaRCSDLEvLRAG. Now let's try to base64 encode the binary UUID on the MySQL side:
SELECT BIN_TO_UUID(id), to_base64(id) FROM test;->
| BIN_TO_UUID(id) | to_base64(id) |
|---|---|
| 1f0727b7-2cc9-6910-920c-b12f2d100600 | HwcntyzJaRCSDLEvLRAGAA== |
After some investigation i found that HwcntyzJaRCSDLEvLRAG corresponds to 1f0727b7-2cc9-6910-920c-b12f2d1006 (without last zero byte).
So, Maxwell is cut the last byte in case of it's value is zero. I suppose Maxwell treat the last zero byte as the "null char".
I'm using maxwell v1.44.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels