Skip to content

Add support for COMMENT ON COLUMN in Mysql connector #25544

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

Closed
wants to merge 1 commit into from

Conversation

codeDing18
Copy link
Contributor

@codeDing18 codeDing18 commented Apr 10, 2025

Description

related to #5333

Release notes

## MySQL
* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label Apr 10, 2025
@github-actions github-actions bot added the mysql MySQL connector label Apr 10, 2025
Copy link
Member

@ebyhr ebyhr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current implementation will silently change some column attributes (e.g., CHARACTER SET). Please add tests for all attributes.

@codeDing18 codeDing18 force-pushed the mysql-column-comment branch 3 times, most recently from 88f39e1 to 0595125 Compare April 13, 2025 05:11
@codeDing18 codeDing18 force-pushed the mysql-column-comment branch from 0595125 to 41cf90b Compare April 13, 2025 08:25
}));

// MySQL 8.0.13 starts to support DEFAULT value for JSON datatype
if (columnInfo.get("COLUMN_TYPE").equalsIgnoreCase("json") && !columnInfo.get("COLUMN_DEFAULT").isEmpty()) {
Copy link
Member

@ebyhr ebyhr Apr 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These logic are fragile - it will easily break if MySQL adds a new column attribute. I lean toward unsupporting the syntax in the connector.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi,I think that even if mysql adds a new column attribute,it should not change the meaning of the existing column attribute, and it is also need to determine whether the new column attribute is needed when modifying column attribute, because we do not need all column attributes in information_schema.columns when modifying column attribute.

@codeDing18 codeDing18 closed this Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed mysql MySQL connector
Development

Successfully merging this pull request may close these issues.

2 participants