The following query is fine :
SELECT
|
R.splitlot_id,
|
R.run_id,
|
I.ptest_info_id,
|
COLUMN_GET(R.dynamic_flags,I.ptest_info_id as CHAR(1)),
|
COLUMN_GET(R.dynamic_value,I.ptest_info_id as DECIMAL )
|
FROM
|
wt_ptest_results_rows R INNER JOIN
|
wt_ptest_info I on R.splitlot_id=I.splitlot_id
|
where
|
COLUMN_GET(R.dynamic_value,I.ptest_info_id as DECIMAL) IS NOT NULL;
|
but
CREATE VIEW `wt_ptest_results_view`
|
(splitlot_id,run_id,ptest_info_id,flags,value) AS
|
SELECT
|
R.splitlot_id,
|
R.run_id,
|
I.ptest_info_id,
|
COLUMN_GET(R.dynamic_flags,I.ptest_info_id as CHAR(1)),
|
COLUMN_GET(R.dynamic_value,I.ptest_info_id as DECIMAL )
|
FROM
|
wt_ptest_results_rows R INNER JOIN
|
wt_ptest_info I on R.splitlot_id=I.splitlot_id
|
where
|
COLUMN_GET(R.dynamic_value,I.ptest_info_id as DECIMAL) IS NOT NULL;
|
|
select * from wt_ptest_results_view limit 1;
|
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
|
corresponds to your MariaDB server version for the right syntax to use near ') a
|
s char(1) charset utf8) AS `flags`,cast(column_get(`r`.`dynamic_value`,`i`.`p' a
|
t line 1
|
|
show create view wt_ptest_results_view;
|
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
|
corresponds to your MariaDB server version for the right syntax to use near ') a
|
s char(1) charset utf8) AS `flags`,cast(column_get(`r`.`dynamic_value`,`i`.`p' a
|
t line 1
|
Here is an simplified version of the tables in the test :
CREATE TABLE `wt_ptest_info` (
|
`splitlot_id` int(10) unsigned NOT NULL DEFAULT '0',
|
`ptest_info_id` smallint(5) unsigned NOT NULL DEFAULT '0',
|
KEY `wtptestinfo_splitlot_ptest` (`splitlot_id`,`ptest_info_id`)
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 PACK_KEYS=1
|
|
|
CREATE TABLE `wt_ptest_results_rows` (
|
`splitlot_id` int(10) unsigned NOT NULL DEFAULT '0',
|
`run_id` mediumint(7) unsigned NOT NULL DEFAULT '0',
|
`dynamic_flags` blob,
|
`dynamic_value` blob,
|
PRIMARY KEY (`splitlot_id`,`run_id`)
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
{"report":{"fcp":1013.8000001907349,"ttfb":296.5,"pageVisibility":"visible","entityId":23400,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"847df800-e410-41bb-8a6b-a7683ccc58f7","navigationType":0,"readyForUser":1108,"redirectCount":0,"resourceLoadedEnd":1357.1999998092651,"resourceLoadedStart":301,"resourceTiming":[{"duration":248.0999994277954,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":301,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":301,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":549.0999994277954,"responseStart":0,"secureConnectionStart":0},{"duration":248.19999980926514,"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":301.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":301.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":549.5,"responseStart":0,"secureConnectionStart":0},{"duration":257.1000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":301.3999996185303,"connectEnd":301.3999996185303,"connectStart":301.3999996185303,"domainLookupEnd":301.3999996185303,"domainLookupStart":301.3999996185303,"fetchStart":301.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":301.3999996185303,"responseEnd":558.5,"responseStart":558.5,"secureConnectionStart":301.3999996185303},{"duration":299.80000019073486,"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":301.5999994277954,"connectEnd":301.5999994277954,"connectStart":301.5999994277954,"domainLookupEnd":301.5999994277954,"domainLookupStart":301.5999994277954,"fetchStart":301.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":301.5999994277954,"responseEnd":601.3999996185303,"responseStart":601.3999996185303,"secureConnectionStart":301.5999994277954},{"duration":303.5999994277954,"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":301.80000019073486,"connectEnd":301.80000019073486,"connectStart":301.80000019073486,"domainLookupEnd":301.80000019073486,"domainLookupStart":301.80000019073486,"fetchStart":301.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":301.80000019073486,"responseEnd":605.3999996185303,"responseStart":605.3999996185303,"secureConnectionStart":301.80000019073486},{"duration":304,"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":301.8999996185303,"connectEnd":301.8999996185303,"connectStart":301.8999996185303,"domainLookupEnd":301.8999996185303,"domainLookupStart":301.8999996185303,"fetchStart":301.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":301.8999996185303,"responseEnd":605.8999996185303,"responseStart":605.8999996185303,"secureConnectionStart":301.8999996185303},{"duration":304.1000003814697,"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":302.0999994277954,"connectEnd":302.0999994277954,"connectStart":302.0999994277954,"domainLookupEnd":302.0999994277954,"domainLookupStart":302.0999994277954,"fetchStart":302.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":302.0999994277954,"responseEnd":606.1999998092651,"responseStart":606.1999998092651,"secureConnectionStart":302.0999994277954},{"duration":401.19999980926514,"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":302.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":302.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":703.5,"responseStart":0,"secureConnectionStart":0},{"duration":304.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":302.5,"connectEnd":302.5,"connectStart":302.5,"domainLookupEnd":302.5,"domainLookupStart":302.5,"fetchStart":302.5,"redirectEnd":0,"redirectStart":0,"requestStart":302.5,"responseEnd":606.8000001907349,"responseStart":606.8000001907349,"secureConnectionStart":302.5},{"duration":396.69999980926514,"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":307,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":307,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":703.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":300,"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":307.19999980926514,"connectEnd":307.19999980926514,"connectStart":307.19999980926514,"domainLookupEnd":307.19999980926514,"domainLookupStart":307.19999980926514,"fetchStart":307.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":307.19999980926514,"responseEnd":607.1999998092651,"responseStart":607.1999998092651,"secureConnectionStart":307.19999980926514},{"duration":823.5,"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":315.30000019073486,"connectEnd":315.30000019073486,"connectStart":315.30000019073486,"domainLookupEnd":315.30000019073486,"domainLookupStart":315.30000019073486,"fetchStart":315.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":315.30000019073486,"responseEnd":1138.8000001907349,"responseStart":1138.8000001907349,"secureConnectionStart":315.30000019073486},{"duration":1037.8000001907349,"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":319.3999996185303,"connectEnd":319.3999996185303,"connectStart":319.3999996185303,"domainLookupEnd":319.3999996185303,"domainLookupStart":319.3999996185303,"fetchStart":319.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":319.3999996185303,"responseEnd":1357.1999998092651,"responseStart":1357.1999998092651,"secureConnectionStart":319.3999996185303},{"duration":424.69999980926514,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":715,"connectEnd":715,"connectStart":715,"domainLookupEnd":715,"domainLookupStart":715,"fetchStart":715,"redirectEnd":0,"redirectStart":0,"requestStart":715,"responseEnd":1139.6999998092651,"responseStart":1139.6999998092651,"secureConnectionStart":715},{"duration":372.1000003814697,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1007.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1007.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1379.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":122,"responseStart":297,"responseEnd":320,"domLoading":300,"domInteractive":1383,"domContentLoadedEventStart":1383,"domContentLoadedEventEnd":1430,"domComplete":1912,"loadEventStart":1912,"loadEventEnd":1912,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1359},{"name":"bigPipe.sidebar-id.end","time":1359.8999996185303},{"name":"bigPipe.activity-panel-pipe-id.start","time":1360.0999994277954},{"name":"bigPipe.activity-panel-pipe-id.end","time":1361.5999994277954},{"name":"activityTabFullyLoaded","time":1445.8000001907349}],"measures":[],"correlationId":"49b72d2e55db63","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":106,"dbReadsTimeInMs":12,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
sample data to insert into Dynamic column table schema