pingcap / pingcap/tidb

ddl: if the DDL is a noop, add logging to explain the reason

Open
#60,464 0 comments 1 reaction 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement

```
create table tt (sessionid varchar(100) collate utf8mb4_unicode_ci not null, primary key (sessionid)) default charset=utf8mb4 collate=utf8mb4_unicode_ci;

-- The current **collate** of the table is already 'utf8mb4_unicode_ci', so this DDL operation is a noop.
alter table tt default character set utf8mb4 collate utf8mb4_unicode_ci;
```

There is no change for this query . And there are no record when execute 'admin show ddl jobs'.
In tidb.log , there is no logs except this ddl-query.

Actually can we log a message saying that the DDL statement does nothing for easy debugging?

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.