diff options
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/item.cc b/sql/item.cc index 336041f0a76..69aaec44f55 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -178,7 +178,7 @@ bool Item::val_bool() { switch(result_type()) { case INT_RESULT: - return val_int(); + return val_int() != 0; case DECIMAL_RESULT: { my_decimal decimal_value; @@ -1217,7 +1217,7 @@ bool Item_field::val_bool_result() return FALSE; switch (result_field->result_type()) { case INT_RESULT: - return result_field->val_int(); + return result_field->val_int() != 0; case DECIMAL_RESULT: { my_decimal decimal_value; @@ -3946,7 +3946,7 @@ bool Item_ref::val_bool_result() return 0; switch (result_field->result_type()) { case INT_RESULT: - return result_field->val_int(); + return result_field->val_int() != 0; case DECIMAL_RESULT: { my_decimal decimal_value; |