-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
ERROR 1305 (42000): FUNCTION UUID_SHORT does not exist #4620
Comments
Hi, @GuoYuan-DiYiDan , if possible, can you send us a PR to support this function? |
@XuHuaiyu Thanks for your invitation. Here is more info about this issue: |
@GuoYuan-DiYiDan According to the MySQL manual, Can we maintain a uint64 variable as an attribute in the implementation of uuid_short, |
@XuHuaiyu For lots of companies and applications, auto-incremented global unique id is a needed feature in back-end distributed service development . Up to now, our auto-incremented global unique id generation strategy depends on MySQL's UUID_SHORT() function. MySQL's UUID_SHORT implementation is easy to understand and I agree with your solution. |
@GuoYuan-DiYiDan In TiDB, if you want to get a global auto-increment unique id, you can use begin; select @@tidb_current_ts; Or, if you want to keep using |
@XuHuaiyu
You can see that the result is not auto-incrementing after per call. MySQL 5.7 works well:
I think its a better choice to support auto-increment after per call for a global auto-increment unique id generation strategy. So, I think we still need a Note: What I mean global auto-increment unique id is TiDB Cluster Instance scope, not just the same table scope. |
|
@XuHuaiyu |
#4628 will fix this. |
So, currently, it means TiDB doesn't have a battery included solution for global auto-increment unqiue id like MySQL UUID_SHORT? Actually, I can solve this problem for my application with Redis. But I still hope that TiDB will implement this feature before the release of v1.0.0. |
I think the semantics are different from an
|
短期不考虑增加uuid_short()函数的支持么? |
Please answer these questions before submitting your issue. Thanks!
If possible, provide a recipe for reproducing the error.
SELECT UUID_SHORT();
+-------------------+
| UUID_SHORT() |
+-------------------+
| 97316296756035585 |
+-------------------+
1 row in set (0.00 sec)
ERROR 1305 (42000): FUNCTION UUID_SHORT does not exist
tidb-server -V
)?Release Version: 0.9.0
Git Commit Hash: fa87ec4
Git Commit Branch: HEAD
UTC Build Time: 2017-09-24 01:38:26
The text was updated successfully, but these errors were encountered: