Fix 5.29 regression using temp tables
authoreileen <emcnaughton@wikimedia.org>
Wed, 12 Aug 2020 04:20:38 +0000 (16:20 +1200)
committereileen <emcnaughton@wikimedia.org>
Sat, 15 Aug 2020 00:07:16 +0000 (12:07 +1200)
commit8f719ee0848833b42e5f5f2eacabf8cfef2afa44
treeb5f7b034a73569d48b9d187ec2999ebaecf2dbb5
parent520d760ea9dbf3b78ac7b6f76af92d1ec55193c3
Fix 5.29 regression using temp tables

I just pushed 5.29rc through our WMF CI & it failed on a situation where it created a temp
table and that got joined on a non-temp table with a collation mix error. The issue is that the
DB default is set to utf8_general_ci (at least on our development DBs) whereas the
civicrm tables are utf8_unicode_ci. Until https://github.com/civicrm/civicrm-core/pull/18012/files
there was a list of permitted matches for db collation but now any 'utf' string matches.

From what I can tell utf8_general_ci  is a pretty common collation on drupal DBs and from my tests
it causes problems if not excluded here
CRM/Core/BAO/SchemaHandler.php
CRM/Utils/SQL/TempTable.php
tests/phpunit/api/v3/ReportTemplateTest.php