Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2(EOL)
-
None
-
10.1.12
Description
"Storage engine handles GROUP BY" optimization in Sequence SE returns incorrect value for COUNT(NULL):
MariaDB [test]> select * from seq_1_to_3;
|
+-----+
|
| seq |
|
+-----+
|
| 1 |
|
| 2 |
|
| 3 |
|
+-----+
|
 |
MariaDB [test]> select count(NULL) from seq_1_to_3;
|
+-------------+
|
| count(NULL) |
|
+-------------+
|
| 3 |
|
+-------------+
|
This is an incorrect result. For comparison:
create table t100 (a int);
|
insert into t100 values (1),(2),(3);
|
select count(NULL) from t100;
|
+-------------+
|
| count(NULL) |
|
+-------------+
|
| 0 |
|
+-------------+
|