fix(db-browser): cannot get table charset in native mysql mode #592
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
type-bug
module-Database object
What this PR does / why we need it:
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.optimize DBSchemaAccessor ut test by create
private static DBSchemaAccessor accessor
fix
@Ignore("TODO: fix this test case")
ut test. I consulted kernel classmates and found that thecomment
field of theinformation_schema.STATISTICS
table and thecomment
field of theshow index from
query have different sources and meanings. Thecomment
field ofinformation_schema.STATISTICS
cannot be used to indicate the status of the index, so forMap<String, List<DBTableIndex >> listTableIndexes(String schemaName);
method does not query whether the index is available. Actually only theList<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.: