Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.5.15, 10.6.7, 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL)
-
None
-
Ubuntu 20.04 / macOS Monterey
Description
With one of the last updates, a bug in mariadb server got introduced which returns unexpected behavior. The last tested version without this bug is 10.5.13/10.6.5.
When executing a "where in" query with more than 1000 values in a prepared statement, the query will always return an empty result set. This only occurs in prepared statements, not if queried directly. We have attached a test case below.
Steps to reproduce:
1. Create a test table with a "val" column.
2. Add two or more rows:
INSERT INTO `test` (`id`, `val`) VALUES (1, 1), (2, 2), (3, 3); |
3. Create a prepared statement:
PREPARE stmt1 FROM 'select * from test where val in (?,[more than 999 entries]...)'; |
4. Execute the prepared statement with 999+ values. Exclude one or more rows to expect a non-empty result set:
EXECUTE stmt1 USING 2, 3, ...; |
Expected results:
A proper result with one or more entries, depending on the query. Or, alternatively, a proper error message stating why this is no longer possible.
Actual results:
No error message is returned, just an empty result set.
Attachments
Issue Links
- duplicates
-
MDEV-27869 Conversion of Big IN Predicates Into Subqueries returns wrong result
- Closed
-
MDEV-28557 No results-set returned when results exists.
- Closed
- is caused by
-
MDEV-23182 Server crashes in Item::fix_fields_if_needed / table_value_constr::prepare upon 2nd execution of PS
- Closed
- is duplicated by
-
MDEV-28041 Invalid resulset received for prepared statement
- Closed
-
MDEV-28064 Prepared Statements WHERE IN limited to 999 parameters
- Closed
-
MDEV-28316 Prepared statement with more than 1000 parameters leads to incorrect result
- Closed