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

fix(db-browser): cannot get table charset in native mysql mode #592

Merged

Conversation

PeachThinking
Copy link
Collaborator

@PeachThinking PeachThinking commented Oct 24, 2023

What type of PR is this?

type-bug
module-Database object

What this PR does / why we need it:

  1. Fix cannot get table charset in native mysql mode. OB mysql get table charset by DBSchemaAccessorUtil#obtainOptionsByParse which is not work for native mysql mode.
    we can get table by parse table ddl in both mysql and ob mysql mode. add obtainOptionsByParser method and use it to get table options.

  2. optimize DBSchemaAccessor ut test by create private static DBSchemaAccessor accessor

  3. fix @Ignore("TODO: fix this test case") ut test. I consulted kernel classmates and found that the comment field of the information_schema.STATISTICS table and the comment field of the show index from query have different sources and meanings. The comment field of information_schema.STATISTICS cannot be used to indicate the status of the index, so for Map<String, List<DBTableIndex >> listTableIndexes(String schemaName); method does not query whether the index is available. Actually only the List<DBTableIndex> listTableIndexes(String schemaName, String tableName) method needs to provide the available status of the index.

Which issue(s) this PR fixes:

Fixes #582

Special notes for your reviewer:

Additional documentation e.g., usage docs, etc.:


@PeachThinking PeachThinking added type-bug Something isn't working priority-high module-Database object Table/View/Type/Function/Procedure/Package/Synonym/Constraint/Index labels Oct 24, 2023
@PeachThinking PeachThinking added this to the ODC 4.2.2 milestone Oct 24, 2023
@PeachThinking PeachThinking self-assigned this Oct 24, 2023
Copy link
Contributor

@yhilmare yhilmare left a comment

Choose a reason for hiding this comment

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

lgtm

@yhilmare yhilmare merged commit 646ccda into dev/4.2.2 Oct 24, 2023
19 checks passed
@yhilmare yhilmare deleted the jingtian_422_fix_cannot_get_table_charset_in_mysql branch October 24, 2023 07:58
yhilmare pushed a commit that referenced this pull request Jan 15, 2024
* fix cannot get table charset in mysql mode

* fix listTableIndexes ut test

* get table options by parser

* response to review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module-Database object Table/View/Type/Function/Procedure/Package/Synonym/Constraint/Index priority-high type-bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants