Details
Description
CREATE TABLE IF NOT EXISTS t0 ( |
c0_1 VARCHAR(200), |
c0_2 TEXT
|
);
|
|
INSERT INTO t0 VALUES ('0.67882431850', '97966'); |
MariaDB [test]> select * from t0; |
+---------------+-------+ |
| c0_1 | c0_2 |
|
+---------------+-------+ |
| 0.67882431850 | 97966 |
|
+---------------+-------+ |
1 row in set (0.002 sec) |
Execute the query:
SELECT (CONCAT(t0.c0_1, t0.c0_2)) AS ref0 FROM t0 WHERE (CONCAT(t0.c0_1, t0.c0_2)); |
Expected Result:
The query should return a single row with the value 0.6788243185097966 in the ref0 column.
Actual Result:
The query returns an empty set.
Attachments
Issue Links
- causes
-
MDEV-35288 Assertion `!is_cond()' failed in virtual longlong Item_bool_func::val_int()
-
- Stalled
-
- is duplicated by
-
MDEV-34592 There are some problems with the keyword 'where if'
-
- Closed
-
- relates to
-
MDEV-35135 Assertion `!is_cond()' failed in Item_bool_func::val_int / do_select
-
- Closed
-
-
MDEV-33999 Unexpected result when casting decimal in WHERE clause
-
- Confirmed
-
-
MDEV-34114 Incorrect Query Result when Adding Columns
-
- Open
-
-
MDEV-34189 Unexpected error on `WHERE inet6col`
-
- Closed
-
In case of the column, normalize_cond() rewrites this statement:
as:
The rewritten condition is evaluated as DECIMAL:
In case of functions, the condition does not get replaced, the conditions is evaluated as is:
evaluate_join_record() calls Item_func_xxx::val_int(), which is :
longlong Item_str_func::val_int()
{
DBUG_ASSERT(fixed());
StringBuffer<22> tmp;
String *res= val_str(&tmp);
}
longlong_from_string_with_check() converts '0.6' to 0 (without rounding).