Windows 10, 64-bit
MariaDB Odbc driver 3.0.8
MariaDB database server 3.10
Description
I have a simple test database, two columns, one is a varchar, the other one is a BigInt with Numeric_precision = 19 and Numeric_scale = 0.
When I in my application use the command SQLColAttribute with the field descriptor SQL_DESC_FIXED_PREC_SCALE, it returns SQL_TRUE. But according to documentation, I think it should return SQL_FALSE.
Thank you for your report!
On one hand looks like you are right. But on other the page says scale should be nonzero in both cases, and that makes both values not fitting your case
"SQL_TRUE if the column has a fixed precision and nonzero scale that are data source-specific.
SQL_FALSE if the column does not have a fixed precision and nonzero scale that are data source-specific."
But yeah, we will fix this.
Lawrin Novitsky
added a comment - Thank you for your report!
On one hand looks like you are right. But on other the page says scale should be nonzero in both cases, and that makes both values not fitting your case
"SQL_TRUE if the column has a fixed precision and nonzero scale that are data source-specific.
SQL_FALSE if the column does not have a fixed precision and nonzero scale that are data source-specific."
But yeah, we will fix this.
Connector returned wrong value for SQL_DESC_FIXED_PREC_SCALE. In the
report it was going about bigint type, but in fact for more types
SQL_TRUE was returned, where it shouldn't. Since defininition of SQL_DESC_FIXED_PREC_SCALE is not super clear, I checked what SQL Server driver returns for different types. As as being also MS's creation, I guess it can be used for reference if specs
are ambiguous. Only (small)money types SQL_TRUE is returned. MariaDB does not
have it. And for types that has counterpart in MariaDB, SQL_FALSE is
always returned. Thus, i made SQL_FALSE default value for all types for
SQL_DESC_FIXED_PREC_SCALE field.
Lawrin Novitsky
added a comment - Connector returned wrong value for SQL_DESC_FIXED_PREC_SCALE. In the
report it was going about bigint type, but in fact for more types
SQL_TRUE was returned, where it shouldn't. Since defininition of SQL_DESC_FIXED_PREC_SCALE is not super clear, I checked what SQL Server driver returns for different types. As as being also MS's creation, I guess it can be used for reference if specs
are ambiguous. Only (small)money types SQL_TRUE is returned. MariaDB does not
have it. And for types that has counterpart in MariaDB, SQL_FALSE is
always returned. Thus, i made SQL_FALSE default value for all types for
SQL_DESC_FIXED_PREC_SCALE field.
People
Lawrin Novitsky
Johan Telenius
Votes:
0Vote for this issue
Watchers:
2Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":831.3999996185303,"ttfb":243.19999980926514,"pageVisibility":"visible","entityId":72266,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"ff4961f9-5930-408d-beb6-766c00bf33c2","navigationType":0,"readyForUser":895.5,"redirectCount":0,"resourceLoadedEnd":1078.3999996185303,"resourceLoadedStart":248.0999994277954,"resourceTiming":[{"duration":56.90000057220459,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":248.0999994277954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":248.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":305,"responseStart":0,"secureConnectionStart":0},{"duration":57,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":248.39999961853027,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":248.39999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":305.3999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":111.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":248.5999994277954,"connectEnd":248.5999994277954,"connectStart":248.5999994277954,"domainLookupEnd":248.5999994277954,"domainLookupStart":248.5999994277954,"fetchStart":248.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":248.5999994277954,"responseEnd":360.3999996185303,"responseStart":360.3999996185303,"secureConnectionStart":248.5999994277954},{"duration":185.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":248.79999923706055,"connectEnd":248.79999923706055,"connectStart":248.79999923706055,"domainLookupEnd":248.79999923706055,"domainLookupStart":248.79999923706055,"fetchStart":248.79999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":248.79999923706055,"responseEnd":434.29999923706055,"responseStart":434.29999923706055,"secureConnectionStart":248.79999923706055},{"duration":189.0999994277954,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":249,"connectEnd":249,"connectStart":249,"domainLookupEnd":249,"domainLookupStart":249,"fetchStart":249,"redirectEnd":0,"redirectStart":0,"requestStart":249,"responseEnd":438.0999994277954,"responseStart":438,"secureConnectionStart":249},{"duration":189.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":249.19999980926514,"connectEnd":249.19999980926514,"connectStart":249.19999980926514,"domainLookupEnd":249.19999980926514,"domainLookupStart":249.19999980926514,"fetchStart":249.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":249.19999980926514,"responseEnd":438.5,"responseStart":438.5,"secureConnectionStart":249.19999980926514},{"duration":189.60000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":249.29999923706055,"connectEnd":249.29999923706055,"connectStart":249.29999923706055,"domainLookupEnd":249.29999923706055,"domainLookupStart":249.29999923706055,"fetchStart":249.29999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":249.29999923706055,"responseEnd":438.8999996185303,"responseStart":438.8999996185303,"secureConnectionStart":249.29999923706055},{"duration":253.5999994277954,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":249.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":249.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":503.0999994277954,"responseStart":0,"secureConnectionStart":0},{"duration":189.5999994277954,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":249.69999980926514,"connectEnd":249.69999980926514,"connectStart":249.69999980926514,"domainLookupEnd":249.69999980926514,"domainLookupStart":249.69999980926514,"fetchStart":249.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":249.69999980926514,"responseEnd":439.29999923706055,"responseStart":439.29999923706055,"secureConnectionStart":249.69999980926514},{"duration":253.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/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":249.79999923706055,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":249.79999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":503.29999923706055,"responseStart":0,"secureConnectionStart":0},{"duration":189.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/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":250.0999994277954,"connectEnd":250.0999994277954,"connectStart":250.0999994277954,"domainLookupEnd":250.0999994277954,"domainLookupStart":250.0999994277954,"fetchStart":250.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":250.0999994277954,"responseEnd":439.8999996185303,"responseStart":439.8999996185303,"secureConnectionStart":250.0999994277954},{"duration":807.4000005722046,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":250.79999923706055,"connectEnd":250.79999923706055,"connectStart":250.79999923706055,"domainLookupEnd":250.79999923706055,"domainLookupStart":250.79999923706055,"fetchStart":250.79999923706055,"redirectEnd":0,"redirectStart":0,"requestStart":250.79999923706055,"responseEnd":1058.1999998092651,"responseStart":1058.1999998092651,"secureConnectionStart":250.79999923706055},{"duration":808.6000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":250.89999961853027,"connectEnd":250.89999961853027,"connectStart":250.89999961853027,"domainLookupEnd":250.89999961853027,"domainLookupStart":250.89999961853027,"fetchStart":250.89999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":250.89999961853027,"responseEnd":1059.5,"responseStart":1059.5,"secureConnectionStart":250.89999961853027},{"duration":67,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":515.1999998092651,"connectEnd":515.1999998092651,"connectStart":515.1999998092651,"domainLookupEnd":515.1999998092651,"domainLookupStart":515.1999998092651,"fetchStart":515.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":515.1999998092651,"responseEnd":582.1999998092651,"responseStart":582.1999998092651,"secureConnectionStart":515.1999998092651},{"duration":289.0999994277954,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bv2/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":787.1999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":787.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1076.2999992370605,"responseStart":0,"secureConnectionStart":0},{"duration":290.3999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/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":788,"connectEnd":788,"connectStart":788,"domainLookupEnd":788,"domainLookupStart":788,"fetchStart":788,"redirectEnd":0,"redirectStart":0,"requestStart":788,"responseEnd":1078.3999996185303,"responseStart":1078.3999996185303,"secureConnectionStart":788},{"duration":296.1000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/53a43b6764f587426c7bb9a150184c00-CDN/lu2bv2/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":788.3999996185303,"connectEnd":788.3999996185303,"connectStart":788.3999996185303,"domainLookupEnd":788.3999996185303,"domainLookupStart":788.3999996185303,"fetchStart":788.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":788.3999996185303,"responseEnd":1084.5,"responseStart":1084.5,"secureConnectionStart":788.3999996185303}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":59,"responseStart":243,"responseEnd":244,"domLoading":246,"domInteractive":1079,"domContentLoadedEventStart":1079,"domContentLoadedEventEnd":1116,"domComplete":1451,"loadEventStart":1451,"loadEventEnd":1451,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1062},{"name":"bigPipe.sidebar-id.end","time":1062.7999992370605},{"name":"bigPipe.activity-panel-pipe-id.start","time":1063},{"name":"bigPipe.activity-panel-pipe-id.end","time":1063.8999996185303},{"name":"activityTabFullyLoaded","time":1129.3999996185303}],"measures":[],"correlationId":"b6b0a2bcf7ae6d","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":115,"dbReadsTimeInMs":11,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Thank you for your report!
On one hand looks like you are right. But on other the page says scale should be nonzero in both cases, and that makes both values not fitting your case
"SQL_TRUE if the column has a fixed precision and nonzero scale that are data source-specific.
SQL_FALSE if the column does not have a fixed precision and nonzero scale that are data source-specific."
But yeah, we will fix this.