-
-
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-20632: Exporting Contacts using "Export PRIMARY fields" and "Merge Household Members into their Households" produces db error #11870
Conversation
ping @lcdservices |
Jenkins test this please |
@monishdeb I implemented this and ran tests. I no longer get the error, but the merge does not happen.
|
Ran through tests, and we're making progress.
So it looks like we just need to sort out the issue with the merge same address function so that if a household relationship exists, it uses that instead of constructing the merged record. The help text for that field explains the intended behavior. |
If you are touching this code you should also remove the cloning per #11703 - it's a bit of a timebomb in the code because of the way it interacts with the memory leak bug in the DAO. |
@lcdservices re 2nd and 4rth point, isn't this a separate issue as the current patch only fixes the fatal error related to @eileenmcnaughton thanks for pointing that memory leak case, will bring up the change in next PR update. |
@monishdeb I assumed (perhaps incorrectly) that these changes may have impacted that functionality. If you think otherwise, let's break it out into a separate issue (we will need to address it one way or the other). |
@monishdeb extractions are really good for the code base but hard to review when combined with other changes - if you do a clean extraction as a stand alone PR then I can look to merge that & this will be a lot simpler |
@eileenmcnaughton I am unable to extract the code into a separate PR because of this variable
$row = [
id,
contact_type,
...
8_a_b => [
id,
...
]
7_b_a => [
...
],
] unlike earlier as
|
153d289
to
eeb6d43
Compare
@eileenmcnaughton I have merged #11918 and rebased this PR. Please have a look. |
Added UT |
Jenkins test this please |
… Members into their Households" produces db error
@monishdeb current iteration towards getting this merged is #12290 |
@monishdeb I'm going to close this now & keep chipping away at rationalising the export function. The current refactor is here #12579 and #12586 I'm now about 95% sure we gain no performance benefit by ever writing the household merge fields to a table as we actually iterate through them in php and we have all the information we need to merge them in php at a time when we are already doing heavy processing. |
Overview
Exporting Contacts using the settings "Export PRIMARY fields" and "Merge Household Members into their Households" produces db error: "Database Error Code: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline., 1118"
Before
After
It fixes this error, also the patch is tested in 5.7 on FULL_GROUP_BY_MODE enabled.
Technical Details
Fix need a minor modification in
appendAnyValueToSelect(...)
to support alias when there isn't any and when select column is used in aggregate fn. On the other hand, modified the existing UT to includemergeSameHousehold = TRUE
criteria.