[fix](type compatibility) fix unsigned int type compatibility problem (#17427)
Fix unsigned int type compatibility value scope problem. When defining columns, map UNSIGNED INT to BIGINT for compatibility. The problems are as follows: It is not consistent with this doc image We support the unsigned int type to be compatible with mysql types, but the unsigned int type is created as the int at the time of definition. This will cause numerical overflow.
This commit is contained in:
@ -5744,6 +5744,9 @@ type ::=
|
||||
{: RESULT = Type.SMALLINT; :}
|
||||
| opt_signed_unsigned KW_INT opt_field_length
|
||||
{: RESULT = Type.INT; :}
|
||||
// This is just for MySQL compatibility now.
|
||||
| KW_UNSIGNED KW_INT opt_field_length
|
||||
{: RESULT = Type.BIGINT; :}
|
||||
| KW_BIGINT opt_field_length
|
||||
{: RESULT = Type.BIGINT; :}
|
||||
| KW_LARGEINT opt_field_length
|
||||
@ -5848,8 +5851,6 @@ opt_signed_unsigned ::=
|
||||
{: RESULT = true; :}
|
||||
| KW_SIGNED
|
||||
{: RESULT = true; :}
|
||||
| KW_UNSIGNED
|
||||
{: RESULT = false; :}
|
||||
;
|
||||
|
||||
type_def ::=
|
||||
|
||||
Reference in New Issue
Block a user