This PR fixes three small bugs related to the character set and collate.
Both COLLATE collation_name and COLLATE = collation_name are valid table option to set collate. Parsing the create table statement in the sql file only takes into account the case where there is no equal sign.
If neither CHARACTER SET nor COLLATE is specified for a column, the CHARACTER SET and COLLATE of the table should be used.
When determining whether a column is a variable-length char, the column's MaxBytesPerChar should be used instead of the table's MaxBytesPerChar.
This PR fixes three small bugs related to the character set and collate.
Both
COLLATE collation_name
andCOLLATE = collation_name
are valid table option to set collate. Parsing the create table statement in the sql file only takes into account the case where there is no equal sign.If neither
CHARACTER SET
norCOLLATE
is specified for a column, theCHARACTER SET
andCOLLATE
of the table should be used.When determining whether a column is a variable-length char, the column's MaxBytesPerChar should be used instead of the table's MaxBytesPerChar.