Having a server with
[server]
|
character-set-server = utf8mb3
|
collation-server = utf8mb3_swedish_ci
|
the command line client, return "utf8mb3_general_ci" as result of
SHOW VARIABLES LIKE 'collation_connection';
both when connecting to the MariaDB server directly, and when connecting via Maxscale.
A PHP program on the other hand also returns "utf8mb3_general_ci" when connecting via Maxscale, but "utf8mb3_swedish_ci" when connecting to MariaDB server directly.
This breaks PHP applications that do not explicitly set client character set / collation.
PHP test code I used:
<?php
|
|
function test($host)
|
{
|
$mysqli = new mysqli($host,"vagrant","Secret23!");
|
if ($mysqli -> connect_errno) {
|
echo "Failed to connect to MySQL: " . $mysqli -> connect_error;
|
exit();
|
}
|
echo "Host: $host\n";
|
if ($result = $mysqli -> query("SHOW VARIABLES LIKE 'collation_connection'")) {
|
while($row = mysqli_fetch_assoc($result)){
|
print_r($row);
|
}
|
$result -> free_result();
|
}
|
echo "\n";
|
$mysqli -> close();
|
}
|
|
test("master");
|
test("maxscale");
|
?>
|
Note that PHP does not use a bundled version of libmysqlclient anymore by default, but its own "mysqlnd" implementation of the client protocol.
{"report":{"fcp":1012.8000001907349,"ttfb":295,"pageVisibility":"visible","entityId":118611,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"dce79db0-b798-4c95-8d58-fd022cafc0fd","navigationType":0,"readyForUser":1098,"redirectCount":0,"resourceLoadedEnd":1146.3000001907349,"resourceLoadedStart":300.1000003814697,"resourceTiming":[{"duration":108.89999961853027,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":300.1000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":300.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":409,"responseStart":0,"secureConnectionStart":0},{"duration":109.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":300.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":300.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":409.5,"responseStart":0,"secureConnectionStart":0},{"duration":183.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":300.6000003814697,"connectEnd":300.6000003814697,"connectStart":300.6000003814697,"domainLookupEnd":300.6000003814697,"domainLookupStart":300.6000003814697,"fetchStart":300.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":300.6000003814697,"responseEnd":483.80000019073486,"responseStart":483.7000002861023,"secureConnectionStart":300.6000003814697},{"duration":267.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":300.80000019073486,"connectEnd":300.80000019073486,"connectStart":300.80000019073486,"domainLookupEnd":300.80000019073486,"domainLookupStart":300.80000019073486,"fetchStart":300.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":300.80000019073486,"responseEnd":568.5,"responseStart":568.5,"secureConnectionStart":300.80000019073486},{"duration":270.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":301,"connectEnd":301,"connectStart":301,"domainLookupEnd":301,"domainLookupStart":301,"fetchStart":301,"redirectEnd":0,"redirectStart":0,"requestStart":301,"responseEnd":571.8000001907349,"responseStart":571.8000001907349,"secureConnectionStart":301},{"duration":271.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":301.1000003814697,"connectEnd":301.1000003814697,"connectStart":301.1000003814697,"domainLookupEnd":301.1000003814697,"domainLookupStart":301.1000003814697,"fetchStart":301.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":301.1000003814697,"responseEnd":572.3000001907349,"responseStart":572.3000001907349,"secureConnectionStart":301.1000003814697},{"duration":271.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":301.30000019073486,"connectEnd":301.30000019073486,"connectStart":301.30000019073486,"domainLookupEnd":301.30000019073486,"domainLookupStart":301.30000019073486,"fetchStart":301.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":301.30000019073486,"responseEnd":572.7000002861023,"responseStart":572.7000002861023,"secureConnectionStart":301.30000019073486},{"duration":333.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":301.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":301.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":634.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":271.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":301.7000002861023,"connectEnd":301.7000002861023,"connectStart":301.7000002861023,"domainLookupEnd":301.7000002861023,"domainLookupStart":301.7000002861023,"fetchStart":301.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":301.7000002861023,"responseEnd":573.1000003814697,"responseStart":573.1000003814697,"secureConnectionStart":301.7000002861023},{"duration":333.30000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":301.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":301.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":635.2000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":271.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":302.1000003814697,"connectEnd":302.1000003814697,"connectStart":302.1000003814697,"domainLookupEnd":302.1000003814697,"domainLookupStart":302.1000003814697,"fetchStart":302.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":302.1000003814697,"responseEnd":573.8000001907349,"responseStart":573.8000001907349,"secureConnectionStart":302.1000003814697},{"duration":411.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":309.40000009536743,"connectEnd":309.40000009536743,"connectStart":309.40000009536743,"domainLookupEnd":309.40000009536743,"domainLookupStart":309.40000009536743,"fetchStart":309.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":309.40000009536743,"responseEnd":720.8000001907349,"responseStart":720.8000001907349,"secureConnectionStart":309.40000009536743},{"duration":742.6999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":312.7000002861023,"connectEnd":312.7000002861023,"connectStart":312.7000002861023,"domainLookupEnd":312.7000002861023,"domainLookupStart":312.7000002861023,"fetchStart":312.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":312.7000002861023,"responseEnd":1055.4000000953674,"responseStart":1055.4000000953674,"secureConnectionStart":312.7000002861023},{"duration":70.80000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":650.4000000953674,"connectEnd":650.4000000953674,"connectStart":650.4000000953674,"domainLookupEnd":650.4000000953674,"domainLookupStart":650.4000000953674,"fetchStart":650.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":650.4000000953674,"responseEnd":721.2000002861023,"responseStart":721.2000002861023,"secureConnectionStart":650.4000000953674},{"duration":235.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":911.1000003814697,"connectEnd":911.1000003814697,"connectStart":911.1000003814697,"domainLookupEnd":911.1000003814697,"domainLookupStart":911.1000003814697,"fetchStart":911.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":911.1000003814697,"responseEnd":1146.3000001907349,"responseStart":1146.3000001907349,"secureConnectionStart":911.1000003814697},{"duration":198.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1005.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1005.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1204.2000002861023,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":135,"responseStart":294,"responseEnd":312,"domLoading":298,"domInteractive":1150,"domContentLoadedEventStart":1150,"domContentLoadedEventEnd":1193,"domComplete":1812,"loadEventStart":1812,"loadEventEnd":1812,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1138.1000003814697},{"name":"bigPipe.sidebar-id.end","time":1138.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":1139.1000003814697},{"name":"bigPipe.activity-panel-pipe-id.end","time":1140.1000003814697},{"name":"activityTabFullyLoaded","time":1216.1000003814697}],"measures":[],"correlationId":"12610f9703fd76","effectiveType":"4g","downlink":9.4,"rtt":0,"serverDuration":92,"dbReadsTimeInMs":10,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I managed to reproduce this on 22.08