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

_utf8 not supported #3928

Closed
jackysp opened this issue Jul 28, 2017 · 3 comments
Closed

_utf8 not supported #3928

jackysp opened this issue Jul 28, 2017 · 3 comments

Comments

@jackysp
Copy link
Member

jackysp commented Jul 28, 2017

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
select left(_utf8 0xD0B0D0B1D0B2,1
  1. What did you expect to see?
mysql> select left(_utf8 0xD0B0D0B1D0B2,1);
+------------------------------+
| left(_utf8 0xD0B0D0B1D0B2,1) |
+------------------------------+
| а                            |
+------------------------------+
1 row in set (0.01 sec)
  1. What did you see instead?
mysql> select left(_utf8 0xD0B0D0B1D0B2,1);
ERROR 1105 (HY000): line 0 column 32 near ",1)" (total length 35)
  1. What version of TiDB are you using (tidb-server -V)?
@morgo
Copy link
Contributor

morgo commented Nov 24, 2018

Confirming that this issue can still be reproduced:

mysql57> select left(_utf8 0xD0B0D0B1D0B2,1);
+------------------------------+
| left(_utf8 0xD0B0D0B1D0B2,1) |
+------------------------------+
| а                            |
+------------------------------+
1 row in set (0.00 sec)

tidb> select left(_utf8 0xD0B0D0B1D0B2,1);
ERROR 1105 (HY000): line 1 column 32 near ",1)" (total length 35)
mysql> select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v2.1.0-rc.3-219-g1e0876fe8-dirty
Git Commit Hash: 1e0876fe810a832721aac52275dd2b7792fd2892
Git Branch: flush
UTC Build Time: 2018-11-24 01:12:47
GoVersion: go version go1.11 linux/amd64
Race Enabled: false
TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e
Check Table Before Drop: false
1 row in set (0.00 sec)

@ghost ghost added the component/parser label Jul 29, 2020
@ghost
Copy link

ghost commented Jul 29, 2020

Still present in master:

..
mysql> SELECT tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v4.0.0-beta.2-852-g1e7454c81
Edition: Community
Git Commit Hash: 1e7454c81d1f4fae464e835d1a4023a911cfa87b
Git Branch: master
UTC Build Time: 2020-07-28 01:36:23
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.00 sec)

mysql> select left(_utf8 0xD0B0D0B1D0B2,1) 
    -> ;
ERROR 1064 (42000): 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 32 near "0xD0B0D0B1D0B2,1)" 

@tangenta
Copy link
Contributor

Fixed by pingcap/parser#926.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants