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

Unconditional ANALYZE DELETE does not delete rows

    XMLWordPrintable

Details

    Description

      MariaDB [test]> create table t1 (i int);
      Query OK, 0 rows affected (1.53 sec)
       
      MariaDB [test]> insert into t1 values (1),(2);
      Query OK, 2 rows affected (0.10 sec)
      Records: 2  Duplicates: 0  Warnings: 0
       
      MariaDB [test]> analyze delete from t1;
      +------+-------------+-------+------+---------------+------+---------+------+------+--------+----------+------------+-------------------+
      | id   | select_type | table | type | possible_keys | key  | key_len | ref  | rows | r_rows | filtered | r_filtered | Extra             |
      +------+-------------+-------+------+---------------+------+---------+------+------+--------+----------+------------+-------------------+
      |    1 | SIMPLE      | NULL  | NULL | NULL          | NULL | NULL    | NULL |    2 |   NULL |     NULL |       NULL | Deleting all rows |
      +------+-------------+-------+------+---------------+------+---------+------+------+--------+----------+------------+-------------------+
      1 row in set (0.00 sec)
       
      MariaDB [test]> select * from t1;
      +------+
      | i    |
      +------+
      |    1 |
      |    2 |
      +------+
      2 rows in set (0.00 sec)

      Test case

      create table t1 (i int);
      insert into t1 values (1),(2);
      analyze delete from t1;
      select * from t1;
       
      drop table t1;

      Attachments

        Activity

          People

            cvicentiu Vicențiu Ciorbaru
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.