Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-33042

Improve or remove unclear 'Got error ...' error log messages: errors 1227, 1814, 1064 and 1290

    XMLWordPrintable

Details

    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) CLI output

      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) error log

      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 (and perhaps best also the failing query in that case), or consider implications of removing them altogether.

      Attachments

        Issue Links

          Activity

            People

              ycp Yuchen Pei
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.