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

The CSV table cannot be repaired because my_error is set incorrectly

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.5.1
    • None
    • Server
    • None

    Description

      Tables using the CSV engine, such as general log and slow log, cannot be automatically repaired because my_error
      is set to an incorrect value, making it impossible to operate on the CSV engine table.

      You can reproduce the problem by following the steps below:
      You need to set it in the configuration file my.cnf:

      slow_query_log=on;
      long_query_time=1;
      log_output=table;
      

      Start mariadb and execute:

      select sleep(2);
      

      Then kill the mariadb process. You will get a slow_log.CSM with crash bit set to true.

      Then start mariadb.

      show variables like "%slow%";
      set global slow_query_log=off;
      set global slow_query_log=on;
      

      You will get the error:

      ERROR 1032 (HY000): Can't find record in 'slow_log'
      

      show variables like "%slow%"; will set thd->mysys_var->thr_errno = HA_ERR_END_OF_FILE;
      when set global slow_query_log=on;
      cause thd->mysys_var->thr_errno = HA_ERR_END_OF_FILE, the slow log file will not be repaired,so other operations related to the slow log file will not be possible.

      I have some suggestions for fixing this bug, which you can see in the attachment.

      Attachments

        1. fix_1.text
          0.4 kB
          zhangqingrui
        2. fix_2.txt
          0.4 kB
          zhangqingrui

        Issue Links

          Activity

            People

              Unassigned Unassigned
              KarryZhang zhangqingrui
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.