Type:
Task
Priority:
Major
Resolution:
Fixed
Item_func_hex::val_str_ascii() has a few tests on args[0] ->result_type() .
if (args[0]->result_type() == REAL_RESULT ||
args[0]->result_type() == DECIMAL_RESULT)
We'll move the data type specific code to the corresponding Type_handler_xxx , and rewrite Item_func_hex::val_str_ascii() to call a virtual method in Type_handler , e.g. about like this:
String *val_str_ascii(String *str)
{
return args[0]->type_handler()->Item_func_hex_val_str_ascii( this , str);
}
Note, the value of args[0] ->type_handler() can be cached at fix_length_and_dec() time, to have fewer virtual calls at run time:
String *val_str_ascii(String *str)
{
return m_handler->Item_func_hex_val_str_ascii( this , str);
}
blocks
MDEV-4912
Data type plugin API version 1
Closed
Alexander Barkov
made changes -
2016-11-16 14:02
Status
Open
[ 1
]
In Progress
[ 3
]
Alexander Barkov
made changes -
2016-11-16 14:05
Description
{{Item_func_hex::val_str_ascii()}} has a few tests on {{args[0]->result_type()}}.
{code}
if (args[0]->result_type() == REAL_RESULT ||
args[0]->result_type() == DECIMAL_RESULT)
{code}
We'll move the data type specific code to the corresponding {{Type_handler_xxx}}, and rewrite {{Item_func_hex::val_str_ascii()}} to call a virtual method in {{Type_handler}}, e.g. about like this:
{code}
String *val_str_ascii(String *str)
{
return args[0]->type_handler()->Item_func_hex_val_str_ascii(this, str);
}
{code}
Note, the value of {{args[0]->type_handler()}} can be cached at {{fix_length_and_dec()}} time, to less fewer virtual calls at run time:
{code}
String *val_str_ascii(String *str)
{
return m_handler->Item_func_hex_val_str_ascii(this, str);
}
{code}
{{Item_func_hex::val_str_ascii()}} has a few tests on {{args[0]->result_type()}}.
{code:cpp}
if (args[0]->result_type() == REAL_RESULT ||
args[0]->result_type() == DECIMAL_RESULT)
{code}
We'll move the data type specific code to the corresponding {{Type_handler_xxx}}, and rewrite {{Item_func_hex::val_str_ascii()}} to call a virtual method in {{Type_handler}}, e.g. about like this:
{code:cpp}
String *val_str_ascii(String *str)
{
return args[0]->type_handler()->Item_func_hex_val_str_ascii(this, str);
}
{code}
Note, the value of {{args[0]->type_handler()}} can be cached at {{fix_length_and_dec()}} time, to less fewer virtual calls at run time:
{code:cpp}
String *val_str_ascii(String *str)
{
return m_handler->Item_func_hex_val_str_ascii(this, str);
}
{code}
Alexander Barkov
made changes -
2016-11-16 14:06
Description
{{Item_func_hex::val_str_ascii()}} has a few tests on {{args[0]->result_type()}}.
{code:cpp}
if (args[0]->result_type() == REAL_RESULT ||
args[0]->result_type() == DECIMAL_RESULT)
{code}
We'll move the data type specific code to the corresponding {{Type_handler_xxx}}, and rewrite {{Item_func_hex::val_str_ascii()}} to call a virtual method in {{Type_handler}}, e.g. about like this:
{code:cpp}
String *val_str_ascii(String *str)
{
return args[0]->type_handler()->Item_func_hex_val_str_ascii(this, str);
}
{code}
Note, the value of {{args[0]->type_handler()}} can be cached at {{fix_length_and_dec()}} time, to less fewer virtual calls at run time:
{code:cpp}
String *val_str_ascii(String *str)
{
return m_handler->Item_func_hex_val_str_ascii(this, str);
}
{code}
{{Item_func_hex::val_str_ascii()}} has a few tests on {{args[0]->result_type()}}.
{code:cpp}
if (args[0]->result_type() == REAL_RESULT ||
args[0]->result_type() == DECIMAL_RESULT)
{code}
We'll move the data type specific code to the corresponding {{Type_handler_xxx}}, and rewrite {{Item_func_hex::val_str_ascii()}} to call a virtual method in {{Type_handler}}, e.g. about like this:
{code:cpp}
String *val_str_ascii(String *str)
{
return args[0]->type_handler()->Item_func_hex_val_str_ascii(this, str);
}
{code}
Note, the value of {{args[0]->type_handler()}} can be cached at {{fix_length_and_dec()}} time, to have fewer virtual calls at run time:
{code:cpp}
String *val_str_ascii(String *str)
{
return m_handler->Item_func_hex_val_str_ascii(this, str);
}
{code}
Alexander Barkov
made changes -
2016-11-21 14:16
Assignee
Alexander Barkov
[ bar
]
Alexey Botchkov
[ holyfoot
]
Status
In Progress
[ 3
]
In Review
[ 10002
]
Alexey Botchkov
made changes -
2016-11-30 13:48
Status
In Review
[ 10002
]
Stalled
[ 10000
]
Alexey Botchkov
made changes -
2016-11-30 13:48
Assignee
Alexey Botchkov
[ holyfoot
]
Alexander Barkov
[ bar
]
Alexander Barkov
made changes -
2016-12-01 07:58
Status
Stalled
[ 10000
]
In Progress
[ 3
]
Alexander Barkov
made changes -
2016-12-01 07:59
issue.field.resolutiondate
2016-12-01 07:59:12.0
2016-12-01 07:59:12.394
Alexander Barkov
made changes -
2016-12-01 07:59
Fix Version/s
10.3.0
[ 22127
]
Fix Version/s
10.3
[ 22126
]
Resolution
Fixed
[ 1
]
Status
In Progress
[ 3
]
Closed
[ 6
]
Sergei Golubchik
made changes -
2021-12-06 21:23
Workflow
MariaDB v3
[ 78323
]
MariaDB v4
[ 133003
]
{"report":{"fcp":1309.0999999046326,"ttfb":335.3999996185303,"pageVisibility":"visible","entityId":58923,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"528eb3d6-a97c-4b02-8a3e-1c74cd7a7741","navigationType":0,"readyForUser":1398.0999999046326,"redirectCount":0,"resourceLoadedEnd":2106.5999999046326,"resourceLoadedStart":348.5,"resourceTiming":[{"duration":467.2999997138977,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":348.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":348.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":815.7999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":467.30000019073486,"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":348.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":348.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":816.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":471.7999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":349.09999990463257,"connectEnd":349.09999990463257,"connectStart":349.09999990463257,"domainLookupEnd":349.09999990463257,"domainLookupStart":349.09999990463257,"fetchStart":349.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":349.09999990463257,"responseEnd":820.8999996185303,"responseStart":820.8999996185303,"secureConnectionStart":349.09999990463257},{"duration":500,"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":351.7999997138977,"connectEnd":351.7999997138977,"connectStart":351.7999997138977,"domainLookupEnd":351.7999997138977,"domainLookupStart":351.7999997138977,"fetchStart":351.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":351.7999997138977,"responseEnd":851.7999997138977,"responseStart":851.7999997138977,"secureConnectionStart":351.7999997138977},{"duration":506.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":352.09999990463257,"connectEnd":352.09999990463257,"connectStart":352.09999990463257,"domainLookupEnd":352.09999990463257,"domainLookupStart":352.09999990463257,"fetchStart":352.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":352.09999990463257,"responseEnd":858.5999999046326,"responseStart":858.5,"secureConnectionStart":352.09999990463257},{"duration":508.59999990463257,"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":352.2999997138977,"connectEnd":352.2999997138977,"connectStart":352.2999997138977,"domainLookupEnd":352.2999997138977,"domainLookupStart":352.2999997138977,"fetchStart":352.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":352.2999997138977,"responseEnd":860.8999996185303,"responseStart":860.8999996185303,"secureConnectionStart":352.2999997138977},{"duration":514.6000003814697,"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":352.3999996185303,"connectEnd":352.3999996185303,"connectStart":352.3999996185303,"domainLookupEnd":352.3999996185303,"domainLookupStart":352.3999996185303,"fetchStart":352.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":352.3999996185303,"responseEnd":867,"responseStart":867,"secureConnectionStart":352.3999996185303},{"duration":660.0999999046326,"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":352.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":352.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1012.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":517.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":352.7999997138977,"connectEnd":352.7999997138977,"connectStart":352.7999997138977,"domainLookupEnd":352.7999997138977,"domainLookupStart":352.7999997138977,"fetchStart":352.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":352.7999997138977,"responseEnd":870.2999997138977,"responseStart":870.2999997138977,"secureConnectionStart":352.7999997138977},{"duration":659.7999997138977,"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":353.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":353.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1012.8999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":518,"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":353.19999980926514,"connectEnd":353.19999980926514,"connectStart":353.19999980926514,"domainLookupEnd":353.19999980926514,"domainLookupStart":353.19999980926514,"fetchStart":353.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":353.19999980926514,"responseEnd":871.1999998092651,"responseStart":871.0999999046326,"secureConnectionStart":353.19999980926514},{"duration":1002.5,"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":354.19999980926514,"connectEnd":354.19999980926514,"connectStart":354.19999980926514,"domainLookupEnd":354.19999980926514,"domainLookupStart":354.19999980926514,"fetchStart":354.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":354.19999980926514,"responseEnd":1356.6999998092651,"responseStart":1356.6999998092651,"secureConnectionStart":354.19999980926514},{"duration":1747.8000001907349,"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":358.7999997138977,"connectEnd":358.7999997138977,"connectStart":358.7999997138977,"domainLookupEnd":358.7999997138977,"domainLookupStart":358.7999997138977,"fetchStart":358.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":358.7999997138977,"responseEnd":2106.5999999046326,"responseStart":2106.5999999046326,"secureConnectionStart":358.7999997138977},{"duration":984.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1085.2999997138977,"connectEnd":1085.2999997138977,"connectStart":1085.2999997138977,"domainLookupEnd":1085.2999997138977,"domainLookupStart":1085.2999997138977,"fetchStart":1085.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":1085.2999997138977,"responseEnd":2069.7999997138977,"responseStart":2069.7999997138977,"secureConnectionStart":1085.2999997138977},{"duration":841.3000001907349,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1296.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1296.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2138.0999999046326,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":135,"responseStart":336,"responseEnd":350,"domLoading":344,"domInteractive":2140,"domContentLoadedEventStart":2140,"domContentLoadedEventEnd":2189,"domComplete":2736,"loadEventStart":2737,"loadEventEnd":2737,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2111.2999997138977},{"name":"bigPipe.sidebar-id.end","time":2112.199999809265},{"name":"bigPipe.activity-panel-pipe-id.start","time":2112.3999996185303},{"name":"bigPipe.activity-panel-pipe-id.end","time":2116.7999997138977},{"name":"activityTabFullyLoaded","time":2208.2999997138977}],"measures":[],"correlationId":"a342c66e4e2ce2","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":141,"dbReadsTimeInMs":29,"dbConnsTimeInMs":40,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}