Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.5.15
-
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.