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

Fix (unreleased) regression on report pager #12149

Merged
merged 1 commit into from
May 16, 2018

Conversation

monishdeb
Copy link
Member

Overview

5.2 rc exhibits a regression whereby reports are missing their pages - this fixes.

Before

screenshot 2018-05-04 16 47 33

After

screenshot 2018-05-04 16 26 39

Technical Details

We recently added a patch to disable full group by before some queries that were not
compliant with that standard. That patch broke the report pager because later code relied on the
last issued query ALWAYS being the one that determined how many rows are retrived by the main query,
however, we were doing a query to check sql mode after the main query.

I could make a case for storing sql mode data somewhere sensible at the start of the session.
However, I think this fix is the right fix for the bug as it calculates the rows retrieved
/ retrievable immediately after the retrieval query, rather than 'at some later date when
we hope no other queries have run'. If is in the same function as the enableFullGroupBy so
only reports that ALSO run that will hit the line (ie. not reports that override buildRows)

Comments

@seamuslee001 @monishdeb I checked other places in the code (including the unmerged #12070 and I don't believe any others are affected - using that query to retrieve calc rows is uncommon in our code base & I see no other intersection between the places we do that & the places we check if group by is enabled)

@seamuslee001
Copy link
Contributor

Backport looks good to me @eileenmcnaughton @totten @monishdeb

We recently added a patch to disable full group by before some queries that were not
compliant with that standard. That patch broke the report pager because later code relied on the
last issued query ALWAYS being the one that determined how many rows are retrived by the main query,
however, we were doing a query to check sql mode after the main query.

I could make a case for storing sql mode data somewhere sensible at the start of the session.
However, I think this fix is the right fix for the bug as it calculates the rows retrieved
/ retrievable immediately after the retrieval query, rather than 'at some later date when
we hope no other queries have run'. If is in the same function as the enableFullGroupBy so
only reports that ALSO run that will hit the line (ie. not reports that override buildRows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants