http://www.blogjava.net/himalayas/archive/2011/11/30/365162.html

项目组的同学进来在使用mysql的时候发现了一个问题,具体内容如下:
MYSQL 版本 : Server version: 5.1.48-log Source distribution


咨询了DBA,我们发现在mysql进行值比较的时候

int:使用decimal类型比较(支持浮点数的比较)

Arg_comparator::compare_decimal

Arg_comparator::compare_decimal (this=0x121cc2b8) at item_cmpfunc.cc:1378

1378    int Arg_comparator::compare_decimal()

 

bigint:使用int类型比较

Arg_comparator::compare_int_signed

Arg_comparator::compare_int_signed (this=0x121cc2b8) at item_cmpfunc.cc:1457

1457  int Arg_comparator::compare_int_signed()