improvement. change unessesary mem copy in for index substring call (#11405)
improvement. change unessesary mem copy in for index substring call (#11405)

Test pass, auto merge by Bot
qiuyesuifeng/tidb,pingcap/tidb,pingcap/tidb,cosmtrek/tidb,pingcap/tidb,XuHuaiyu/tidb,pingcap/tidb,ming-relax/tidb,EvilMcJerkface/tidb,ngaut/tidb,c4pt0r/tidb,ngaut/tidb,kyle-wang/tidb,pingcap/tidb,ming-relax/tidb,ngaut/tidb,ngaut/tidb,c4pt0r/tidb,c4pt0r/tidb,XuHuaiyu/tidb,coocood/tidb,ngaut/tidb,Cofyc/tidb,EvilMcJerkface/tidb,c4pt0r/tidb,kyle-wang/tidb,ngaut/tidb,qiuyesuifeng/tidb,kyle-wang/tidb,c4pt0r/tidb,coocood/tidb,c4pt0r/tidb,kyle-wang/tidb,kyle-wang/tidb,cosmtrek/tidb,pingcap/tidb,kyle-wang/tidb,Cofyc/tidb