Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Cannot Reproduce
-
10.3(EOL)
Description
If VALUES has only 1 row and it contains at least 1 row constructor, nothing is returned:
MariaDB [test]> VALUES (1, 2, (3, 3)); |
Query OK, 0 rows affected (0.000 sec) |
If it has multiple rows, rows constructors become a 0-value for the first row, and the value from the previous rows for the following rows:
MariaDB [test]> VALUES |
-> ((5,5), 5),
|
-> (1, 2),
|
-> ((6,6), (7,7)),
|
-> ((6,6), (7,7));
|
+-------+---+ |
| (5,5) | 5 |
|
+-------+---+ |
| 0 | 5 |
|
| 1 | 2 |
|
| 1 | 2 |
|
| 1 | 2 |
|
+-------+---+ |
4 rows in set (0.000 sec) |
If VALUES is used as a subquery, the anomaly propagates:
MariaDB [test]> SELECT COUNT(*) FROM (VALUES ((1, 2))) v; |
Query OK, 0 rows affected (0.000 sec) |