Skip to content
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

The actual length of stored value is longer than the definition of QUERY column in the DDL_JOBS table #42440

Closed
Mini256 opened this issue Mar 21, 2023 · 0 comments · Fixed by #42536
Assignees
Labels
affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.0 affects-6.1 affects-6.2 affects-6.3 affects-6.4 affects-6.5 affects-6.6 affects-7.0 severity/minor sig/sql-infra SIG: SQL Infra type/bug This issue is a bug.

Comments

@Mini256
Copy link
Member

Mini256 commented Mar 21, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

ecommerce> show create table information_schema.ddl_jobs\G
***************************[ 1. row ]***************************
Table        | DDL_JOBS
Create Table | CREATE TABLE `DDL_JOBS` (
  `JOB_ID` bigint(21) DEFAULT NULL,
  `DB_NAME` varchar(64) DEFAULT NULL,
  `TABLE_NAME` varchar(64) DEFAULT NULL,
  `JOB_TYPE` varchar(64) DEFAULT NULL,
  `SCHEMA_STATE` varchar(64) DEFAULT NULL,
  `SCHEMA_ID` bigint(21) DEFAULT NULL,
  `TABLE_ID` bigint(21) DEFAULT NULL,
  `ROW_COUNT` bigint(21) DEFAULT NULL,
  `CREATE_TIME` datetime DEFAULT NULL,
  `START_TIME` datetime DEFAULT NULL,
  `END_TIME` datetime DEFAULT NULL,
  `STATE` varchar(64) DEFAULT NULL,
  `QUERY` varchar(64) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
1 row in set
Time: 0.335s
ecommerce> select length(query) from information_schema.ddl_jobs;
(1105, 'should ensure all columns have the same length, expect 29, but got 35')

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

Maybe the type of query column should be TEXT / LONGTEXT.

3. What did you see instead (Required)

The QUERY column stores DDL statements that are significantly longer than 64 characters in length.

4. What is your TiDB version? (Required)

***************************[ 1. row ]***************************
tidb_version() | Release Version: v6.6.0-serverless
Edition: Community
Git Commit Hash: ba65916645254bc350c5f815eb9521981015e607
Git Branch: release-6.6-serverless
UTC Build Time: 2023-03-13 09:34:56
GoVersion: go1.19.4
Race Enabled: false
TiKV Min Version: 6.1.0
Check Table Before Drop: false
Store: tikv
1 row in set
Time: 0.272s
@Mini256 Mini256 added the type/bug This issue is a bug. label Mar 21, 2023
@tiancaiamao tiancaiamao added the sig/sql-infra SIG: SQL Infra label Mar 23, 2023
@tiancaiamao tiancaiamao self-assigned this Mar 23, 2023
@tiancaiamao tiancaiamao added severity/minor affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.0 affects-6.1 affects-6.2 affects-6.3 affects-6.4 affects-6.5 affects-6.6 affects-7.0 labels Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-5.0 This bug affects 5.0.x versions. affects-5.1 This bug affects 5.1.x versions. affects-5.2 This bug affects 5.2.x versions. affects-5.3 This bug affects 5.3.x versions. affects-5.4 This bug affects 5.4.x versions. affects-6.0 affects-6.1 affects-6.2 affects-6.3 affects-6.4 affects-6.5 affects-6.6 affects-7.0 severity/minor sig/sql-infra SIG: SQL Infra type/bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants