[MDEV-33041] Improved documentation for spider_internal_sql_log_off Created: 2023-12-16  Updated: 2023-12-18

Status: Confirmed
Project: MariaDB Server
Component/s: Documentation, Storage Engine - Spider
Affects Version/s: N/A
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Roel Van de Paar Assignee: Roel Van de Paar
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-29659 Got error 1227 when reading table and... Closed
relates to MDEV-33043 Possible performance optimization whe... Open

 Description   

Please change:

#title#  Enable use of non root connections
 
When using the General Query Log, non-root users may encounter issues when querying Spider tables. 
Explicitly setting the spider_internal_sql_log_off system variable causes the Spider node to execute 
SET sql_log_off statements on the data nodes to enable or disable the General Query Log. 
When this is done, queries issued by users without the SUPER privilege raise an error.
 
To avoid this, don't explicitly set the spider_internal_sql_log_off system variable.

To:

#title#  Setting the SUPER privilege for the Spider user on data nodes or alternatives to avoid privilege issues
 
When explicitly setting the [spider_internal_sql_log_off|https://mariadb.com/kb/en/spider-system-variables/#spider_internal_sql_log_off] 
system variable, please note that Spider will execute matching [SET SQL_LOG_OFF|https://mariadb.com/docs/server/ref/mdb/system-variables/sql_log_off/] 
statements on each of the data nodes. It will attempt to do this on the data nodes using the SUPER privilege, 
which thus requires one to grant this privilege to the Spider user on the data nodes. 
 
If the Spider user on the data note is not configured with the SUPER privilege, you may encounter issues 
when working with Spider tables like ERROR 1227 (42000): Access denied for the missing SUPER privilege. 
To avoid this, don't explicitly set spider_internal_sql_log_off, or set it to -1, or grant the SUPER privilege 
to the Spider user on the data node.

Here: https://mariadb.com/kb/en/spider-use-cases/#enable-use-of-non-root-connections

Thank you



 Comments   
Comment by Roel Van de Paar [ 2023-12-16 ]

Documentation update signed off by ycp

Comment by Roel Van de Paar [ 2023-12-16 ]

Additionally, for https://mariadb.com/kb/en/spider-system-variables/#spider_internal_sql_log_off:

Description: Whether to log SQL statements sent to the remote server in the General Query Log.
 
Explicitly setting this system variable to either ON or OFF causes the Spider node to send a SET sql_log_off 
statement to each of the data nodes using the SUPER privilege.

To become:

Description: Whether to log SQL statements sent to the remote data node in the General Query Log
on the remote data node.
 
Explicitly setting this system variable to either ON or OFF causes the Spider node to send a SET sql_log_off 
statement to each of the data nodes. Note that this will require the Spider user on the data nodes to have
the SUPER privilege.

Comment by Ian Gilfillan [ 2023-12-16 ]

Initial update made, will wait for confirmation on the latter update.

Comment by Roel Van de Paar [ 2023-12-18 ]

Ack. Still discussing the second update.

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