[MDEV-7532] IN() without parameter Created: 2015-01-30  Updated: 2015-10-30  Resolved: 2015-10-30

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Fix Version/s: N/A

Type: Task Priority: Minor
Reporter: Pavel Cibulka Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

It would be nice, if IN() without any parameter doesn't throw syntax error and return false instead. This would make easier writing scripts like DELETE / UPDATE ... WHERE (NOT) IN(?).

example:
SELECT 2 IN (0,3,5,7);
returns false

SELECT 2 IN ();
returns syntax error
false would be better

Also NOT IN() without parameter should return true. Optimizer also could replace this functions with true / false.



 Comments   
Comment by Sergei Golubchik [ 2015-10-30 ]

This directly contradicts SQL Standard, that dictates that IN() must have at least one value in the list.

Generated at Thu Feb 08 07:20:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.