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

Document what integer in error log means

Details

    Description

      The error log in MariaDB 10.1 has entries like the following:

      2016-05-11 14:50:00 140452469635200 [Note] /usr/sbin/mysqld: ready for connections.
      

      What does "140452469635200" mean in this context? It is not documented here:

      https://mariadb.com/kb/en/mariadb/error-log/

      Is this the process ID, as added in this upstream patch?

      https://bugs.mysql.com/bug.php?id=56240

      Or is this some thread ID, as referenced in the MySQL 5.7 documentation?

      As of MySQL 5.7.2, the ID included in error log messages is that of the thread within mysqld responsible for writing the message. This indicates which part of the server produced the message, and is consistent with general query log and slow query log messages, which include the connection thread ID. Before MySQL 5.7.2, the ID in error log messages is that of the mysqld process ID.
      

      http://dev.mysql.com/doc/refman/5.7/en/error-log.html

      Attachments

        Activity

          In current 10.1 code from GitHub I see the following call eventually (line 8399 in sql/log.cc):

             8399   fprintf(stderr, "%d-%02d-%02d %2d:%02d:%02d %lu [%s] %.*s%.*s\n",
             8400           start->tm_year + 1900,
             8401           start->tm_mon+1,
             8402           start->tm_mday,
             8403           start->tm_hour,
             8404           start->tm_min,
             8405           start->tm_sec,
             8406           (unsigned long) pthread_self(),
             8407           (level == ERROR_LEVEL ? "ERROR" : level == WARNING_LEVEL ?
             8408            "Warning" : "Note"),
             8409           tag_length, tag,
             8410           (int) length, buffer);
             8411
             8412   fflush(stderr);
          
          

          So, this is thread ID as pthread_self() shows, see http://linux.die.net/man/3/pthread_self.

          valerii Valerii Kravchuk added a comment - In current 10.1 code from GitHub I see the following call eventually (line 8399 in sql/log.cc): 8399 fprintf(stderr, "%d-%02d-%02d %2d:%02d:%02d %lu [%s] %.*s%.*s\n" , 8400 start->tm_year + 1900 , 8401 start->tm_mon+ 1 , 8402 start->tm_mday, 8403 start->tm_hour, 8404 start->tm_min, 8405 start->tm_sec, 8406 (unsigned long ) pthread_self(), 8407 (level == ERROR_LEVEL ? "ERROR" : level == WARNING_LEVEL ? 8408 "Warning" : "Note" ), 8409 tag_length, tag, 8410 ( int ) length, buffer); 8411 8412 fflush(stderr); So, this is thread ID as pthread_self() shows, see http://linux.die.net/man/3/pthread_self .
          greenman Ian Gilfillan added a comment -

          A description of the error log format has been added to the documentation

          greenman Ian Gilfillan added a comment - A description of the error log format has been added to the documentation

          People

            greenman Ian Gilfillan
            GeoffMontee Geoff Montee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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