-
Bug
-
-
Major
-
Resolution:
Unresolved
-
3.0.9
-
-
None
-
mysql_fetch_fields() says a "smallint(5) unsigned zerofill" has a (max)length of 5.
However If I use mysql_stmt_fetch() with a MYSQL_BIND with buffer_length of 5 I get return code 101 (MYSQL_DATA_TRUNCATED).
With a buffer of 6 it works fine.
With 10.3.11 a buffer of 5 was working fine.
Related: https://github.com/perl5-dbi/DBD-mysql/issues/304
- relates to
-
MDEV-18143
mysql_stmt_fetch return code is wrong if buffer size is 1
-
-
Closed
Elena Stepanova
made changes -
Assignee
|
|
Georg Richter
[ georg
]
|
Elena Stepanova
made changes -
Fix Version/s
|
|
10.3
[ 22126
]
|
Sergei Golubchik
made changes -
Component/s
|
libmariadb
[ 14006
]
|
|
Fix Version/s
|
|
3.0.10
[ 23414
]
|
Fix Version/s
|
10.3
[ 22126
]
|
|
Fix Version/s
|
10.4
[ 22408
]
|
|
Key
|
MDEV-18823
|
CONC-407
|
Affects Version/s
|
|
3.0.9
[ 23243
]
|
Affects Version/s
|
10.3.13
[ 23215
]
|
|
Workflow
|
MariaDB v3
[ 92979
]
|
MariaDB connectors
[ 96636
]
|
Project
|
MariaDB Server
[ 10000
]
|
MariaDB Connector/C
[ 10300
]
|
Georg Richter
made changes -
Fix Version/s
|
|
3.1.13
[ 25621
]
|
Fix Version/s
|
3.0.10
[ 23414
]
|
|
Ralf Gebhardt
made changes -
Fix Version/s
|
|
3.1
[ 23223
]
|
Fix Version/s
|
3.1.13
[ 25621
]
|
|
Julien Fritsch
made changes -
Workflow
|
MariaDB connectors
[ 96636
]
|
MariaDB v4
[ 160842
]
|
{"report":{"fcp":1072.5,"ttfb":296.2000000476837,"pageVisibility":"visible","entityId":72973,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"8716520f-44e3-444c-91a3-b9bb1abdf609","navigationType":0,"readyForUser":1141.5,"redirectCount":0,"resourceLoadedEnd":1673.1000000238419,"resourceLoadedStart":301.2000000476837,"resourceTiming":[{"duration":305.89999997615814,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":301.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":301.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":607.1000000238419,"responseStart":0,"secureConnectionStart":0},{"duration":306,"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":301.4000000357628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":301.4000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":607.4000000357628,"responseStart":0,"secureConnectionStart":0},{"duration":314.19999998807907,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":301.60000002384186,"connectEnd":301.60000002384186,"connectStart":301.60000002384186,"domainLookupEnd":301.60000002384186,"domainLookupStart":301.60000002384186,"fetchStart":301.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":301.60000002384186,"responseEnd":615.8000000119209,"responseStart":615.8000000119209,"secureConnectionStart":301.60000002384186},{"duration":361.2999999523163,"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":301.7000000476837,"connectEnd":301.7000000476837,"connectStart":301.7000000476837,"domainLookupEnd":301.7000000476837,"domainLookupStart":301.7000000476837,"fetchStart":301.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":301.7000000476837,"responseEnd":663,"responseStart":663,"secureConnectionStart":301.7000000476837},{"duration":364.7000000476837,"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":302,"connectEnd":302,"connectStart":302,"domainLookupEnd":302,"domainLookupStart":302,"fetchStart":302,"redirectEnd":0,"redirectStart":0,"requestStart":302,"responseEnd":666.7000000476837,"responseStart":666.7000000476837,"secureConnectionStart":302},{"duration":364.89999997615814,"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":302.2000000476837,"connectEnd":302.2000000476837,"connectStart":302.2000000476837,"domainLookupEnd":302.2000000476837,"domainLookupStart":302.2000000476837,"fetchStart":302.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":302.2000000476837,"responseEnd":667.1000000238419,"responseStart":667.1000000238419,"secureConnectionStart":302.2000000476837},{"duration":365.19999998807907,"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":302.30000001192093,"connectEnd":302.30000001192093,"connectStart":302.30000001192093,"domainLookupEnd":302.30000001192093,"domainLookupStart":302.30000001192093,"fetchStart":302.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":302.30000001192093,"responseEnd":667.5,"responseStart":667.5,"secureConnectionStart":302.30000001192093},{"duration":451.5999999642372,"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":302.4000000357628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":302.4000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":754,"responseStart":0,"secureConnectionStart":0},{"duration":365.30000001192093,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":302.60000002384186,"connectEnd":302.60000002384186,"connectStart":302.60000002384186,"domainLookupEnd":302.60000002384186,"domainLookupStart":302.60000002384186,"fetchStart":302.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":302.60000002384186,"responseEnd":667.9000000357628,"responseStart":667.9000000357628,"secureConnectionStart":302.60000002384186},{"duration":451.39999997615814,"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":302.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":302.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":754.1000000238419,"responseStart":0,"secureConnectionStart":0},{"duration":365.5999999642372,"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":302.9000000357628,"connectEnd":302.9000000357628,"connectStart":302.9000000357628,"domainLookupEnd":302.9000000357628,"domainLookupStart":302.9000000357628,"fetchStart":302.9000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":302.9000000357628,"responseEnd":668.5,"responseStart":668.5,"secureConnectionStart":302.9000000357628},{"duration":1337.5999999642372,"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":308.4000000357628,"connectEnd":308.4000000357628,"connectStart":308.4000000357628,"domainLookupEnd":308.4000000357628,"domainLookupStart":308.4000000357628,"fetchStart":308.4000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":308.4000000357628,"responseEnd":1646,"responseStart":1646,"secureConnectionStart":308.4000000357628},{"duration":1337.5,"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":309,"connectEnd":309,"connectStart":309,"domainLookupEnd":309,"domainLookupStart":309,"fetchStart":309,"redirectEnd":0,"redirectStart":0,"requestStart":309,"responseEnd":1646.5,"responseStart":1646.5,"secureConnectionStart":309},{"duration":132.69999998807907,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":764.8000000119209,"connectEnd":764.8000000119209,"connectStart":764.8000000119209,"domainLookupEnd":764.8000000119209,"domainLookupStart":764.8000000119209,"fetchStart":764.8000000119209,"redirectEnd":0,"redirectStart":0,"requestStart":764.8000000119209,"responseEnd":897.5,"responseStart":897.5,"secureConnectionStart":764.8000000119209},{"duration":657.6999999880791,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bu7/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","startTime":1015.4000000357628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1015.4000000357628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1673.1000000238419,"responseStart":0,"secureConnectionStart":0},{"duration":650,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/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","startTime":1016.2000000476837,"connectEnd":1016.2000000476837,"connectStart":1016.2000000476837,"domainLookupEnd":1016.2000000476837,"domainLookupStart":1016.2000000476837,"fetchStart":1016.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1016.2000000476837,"responseEnd":1666.2000000476837,"responseStart":1666.2000000476837,"secureConnectionStart":1016.2000000476837},{"duration":653.1000000238419,"initiatorType":"script","name":"https://jira.mariadb.org/s/f51ef5507eea4c158f257c66c93b2a3f-CDN/lu2bu7/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/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.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":1016.6000000238419,"connectEnd":1016.6000000238419,"connectStart":1016.6000000238419,"domainLookupEnd":1016.6000000238419,"domainLookupStart":1016.6000000238419,"fetchStart":1016.6000000238419,"redirectEnd":0,"redirectStart":0,"requestStart":1016.6000000238419,"responseEnd":1669.7000000476837,"responseStart":1669.7000000476837,"secureConnectionStart":1016.6000000238419},{"duration":664.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1067,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1067,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1731.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":70,"responseStart":296,"responseEnd":310,"domLoading":299,"domInteractive":1685,"domContentLoadedEventStart":1685,"domContentLoadedEventEnd":1728,"domComplete":2070,"loadEventStart":2070,"loadEventEnd":2071,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1650.1000000238419},{"name":"bigPipe.sidebar-id.end","time":1650.9000000357628},{"name":"bigPipe.activity-panel-pipe-id.start","time":1651},{"name":"bigPipe.activity-panel-pipe-id.end","time":1655.800000011921},{"name":"activityTabFullyLoaded","time":1743.9000000357628}],"measures":[],"correlationId":"5991246a2fe5e3","effectiveType":"4g","downlink":9.3,"rtt":0,"serverDuration":166,"dbReadsTimeInMs":41,"dbConnsTimeInMs":52,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Output of attached testcase:
Client compile version: 100311
Client runtime version: 10.3.11
Server version: 100311
Field 0 length: 5
Field 0 max_length: 5
Result: 00001
Buffer length: 1
mysql_stmt_fetch result: 0
Result: 1�/E (prepared statement)
Buffer length: 2
mysql_stmt_fetch result: 101
Result: 00/E (prepared statement)
Buffer length: 3
mysql_stmt_fetch result: 101
Result: 000E (prepared statement)
Buffer length: 4
mysql_stmt_fetch result: 101
Result: 0000 (prepared statement)
Buffer length: 5
mysql_stmt_fetch result: 0
Result: 00001 (prepared statement)
Buffer length: 6
mysql_stmt_fetch result: 0
Result: 00001 (prepared statement)
Client compile version: 100313
Client runtime version: 10.3.13
Server version: 100313
Field 0 length: 5
Field 0 max_length: 5
Result: 00001
Buffer length: 1
mysql_stmt_fetch result: 101
Result: 1 (prepared statement)
Buffer length: 2
mysql_stmt_fetch result: 101
Result: 1 (prepared statement)
Buffer length: 3
mysql_stmt_fetch result: 101
Result: 1 (prepared statement)
Buffer length: 4
mysql_stmt_fetch result: 101
Result: 1 (prepared statement)
Buffer length: 5
mysql_stmt_fetch result: 101
Result: 1 (prepared statement)
Buffer length: 6
mysql_stmt_fetch result: 0
Result: 00001 (prepared statement)