-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
LastInsertId always returns 0 #251
Comments
Thanks for the bug report. LastInsertId is not currently populated into the query response, which is why it's always 0. It shouldn't be that hard to fix. I'll take a look and get back to you. |
Any updates on this one? |
I'm also blocked by this issue. This is a pretty fundamental gap in functionality which prevents this from being a "drop-in replacement" for a real MySQL server. Can this be highly prioritized? I also just noticed that ROW_COUNT() is not implemented, so we can't tell the number of rows affected by the last query either. Is this also related to not populating the query response? |
Hi folks, We have this in our docket now, should be part of a release coming pretty soon. Sorry for the lack of updates! Zach |
ROW_COUNT(), FOUND_ROWS(), and LAST_INSERT_ID() are all implemented in the latest release: https://github.com/dolthub/go-mysql-server/releases/tag/v0.9.0 The lastInsertId field on the OK response packet is still not populated, but this value can now be fetched with |
Wuhu thank you very much for adding this feature! |
I've tried to work around this a few ways, but it would be much easier of LastInsertId was filled |
@paralin , we prioritize features as they impact our main project Dolt. You have some options to get this prioritized:
We'll eventually get to everything as long as we can stay in business. |
Hi @timsehn thanks for your great work. I'm already aware of your business model, my comment was less a "hurry up" and more a "yes this is relevant to me," and I'll most likely end up submitting a PR with the fix soon. |
We would appreciate the contribution.
…On Sun, Apr 25, 2021 at 10:02 AM Christian Stewart ***@***.***> wrote:
Hi @timsehn <https://github.com/timsehn> thanks for your great work. I'm
already aware of your business model, my comment was less a "hurry up" and
more a "yes this is relevant to me," and I'll most likely end up submitting
a PR with the fix soon. No need to send the "pay us if you want it faster"
blurb, I fully get it. Thanks again.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#251 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJAR3GREOU4BA2OJ5PNC2LTKRDI3ANCNFSM4VNAXTBQ>
.
|
This is fixed in the latest release. Grab v0.10.0 to get it. |
Thanks! |
When running several insert commands like
Against a simple table like
the returned id is always 0. While the go-mysql-driver returns the correct pkey.
Used libraries:
github.com/dolthub/go-mysql-server v0.6.1-0.20201228192939-415fc40f3a71
github.com/go-sql-driver/mysql v1.5.0
The text was updated successfully, but these errors were encountered: