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

10.0-monty tree: ALTER TABLE CHANGE COLUMN doesn't drop EITS stats

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      A statement

      ALTER TABLE t1 CHANGE COLUMN b x varchar(30)
      

      used to drop column's statistics in Engine-Independent Table Statistics.
      In current 10.0-monty, the EITS entry is not dropped, which causes a failure in mysql-test/t/statistics.test which looks like this:

      CURRENT_TEST: main.statistics
      mysqltest: At line 280: query 'LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/save_column_stats'
        INTO TABLE mysql.column_stats
      FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n'' failed: 1062: Duplicate entry 'test-t1-b' for key 'PRIMARY'
      

      I guess, ALTER TABLE code merge went wrong somewhere.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              There are no comments yet on this issue.

                People

                • Assignee:
                  serg Sergei Golubchik
                  Reporter:
                  psergey Sergei Petrunia
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 2 hours, 40 minutes
                    2h 40m