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

Strange warning after ALTER TABLE MODIFY ... COMPRESSED

    XMLWordPrintable

Details

    Description

      I was converting a table used by MediaWiki 1.31 to use column compression on a MEDIUMBLOB field. The ALTER itself worked and the column compression does seem to work but I saw this odd warning about deprecated syntax which seemed wrong.

      MariaDB [mediawiki_old]> show create table text;
      +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table |
      +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | text  | CREATE TABLE `text` (
         `old_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
         `old_text` mediumblob NOT NULL,
         `old_flags` tinyblob NOT NULL,
         PRIMARY KEY (`old_id`)
      ) ENGINE=InnoDB AUTO_INCREMENT=79873 DEFAULT CHARSET=binary
      MAX_ROWS=10000000 AVG_ROW_LENGTH=10240 |
      +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.000 sec)
      MariaDB [mediawiki_old]> ALTER TABLE `text` MODIFY COLUMN `old_text`
      MEDIUMBLOB NOT NULL COMPRESSED;
      Query OK, 49202 rows affected, 1 warning (55.083 sec)
      Records: 49202  Duplicates: 0  Warnings: 1
      MariaDB [mediawiki_old]> show warnings;
      +---------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | Level   | Code | Message |
      +---------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | Warning | 1287 | '<data type> <character set clause> ...
      COMPRESSED...' is deprecated and will be removed in a future release.
      Please use '<data type> COMPRESSED... <character set clause> ...' instead |
      +---------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.001 sec)
      MariaDB [mediawiki_old]> show create table text;
      +-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table |
      +-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      | text  | CREATE TABLE `text` (
         `old_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
         `old_text` mediumblob /*!100301 COMPRESSED*/ NOT NULL DEFAULT '',
         `old_flags` tinyblob NOT NULL,
         PRIMARY KEY (`old_id`)
      ) ENGINE=InnoDB AUTO_INCREMENT=79873 DEFAULT CHARSET=binary
      MAX_ROWS=10000000 AVG_ROW_LENGTH=10240 |
      +-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0.000 sec)
      

      Additionally, it seems to have added a default value to the column when there appeared to be none before the ALTER.

      Attachments

        Activity

          People

            Unassigned Unassigned
            markus makela markus makela
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.