optimize code and fix warning for mysql
optimize code and fix warning for mysql

sshling/tcpcopy,eliteYang/tcpcopy,wfxiang08/tcpcopy,liviusATnetskope/second,eliteYang/tcpcopy,daodaoliang/tcpcopy,caosiyang/tcpcopy,horryq/tcpcopy,caosiyang/tcpcopy,u20024804/tcpcopy,left2right/tcpcopy,u20024804/tcpcopy,liviusATnetskope/second,ycaihua/tcpcopy,daodaoliang/tcpcopy,horryq/tcpcopy,sshling/tcpcopy,ycaihua/tcpcopy,left2right/tcpcopy,wfxiang08/tcpcopy