[MDEV-28064] Prepared Statements WHERE IN limited to 999 parameters Created: 2022-03-14  Updated: 2022-03-15  Resolved: 2022-03-15

Status: Closed
Project: MariaDB Server
Component/s: Prepared Statements
Affects Version/s: 10.3.34
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Adam Chapman Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-27937 Assertion failure when executing prep... Closed

 Description   

There appears to be an issue with 10.3.34 where the number of parameters that can be used within "IN ()" is limited to 999. If you have 999 or less, the prepared statement will work. As soon as there are 1000 or more, the prepared statement stops working. I can not find any error that gets flagged or returned (I might need to do some more digging) but it seems to silently fail.

The raw sql that is produced by the prepared statement that contains 1000 or more parameters does work when used directly in the database though.

I have tested the following MariaDB versions with 1000 or more prepared parameters.

10.3.27 - works
10.3.31 - works
10.3.34 - fails.



 Comments   
Comment by Alice Sherepa [ 2022-03-15 ]

Thanks for the report! This is the same bug as MDEV-27937 - a temporary workaround is to set in_predicate_conversion_threshold variable higher than the biggest number of values which you might use in such statements

Generated at Thu Feb 08 09:57:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.