Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-9100

SHOW BINARY LOGS not parsed properly for MySQL8

Details

    • 1
    • Yes
    • Yes
    • C/S Core
    • No

    Description

      5.7:

       mysql> show binary logs;
      +------------+-----------+
      | Log_name   | File_size |
      +------------+-----------+
      | aaa.000001 |       154 |
      +------------+-----------+
      1 row in set (0,00 sec)
      

       

      8.0:

       mysql> show binary logs;
      +---------------+-----------+-----------+
      | Log_name      | File_size | Encrypted |
      +---------------+-----------+-----------+
      | binlog.000001 |      1512 | No        |
      | binlog.000002 |       870 | No        |
      | binlog.000003 |       156 | No        |
      | binlog.000004 |     17933 | No        |
      +---------------+-----------+-----------+
      

       

       

      // Scrape collects data.func (ScrapeBinlogSize) Scrape(ctx context.Context, db *sql.DB, ch chan<- prometheus.Metric) error {	
      ...
      for masterLogRows.Next() {
      		if err := masterLogRows.Scan(&filename, &filesize); err != nil {
      			return nil
      		}
      		size += filesize
      		count++
      	}
       

      which generates error, as 8.0 has the extra Encrypted field:

      sql: expected 3 destination arguments in Scan, not 2 

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              iwo.panowicz Iwo Panowicz
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Smart Checklist