Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-6730

Slow query log: Field 'Last_errno:' should be used for errors only

Details

    Description

      Start Percona Server 8.0 with slow query log enabled:

      --loose-log_slow_verbosity=full --slow_query_log=1 --long_query_time=0

      Execute following statements:

      mysql -uroot test

      mysql> create table t1(f1 decimal(5,2) not null);

      mysql>INSERT INTO t1(f1) values (31.400191);

      Row was successfully inserted but also we got a warning with error code 1265. This warning was logged into the slow query log as value for 'Last_errno' field (see below) but that field should represent only real errors and not a warnings.

      <cut>

      Time: 2019-12-18T18:53:15.857371Z

      1. [email protected]: root[root] @ localhost [] Id: 40167
      2. Schema: test Last_errno: 1265 Killed: 0
      3. Query_time: 0.000593 Lock_time: 0.000101 Rows_sent: 0 Rows_examined: 0 Rows_affected: 1
      4. Bytes_sent: 11 Tmp_tables: 0 Tmp_disk_tables: 0 Tmp_table_sizes: 0
      5. InnoDB_trx_id: 32015
      6. Full_scan: No Full_join: No Tmp_table: No Tmp_table_on_disk: No
      7. Filesort: No Filesort_on_disk: No Merge_passes: 0
      8. InnoDB_IO_r_ops: 0 InnoDB_IO_r_bytes: 0 InnoDB_IO_r_wait: 0.000000
      9. InnoDB_rec_lock_wait: 0.000000 InnoDB_queue_wait: 0.000000
      10. InnoDB_pages_distinct: 5
        SET timestamp=1576695195;
        INSERT INTO t1(f1) values (31.400191);

      <cut>

      Slow query log should be fixed  to separate errors from warnings and report only errors in 'Last_errno' field.

       

       

      Attachments

        Issue Links

          Activity

            People

              oleksandr.kachan Oleksandr Kachan
              alexey.stroganov Alexey Stroganov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 5 hours
                  5h

                  Smart Checklist