[MDEV-31145] Strange warning after ALTER TABLE MODIFY ... COMPRESSED Created: 2023-04-28  Updated: 2023-11-28

Status: Open
Project: MariaDB Server
Component/s: Data Definition - Alter Table
Affects Version/s: 10.5.15
Fix Version/s: 10.5, 10.6, 10.11, 11.0, 11.1

Type: Bug Priority: Minor
Reporter: markus makela Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 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.


Generated at Thu Feb 08 10:21:37 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.