[MDEV-33042] Improve unclear 'Got error 1227' error log message Created: 2023-12-16  Updated: 2023-12-16

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - Spider
Fix Version/s: 10.4, 10.5, 10.6, 10.11, 11.0, 11.1, 11.2, 11.3

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

Issue Links:
Relates
relates to MDEV-29659 Got error 1227 when reading table and... Closed

 Description   

Spinoff from MDEV-29659.

INSTALL PLUGIN Spider SONAME 'ha_spider.so';
CREATE USER Spider@localhost IDENTIFIED BY 'PWD123';
GRANT ALL ON test.* TO Spider@localhost;
CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET '../socket.sock', DATABASE 'test', USER 'Spider', PASSWORD 'PWD123');
CREATE TABLE t (c INT) ENGINE=InnoDB;
SET spider_internal_sql_log_off=0;
CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=Spider COMMENT='WRAPPER "mysql", srv "srv", TABLE "t"';
SELECT LEFT('a', SUM(a)) FROM t1;

Leads to:

10.11.0 6ebdd3013a18b01dbecec76b870810329eb76586 (Debug)

10.11.0-dbg>SELECT LEFT('a', SUM(a)) FROM t1;
ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation

10.11.0 6ebdd3013a18b01dbecec76b870810329eb76586 (Debug)

Version: '10.11.0-MariaDB-debug'  socket: '/test/MD190922-mariadb-10.11.0-linux-x86_64-dbg/socket.sock'  port: 12223  MariaDB Server
2022-09-28 20:34:12 4 [ERROR] Got error 1227 when reading table './test/t1'

$ ./bin/perror 1227
MariaDB error code 1227 (ER_SPECIFIC_ACCESS_DENIED_ERROR): Access denied; you need (at least one of) the %-.128s privilege(s) for this operation

Present in 10.4+

Proposal to improve the error log message to include the information visible in the CLI or when using perror.


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