Since MariaDB 10.3.3 executing prepared statement with more than 999 parameters (binary blobs) return empty data set and no errors if utf8 collation is used and binary blobs contain non ASCII characters (symbols with codes of 128 or higher).
Same query with 999 parameters works fine, having 1000 parameters returns no data.
Same query with ASCII data works fine, having at least one byte >= 128 returns no data.
Same query on connection with collation latin1 works fine, using utf8 returns no data.
Go proof of concept app
We have stumbled on this bug after upgrade to MariaDB 10.3 on our service written in go. Simple go application to reproduce the problem is attached to the issue. Application will spin MariaDB server docker container and execute same query with 999 and 1000 parameters to show the issue. It will try multiple MariaDB versions. Same issue is not present in latest MySQL servers or MariaDB < 10.3.3.
C proof of concept app
Digging deeper into the issue I was able to reproduce it in C code. Demo code attached to the issue (builds with clang main.c -o main `mysql_config --cflags` `mysql_config --libs`).
C app will not spawn any docker containers and expect MariaDB running on localhost:3306.
{"report":{"fcp":3762.4000000953674,"ttfb":543.3000001907349,"pageVisibility":"visible","entityId":76080,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"25979d82-1239-49ac-8a1e-344ce7bf2b0e","navigationType":0,"readyForUser":3185.2000002861023,"redirectCount":0,"resourceLoadedEnd":4411,"resourceLoadedStart":608.4000000953674,"resourceTiming":[{"duration":1167.7000002861023,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":608.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":608.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1776.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":1630,"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":608.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":608.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2238.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":1646,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":609.4000000953674,"connectEnd":609.4000000953674,"connectStart":609.4000000953674,"domainLookupEnd":609.4000000953674,"domainLookupStart":609.4000000953674,"fetchStart":609.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":609.4000000953674,"responseEnd":2255.4000000953674,"responseStart":2255.4000000953674,"secureConnectionStart":609.4000000953674},{"duration":1674.3000001907349,"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":609.5,"connectEnd":609.5,"connectStart":609.5,"domainLookupEnd":609.5,"domainLookupStart":609.5,"fetchStart":609.5,"redirectEnd":0,"redirectStart":0,"requestStart":609.5,"responseEnd":2283.800000190735,"responseStart":2283.800000190735,"secureConnectionStart":609.5},{"duration":1826.2000002861023,"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":609.9000000953674,"connectEnd":609.9000000953674,"connectStart":609.9000000953674,"domainLookupEnd":609.9000000953674,"domainLookupStart":609.9000000953674,"fetchStart":609.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":609.9000000953674,"responseEnd":2436.1000003814697,"responseStart":2436.1000003814697,"secureConnectionStart":609.9000000953674},{"duration":1827.0999999046326,"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":610.1000003814697,"connectEnd":610.1000003814697,"connectStart":610.1000003814697,"domainLookupEnd":610.1000003814697,"domainLookupStart":610.1000003814697,"fetchStart":610.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":610.1000003814697,"responseEnd":2437.2000002861023,"responseStart":2437.2000002861023,"secureConnectionStart":610.1000003814697},{"duration":1828.1999998092651,"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":610.3000001907349,"connectEnd":610.3000001907349,"connectStart":610.3000001907349,"domainLookupEnd":610.3000001907349,"domainLookupStart":610.3000001907349,"fetchStart":610.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":610.3000001907349,"responseEnd":2438.5,"responseStart":2438.5,"secureConnectionStart":610.3000001907349},{"duration":1914.2000002861023,"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":610.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":610.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2524.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":1913.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":610.6000003814697,"connectEnd":610.6000003814697,"connectStart":610.6000003814697,"domainLookupEnd":610.6000003814697,"domainLookupStart":610.6000003814697,"fetchStart":610.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":610.6000003814697,"responseEnd":2524.1000003814697,"responseStart":2524.1000003814697,"secureConnectionStart":610.6000003814697},{"duration":2161.699999809265,"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":610.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":610.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2772.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":2021.2000002861023,"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":610.9000000953674,"connectEnd":610.9000000953674,"connectStart":610.9000000953674,"domainLookupEnd":610.9000000953674,"domainLookupStart":610.9000000953674,"fetchStart":610.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":610.9000000953674,"responseEnd":2632.1000003814697,"responseStart":2632.1000003814697,"secureConnectionStart":610.9000000953674},{"duration":3753.5999999046326,"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":611.8000001907349,"connectEnd":611.8000001907349,"connectStart":611.8000001907349,"domainLookupEnd":611.8000001907349,"domainLookupStart":611.8000001907349,"fetchStart":611.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":611.8000001907349,"responseEnd":4365.400000095367,"responseStart":4365.400000095367,"secureConnectionStart":611.8000001907349},{"duration":3770.199999809265,"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":611.8000001907349,"connectEnd":611.8000001907349,"connectStart":611.8000001907349,"domainLookupEnd":611.8000001907349,"domainLookupStart":611.8000001907349,"fetchStart":611.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":611.8000001907349,"responseEnd":4382,"responseStart":4381.900000095367,"secureConnectionStart":611.8000001907349},{"duration":416.69999980926514,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":2472.7000002861023,"connectEnd":2472.7000002861023,"connectStart":2472.7000002861023,"domainLookupEnd":2472.7000002861023,"domainLookupStart":2472.7000002861023,"fetchStart":2472.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":2472.7000002861023,"responseEnd":2889.4000000953674,"responseStart":2889.4000000953674,"secureConnectionStart":2472.7000002861023},{"duration":1304,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":3107.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":3107.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":4411.400000095367,"responseStart":0,"secureConnectionStart":0},{"duration":1294.6999998092651,"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":3116.300000190735,"connectEnd":3116.300000190735,"connectStart":3116.300000190735,"domainLookupEnd":3116.300000190735,"domainLookupStart":3116.300000190735,"fetchStart":3116.300000190735,"redirectEnd":0,"redirectStart":0,"requestStart":3116.300000190735,"responseEnd":4411,"responseStart":4411,"secureConnectionStart":3116.300000190735}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":301,"responseStart":543,"responseEnd":545,"domLoading":567,"domInteractive":4436,"domContentLoadedEventStart":4436,"domContentLoadedEventEnd":4487,"domComplete":5422,"loadEventStart":5422,"loadEventEnd":5423,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":4412.200000286102},{"name":"bigPipe.sidebar-id.end","time":4413.10000038147},{"name":"bigPipe.activity-panel-pipe-id.start","time":4413.300000190735},{"name":"bigPipe.activity-panel-pipe-id.end","time":4415.200000286102},{"name":"activityTabFullyLoaded","time":4500.800000190735}],"measures":[],"correlationId":"a7e2e057e658f1","effectiveType":"4g","downlink":9.3,"rtt":0,"serverDuration":106,"dbReadsTimeInMs":15,"dbConnsTimeInMs":24,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Thanks a lot! I repeated as described, with main.c, on current 10.3,10.4 (10.3 592dc59d7a5f9bd80bffdd9d0f0)
Not reproducible on 10.2