-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
CRM-21061: Fixing CiviReport crashing issue for column alias greater then 64 characters. #11126
Conversation
Can one of the admins verify this patch? |
Jenkins ok to test |
95fe434
to
d2e7caf
Compare
d2e7caf
to
8c6464f
Compare
Can someone review this PR please? |
This PR further work related to #10854 |
@eileenmcnaughton or @seamuslee001 would you mind reviewing this one? |
I actually think we might need to tackle this slightly differently to be consistent with report intent. There are aliases defined on the table spec & on the field spec - we should probably intervene when they are defined to make them a max of 32 char each. Test looks great |
@eileenmcnaughton just a heads up, we're not going to spend any more time on this bug fix |
I'm going to close this because I think #11183 supercedes it. I have put the unit test in #11866 and will merge that. A case could be made to truncate to support tables created prior to that fix - in which case I think it should be in the following function (although one might assume people would have resolved them by now if hitting them)
|
Overview
Steps to reproduce the issue:
Above case throw following error message.
This happens because the final name of the column with it's table name becomes very big (more then 64 characters) and maximum length of MySQL column is 64 characters.
Before
Report was not getting generated due to the maximum length error of the column.
After
It now works as expected, and show the Report result with correct data.
Technical Details
We're trimming the length of both alias and column header before executing the SQL, this would prevent database level error. We've also written a unit test to prevent this from failing in future.
Agileware Ref: CIVICRM-555