util: clean up bound check functions.
util: clean up bound check functions.

netroby/tidb,gaocegege/tidb,cosmtrek/tidb,anywhy/tidb,qhsong/tidb,ueizhou/tidb,astaxie/tidb,ngaut/tidb,kyle-wang/tidb,gaocegege/tidb,yuanwhy/tidb,XuHuaiyu/tidb,louishust/tidb,qiuyesuifeng/tidb,mccxj/tidb,pingcap/tidb,c4pt0r/tidb,liyu4/tidb,louishust/tidb,kyle-wang/tidb,spongedu/tidb,myrice/tidb,mccxj/tidb,yangwenmai/tidb,8cbx/tidb,tiancaiamao/tidb,ngaut/tidb,JinheLin/tidb,qiuyesuifeng/tidb,ngaut/tidb,simon-xia/tidb,XuHuaiyu/tidb,kyle-wang/tidb,simon-xia/tidb,tiancaiamao/tidb,andelf/tidb,qhsong/tidb,yangwenmai/tidb,silenceper/tidb,ngaut/tidb,Cofyc/tidb,zs634134578/tidb,zimulala/tidb,pingcap/tidb,anywhy/tidb,ngaut/tidb,c4pt0r/tidb,silentred/tidb,pingcap/tidb,cosmtrek/tidb,JinheLin/tidb,c4pt0r/tidb,yuanwhy/tidb,Nify/tidb,spongedu/tidb,zs634134578/tidb,ming-relax/tidb,ngaut/tidb,zimulala/tidb,coocood/tidb,coocood/tidb,wusphinx/tidb,Nify/tidb,kyle-wang/tidb,c4pt0r/tidb,CodeRushing/tidb,pingcap/tidb,pingcap/tidb,myrice/tidb,c4pt0r/tidb,kyle-wang/tidb,kyle-wang/tidb,andelf/tidb,wusphinx/tidb,8cbx/tidb,netroby/tidb,pingcap/tidb,EvilMcJerkface/tidb,ming-relax/tidb,EvilMcJerkface/tidb,c4pt0r/tidb,astaxie/tidb,ueizhou/tidb,CodeRushing/tidb,liyu4/tidb,silenceper/tidb,Cofyc/tidb,silentred/tidb