So I noticed something a bit funny about the MariaDB 10.2 install process, when it comes to header files. It seems there are kinda two competing install processes.
The source code includes a libmariadb/ subdirectory, which is actually (in the git repo) the mariadb-connector-c project as a submodule. This project has its own include/ subdirectory, which contains several header files and some install rules for them in a CMakeLists.txt file.
But the mariadb source also has its own include/ subdirectory, which similarly contains several header files and some install rules for them. In several cases, the install rules for both include/ subdirectories try to install a file with the same name to the same place: this includes at least mysql.h and errmsg.h . You can spot cases like this in the console output by looking for the string 'Up-to-date', which basically seems to be CMake indicating that a file listed for installation already exists and won't be replaced.
AFAICS, at least during our (Fedora's) builds, the libmariadb/include/ subdirectory gets to go first, and then when the include/ subdirectory runs, it doesn't overwrite any file that the libmariadb/include/ subdirectory already installed. But as there are more headers in the include/ subdirectory, you ultimately wind up with a mish-mash of headers installed, some from the libmariadb/ subproject and some from mariadb itself.
This is particularly significant in the case of mysql.h; what actually winds up installed is libmariadb/include/mysql.h , not include/mysql.h . There are some significant differences between the two; for instance, the one from libmariadb/include/ includes mariadb_version.h from the same directory , whereas the mysql.h from include/ includes mysql_version.h from the same directory. libmariadb's mariadb_version.h defines rather fewer things than mariadb's mysql_version.h does. So ultimately, for instance, if you install MariaDB 10.2, then write some code that just does #include mysql.h , then you will have no MYSQL_SERVER_VERSION defined.
This is definitely confusing and ambiguous, and I think it's a straight up bug. I would think that when installing MariaDB itself then we really want to install include/mysql.h , not libmariadb/include/mysql.h .
- causes
-
MDEV-13773
client packages need my_global.h and/or my_config.h
-
-
Closed
{"report":{"fcp":1081.3000001907349,"ttfb":383,"pageVisibility":"visible","entityId":62344,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"980703ba-a31c-47c6-ba8a-fc104dca3d8b","navigationType":0,"readyForUser":1153.1000003814697,"redirectCount":0,"resourceLoadedEnd":1176.5,"resourceLoadedStart":388.5,"resourceTiming":[{"duration":79.60000038146973,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":388.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":388.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":468.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":80.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":388.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":388.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":468.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":145.10000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":389,"connectEnd":389,"connectStart":389,"domainLookupEnd":389,"domainLookupStart":389,"fetchStart":389,"redirectEnd":0,"redirectStart":0,"requestStart":389,"responseEnd":534.1000003814697,"responseStart":534.1000003814697,"secureConnectionStart":389},{"duration":270.19999980926514,"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":389.1000003814697,"connectEnd":389.1000003814697,"connectStart":389.1000003814697,"domainLookupEnd":389.1000003814697,"domainLookupStart":389.1000003814697,"fetchStart":389.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":389.1000003814697,"responseEnd":659.3000001907349,"responseStart":659.3000001907349,"secureConnectionStart":389.1000003814697},{"duration":273.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":389.5,"connectEnd":389.5,"connectStart":389.5,"domainLookupEnd":389.5,"domainLookupStart":389.5,"fetchStart":389.5,"redirectEnd":0,"redirectStart":0,"requestStart":389.5,"responseEnd":663.3000001907349,"responseStart":663.3000001907349,"secureConnectionStart":389.5},{"duration":274,"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":389.7000002861023,"connectEnd":389.7000002861023,"connectStart":389.7000002861023,"domainLookupEnd":389.7000002861023,"domainLookupStart":389.7000002861023,"fetchStart":389.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":389.7000002861023,"responseEnd":663.7000002861023,"responseStart":663.7000002861023,"secureConnectionStart":389.7000002861023},{"duration":274.30000019073486,"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":389.80000019073486,"connectEnd":389.80000019073486,"connectStart":389.80000019073486,"domainLookupEnd":389.80000019073486,"domainLookupStart":389.80000019073486,"fetchStart":389.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":389.80000019073486,"responseEnd":664.1000003814697,"responseStart":664.1000003814697,"secureConnectionStart":389.80000019073486},{"duration":292.5,"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":390,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":390,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":682.5,"responseStart":0,"secureConnectionStart":0},{"duration":274.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":390.2000002861023,"connectEnd":390.2000002861023,"connectStart":390.2000002861023,"domainLookupEnd":390.2000002861023,"domainLookupStart":390.2000002861023,"fetchStart":390.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":390.2000002861023,"responseEnd":664.7000002861023,"responseStart":664.7000002861023,"secureConnectionStart":390.2000002861023},{"duration":292.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":390.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":390.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":682.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":274.90000009536743,"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":390.40000009536743,"connectEnd":390.40000009536743,"connectStart":390.40000009536743,"domainLookupEnd":390.40000009536743,"domainLookupStart":390.40000009536743,"fetchStart":390.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":390.40000009536743,"responseEnd":665.3000001907349,"responseStart":665.3000001907349,"secureConnectionStart":390.40000009536743},{"duration":779.7000002861023,"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":391.40000009536743,"connectEnd":391.40000009536743,"connectStart":391.40000009536743,"domainLookupEnd":391.40000009536743,"domainLookupStart":391.40000009536743,"fetchStart":391.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":391.40000009536743,"responseEnd":1171.1000003814697,"responseStart":1171.1000003814697,"secureConnectionStart":391.40000009536743},{"duration":775.1999998092651,"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":396.2000002861023,"connectEnd":396.2000002861023,"connectStart":396.2000002861023,"domainLookupEnd":396.2000002861023,"domainLookupStart":396.2000002861023,"fetchStart":396.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":396.2000002861023,"responseEnd":1171.4000000953674,"responseStart":1171.4000000953674,"secureConnectionStart":396.2000002861023},{"duration":134,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":694.4000000953674,"connectEnd":694.4000000953674,"connectStart":694.4000000953674,"domainLookupEnd":694.4000000953674,"domainLookupStart":694.4000000953674,"fetchStart":694.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":694.4000000953674,"responseEnd":828.4000000953674,"responseStart":828.4000000953674,"secureConnectionStart":694.4000000953674},{"duration":206.89999961853027,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":969.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":969.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1176.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":226,"responseStart":383,"responseEnd":387,"domLoading":387,"domInteractive":1218,"domContentLoadedEventStart":1218,"domContentLoadedEventEnd":1266,"domComplete":1780,"loadEventStart":1780,"loadEventEnd":1781,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1193},{"name":"bigPipe.sidebar-id.end","time":1193.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":1194},{"name":"bigPipe.activity-panel-pipe-id.end","time":1195.6000003814697},{"name":"activityTabFullyLoaded","time":1289}],"measures":[],"correlationId":"46c9a498e90b68","effectiveType":"4g","downlink":9.8,"rtt":0,"serverDuration":104,"dbReadsTimeInMs":13,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Jared: I don't think that's what Sergei means, no. I believe that the full mariadb will contain both the server and the client headers, in different directories. mariadb-connector-c will only contain the client headers, in the same place mariadb puts them. Again, this is just as I understand it.