Feature request for Oracle/DB2 migration compatibility:
We are using the window function "ROW_NUMBER() OVER()" to generate the row sequence number required for pagination across the pages. For example:
SELECT ROW_NUMBER() OVER() as RN, COL1, COL2 FROM MYTABLE;
|
Since there is no expression given in the OVER() clause, DB2 will just assign sequential numbers to the output. The column RN returned from the query will have numbers in perfect order.
However, MariaDB does not guarantee the numbers in order without an explicit ORDER BY.
This will require query re-writing in order to migrate.
- relates to
-
MDEV-12743
Wrong results with ROW_NUMBER OVER
-
-
Closed
{"report":{"fcp":1013.7999999523163,"ttfb":216.60000014305115,"pageVisibility":"visible","entityId":61314,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"ccdecfe1-d181-48aa-8470-8b542e88e32d","navigationType":0,"readyForUser":1087.6000001430511,"redirectCount":0,"resourceLoadedEnd":1428.7999999523163,"resourceLoadedStart":222.10000014305115,"resourceTiming":[{"duration":293.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":222.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":222.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":515.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":293,"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":222.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":222.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":515.5,"responseStart":0,"secureConnectionStart":0},{"duration":302.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":222.70000004768372,"connectEnd":222.70000004768372,"connectStart":222.70000004768372,"domainLookupEnd":222.70000004768372,"domainLookupStart":222.70000004768372,"fetchStart":222.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":222.70000004768372,"responseEnd":525.1000001430511,"responseStart":525.1000001430511,"secureConnectionStart":222.70000004768372},{"duration":347.7999999523163,"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":222.90000009536743,"connectEnd":222.90000009536743,"connectStart":222.90000009536743,"domainLookupEnd":222.90000009536743,"domainLookupStart":222.90000009536743,"fetchStart":222.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":222.90000009536743,"responseEnd":570.7000000476837,"responseStart":570.7000000476837,"secureConnectionStart":222.90000009536743},{"duration":352.19999980926514,"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":223.10000014305115,"connectEnd":223.10000014305115,"connectStart":223.10000014305115,"domainLookupEnd":223.10000014305115,"domainLookupStart":223.10000014305115,"fetchStart":223.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":223.10000014305115,"responseEnd":575.2999999523163,"responseStart":575.2999999523163,"secureConnectionStart":223.10000014305115},{"duration":352.7000000476837,"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":223.20000004768372,"connectEnd":223.20000004768372,"connectStart":223.20000004768372,"domainLookupEnd":223.20000004768372,"domainLookupStart":223.20000004768372,"fetchStart":223.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":223.20000004768372,"responseEnd":575.9000000953674,"responseStart":575.9000000953674,"secureConnectionStart":223.20000004768372},{"duration":352.89999985694885,"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":223.40000009536743,"connectEnd":223.40000009536743,"connectStart":223.40000009536743,"domainLookupEnd":223.40000009536743,"domainLookupStart":223.40000009536743,"fetchStart":223.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":223.40000009536743,"responseEnd":576.2999999523163,"responseStart":576.2999999523163,"secureConnectionStart":223.40000009536743},{"duration":448.89999985694885,"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":223.60000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":223.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":672.5,"responseStart":0,"secureConnectionStart":0},{"duration":353,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":223.79999995231628,"connectEnd":223.79999995231628,"connectStart":223.79999995231628,"domainLookupEnd":223.79999995231628,"domainLookupStart":223.79999995231628,"fetchStart":223.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":223.79999995231628,"responseEnd":576.7999999523163,"responseStart":576.7999999523163,"secureConnectionStart":223.79999995231628},{"duration":448.7000000476837,"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":223.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":223.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":672.6000001430511,"responseStart":0,"secureConnectionStart":0},{"duration":353.19999980926514,"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":224.10000014305115,"connectEnd":224.10000014305115,"connectStart":224.10000014305115,"domainLookupEnd":224.10000014305115,"domainLookupStart":224.10000014305115,"fetchStart":224.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":224.10000014305115,"responseEnd":577.2999999523163,"responseStart":577.2999999523163,"secureConnectionStart":224.10000014305115},{"duration":569.7999999523163,"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":229.40000009536743,"connectEnd":229.40000009536743,"connectStart":229.40000009536743,"domainLookupEnd":229.40000009536743,"domainLookupStart":229.40000009536743,"fetchStart":229.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":229.40000009536743,"responseEnd":799.2000000476837,"responseStart":799.2000000476837,"secureConnectionStart":229.40000009536743},{"duration":1199.2999999523163,"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":229.5,"connectEnd":229.5,"connectStart":229.5,"domainLookupEnd":229.5,"domainLookupStart":229.5,"fetchStart":229.5,"redirectEnd":0,"redirectStart":0,"requestStart":229.5,"responseEnd":1428.7999999523163,"responseStart":1428.7999999523163,"secureConnectionStart":229.5},{"duration":168.79999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":687.1000001430511,"connectEnd":687.1000001430511,"connectStart":687.1000001430511,"domainLookupEnd":687.1000001430511,"domainLookupStart":687.1000001430511,"fetchStart":687.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":687.1000001430511,"responseEnd":855.9000000953674,"responseStart":855.9000000953674,"secureConnectionStart":687.1000001430511},{"duration":542.5999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-jira.view.issue,-jira.navigator.kickass,-viewissue.standalone,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":952.1000001430511,"connectEnd":952.1000001430511,"connectStart":952.1000001430511,"domainLookupEnd":952.1000001430511,"domainLookupStart":952.1000001430511,"fetchStart":952.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":952.1000001430511,"responseEnd":1494.7000000476837,"responseStart":1494.7000000476837,"secureConnectionStart":952.1000001430511}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":63,"responseStart":216,"responseEnd":223,"domLoading":219,"domInteractive":1448,"domContentLoadedEventStart":1448,"domContentLoadedEventEnd":1488,"domComplete":2064,"loadEventStart":2064,"loadEventEnd":2064,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1430.7000000476837},{"name":"bigPipe.sidebar-id.end","time":1431.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1431.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1433.1000001430511},{"name":"activityTabFullyLoaded","time":1501.6000001430511}],"measures":[],"correlationId":"5468c0221b8570","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":95,"dbReadsTimeInMs":11,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
(I assume "ROW_NUMBER() ORDER()" had a typo, changed it to be "ROW_NUMBER() OVER()" )