You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mysql-test/r/compare.result
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ EXPLAIN EXTENDED SELECT b,c FROM t1 WHERE b = 1 AND CONCAT(b,c) = '0101';
64
64
id select_type table type possible_keys key key_len ref rows filtered Extra
65
65
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
66
66
Warnings:
67
-
Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where ((`test`.`t1`.`b` = 1) and (concat('01',`test`.`t1`.`c`) = '0101'))
67
+
Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where ((`test`.`t1`.`b` = 1) and (concat(`test`.`t1`.`b`,`test`.`t1`.`c`) = '0101'))
68
68
SELECT b,c FROM t1 WHERE b = 1 AND CONCAT(b,c) = '0101';
Copy file name to clipboardExpand all lines: mysql-test/r/func_str.result
+27Lines changed: 27 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4535,3 +4535,30 @@ set global max_allowed_packet=default;
4535
4535
#
4536
4536
# End of 5.6 tests
4537
4537
#
4538
+
#
4539
+
# Start of 10.1 tests
4540
+
#
4541
+
#
4542
+
# MDEV-8369 Unexpected impossible WHERE for a condition on a ZEROFILL field
4543
+
#
4544
+
CREATE TABLE t1 (a BIGINT(20) ZEROFILL);
4545
+
INSERT INTO t1 VALUES (18446744073709551615),(0);
4546
+
SELECT * FROM t1 WHERE a=18446744073709551615;
4547
+
a
4548
+
18446744073709551615
4549
+
SELECT * FROM t1 WHERE FORMAT(a,0)='18,446,744,073,709,551,615';
4550
+
a
4551
+
18446744073709551615
4552
+
SELECT * FROM t1 WHERE a=18446744073709551615 AND FORMAT(a,0)='18,446,744,073,709,551,615';
4553
+
a
4554
+
18446744073709551615
4555
+
EXPLAIN EXTENDED
4556
+
SELECT * FROM t1 WHERE a=18446744073709551615 AND FORMAT(a,0)='18,446,744,073,709,551,615';
4557
+
id select_type table type possible_keys key key_len ref rows filtered Extra
4558
+
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
4559
+
Warnings:
4560
+
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 18446744073709551615) and (format(`test`.`t1`.`a`,0) = '18,446,744,073,709,551,615'))
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
1431
1431
Warnings:
1432
-
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 0
1432
+
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 2010) and ((case when 2010 = 2011 then NULL else `test`.`t1`.`a` end) = '2011'))
1433
1433
EXPLAIN EXTENDED
1434
1434
SELECT * FROM t1 WHERE a=10 AND NULLIF(a,2011.1)=CONCAT('2011',RAND());
1435
1435
id select_type table type possible_keys key key_len ref rows filtered Extra
1436
1436
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
1437
1437
Warnings:
1438
-
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 2010) and (<cache>((case when 2010 = 2011 then NULL else '2010' end)) = concat('2011',rand())))
1438
+
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 2010) and ((case when 2010 = 2011 then NULL else `test`.`t1`.`a` end) = concat('2011',rand())))
1439
1439
DROP TABLE t1;
1440
1440
#
1441
1441
# MDEV-8754 Wrong result for SELECT..WHERE year_field=2020 AND NULLIF(year_field,2010)='2020'
@@ -1456,13 +1456,13 @@ SELECT * FROM t1 WHERE a=2020 AND NULLIF(a,2010)='2020';
1456
1456
id select_type table type possible_keys key key_len ref rows filtered Extra
1457
1457
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
1458
1458
Warnings:
1459
-
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = 2020)
1459
+
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 2020) and ((case when 2020 = 2010 then NULL else `test`.`t1`.`a` end) = '2020'))
1460
1460
EXPLAIN EXTENDED
1461
1461
SELECT * FROM t1 WHERE a=2020 AND NULLIF(a,2010)=CONCAT('2020',RAND());
1462
1462
id select_type table type possible_keys key key_len ref rows filtered Extra
1463
1463
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
1464
1464
Warnings:
1465
-
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 2020) and (<cache>((case when 2020 = 2010 then NULL else '2020' end)) = concat('2020',rand())))
1465
+
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 2020) and ((case when 2020 = 2010 then NULL else `test`.`t1`.`a` end) = concat('2020',rand())))
0 commit comments