Skip to content

Change a json column using DML statements will lead to change of the column meta data #19701

Closed
@zyguan

Description

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Enable amend transaction by set tidb_enable_amend_pessimistic_txn to 1, and execute following sql

/* INIT */ drop table if exists t;
/* INIT */ create table t (id int primary key, c_json json);
/* INIT */ insert into t values (1, '{"k": 1}');
/* TXN */ begin;
/* DDL */ alter table t rename column c_json to cc_json;
/* TXN */ update t set c_json = '{"k": 2}' where id = 1;
/* TXN */ commit;

2. What did you expect to see? (Required)

Transaction should be committed successfully.

3. What did you see instead (Required)

Error 8028: Information schema is changed during the execution of the statement(for example, table definition may be updated by other DDL ran in parallel). If you see this error often, try increasing `tidb_max_delta_schema_count`. [try again later]

4. What is your TiDB version? (Required)

master @ a363130

SIG slack channel

#sig-exec

Score

  • 300

Mentor

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions