Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@xsist10
Copy link
Contributor

@xsist10 xsist10 commented Dec 2, 2023

Confusion between CHARACTER type and CHARACTER SET

In an attempt to fix the data type aliases per #355, I introduced a bug documented in #365.

This change separates out the CHARACTER check to do a look ahead to see if the next keyword is `SET and splits the logic appropriately.

An alternative would be to look back at the constructed expression array ($expr) to see if a ExpressionType::DATA_TYPE has already been defined.

Additionally this also includes a fix to support CHARSET which is a valid alias for CHARACTER SET per the MySQL character sets documentation.

This is an alternative to the fix proposed by #366

In an attempt to fix the character set issue introduced by me in
greenlion#355

This change separates out the CHARACTER check to do a look ahead
to see if the next keyword is SET and splits the logic appropriately.

An alternative would be to look back at the constructed expression
array ($expr) to see if a ExpressionType::DATA_TYPE has already been
defined.

This is an alternative fix to the fix proposed by
greenlion#366
@xsist10 xsist10 changed the title Charset issue Fix confusion between CHARACTER data type and CHARACTER SET issue Dec 2, 2023
@greenlion greenlion merged commit dec667f into greenlion:master Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants