Closed xsist10 closed 8 months ago
Confusion between CHARACTER type and CHARACTER SET
CHARACTER
CHARACTER SET
In an attempt to fix the data type aliases per https://github.com/greenlion/PHP-SQL-Parser/issues/355, I introduced a bug documented in https://github.com/greenlion/PHP-SQL-Parser/issues/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.
$expr
ExpressionType::DATA_TYPE
Additionally this also includes a fix to support CHARSET which is a valid alias for CHARACTER SET per the MySQL character sets documentation.
CHARSET
This is an alternative to the fix proposed by https://github.com/greenlion/PHP-SQL-Parser/pull/366
Confusion between
CHARACTER
type andCHARACTER SET
In an attempt to fix the data type aliases per https://github.com/greenlion/PHP-SQL-Parser/issues/355, I introduced a bug documented in https://github.com/greenlion/PHP-SQL-Parser/issues/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 aExpressionType::DATA_TYPE
has already been defined.Additionally this also includes a fix to support
CHARSET
which is a valid alias forCHARACTER SET
per the MySQL character sets documentation.This is an alternative to the fix proposed by https://github.com/greenlion/PHP-SQL-Parser/pull/366