Type:
Task
Priority:
Major
Resolution:
Fixed
Let's add automatic conversion operator from LEX_STRING to LEX_CSTRING.
struct st_mysql_lex_string
{
char *str;
size_t length;
#ifdef __cplusplus
// Allow automatic cast from LEX_STRING to LEX_CSTRING in c++.
operator struct st_mysql_const_lex_string() const
{
return {str, length};
}
#endif
This will help to remove some duplicate functions/methods accepting LEX_CSTRING and LEX_STRING and to avoid adding duplicate functions/methods in the future.
Duplicate methods:
Lex_cstring_with_compare( const LEX_STRING src) :
Lex_cstring(src.str, src.length)
{ }
Lex_cstring_with_compare( const LEX_CSTRING src) : Lex_cstring(src.str, src.length)
{ }
Storage_engine_name( const LEX_CSTRING &name)
:m_storage_engine_name(name)
{ }
Storage_engine_name( const LEX_STRING &name)
{
m_storage_engine_name.str= name.str;
m_storage_engine_name.length= name.length;
}
// Append with optional character set conversion from ASCII (e.g. to UCS2)
bool append( const LEX_STRING *ls)
{
DBUG_ASSERT(ls->length < UINT_MAX32 &&
((ls->length == 0 && !ls->str) ||
ls->length == strlen (ls->str)));
return append(ls->str, (uint32) ls->length);
}
bool append( const LEX_CSTRING *ls)
{
DBUG_ASSERT(ls->length < UINT_MAX32 &&
((ls->length == 0 && !ls->str) ||
ls->length == strlen (ls->str)));
return append(ls->str, (uint32) ls->length);
}
The version with LEX_STRING should be removed.
Transition
Time In Source Status
Execution Times
Open
Closed
43m 18s
1
{"report":{"fcp":953.8000001907349,"ttfb":289.80000019073486,"pageVisibility":"visible","entityId":124456,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"b0d7fcf5-0e40-425b-9b61-429652e4511d","navigationType":0,"readyForUser":1039.9000000953674,"redirectCount":0,"resourceLoadedEnd":1018.9000000953674,"resourceLoadedStart":304,"resourceTiming":[{"duration":154.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":304,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":304,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":458.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":154.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/de66727265cf9bacb834a09f7715209c/_/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":304.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":304.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":458.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":163.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":304.40000009536743,"connectEnd":304.40000009536743,"connectStart":304.40000009536743,"domainLookupEnd":304.40000009536743,"domainLookupStart":304.40000009536743,"fetchStart":304.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":304.40000009536743,"responseEnd":468.2000002861023,"responseStart":468.2000002861023,"secureConnectionStart":304.40000009536743},{"duration":252.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/de66727265cf9bacb834a09f7715209c/_/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":304.6000003814697,"connectEnd":304.6000003814697,"connectStart":304.6000003814697,"domainLookupEnd":304.6000003814697,"domainLookupStart":304.6000003814697,"fetchStart":304.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":304.6000003814697,"responseEnd":556.9000000953674,"responseStart":556.9000000953674,"secureConnectionStart":304.6000003814697},{"duration":256.69999980926514,"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":304.80000019073486,"connectEnd":304.80000019073486,"connectStart":304.80000019073486,"domainLookupEnd":304.80000019073486,"domainLookupStart":304.80000019073486,"fetchStart":304.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":304.80000019073486,"responseEnd":561.5,"responseStart":561.5,"secureConnectionStart":304.80000019073486},{"duration":257,"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":305,"connectEnd":305,"connectStart":305,"domainLookupEnd":305,"domainLookupStart":305,"fetchStart":305,"redirectEnd":0,"redirectStart":0,"requestStart":305,"responseEnd":562,"responseStart":562,"secureConnectionStart":305},{"duration":257.09999990463257,"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":305.2000002861023,"connectEnd":305.2000002861023,"connectStart":305.2000002861023,"domainLookupEnd":305.2000002861023,"domainLookupStart":305.2000002861023,"fetchStart":305.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":305.2000002861023,"responseEnd":562.3000001907349,"responseStart":562.3000001907349,"secureConnectionStart":305.2000002861023},{"duration":312.09999990463257,"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":305.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":305.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":617.5,"responseStart":0,"secureConnectionStart":0},{"duration":257.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":305.7000002861023,"connectEnd":305.7000002861023,"connectStart":305.7000002861023,"domainLookupEnd":305.7000002861023,"domainLookupStart":305.7000002861023,"fetchStart":305.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":305.7000002861023,"responseEnd":563.2000002861023,"responseStart":563.2000002861023,"secureConnectionStart":305.7000002861023},{"duration":311.80000019073486,"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":305.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":305.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":617.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":258.2000002861023,"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":306,"connectEnd":306,"connectStart":306,"domainLookupEnd":306,"domainLookupStart":306,"fetchStart":306,"redirectEnd":0,"redirectStart":0,"requestStart":306,"responseEnd":564.2000002861023,"responseStart":564.2000002861023,"secureConnectionStart":306},{"duration":664.2000002861023,"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":307,"connectEnd":307,"connectStart":307,"domainLookupEnd":307,"domainLookupStart":307,"fetchStart":307,"redirectEnd":0,"redirectStart":0,"requestStart":307,"responseEnd":971.2000002861023,"responseStart":971.2000002861023,"secureConnectionStart":307},{"duration":711.7999997138977,"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":307.1000003814697,"connectEnd":307.1000003814697,"connectStart":307.1000003814697,"domainLookupEnd":307.1000003814697,"domainLookupStart":307.1000003814697,"fetchStart":307.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":307.1000003814697,"responseEnd":1018.9000000953674,"responseStart":1018.9000000953674,"secureConnectionStart":307.1000003814697},{"duration":346.69999980926514,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":629.7000002861023,"connectEnd":629.7000002861023,"connectStart":629.7000002861023,"domainLookupEnd":629.7000002861023,"domainLookupStart":629.7000002861023,"fetchStart":629.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":629.7000002861023,"responseEnd":976.4000000953674,"responseStart":976.4000000953674,"secureConnectionStart":629.7000002861023},{"duration":156.60000038146973,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":947.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":947.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1104.1000003814697,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":85,"responseStart":290,"responseEnd":291,"domLoading":302,"domInteractive":1196,"domContentLoadedEventStart":1196,"domContentLoadedEventEnd":1245,"domComplete":1406,"loadEventStart":1406,"loadEventEnd":1407,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1176.1000003814697},{"name":"bigPipe.sidebar-id.end","time":1177.1000003814697},{"name":"bigPipe.activity-panel-pipe-id.start","time":1178},{"name":"bigPipe.activity-panel-pipe-id.end","time":1179.1000003814697},{"name":"activityTabFullyLoaded","time":1261}],"measures":[],"correlationId":"71c17a5df5b3d9","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":126,"dbReadsTimeInMs":15,"dbConnsTimeInMs":39,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}