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

Indeterministic row number in SHOW TABLE STATUS on RocksDB table

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Not a Bug
    • 10.2(EOL)
    • N/A
    • None
    • 10.2 0992be927e1c686c39c39fe53fc2a7869d55143d

    Description

      DROP TABLE IF EXISTS t1, t2;
      CREATE TABLE t1 (a INT, b VARCHAR(8)) ENGINE=RocksDB;
      INSERT INTO t1 (a,b) VALUES (100,'a'),(2,'foo');
      CREATE TABLE t2 (a INT, b VARCHAR(8)) ENGINE=RocksDB;
      INSERT INTO t2 (a,b) VALUES (1,'bar');
      ANALYZE TABLE t1, t2;
      SHOW TABLE STATUS;
      DROP TABLE t1, t2;
      

      By repeating the same set of queries, I get different results.

      Sometimes the output shows 2 rows for t1, as it should be:

      MariaDB [test]> SHOW TABLE STATUS \G
      *************************** 1. row ***************************
                 Name: t1
               Engine: ROCKSDB
              Version: 10
           Row_format: Dynamic
                 Rows: 2
       Avg_row_length: 30
          Data_length: 60
      Max_data_length: 0
         Index_length: 0
            Data_free: 0
       Auto_increment: NULL
          Create_time: NULL
          Update_time: NULL
           Check_time: NULL
            Collation: latin1_swedish_ci
             Checksum: NULL
       Create_options: 
              Comment: 
      *************************** 2. row ***************************
                 Name: t2
               Engine: ROCKSDB
              Version: 10
           Row_format: Dynamic
                 Rows: 1
       Avg_row_length: 30
          Data_length: 30
      Max_data_length: 0
         Index_length: 0
            Data_free: 0
       Auto_increment: NULL
          Create_time: NULL
          Update_time: NULL
           Check_time: NULL
            Collation: latin1_swedish_ci
             Checksum: NULL
       Create_options: 
              Comment: 
      2 rows in set (0.01 sec)
      

      And sometimes it's 3 (and the data length differs):

      MariaDB [test]> SHOW TABLE STATUS \G
      *************************** 1. row ***************************
                 Name: t1
               Engine: ROCKSDB
              Version: 10
           Row_format: Dynamic
                 Rows: 3
       Avg_row_length: 30
          Data_length: 90
      Max_data_length: 0
         Index_length: 0
            Data_free: 0
       Auto_increment: NULL
          Create_time: NULL
          Update_time: NULL
           Check_time: NULL
            Collation: latin1_swedish_ci
             Checksum: NULL
       Create_options: 
              Comment: 
      *************************** 2. row ***************************
                 Name: t2
               Engine: ROCKSDB
              Version: 10
           Row_format: Dynamic
                 Rows: 1
       Avg_row_length: 30
          Data_length: 30
      Max_data_length: 0
         Index_length: 0
            Data_free: 0
       Auto_increment: NULL
          Create_time: NULL
          Update_time: NULL
           Check_time: NULL
            Collation: latin1_swedish_ci
             Checksum: NULL
       Create_options: 
              Comment: 
      2 rows in set (0.00 sec)
      

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.