cockroachdb / cockroachdb/cockroach

changefeedccl: json feed double escapes null byte in string

Open
#123,490 1 comment 0 reactions 0 assignees View on GitHub
A-cdc C-bug T-cdc
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Describe the problem**

Please describe the issue you observed, and any steps we can take to reproduce it:

a json changefeed will double escape a null byte in a string as `"\\x00"` instead of `"\u0000"`

**To Reproduce**
```
create table stuff ( id string PRIMARY KEY, data jsonb);
CREATE CHANGEFEED FOR TABLE stuff INTO '...' WITH updated, resolved, format = json;
insert into stuff (id, data) values ('\000'::bytea::string, '{"a": 42}'::jsonb);

# observe the output in your sink of choice
```

Jira issue: CRDB-38376

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.