Type:
Task
Priority:
Minor
Resolution:
Unresolved
Fix Version/s:
None
Feature Request
Support expressions in the LIMIT clause, not just integers,
such as SELECT * FROM tbl LIMIT (1 * :param)
Both SQLite and Postgres allow similar. And it would be kind of helpful for PHP users, to eschew the emulated prepared statement driver situation there.
(Bound parameters are interpolated as strings per default, and MariaDB doesn't permit `LIMIT '20'` clauses of course.)
It's entirely sufficient to support scalar expressions of course. There's no need for incorporating column references etc.
mario
created issue -
2015-01-14 21:54
mario
made changes -
2015-01-14 21:56
Field
Original Value
New Value
Description
-Feature Request-
Support expressions in the LIMIT clause, not just integers,
such as SELECT * FROM tbl LIMIT (1 * :param)
Both SQLite and Postgres allow similar. And it would be kind of helpful for PHP users, to eschew the emulated prepared statement driver situation there.
(Bound parameters are interpolated as strings per default, and MariaDB doesn't permit `LIMIT '20'` clauses of course.)
It's entirely sufficient to support scalar expressions of course. There's no need for incorporating column references etc.
_Feature Request_
Support expressions in the LIMIT clause, not just integers,
such as SELECT * FROM tbl LIMIT (1 * :param)
Both SQLite and Postgres allow similar. And it would be kind of helpful for PHP users, to eschew the emulated prepared statement driver situation there.
(Bound parameters are interpolated as strings per default, and MariaDB doesn't permit `LIMIT '20'` clauses of course.)
It's entirely sufficient to support scalar expressions of course. There's no need for incorporating column references etc.
Sergei Golubchik
made changes -
2021-12-06 21:20
Workflow
MariaDB v3
[ 62942
]
MariaDB v4
[ 130303
]
{"report":{"fcp":1405.1999998092651,"ttfb":605.3999996185303,"pageVisibility":"visible","entityId":49631,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":0.5,"journeyId":"a7b125f9-383b-4034-865c-34fe2fec5098","navigationType":0,"readyForUser":1467.5999994277954,"redirectCount":0,"resourceLoadedEnd":1645.5999994277954,"resourceLoadedStart":610.5999994277954,"resourceTiming":[{"duration":224.30000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":610.5999994277954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":610.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":834.8999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":224.5,"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":610.8999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":610.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":835.3999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":278.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":611,"connectEnd":611,"connectStart":611,"domainLookupEnd":611,"domainLookupStart":611,"fetchStart":611,"redirectEnd":0,"redirectStart":0,"requestStart":611,"responseEnd":889.1999998092651,"responseStart":889.1999998092651,"secureConnectionStart":611},{"duration":330.30000019073486,"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":611.1999998092651,"connectEnd":611.1999998092651,"connectStart":611.1999998092651,"domainLookupEnd":611.1999998092651,"domainLookupStart":611.1999998092651,"fetchStart":611.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":611.1999998092651,"responseEnd":941.5,"responseStart":941.5,"secureConnectionStart":611.1999998092651},{"duration":333.5,"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":611.5,"connectEnd":611.5,"connectStart":611.5,"domainLookupEnd":611.5,"domainLookupStart":611.5,"fetchStart":611.5,"redirectEnd":0,"redirectStart":0,"requestStart":611.5,"responseEnd":945,"responseStart":945,"secureConnectionStart":611.5},{"duration":333.8999996185303,"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":611.6999998092651,"connectEnd":611.6999998092651,"connectStart":611.6999998092651,"domainLookupEnd":611.6999998092651,"domainLookupStart":611.6999998092651,"fetchStart":611.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":611.6999998092651,"responseEnd":945.5999994277954,"responseStart":945.5999994277954,"secureConnectionStart":611.6999998092651},{"duration":334.29999923706055,"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":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":946.0999994277954,"responseStart":946.0999994277954,"secureConnectionStart":611.8000001907349},{"duration":420.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":612,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":612,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1032.5,"responseStart":0,"secureConnectionStart":0},{"duration":334.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":612,"connectEnd":612,"connectStart":612,"domainLookupEnd":612,"domainLookupStart":612,"fetchStart":612,"redirectEnd":0,"redirectStart":0,"requestStart":612,"responseEnd":946.6999998092651,"responseStart":946.6999998092651,"secureConnectionStart":612},{"duration":420.3999996185303,"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":612.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":612.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1032.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":335,"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":612.3999996185303,"connectEnd":612.3999996185303,"connectStart":612.3999996185303,"domainLookupEnd":612.3999996185303,"domainLookupStart":612.3999996185303,"fetchStart":612.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":612.3999996185303,"responseEnd":947.3999996185303,"responseStart":947.3999996185303,"secureConnectionStart":612.3999996185303},{"duration":1027.1999998092651,"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":613.3000001907349,"connectEnd":613.3000001907349,"connectStart":613.3000001907349,"domainLookupEnd":613.3000001907349,"domainLookupStart":613.3000001907349,"fetchStart":613.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":613.3000001907349,"responseEnd":1640.5,"responseStart":1640.5,"secureConnectionStart":613.3000001907349},{"duration":1027.3999996185303,"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":617.3000001907349,"connectEnd":617.3000001907349,"connectStart":617.3000001907349,"domainLookupEnd":617.3000001907349,"domainLookupStart":617.3000001907349,"fetchStart":617.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":617.3000001907349,"responseEnd":1644.6999998092651,"responseStart":1644.6999998092651,"secureConnectionStart":617.3000001907349},{"duration":77.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1044.1999998092651,"connectEnd":1044.1999998092651,"connectStart":1044.1999998092651,"domainLookupEnd":1044.1999998092651,"domainLookupStart":1044.1999998092651,"fetchStart":1044.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1044.1999998092651,"responseEnd":1121.6999998092651,"responseStart":1121.6999998092651,"secureConnectionStart":1044.1999998092651},{"duration":338.19999980926514,"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":1307.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1307.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1645.5999994277954,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":451,"responseStart":606,"responseEnd":612,"domLoading":609,"domInteractive":1664,"domContentLoadedEventStart":1664,"domContentLoadedEventEnd":1701,"domComplete":2021,"loadEventStart":2021,"loadEventEnd":2022,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1646.3000001907349},{"name":"bigPipe.sidebar-id.end","time":1647.0999994277954},{"name":"bigPipe.activity-panel-pipe-id.start","time":1647.3999996185303},{"name":"bigPipe.activity-panel-pipe-id.end","time":1648.5999994277954},{"name":"activityTabFullyLoaded","time":1711}],"measures":[],"correlationId":"a1eb49cfc07977","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":99,"dbReadsTimeInMs":15,"dbConnsTimeInMs":25,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}