8000 Bug Report: Cannot create a JSON value from a string with CHARACTER SET 'binary' · Issue #18143 · vitessio/vitess · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bug Report: Cannot create a JSON value from a string with CHARACTER SET 'binary' #18143

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Tracked by #17898
L3o-pold opened this issue Apr 9, 2025 · 1 comment
Open
Tracked by #17898

Comments

@L3o-pold
Copy link
Collaborator
L3o-pold commented Apr 9, 2025

Overview of the Issue

Upgrading vttablet to v22.0.0-rc1 resulting in the following error:

SQLSTATE[22032]: <<Unknown error>>: 3144 reverted partial DML execution failure: target: commerce.-80.primary: vttablet: Cannot create a JSON value from a string with CHARACTER SET 'binary'. (errno 3144) (sqlstate 22032) (CallerID: user): Sql: insert into testing(testing, id) values (:v1, :_id_0)", BindVars: {_id_0: "type:VARBINARY value:\"01961a39-20ef-7354-9f74-b645365a0232\""v9: "type:VARBINARY value:\"[]\""}

Reproduction Steps

{
  "sharded": true,
  "vindexes": {
    "hash": {
      "type": "hash"
    },
  "tables": {
    "testing": {
      "column_vindexes": [
        {
          "column": "id",
          "name": "hash"
        }
      ]
    }
  }
}
CREATE TABLE if not exists `testing`
(
    `id`            char(36) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
    `testing`      json DEFAULT NULL,
    PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
insert into `testing` (`id`, `testing`) values ('01961a39-20ef-7354-9f74-b645365a0232', "[]"))

Binary Version

vttablet and mysqlctld on 22.0.0-rc1 
vtgate still on v21.0.3

`mysqlctld version Version: 22.0.0-rc1 (Git revision 1c1f285c896f016a575d45758e5d399b749173e6 branch 'HEAD') built on Tue Apr  8 15:09:35 UTC 2025 by vitess@buildkitsandbox using go1.24.2 linux/amd64`

Operating System and Environment details

docker

Log Fragments

E0409 11:04:33.780638 1 tabletserver.go:1681] Cannot create a JSON value from a string with CHARACTER SET 'binary'. (errno 3144) (sqlstate 22032) (CallerID: user): Sql: "insert into testing(testing, id) values (:v1, :_id_0)", BindVars: {_id_0: "type:VARBINARY value:\"01961a39-20ef-7354-9f74-b645365a0232\""v9: "type:VARBINARY value:\"[]\""}

I do not reproduce with vitess/vttestserver:v22.0.0-rc1-mysql80

@L3o-pold L3o-pold added Needs Triage This issue needs to be correctly labelled and triaged Type: Bug labels Apr 9, 2025
@GuptaManan100 GuptaManan100 added Component: Query Serving and removed Needs Triage This issue needs to be correctly labelled and triaged labels Apr 10, 2025
@L3o-pold
Copy link
Collaborator Author

With updated vtgate it works, but in the case of a cluster update, it's recommended to update vttablet first, and only then vtgate.

dbussink added a commit to dbussink/vitess that referenced this issue Apr 23, 2025 6F43
This reverts part of the binary encoding change to keep encoding as
plain text even for binary data, to stay compatible with the previous
version of Vitess.

This applies only to v22, since on main we're on v23 and that is
compatible with the change in v22 already. This is only a concern during
upgrades.

Fixes vitessio#18143

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
0