Skip to content

Commit

Permalink
Merge pull request #359 from samir9874/characterSet-check-with-default
Browse files Browse the repository at this point in the history
check if the default character set ( getDBCharset())  value is not same as collation character set
  • Loading branch information
rajeshrhino authored Jun 6, 2023
2 parents 5965a95 + ee04691 commit c22e5e7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CRM/Mailchimp/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,13 @@ public static function getTempTableSchema() {
if (method_exists(CRM_Core_BAO_SchemaHandler::class, 'getDBCharset')) {
$characterSet = CRM_Core_BAO_SchemaHandler::getDBCharset();
}
// check if the getDBCharset() value is not same as collation charset
$collationsArray = explode('_', $collation);
if(!empty($collationsArray)){
if($collationsArray[0]!=$characterSet){
$characterSet =$collationsArray[0];
}
}

$tempTableSchema = "{$characterSet} COLLATE {$collation}";

Expand Down

0 comments on commit c22e5e7

Please sign in to comment.