Skip to content

Escape 0x00 as \0 #1121

@bgrainger

Description

@bgrainger

As per https://dev.mysql.com/doc/refman/5.7/en/string-literals.html, the NUL byte (0x00, X'00') can be escaped as \0 within a quoted string. MySqlConnector doesn't do this, but sends it as a literal NUL byte.

Some MySQL-compatible servers (in particular SingleStore) may not support this and need it to be escaped, as per these commits:

It should be fairly simple to always escape 0x00 within single-quoted strings if NO_BACKSLASH_ESCAPES isn't set.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions