MYSQL字段int/bigint類型查詢返回的結(jié)果不同(bug)
項目組的同學(xué)進來在使用mysql的時候發(fā)現(xiàn)了一個問題,具體內(nèi)容如下:
MYSQL 版本 : Server version: 5.1.48-log Source distribution

MYSQL 版本 : Server version: 5.1.48-log Source distribution

咨詢了DBA,我們發(fā)現(xiàn)在mysql進行值比較的時候
int:使用decimal類型比較(支持浮點數(shù)的比較)
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() |
posted on 2011-11-30 09:49 himalayas 閱讀(3010) 評論(0) 編輯 收藏 所屬分類: database