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

CSV: Table marked as crashed and should be repaired

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.2.3, 5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL)
    • 10.5, 10.6
    • Server

    Description

      MariaDB [test]> SET sql_mode='NO_ZERO_DATE';
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> DROP TABLE IF EXISTS t1;
      Query OK, 0 rows affected (0.02 sec)
       
      MariaDB [test]> CREATE TABLE t1 (c1 DATE NOT NULL) ENGINE=CSV;
      Query OK, 0 rows affected (0.00 sec)
       
      MariaDB [test]> INSERT IGNORE INTO t1 VALUES();
      Query OK, 1 row affected, 1 warning (0.01 sec)
       
      MariaDB [test]> SHOW WARNINGS;
      +---------+------+-----------------------------------------+
      | Level   | Code | Message                                 |
      +---------+------+-----------------------------------------+
      | Warning | 1364 | Field 'c1' doesn't have a default value |
      +---------+------+-----------------------------------------+
      1 row in set (0.00 sec)
       
      MariaDB [test]> SELECT * FROM t1;
      ERROR 1194 (HY000): Table 't1' is marked as crashed and should be repaired
      

      Attachments

        Issue Links

          Activity

            Also reproducible with MySQL-5.7.
            nirbhay_c, do you think it makes sense to file an upstream bug report? If it does, can you do it?

            elenst Elena Stepanova added a comment - Also reproducible with MySQL-5.7. nirbhay_c , do you think it makes sense to file an upstream bug report? If it does, can you do it?

            After fixing, please remember not only update the test/results (it will be hard to forget as they'll start failing), but also remove extra MTR suppressions for the error.

            elenst Elena Stepanova added a comment - After fixing, please remember not only update the test/results (it will be hard to forget as they'll start failing), but also remove extra MTR suppressions for the error.

            Removed 10.2-ga label since NO_ZERO_DATE has not become a part of the default sql_mode.

            elenst Elena Stepanova added a comment - Removed 10.2-ga label since NO_ZERO_DATE has not become a part of the default sql_mode.

            I saw this one also in testing

            SET sql_mode='no_zero_date';
            CREATE TABLE t (a DATETIME NOT NULL) ENGINE=CSV;
            CREATE TEMPORARY TABLE t (b INT) ENGINE=InnoDB;
            DROP TABLE t;
            INSERT INTO t VALUES (1);
            SELECT * FROM t;
            

            Leads to:

            MD160821-mariadb-10.7.0-linux-x86_64-dbg/log/master.err:2021-08-16  9:14:50 4 [ERROR] mysqld: Table 't' is marked as crashed and should be repaired
            

            MD160821-mariadb-10.7.0-linux-x86_64-opt/log/master.err:2021-08-16  9:14:50 4 [ERROR] mysqld: Table 't' is marked as crashed and should be repaired
            

            Bug confirmed present in:
            MariaDB: 10.2.41 (dbg), 10.2.41 (opt), 10.3.32 (dbg), 10.3.32 (opt), 10.4.22 (dbg), 10.4.22 (opt), 10.5.13 (dbg), 10.5.13 (opt), 10.6.5 (dbg), 10.6.5 (opt), 10.7.0 (dbg), 10.7.0 (opt)
            MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.34 (dbg), 5.7.34 (opt), 5.7.35 (dbg), 8.0.24 (dbg), 8.0.24 (opt)

            Roel Roel Van de Paar added a comment - I saw this one also in testing SET sql_mode= 'no_zero_date' ; CREATE TABLE t (a DATETIME NOT NULL ) ENGINE=CSV; CREATE TEMPORARY TABLE t (b INT ) ENGINE=InnoDB; DROP TABLE t; INSERT INTO t VALUES (1); SELECT * FROM t; Leads to: MD160821-mariadb-10.7.0-linux-x86_64-dbg/log/master.err:2021-08-16 9:14:50 4 [ERROR] mysqld: Table 't' is marked as crashed and should be repaired MD160821-mariadb-10.7.0-linux-x86_64-opt/log/master.err:2021-08-16 9:14:50 4 [ERROR] mysqld: Table 't' is marked as crashed and should be repaired Bug confirmed present in: MariaDB: 10.2.41 (dbg), 10.2.41 (opt), 10.3.32 (dbg), 10.3.32 (opt), 10.4.22 (dbg), 10.4.22 (opt), 10.5.13 (dbg), 10.5.13 (opt), 10.6.5 (dbg), 10.6.5 (opt), 10.7.0 (dbg), 10.7.0 (opt) MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.34 (dbg), 5.7.34 (opt), 5.7.35 (dbg), 8.0.24 (dbg), 8.0.24 (opt)
            Roel Roel Van de Paar added a comment - Logged upstream as https://bugs.mysql.com/bug.php?id=104627

            SET sql_mode='';
            CREATE TABLE t1 (a DATE NOT NULL) ENGINE=CSV;
            INSERT INTO t1 VALUES();
            SET sql_mode=TRADITIONAL;
            SELECT 1 FROM t1 WHERE ROW(a,a) NOT IN ((1,1),(2,2));
            

            Leads to:

            10.11.1 50c5743adc87e1cdec1431a02558f6540fe5a6d5 (Debug)

            10.11.1-dbg>SELECT 1 FROM t1 WHERE ROW(a,a) NOT IN ((1,1),(2,2));
            ERROR 1194 (HY000): Table 't1' is marked as crashed and should be repaired
            

            Roel Roel Van de Paar added a comment - SET sql_mode= '' ; CREATE TABLE t1 (a DATE NOT NULL ) ENGINE=CSV; INSERT INTO t1 VALUES (); SET sql_mode=TRADITIONAL; SELECT 1 FROM t1 WHERE ROW(a,a) NOT IN ((1,1),(2,2)); Leads to: 10.11.1 50c5743adc87e1cdec1431a02558f6540fe5a6d5 (Debug) 10.11.1-dbg>SELECT 1 FROM t1 WHERE ROW(a,a) NOT IN ((1,1),(2,2)); ERROR 1194 (HY000): Table 't1' is marked as crashed and should be repaired

            People

              sanja Oleksandr Byelkin
              nirbhay_c Nirbhay Choubey (Inactive)
              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.