Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hex & bit literals are not allowed to follow with UNDERSCORE_CHARSET #451

Closed
zyguan opened this issue Aug 9, 2019 · 0 comments · Fixed by #926
Closed

hex & bit literals are not allowed to follow with UNDERSCORE_CHARSET #451

zyguan opened this issue Aug 9, 2019 · 0 comments · Fixed by #926
Labels
type/bug Something isn't working

Comments

@zyguan
Copy link

zyguan commented Aug 9, 2019

Bug Report

https://github.com/mysql/mysql-server/blob/77306a41670543e103f94fa0db77a71d2b9f88b2/sql/sql_yacc.yy#L13672-L13679

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
select _utf8 0xD0B1, _utf8 X'D0B1';
select _utf8 0b1101000010110001, _utf8 B'1101000010110001';
  1. What did you expect to see?
--------------
select _utf8 0xD0B1, _utf8 X'D0B1'
--------------

+--------------+---------------+
| _utf8 0xD0B1 | _utf8 X'D0B1' |
+--------------+---------------+
| б            | б             |
+--------------+---------------+
--------------
select _utf8 0b1101000010110001, _utf8 B'1101000010110001'
--------------

+--------------------------+---------------------------+
| _utf8 0b1101000010110001 | _utf8 B'1101000010110001' |
+--------------------------+---------------------------+
| б                        | б                         |
+--------------------------+---------------------------+

  1. What did you see instead?
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 19 near "0xD0B1, _utf8 X'D0B1'"
  1. What version of TiDB SQL Parser are you using?

master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant