that'd be str->append(). q_append() means "quick append" that doesn't check if there's enough space and assumes the caller knows what he's doing. Invoking reserve() explicitly every time before q_append() makes little sense, one can just as well use append().
Sergei Golubchik
added a comment - that'd be str->append() . q_append() means "quick append" that doesn't check if there's enough space and assumes the caller knows what he's doing. Invoking reserve() explicitly every time before q_append() makes little sense, one can just as well use append() .
I would like to replace all q_appends with append, but that would be too big of a change. So, I will make spider_string::q_append() behave exactly same as spider_string::append(). Then, I'd gradually remove q_apppend(). I will do this on 10.3+.
Nayuta Yanagisawa (Inactive)
added a comment - - edited Thank you for your comment.
I would like to replace all q_appends with append, but that would be too big of a change. So, I will make spider_string::q_append() behave exactly same as spider_string::append() . Then, I'd gradually remove q_apppend() . I will do this on 10.3+.
I noticed that we cannot simply replace spider_string::q_append() with spider_string::append() because Spider relies on the fact that q_append() never call String::realloc_with_efraxtra_if_needed(). realloc_with_efraxtra_if_needed() might wipes the data, in String::Ptr, which is placed beyond String::str_length.
For example, the test spider.ha fails, if we do the simple replacement. That is because spider_mbase_share::append_table_name_with_adjusting() behaves wrongly.
Nayuta Yanagisawa (Inactive)
added a comment - - edited I noticed that we cannot simply replace spider_string::q_append() with spider_string::append() because Spider relies on the fact that q_append() never call String::realloc_with_efraxtra_if_needed() . realloc_with_efraxtra_if_needed() might wipes the data, in String::Ptr , which is placed beyond String::str_length .
For example, the test spider.ha fails, if we do the simple replacement. That is because spider_mbase_share::append_table_name_with_adjusting() behaves wrongly.
I think that we can avoid relying on the implicit assumption by using spider_string::replace() instead of spider_string::length() + spider_string::q_append(). However, I wouldn't like to make major change in GA older versions. So, I will limit the scope of the issue to 10.9+.
Nayuta Yanagisawa (Inactive)
added a comment - - edited I think that we can avoid relying on the implicit assumption by using spider_string::replace() instead of spider_string::length() + spider_string::q_append() . However, I wouldn't like to make major change in GA older versions. So, I will limit the scope of the issue to 10.9+.
spider_string::q_append and other methods are modelled after String methods in sql/sql_string.h.
I think it'd be very confusing if methods with identical names (e.g. q_append) will start behaving differently in spider_string and String)
Sergei Golubchik
added a comment - spider_string::q_append and other methods are modelled after String methods in sql/sql_string.h .
I think it'd be very confusing if methods with identical names (e.g. q_append ) will start behaving differently in spider_string and String )
People
Yuchen Pei
Nayuta Yanagisawa (Inactive)
Votes:
0Vote for this issue
Watchers:
5Start watching this issue
Dates
Created:
Updated:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":873.7999997138977,"ttfb":281,"pageVisibility":"visible","entityId":107418,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"d1c764a8-f3cb-4a92-970e-423864d98042","navigationType":0,"readyForUser":982.1999998092651,"redirectCount":0,"resourceLoadedEnd":591.9000000953674,"resourceLoadedStart":289.69999980926514,"resourceTiming":[{"duration":6.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":289.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":289.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":296.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":6.899999618530273,"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":289.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":289.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":296.7999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":189.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":290.09999990463257,"connectEnd":290.09999990463257,"connectStart":290.09999990463257,"domainLookupEnd":290.09999990463257,"domainLookupStart":290.09999990463257,"fetchStart":290.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":301.7999997138977,"responseEnd":479.59999990463257,"responseStart":315.19999980926514,"secureConnectionStart":290.09999990463257},{"duration":301.7000002861023,"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":290.19999980926514,"connectEnd":301.2999997138977,"connectStart":301.2999997138977,"domainLookupEnd":301.2999997138977,"domainLookupStart":301.2999997138977,"fetchStart":290.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":301.69999980926514,"responseEnd":591.9000000953674,"responseStart":318.69999980926514,"secureConnectionStart":301.2999997138977},{"duration":30.399999618530273,"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":290.40000009536743,"connectEnd":290.40000009536743,"connectStart":290.40000009536743,"domainLookupEnd":290.40000009536743,"domainLookupStart":290.40000009536743,"fetchStart":290.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":302.40000009536743,"responseEnd":320.7999997138977,"responseStart":317.7999997138977,"secureConnectionStart":290.40000009536743},{"duration":39.69999980926514,"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":290.59999990463257,"connectEnd":290.59999990463257,"connectStart":290.59999990463257,"domainLookupEnd":290.59999990463257,"domainLookupStart":290.59999990463257,"fetchStart":290.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":307.69999980926514,"responseEnd":330.2999997138977,"responseStart":327.69999980926514,"secureConnectionStart":290.59999990463257},{"duration":39.200000286102295,"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":290.7999997138977,"connectEnd":290.7999997138977,"connectStart":290.7999997138977,"domainLookupEnd":290.7999997138977,"domainLookupStart":290.7999997138977,"fetchStart":290.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":306.09999990463257,"responseEnd":330,"responseStart":327,"secureConnectionStart":290.7999997138977},{"duration":12.199999809265137,"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":291,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":291,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":303.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":40.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":291.19999980926514,"connectEnd":291.19999980926514,"connectStart":291.19999980926514,"domainLookupEnd":291.19999980926514,"domainLookupStart":291.19999980926514,"fetchStart":291.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":308.5,"responseEnd":332.09999990463257,"responseStart":328.59999990463257,"secureConnectionStart":291.19999980926514},{"duration":15.599999904632568,"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":291.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":291.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":307,"responseStart":0,"secureConnectionStart":0},{"duration":51.90000009536743,"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":291.5,"connectEnd":291.5,"connectStart":291.5,"domainLookupEnd":291.5,"domainLookupStart":291.5,"fetchStart":291.5,"redirectEnd":0,"redirectStart":0,"requestStart":314.69999980926514,"responseEnd":343.40000009536743,"responseStart":334.09999990463257,"secureConnectionStart":291.5},{"duration":275.90000009536743,"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":294.7999997138977,"connectEnd":294.7999997138977,"connectStart":294.7999997138977,"domainLookupEnd":294.7999997138977,"domainLookupStart":294.7999997138977,"fetchStart":294.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":332.90000009536743,"responseEnd":570.6999998092651,"responseStart":566.4000000953674,"secureConnectionStart":294.7999997138977},{"duration":276.40000009536743,"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":297.69999980926514,"connectEnd":297.69999980926514,"connectStart":297.69999980926514,"domainLookupEnd":297.69999980926514,"domainLookupStart":297.69999980926514,"fetchStart":297.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":350.90000009536743,"responseEnd":574.0999999046326,"responseStart":568.5999999046326,"secureConnectionStart":297.69999980926514},{"duration":95.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":629.2999997138977,"connectEnd":629.2999997138977,"connectStart":629.2999997138977,"domainLookupEnd":629.2999997138977,"domainLookupStart":629.2999997138977,"fetchStart":629.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":691.5,"responseEnd":724.7999997138977,"responseStart":724.0999999046326,"secureConnectionStart":629.2999997138977},{"duration":146.69999980926514,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":868,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":868,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1014.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":174.80000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":874.2999997138977,"connectEnd":874.2999997138977,"connectStart":874.2999997138977,"domainLookupEnd":874.2999997138977,"domainLookupStart":874.2999997138977,"fetchStart":874.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":1015.0999999046326,"responseEnd":1049.0999999046326,"responseStart":1048.1999998092651,"secureConnectionStart":874.2999997138977}],"fetchStart":0,"domainLookupStart":35,"domainLookupEnd":92,"connectStart":92,"connectEnd":111,"secureConnectionStart":100,"requestStart":112,"responseStart":281,"responseEnd":297,"domLoading":285,"domInteractive":1041,"domContentLoadedEventStart":1041,"domContentLoadedEventEnd":1087,"domComplete":1450,"loadEventStart":1450,"loadEventEnd":1451,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1016.7999997138977},{"name":"bigPipe.sidebar-id.end","time":1017.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":1017.7999997138977},{"name":"bigPipe.activity-panel-pipe-id.end","time":1019.5},{"name":"activityTabFullyLoaded","time":1110}],"measures":[],"correlationId":"6fe7f89fec658","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":99,"dbReadsTimeInMs":13,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
that'd be str->append(). q_append() means "quick append" that doesn't check if there's enough space and assumes the caller knows what he's doing. Invoking reserve() explicitly every time before q_append() makes little sense, one can just as well use append().