Type:
Bug
Priority:
Critical
Resolution:
Fixed
Affects Version/s:
3.0.4
Component/s:
None
The current code in ma_default.c does not care for include keywords (!include , !includedir ) in my.cnf .
The whole parse code looks completely different to the my.cnf parser of the MariaDB Server (mysys/my_default.c )
The API documentation of mysql_optionsv(... MYSQL_READ_DEFAULT_FILE ...) links to the my.cnf documentation , which says nothing about {{!include}}s only being parseable by the MariaDB server.
The default location of the MariaDB socket is /tmp/mysql.sock , but many distributions use different locations (eg. CentOS 7: /var/lib/mysql/mysql.sock ). This differing location can be specified eg. in /etc/my.cnf.d/client.cnf :
#
# These two groups are read by the client library
# Use it for options that affect all clients, but not the server
#
[client]
socket=/var/lib/mysql/mysql.sock
# This group is not read by mysql client library,
# If you use the same .cnf file for MySQL and MariaDB,
# use it for MariaDB-only client options
[client-mariadb]
While above configuration snippet works fine with MySQL Connector/C, the MariaDB Connector/C silently ignores the !includedir keyword. Thus, the socket= directive is not read, and the client looks for the socket at the wrong location.
A simple local workaround is to hard-code the "correct" location of the MariaDB socket into the application, or ask the user to configure it directly in /etc/my.cnf . But this is neither clean nor portable.
I don't know what's easier: importing the my.cnf config parser from MariaDB into Connector/C, or to implement the "include" functionality independently. However, it should be better to maintain if there's only one code base for parsing my.cnf files.
{"report":{"fcp":2298,"ttfb":145.09999990463257,"pageVisibility":"visible","entityId":67103,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":0.5,"journeyId":"da928021-14e7-43a4-9ecb-cdc48ed9eb8a","navigationType":0,"readyForUser":2444.899999856949,"redirectCount":0,"resourceLoadedEnd":2506.7000000476837,"resourceLoadedStart":186.39999985694885,"resourceTiming":[{"duration":680.8000001907349,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":186.39999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":186.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":867.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":1355.2000000476837,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":187,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":187,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1542.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":1363.9000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":187.09999990463257,"connectEnd":187.09999990463257,"connectStart":187.09999990463257,"domainLookupEnd":187.09999990463257,"domainLookupStart":187.09999990463257,"fetchStart":187.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":187.09999990463257,"responseEnd":1551,"responseStart":1551,"secureConnectionStart":187.09999990463257},{"duration":1479.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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","startTime":187.20000004768372,"connectEnd":187.20000004768372,"connectStart":187.20000004768372,"domainLookupEnd":187.20000004768372,"domainLookupStart":187.20000004768372,"fetchStart":187.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":187.20000004768372,"responseEnd":1666.2999999523163,"responseStart":1666.2999999523163,"secureConnectionStart":187.20000004768372},{"duration":1535.1000001430511,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":187.39999985694885,"connectEnd":187.39999985694885,"connectStart":187.39999985694885,"domainLookupEnd":187.39999985694885,"domainLookupStart":187.39999985694885,"fetchStart":187.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":187.39999985694885,"responseEnd":1722.5,"responseStart":1722.3999998569489,"secureConnectionStart":187.39999985694885},{"duration":1601.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":187.5,"connectEnd":187.5,"connectStart":187.5,"domainLookupEnd":187.5,"domainLookupStart":187.5,"fetchStart":187.5,"redirectEnd":0,"redirectStart":0,"requestStart":187.5,"responseEnd":1789,"responseStart":1789,"secureConnectionStart":187.5},{"duration":1601.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":187.59999990463257,"connectEnd":187.59999990463257,"connectStart":187.59999990463257,"domainLookupEnd":187.59999990463257,"domainLookupStart":187.59999990463257,"fetchStart":187.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":187.59999990463257,"responseEnd":1789.3999998569489,"responseStart":1789.3999998569489,"secureConnectionStart":187.59999990463257},{"duration":1620.5999999046326,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":187.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":187.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1808.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":1596.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":194.70000004768372,"connectEnd":194.70000004768372,"connectStart":194.70000004768372,"domainLookupEnd":194.70000004768372,"domainLookupStart":194.70000004768372,"fetchStart":194.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":194.70000004768372,"responseEnd":1790.7999999523163,"responseStart":1790.7999999523163,"secureConnectionStart":194.70000004768372},{"duration":1628.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":194.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":194.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1823.3999998569489,"responseStart":0,"secureConnectionStart":0},{"duration":1628.8000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":194.89999985694885,"connectEnd":194.89999985694885,"connectStart":194.89999985694885,"domainLookupEnd":194.89999985694885,"domainLookupStart":194.89999985694885,"fetchStart":194.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":194.89999985694885,"responseEnd":1823.7000000476837,"responseStart":1823.7000000476837,"secureConnectionStart":194.89999985694885},{"duration":2310.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":196.20000004768372,"connectEnd":196.20000004768372,"connectStart":196.20000004768372,"domainLookupEnd":196.20000004768372,"domainLookupStart":196.20000004768372,"fetchStart":196.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":196.20000004768372,"responseEnd":2506.2999999523163,"responseStart":2506.2999999523163,"secureConnectionStart":196.20000004768372},{"duration":2310.4000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":196.29999995231628,"connectEnd":196.29999995231628,"connectStart":196.29999995231628,"domainLookupEnd":196.29999995231628,"domainLookupStart":196.29999995231628,"fetchStart":196.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":196.29999995231628,"responseEnd":2506.7000000476837,"responseStart":2506.7000000476837,"secureConnectionStart":196.29999995231628},{"duration":552,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1949.8999998569489,"connectEnd":1949.8999998569489,"connectStart":1949.8999998569489,"domainLookupEnd":1949.8999998569489,"domainLookupStart":1949.8999998569489,"fetchStart":1949.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":1949.8999998569489,"responseEnd":2501.899999856949,"responseStart":2501.899999856949,"secureConnectionStart":1949.8999998569489}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":4,"responseStart":145,"responseEnd":155,"domLoading":175,"domInteractive":2564,"domContentLoadedEventStart":2564,"domContentLoadedEventEnd":2604,"domComplete":4281,"loadEventStart":4281,"loadEventEnd":4282,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2540.5},{"name":"bigPipe.sidebar-id.end","time":2541.399999856949},{"name":"bigPipe.activity-panel-pipe-id.start","time":2541.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":2544.2999999523163},{"name":"activityTabFullyLoaded","time":2610.899999856949}],"measures":[],"correlationId":"960c5412359420","effectiveType":"4g","downlink":9.8,"rtt":0,"serverDuration":80,"dbReadsTimeInMs":17,"dbConnsTimeInMs":24,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}