Make sure that SELECT argument is an integer or return an error.
Make sure that SELECT argument is an integer or return an error.

Unfortunately we had still the lame atoi() without any error checking in
place, so "SELECT foo" would work as "SELECT 0". This was not an huge
problem per se but some people expected that DB can be strings and not
just numbers, and without errors you get the feeling that they can be
numbers, but not the behavior.

Now getLongFromObjectOrReply() is used as almost everybody else across
the code, generating an error if the number is not an integer or
overflows the long type.

Thanks to @mipearson for reporting that on Twitter.

ttuna/msot-redis,allengaller/redis,gilala/hredis,hawkchch/redis,universsky/redis,pkdevbox/redis,yybirdcf/learn-redis,MSOpenTech/redis,xuzhezhaozhao/redis_reading,seppo0010/rlite-server,abhiklodh/redis,j0hnma/hszredis,Hailei/redis,slfs007/mk-redis,splitice/redis,hgl888/redis,zy416548283/redis-3.0-annotated,soloestoy/redis,tanghaodong25/redis,cusspvz/redis,190235047/redis,miaoyc1989/redis-3.0-annotated,wprice/redis,mumingv/redis,timothyohare/3rdPartySrc-redis,wujf/redis,antirez/redis,fengshao0907/redis-3.0-annotated,huangz1990/redis-3.0-annotated,kensou97/redis,mingyaaaa/redis,zhaobo1023/redis-3.0-annotated,antirez/redis,hedisdb/hedis,SyntaxStacks/redis,brg-liuwei/redis,pedigree/redis,mumingv/redis,ituncle/redis,elkingtonmcb/redis,clamoriniere1A/redis,miaoyc1989/redis-3.0-annotated,spinlock/redis,citusdata/redis,wangyikai/redis,yuhc/redis-benchmark-enhanced,zhcy/redis,saisai/redis,jingjidejuren/redis,itugs/redis,supasate/redis,mengzhejin/RedisStudy,Markgorden/redis,seandsky/redis,Markgorden/redis,spinlock/redis,twskipper/redis,allengaller/redis,AALEKH/redis,drinkthere/redis-3.0-annotated,buobao/redis-3.0-annotated,jbochi/redis,tjschuck/redis,valdsJohn/redis,citusdata/redis,mgk/redis,riyan8250/redis,vincent-vivian-liu/redis,nuxeh/redis,mengyou0304/redis,rouzier/redis,Aliceljm1/redis-3.0-annotated,wprice/redis,Aaron1992/redis,valdsJohn/redis,jackyan/redis,roth1002/redis,GitHubMota/redis,csuhawk/redis,hawkchch/redis,j0hnma/hszredis,programmecat/redis,thomasdarimont/redis,colstrom/redis,dramenk/annotated_redis_source,PradheepShrinivasan/redis,mengyou0304/redis,wprice/redis,maodeyi/redis_lua,darksideofthemoo/redis-histogram,moonbingbing/redis-3.0-annotated,mumingv/redis-3.0-annotated,LongXQ/redis,francischan714/redis,aim-for-better/redis,huangz1990/experiment-redis,zczhuohuo/redis,190235047/redis,LongXQ/redis,wprice/redis,OmarQunsul/graph-redis,modulexcite/redis,aluzzardi/redis,timothyohare/3rdPartySrc-redis,gilala/hredis,allengaller/redis,wenxueliu/redis_comment,fengshao0907/redis,weizijun/redis,yuhc/redis-benchmark-enhanced,hawkchch/redis,miaoyc1989/redis-3.0-annotated,badboy/redis,gechong/redis-3.0-annotated,wuyu201321060203/redis-3.0-annotated,splitice/redis,ncopa/redis,CodeJuan/redis,blackmady/redis,zguangyu/redis,ctripcorp/redis,neomantra/redis,dreamquster/redis,mcanthony/redis,ton31337/redis,takeshineshiro/redis,fengshao0907/redis-3.0-annotated,ituncle/redis,jacklee0810/redis-3.0-annotated,tellapart/redis,haima-zju/redis-3.0-annotated,4396/redis,StevenTsai/redis,nilyang/redis-tdd-annotation,cusspvz/redis,YuanZhewei/redis,zy416548283/redis-3.0-annotated,mpalmer/redis,gongice/redis-3.0-annotated,NBSW/redis,YongMan/redis,YuanZhewei/redis,idning/redis,jingjidejuren/redis,miaoyc1989/redis-3.0-annotated,SummonY/redis,dongqifan2/redis-3.0-annotated,valdsJohn/redis,josiahcarlson/redis,tanghaodong25/redis,timothyohare/3rdPartySrc-redis,gaoxianglong/redis,ytjiang/redis,jbochi/parallel_redis,fankeke/redis-3.0-annotated,ctripcorp/redis,shining-yang/redis,HouKangkang/redis-3.0-annotated,dreamquster/redis,csuhawk/redis,Aaron1992/redis,tjschuck/redis,saisai/redis,holstvoogd/redis,tidatida/annotated_redis_source,himoca/redis,sunlianqiang/redis-3.0-annotated,slfs007/mk-redis,haima-zju/redis-3.0-annotated,arijitvt/redis,july2993/redis,gilala/bjredis,elkingtonmcb/redis,kaushik94/redis,GitHubMota/redis,MSOpenTech/redis,mattsta/redis,0x55/redis-3.0-annotated,simplestbest/redis,pedigree/redis,seandsky/redis,ChaosCoo/annotated_redis_source,hornen/redis,aim-for-better/redis,a-pavlov/redis,mgk/redis,josiahcarlson/redis,saisai/redis,YongMan/redis,francischan714/redis,wenxueliu/redis_comment,machicao2013/redis-source-annotated,sunheehnus/redis,ton31337/redis,huyuezheng/redis,a-pavlov/redis,mgk/redis,zhiliaoniu/redis,Hailei/redis,gaoxianglong/redis,mcanthony/redis,gaoxianglong/redis,xuguruogu/redis,j0hnma/szredis,xuzhezhaozhao/redis_reading,kaushik94/redis,cloudrain21/redis,Cisphyx/redis-websockets,onlymellb/redis-3.0-annotated,j0hnma/hszredis,iandyh/redis,AplayER/redis,zhiliaoniu/redis,ofirluzon/redis,huangz1990/annotated_redis_source,july2993/redis,hhli/redis,riyan8250/redis,alenslan/redis,msn217/redis-3.0-annotated,himoca/redis,splitice/redis,taoguan/redis,zguangyu/redis,devaos/redis,xlzhan/redis,cnbin/redis,soveran/redis,gilala/hbjredis,clamoriniere1A/redis,itugs/redis,YuraLukashik/redis,neomantra/redis,wuyu201321060203/redis-3.0-annotated,MOON-CLJ/redis,mengyou0304/redis,buobao/redis-3.0-annotated,xujunhai1991/redis,saisai/redis,rrsean/redis-3.0-annotated,aim-for-better/redis,sunlianqiang/redis-3.0-annotated,nuxeh/redis,ncopa/redis,JoeWoo/redis,fankeke/redis-3.0-annotated,tidatida/annotated_redis_source,HouKangkang/redis-3.0-annotated,colstrom/redis,blackmady/redis,narma/redis,WorkingOfTimtohyZhang/redis-3.0-annotated,kensou97/redis,ton31337/redis,kensou97/redis,z-fork/redis,ErikDubbelboer/redis,Cisphyx/redis-websockets,devaos/redis,yossigo/redis,gilala/hredis,ipmobiletech/redis,aluzzardi/redis,shreesundara/redis,janekmi/redis,linfangrong/redis,xuguruogu/redis,thomasdarimont/redis,dongqifan2/redis-3.0-annotated,kaushik94/redis,universsky/redis,rogerlz/redis,zhaobo1023/redis-3.0-annotated,fengshao0907/redis,StevenTsai/redis,zczhuohuo/redis,mumingv/redis-3.0-annotated,dongqifan2/redis-3.0-annotated,seppo0010/redis,JoeWoo/redis,charsyam/redis,SyntaxStacks/redis,tzq668766/redis-3.0-annotated,RepmujNetsik/redis,h0x91b/redis,honestme/redis,brg-liuwei/redis,z-fork/redis,SyntaxStacks/redis,LongXQ/redis,CodeJuan/redis,shining-yang/redis,whille/redis-3.0-annotated,gilala/hbjredis,izhoujie/redis,modulexcite/redis,unasm/redis-3.0-annotated,j0hnma/szredis,twskipper/redis,ChanningDuan/annotated_redis_source,GitHubMota/redis,a-pavlov/redis,zhoudayang/redis,davidradunz/redis,louisliangjun/redis,kmiku7/redis,PradheepShrinivasan/redis,huangz1990/annotated_redis_source,gilala/redis,mingyaaaa/redis,oranagra/redis,qiyang0221/redis,healerkx/redis,rogerlz/redis,narma/redis,alenslan/redis,sunheehnus/redis,jasonkying/redis,atreeyang/redis,ramonsnir/redis,elkingtonmcb/redis,davidradunz/redis,flashbuckets/redis,fankeke/redis-3.0-annotated,jermnelson/redis,darksideofthemoo/redis-histogram,ncopa/redis,mpalmer/redis,takeshineshiro/redis,shshlzh/redis-3.0-annotated,ketor/redis,machicao2013/redis-source-annotated,moonbingbing/redis-3.0-annotated,honestme/redis,ituncle/redis,taoguan/redis,4396/redis,rogerchina/redis,jacklee0810/redis-3.0-annotated,xujunhai1991/redis,jacklee0810/annotated_redis_source,nnog/redis,hgl888/redis,MOON-CLJ/redis,MSOpenTech/redis,himoca/redis,louisliangjun/redis,ouyangkongtong/redis,xlzhan/redis,gilala/bjredis,harrisonfeng/redis,darksideofthemoo/redis-histogram,honestme/redis,adamweixuan/redis-3.0-annotated,izhoujie/redis,NBSW/redis,riyan8250/redis,huangz1990/redis-3.0-annotated,gongice/redis-3.0-annotated,ChanningDuan/annotated_redis_source,aluzzardi/redis,wenxueliu/redis_comment,honestme/redis,machicao2013/redis-source-annotated,viongpanzi/annotated_redis_source,francischan714/redis,charsyam/redis,abhiklodh/redis,Wangyao14cyy/redis,neomantra/redis,yuhc/redis-benchmark-enhanced,Hailei/redis,ramonsnir/redis,jxwr/redis,gechong/redis-3.0-annotated,HeartSaVioR/redis,takeshineshiro/redis,ton31337/redis,mverrilli/redis,hhli/redis,blackmady/redis,itugs/redis,duanx/redis,dramenk/annotated_redis_source,nnog/redis,jbochi/parallel_redis,pmem/redis,davidradunz/redis,ketor/redis,qiyang0221/redis,mverrilli/redis,maodeyi/redis_lua,hornen/redis,pkdevbox/redis,holstvoogd/redis,YongMan/redis,SummonY/redis,ytjiang/redis,guker/redis,jxwr/redis,duanx/redis,netroby/redis,nilyang/redis-tdd-annotation,jacklee0810/annotated_redis_source,hedisdb/hedis,huangz1990/experiment-redis,abhiklodh/redis,ncopa/redis,rrsean/redis-3.0-annotated,arijitvt/redis,StevenTsai/redis,soloestoy/redis,elkingtonmcb/redis,PKRoma/redis,shining-yang/redis,CodeJuan/redis,SummonY/redis,whille/redis-3.0-annotated,gspandy/annotated_redis_source,wuxiaowei907/annotated_redis_source,ofirluzon/redis,weizijun/redis,gilala/bjredis,ofirluzon/redis,zy416548283/redis-3.0-annotated,dreamquster/redis,seppo0010/rlite-server,0x20h/redis,190235047/redis,0x55/redis-3.0-annotated,shining-yang/redis,msn217/redis-3.0-annotated,zhcy/redis,july2993/redis,ytjiang/redis,wangyikai/redis,seandsky/redis,guker/redis,figoxu/annotated_redis_source,mverrilli/redis,soveran/redis,GitHubMota/redis,ituncle/redis,drinkthere/redis-3.0-annotated,ttuna/msot-redis,j0hnma/szredis,danny200309/annotated_redis_source,pietern/redis,pmem/redis,yybirdcf/learn-redis,yybirdcf/learn-redis,HouKangkang/redis-3.0-annotated,shshlzh/redis-3.0-annotated,shreesundara/redis,josiahcarlson/redis,weizijun/redis,badboy/redis,colstrom/redis,mingyaaaa/redis,gspandy/annotated_redis_source,magastzheng/redis-3.0-annotated,xlzhan/redis,yossigo/redis,ofirluzon/redis,guker/redis,yuzhangjob/redis-3.0-annotated-unstable,onlymellb/redis-3.0-annotated,buobao/redis-3.0-annotated,healerkx/redis,fengshao0907/redis,unasm/redis-3.0-annotated,aluzzardi/redis,jasonkying/redis,yuhc/redis-benchmark-enhanced,gilala/hbjredis,MasahikoSawada/redis,josiahcarlson/redis,gilala/hbjredis,HeartSaVioR/redis,programmecat/redis,jxwr/redis,clamoriniere1A/redis,PradheepShrinivasan/redis,itamarhaber/redis,healerkx/redis,ytjiang/redis,MOON-CLJ/redis,WorkingOfTimtohyZhang/redis-3.0-annotated,iandyh/redis,idning/redis,takeshineshiro/redis,HeartSaVioR/redis,csuhawk/redis,Aliceljm1/redis,YuanZhewei/redis,gechong/redis-3.0-annotated,WorkingOfTimtohyZhang/redis-3.0-annotated,jasonkying/redis,zhaobo1023/redis-3.0-annotated,jbochi/redis,july2993/redis,ChanningDuan/annotated_redis_source,duanx/redis,Aliceljm1/redis-3.0-annotated,Aliceljm1/redis,louisliangjun/redis,YongMan/redis,AplayER/redis,mattsta/redis,zczhuohuo/redis,netroby/redis,universsky/redis,magastzheng/redis-3.0-annotated,janekmi/redis,idning/redis,zczhuohuo/redis,AplayER/redis,mingyaaaa/redis,xlzhan/redis,wuxiaowei907/annotated_redis_source,weizijun/redis,haima-zju/redis-3.0-annotated,AALEKH/redis,pedigree/redis,unasm/redis-3.0-annotated,gspandy/annotated_redis_source,louisliangjun/redis,PKRoma/redis,simplestbest/redis,charsyam/redis,gilala/redis,cusspvz/redis,0x55/redis-3.0-annotated,YuraLukashik/redis,netroby/redis,cnbin/redis,HunanTV/redis,ttuna/msot-redis,wujf/redis,kmiku7/redis,izhoujie/redis,pcarrier/redis,roth1002/redis,jasonkying/redis,qiyang0221/redis,csuhawk/redis,itamarhaber/redis,HeartSaVioR/redis,kensou97/redis,machicao2013/redis-source-annotated,MSOpenTech/redis,spearhead-ea/redis,zhoudayang/redis,CodeJuan/redis,francischan714/redis,supasate/redis,cloudrain21/redis,shreesundara/redis,nuxeh/redis,j0hnma/hszredis,AALEKH/redis,harrisonfeng/redis,itamarhaber/redis,wbailey5/redis,GrimDerp/redis,badboy/redis,dayuoba/redis,badboy/redis,dayuoba/redis,ChaosCoo/annotated_redis_source,190235047/redis,antirez/redis,Sciumo/redis,atreeyang/redis,guker/redis,itamarhaber/redis,Hailei/redis,healerkx/redis,adamweixuan/redis-3.0-annotated,Soledad89/redis,iandyh/redis,zhcy/redis,soloestoy/redis,gilala/bjredis,j0hnma/szredis,twskipper/redis,msn217/redis-3.0-annotated,neomantra/redis,xuzhezhaozhao/redis_reading,soloestoy/redis,soloestoy/redis,soveran/redis,spinlock/redis,rogerchina/redis,MSOpenTech/redis,ouyangkongtong/redis,fengshao0907/annotated_redis_source,brg-liuwei/redis,linfangrong/redis,mgk/redis,ipmobiletech/redis,rouzier/redis,Soledad89/redis,drinkthere/redis-3.0-annotated,Aliceljm1/redis,kaushik94/redis,abhiklodh/redis,PKRoma/redis,wenxueliu/redis_comment,Wangyao14cyy/redis,hhli/redis,devaos/redis,itugs/redis,taoguan/redis,onlymellb/redis-3.0-annotated,antirez/redis,seppo0010/rlite-server,netroby/redis,Aliceljm1/redis-3.0-annotated,Soledad89/redis,oranagra/redis,ErikDubbelboer/redis,brg-liuwei/redis,SummonY/redis,pedigree/redis,nilyang/redis-tdd-annotation,MasahikoSawada/redis,ctripcorp/redis,arijitvt/redis,mverrilli/redis,huangz1990/experiment-redis,rouzier/redis,universsky/redis,linfangrong/redis,cloudrain21/redis,YuraLukashik/redis,valdsJohn/redis,HunanTV/redis,charsyam/redis,simplestbest/redis,supasate/redis,modulexcite/redis,hawkchch/redis,magastzheng/redis-3.0-annotated,0x55/redis-3.0-annotated,Sciumo/redis,danny200309/annotated_redis_source,ipmobiletech/redis,seppo0010/rlite-server,xuguruogu/redis,hgl888/redis,dayuoba/redis,mengyou0304/redis,Markgorden/redis,zhiliaoniu/redis,wbailey5/redis,ReadCode/redis-3.0-annotated,nuxeh/redis,thomasdarimont/redis,harrisonfeng/redis,AplayER/redis,yuzhangjob/redis-3.0-annotated-unstable,cnbin/redis,h0x91b/redis,huyuezheng/redis,janekmi/redis,rogerchina/redis,arijitvt/redis,tellapart/redis,kmiku7/redis,ksarch-saas/redis,huangz1990/redis-3.0-annotated,Markgorden/redis,dayuoba/redis,pmem/redis,roth1002/redis,moonbingbing/redis-3.0-annotated,thomasdarimont/redis,hedisdb/hedis,mpalmer/redis,twskipper/redis,YuanZhewei/redis,Cisphyx/redis-websockets,flashbuckets/redis,shreesundara/redis,vincent-vivian-liu/redis,colstrom/redis,fengshao0907/annotated_redis_source,LongXQ/redis,zhiliaoniu/redis,modulexcite/redis,pkdevbox/redis,jacklee0810/redis-3.0-annotated,zhoudayang/redis,hedisdb/hedis,danny200309/annotated_redis_source,charsyam/redis,jackyan/redis,hgl888/redis,nnog/redis,SyntaxStacks/redis,pcarrier/redis,vincent-vivian-liu/redis,alenslan/redis,ipmobiletech/redis,rogerlz/redis,seppo0010/redis,wangyikai/redis,spinlock/redis,yossigo/redis,rrsean/redis-3.0-annotated,idning/redis,xuguruogu/redis,yossigo/redis,StevenTsai/redis,JoeWoo/redis,fengshao0907/redis,0x20h/redis,viongpanzi/annotated_redis_source,Wangyao14cyy/redis,jackyan/redis,qiyang0221/redis,slfs007/mk-redis,tidatida/annotated_redis_source,RepmujNetsik/redis,MasahikoSawada/redis,wuyu201321060203/redis-3.0-annotated,timothyohare/3rdPartySrc-redis,kmiku7/redis,mengzhejin/RedisStudy,clamoriniere1A/redis,nilyang/redis-tdd-annotation,figoxu/annotated_redis_source,zhcy/redis,4396/redis,gongice/redis-3.0-annotated,tzq668766/redis-3.0-annotated,ttuna/msot-redis,blackmady/redis,sunlianqiang/redis-3.0-annotated,soveran/redis,ErikDubbelboer/redis,gilala/hredis,GrimDerp/redis,Sciumo/redis,pietern/redis,allengaller/redis,yuzhangjob/redis-3.0-annotated-unstable,hornen/redis,ksarch-saas/redis,hornen/redis,dreamquster/redis,adamweixuan/redis-3.0-annotated,roth1002/redis,PradheepShrinivasan/redis,mumingv/redis,tellapart/redis,pcarrier/redis,jackyan/redis,z-fork/redis,a-pavlov/redis,jermnelson/redis,gilala/redis,rogerlz/redis,tanghaodong25/redis,jacklee0810/annotated_redis_source,oranagra/redis,mumingv/redis,seppo0010/redis,ouyangkongtong/redis,huyuezheng/redis,YuraLukashik/redis,tanghaodong25/redis,h0x91b/redis,ketor/redis,davidradunz/redis,yybirdcf/learn-redis,seppo0010/redis,wuxiaowei907/annotated_redis_source,mattsta/redis,OmarQunsul/graph-redis,ErikDubbelboer/redis,spearhead-ea/redis,oranagra/redis,wujf/redis,programmecat/redis,mengzhejin/RedisStudy,huangz1990/experiment-redis,janekmi/redis,taoguan/redis,MasahikoSawada/redis,tjschuck/redis,aim-for-better/redis,ChaosCoo/annotated_redis_source,pietern/redis,alenslan/redis,citusdata/redis,seandsky/redis,ksarch-saas/redis,jbochi/redis,wbailey5/redis,rogerchina/redis,shshlzh/redis-3.0-annotated,zhoudayang/redis,flashbuckets/redis,OmarQunsul/graph-redis,4396/redis,tellapart/redis,atreeyang/redis,xujunhai1991/redis,mengzhejin/RedisStudy,OmarQunsul/graph-redis,figoxu/annotated_redis_source,cnbin/redis,huangz1990/annotated_redis_source,holstvoogd/redis,atreeyang/redis,wujf/redis,pkdevbox/redis,maodeyi/redis_lua,ReadCode/redis-3.0-annotated,whille/redis-3.0-annotated,dramenk/annotated_redis_source,0x20h/redis,darksideofthemoo/redis-histogram,shshlzh/redis-3.0-annotated,narma/redis,mcanthony/redis,xuzhezhaozhao/redis_reading,ofirluzon/redis,fengshao0907/annotated_redis_source,ksarch-saas/redis,gaoxianglong/redis,zguangyu/redis,viongpanzi/annotated_redis_source,mumingv/redis-3.0-annotated,h0x91b/redis,pmem/redis,ouyangkongtong/redis,HunanTV/redis,linfangrong/redis,sunheehnus/redis,Aaron1992/redis,HunanTV/redis,flashbuckets/redis,cloudrain21/redis,RepmujNetsik/redis,citusdata/redis,gilala/redis,programmecat/redis,GrimDerp/redis,duanx/redis,iandyh/redis,ramonsnir/redis,tzq668766/redis-3.0-annotated,vincent-vivian-liu/redis,0x20h/redis,neomantra/redis,jingjidejuren/redis,JoeWoo/redis,Soledad89/redis,Aaron1992/redis,Cisphyx/redis-websockets,Wangyao14cyy/redis,holstvoogd/redis,zguangyu/redis,jermnelson/redis,ctripcorp/redis,sunheehnus/redis,pcarrier/redis,splitice/redis,mpalmer/redis,NBSW/redis,tjschuck/redis,supasate/redis,mcanthony/redis,wbailey5/redis,cusspvz/redis,oranagra/redis,rouzier/redis,Sciumo/redis,jbochi/parallel_redis,Aliceljm1/redis,z-fork/redis,spearhead-ea/redis,jingjidejuren/redis,ReadCode/redis-3.0-annotated,fengshao0907/redis-3.0-annotated,PKRoma/redis,wangyikai/redis,AALEKH/redis,RepmujNetsik/redis,riyan8250/redis,wuyu201321060203/redis-3.0-annotated,hhli/redis,xujunhai1991/redis,NBSW/redis,PKRoma/redis,harrisonfeng/redis,GrimDerp/redis,devaos/redis,ttuna/msot-redis,izhoujie/redis,pietern/redis,simplestbest/redis,huyuezheng/redis,nnog/redis,yossigo/redis