Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Not a Bug
-
10.2.38
-
None
-
Linux jitsi.kgs-born.de 4.15.0-144-generic #148-Ubuntu SMP Sat May 8 02:33:43 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Description
If i compare a bigint with a varchar i get a wrong result
here a sample:
This query should only find 1 row, but it returns 2 rows
MariaDB [bernd]> desc big;
|
+-------+------------------+------+-----+---------+----------------+
|
| Field | Type | Null | Key | Default | Extra |
|
+-------+------------------+------+-----+---------+----------------+
|
| id | int(11) unsigned | NO | PRI | NULL | auto_increment | |
| bi | bigint(11) | YES | | NULL | | |
| vc | varchar(20) | YES | | NULL | | |
+-------+------------------+------+-----+---------+----------------+
|
3 rows in set (0.01 sec) |
|
MariaDB [bernd]> select * from big;
|
+----+--------------------+--------------------+
|
| id | bi | vc |
|
+----+--------------------+--------------------+
|
| 1 | 137226000008073943 | 137226000008073943 | |
| 2 | 137226000008073929 | 137226000008073929 | |
+----+--------------------+--------------------+
|
2 rows in set (0.05 sec) |
|
MariaDB [bernd]> select * from big where vc = 137226000008073943; |
+----+--------------------+--------------------+
|
| id | bi | vc |
|
+----+--------------------+--------------------+
|
| 1 | 137226000008073943 | 137226000008073943 | |
| 2 | 137226000008073929 | 137226000008073929 | |
+----+--------------------+--------------------+
|
2 rows in set (0.00 sec) |
|
MariaDB [bernd]>
|
Attachments
Issue Links
- relates to
-
MDEV-21445 Strange/inconsistent behavior of IN condition when mixing numbers and strings
- Closed
-
MDEV-25862 BIGINT UNSIGNED treated as SIGNED
- Open