[MDEV-30166] [ERROR] unknown variable 'sql_select_limit' Created: 2022-03-07  Updated: 2023-05-17

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Major
Reporter: Yakov Kushnirsky Assignee: Oleksandr Byelkin
Resolution: Unresolved Votes: 1
Labels: None


 Description   

The variable sql_select_limit cannot be set as Global via config file.
Customer reports that attempt to set sql_select_limit=N in any section of .cnf other than [client] fails with the error
...
[ERROR] /usr/sbin/mysqld: unknown variable 'sql_select_limit=10'
...
If the variable placed in .cnf [client] section, its local. It still can be set as global via client as

MariaDB [(none)]> set global sql_select_limit=100;
Query OK, 0 rows affected (0.000 sec)

but the customer feels that the behavior is an omission, since it contradicts with Doc
https://mariadb.com/kb/en/server-system-variables/#sql_select_limit
and would like the fix.



 Comments   
Comment by Elena Stepanova [ 2022-03-07 ]

How does it contradict the doc?
It even specifically says "Commandline: None"
It's a variable, not an option.

MySQL entry is a feature request.

Comment by Yakov Kushnirsky [ 2022-03-07 ]

Good point, thanks! Indeed
https://mariadb.com/docs/reference/mdb/system-variables/sql_select_limit/
clearly states: "Configuration file | Not Supported".

I was confused by absence the same comments in KB. Will change to NF.

Comment by Ralf Gebhardt [ 2023-05-02 ]

YK, I do not think that it makes sense to limit the number of rows returned for a query on a server level. Users would not expect that the result they get is not complete, if not explicitly set by them. I am even questioning if it is a good idea that SET GLOBAL is allowed.

Comment by Sergei Golubchik [ 2023-05-02 ]

I don't see why anyone might want to set it in the config file.

But generally I like consistency, and a global/session variable that cannot be set in a config file (no matter how pointless it'd be) definitely stands out.

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