-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Support sql_calc_found_rows with limit in sharded keyspace #6680
Support sql_calc_found_rows with limit in sharded keyspace #6680
Conversation
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
f210296
to
e26f979
Compare
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com> Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
@@ -279,4 +279,3 @@ | |||
] | |||
} | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reset this file change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... Weird. On my machine, with 723fef02e
checked out, that file has an extra line at the end, and git does not see any changes. Not sure what's going on...
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
e35553d
to
7fc9762
Compare
f4d5188
to
7fc9762
Compare
Support queries using
SQL_CALC_FOUND_ROWS
. This is done by rewriting the queries according to https://dev.mysql.com/worklog/task/?id=12615:So, vtgate will plan these queries by first solving the original query, without the
SQL_CALC_FOUND_ROWS
option, and then following up with aCOUNT(*)
query.will get be rewritten into two queries:
The first query will be used to return the results to the user, and the second will be used to save the found_rows state on the session in vtgate.