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

Connections closed normally were not logged when log_warning>=4

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.6.14, 10.6.16, 10.4(EOL), 10.5, 10.6, 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.3(EOL)
    • 10.5, 10.6, 10.11
    • Documentation, Server

    Description

      log_warnings >=4, our doc states Connections closed normally will be logged.

      https://mariadb.com/kb/en/server-system-variables/#log_warnings

      But it doesn't log the connections closed normally in the error log.

      Attachments

        Issue Links

          Activity

            The variable log_warnings is also stated as session level by when changing the variable session-level. It doesn't log for the connection changed for the session level. In the below example, the connection id 67 was not logged in the error log.

            MariaDB [(none)]> select @@log_warnings;
            +----------------+
            | @@log_warnings |
            +----------------+
            |              2 |
            +----------------+
            1 row in set (0.002 sec)
             
            MariaDB [(none)]> set log_warnings=9;
            Query OK, 0 rows affected (0.000 sec)
             
            MariaDB [(none)]> show processlist;
            +----+------+-----------+------+---------+------+----------+------------------+----------+
            | Id | User | Host   | db  | Command | Time | State  | Info       | Progress |
            +----+------+-----------+------+---------+------+----------+------------------+----------+
            | 67 | root | localhost | NULL | Query  |  0 | starting | show processlist |  0.000 |
            +----+------+-----------+------+---------+------+----------+------------------+----------+
            1 row in set (0.000 sec)
             
            MariaDB [(none)]> kill 67;
            ERROR 1927 (70100): Connection was killed
            MariaDB [(none)]> show global variables like 'log%war%';
            ERROR 2006 (HY000): Server has gone away
            No connection. Trying to reconnect...
            Connection id:  68
            Current database: *** NONE ***
            
            

            pandi.gurusamy Pandikrishnan Gurusamy added a comment - The variable log_warnings is also stated as session level by when changing the variable session-level. It doesn't log for the connection changed for the session level. In the below example, the connection id 67 was not logged in the error log. MariaDB [(none)]> select @@log_warnings; +----------------+ | @@log_warnings | +----------------+ | 2 | +----------------+ 1 row in set (0.002 sec)   MariaDB [(none)]> set log_warnings=9; Query OK, 0 rows affected (0.000 sec)   MariaDB [(none)]> show processlist; +----+------+-----------+------+---------+------+----------+------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +----+------+-----------+------+---------+------+----------+------------------+----------+ | 67 | root | localhost | NULL | Query | 0 | starting | show processlist | 0.000 | +----+------+-----------+------+---------+------+----------+------------------+----------+ 1 row in set (0.000 sec)   MariaDB [(none)]> kill 67; ERROR 1927 (70100): Connection was killed MariaDB [(none)]> show global variables like 'log%war%'; ERROR 2006 (HY000): Server has gone away No connection. Trying to reconnect... Connection id: 68 Current database: *** NONE ***

            Thanks! Documentation is updated.

            serg Sergei Golubchik added a comment - Thanks! Documentation is updated.

            Thanks serg. Our doc also states log_warnings is a session-level variable, but it doesn't take any effect for session-level changes. Pls, find the first comment in this ticket.

            pandi.gurusamy Pandikrishnan Gurusamy added a comment - Thanks serg . Our doc also states log_warnings is a session-level variable, but it doesn't take any effect for session-level changes. Pls, find the first comment in this ticket.
            serg Sergei Golubchik added a comment - - edited

            "Aborted connection" warning is controlled by the global value of log_warnings, any session changes won't affect it. Other warnings are affected by it, though

            serg Sergei Golubchik added a comment - - edited "Aborted connection" warning is controlled by the global value of log_warnings, any session changes won't affect it. Other warnings are affected by it, though

            People

              greenman Ian Gilfillan
              pandi.gurusamy Pandikrishnan Gurusamy
              Votes:
              0 Vote for this issue
              Watchers:
              4 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.