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

return a known error code when max rows is exceeded #3159

Merged
merged 1 commit into from
Sep 11, 2017

Conversation

bbeaudreault
Copy link
Contributor

I chose negative numbers for the vitess error codes so they dont conflict with mysql, but could be easily swayed to choose something else if preferred. There are no pre-existing mysql error codes that really make sense for this.

We could also add another field to SQLError, if that would be preferred.

@sougou
Copy link
Contributor

sougou commented Sep 11, 2017

We should find out what error code mysql returns for the max rows setting and mimic that.

@bbeaudreault
Copy link
Contributor Author

@sougou I scanned https://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html and I didn't see any error codes that made sense. I don't think mysql sets a limit on this?

There is an ER_TOO_MANY_ROWS, but that is specifically for the case of select * from foo where a = (select b from bar), when the inner query returns more than 1 row.

@sougou
Copy link
Contributor

sougou commented Sep 11, 2017

LGTM
I think this is ok for now. But we have to keep an eye on it. It could become a problem later if some third party tools get confused by the error code.

Approved with PullApprove

@sougou sougou merged commit 3edb12a into vitessio:master Sep 11, 2017
frouioui pushed a commit to planetscale/vitess that referenced this pull request Mar 26, 2024
…itessio#13985) (vitessio#3159)

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Co-authored-by: Harshit Gangal <harshit@planetscale.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants