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

SQL Error log plugin prints "(null)" in the Query part for an access denied error

    XMLWordPrintable

Details

    Description

      --source include/not_embedded.inc
       
      if (!$SQL_ERRLOG_SO) {
        skip No SQL_ERROR_LOG plugin;
      }
       
       
      install plugin SQL_ERROR_LOG soname 'sql_errlog';
       
       
      show variables like 'sql_error_log%';
      set global sql_error_log_rate=1;
       
      create user u identified by 'good_pass';
       
      # Test the user is blocked after using bad password
      error ER_ACCESS_DENIED_ERROR;
      connect(con1, localhost, u, bas_pass);
       
       
      let $MYSQLD_DATADIR= `SELECT @@datadir`;
      # replace the timestamp and the hostname with constant values
      --replace_regex /[1-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [ 0-9][0-9]:[0-9][0-9]:[0-9][0-9] [^EW]*/TIME HOSTNAME /
      cat_file $MYSQLD_DATADIR/sql_errors.log;
       
      --------------------------------------------------------------------------------------------------------------------------------------------------
      set global sql_error_log_rate=1;
      create user u identified by 'good_pass';
      connect(localhost,u,bas_pass,test,16000,/test/MD230124-mariadb-11.2.3-linux-x86_64-opt/mariadb-test/var/tmp/mysqld.1.sock);
      connect con1, localhost, u, bas_pass;
      ERROR 28000: Access denied for user 'u'@'localhost' (using password: YES)
      TIME HOSTNAME ERROR 1045: Access denied for user 'u'@'localhost' (using password: YES) : (null)
      plugins.MDEV-33304                       [ pass ]      3
      --------------------------------------------------------------------------------------------------------------------------------------------------
      

      SQL Error log plugin prints "(null)" in the Query part for an access denied error

      10.6.17 011d666ada0514875717a15171b93b139a701219

      $ /test/mtest/server/mariadb-10.6.17-linux-x86_64/bin/mariadb -urepl_user -S/test/mtest/server/mariadb-10.6.17-linux-x86_64/socket.sock
      ERROR 1045 (28000): Access denied for user 'repl_user'@'localhost' (using password: NO)
       
      $ cat data/sql_errors.log
      2024-01-24 13:00:53 6 [repl_user] @ localhost [] NULL ERROR 1045: Access denied for user 'repl_user'@'localhost' (using password: NO) : (null) 
      $ 
      

      Attachments

        Activity

          People

            rucha174 Rucha Deodhar
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.