Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.7.2
-
None
-
Docker on MacOS
-
Unexpected results
Description
Possibly related: MDEV-34173
The behavior from the title of this issue I can only observe in PhpMyAdmin, see screenshots, which is really weird.
However in the cli, I observe the buggy behavior independet of the actual strings in the array.
Expectation would be to have ["English"] in every row of the result, right?
MariaDB [db]> SELECT id, JSON_ARRAY_INTERSECT('["German", "English"]', '["English"]') FROM events;
|
+-----+--------------------------------------------------------------+
|
| id | JSON_ARRAY_INTERSECT('["German", "English"]', '["English"]') |
|
+-----+--------------------------------------------------------------+
|
| 20 | ["English"] |
|
| 72 | NULL |
|
| 136 | NULL |
|
| 137 | NULL |
|
| 138 | NULL |
|
+-----+--------------------------------------------------------------+
|
5 rows in set (0.001 sec)
|
Also happens when using JSON_ARRAY instead of literal strings:
MariaDB [db]> SELECT id, JSON_ARRAY_INTERSECT(JSON_ARRAY('English', 'Deutsch'), JSON_ARRAY('Deutsch')) FROM events;
|
+-----+-------------------------------------------------------------------------------+
|
| id | JSON_ARRAY_INTERSECT(JSON_ARRAY('English', 'Deutsch'), JSON_ARRAY('Deutsch')) |
|
+-----+-------------------------------------------------------------------------------+
|
| 20 | ["Deutsch"] |
|
| 72 | NULL |
|
| 136 | NULL |
|
| 137 | NULL |
|
| 138 | NULL |
|
+-----+-------------------------------------------------------------------------------+
|
5 rows in set (0.001 sec)
|
Attachments
Issue Links
- relates to
-
MDEV-36808 json_array_intersect incorrect results after returning NULL in table scan
-
- Confirmed
-