1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-11371 - column compression

Storage engine independent support for column compression.

TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB, TINYTEXT, TEXT, MEDIUMTEXT, LONGTEXT,
VARCHAR and VARBINARY columns can be compressed.

New COMPRESSED column attribute added:
COMPRESSED[=<compression_method>]

System variables added:
column_compression_threshold
column_compression_zlib_level
column_compression_zlib_strategy
column_compression_zlib_wrap

Status variables added:
Column_compressions
Column_decompressions

Limitations:
- the only supported method currently is zlib
- CSV storage engine stores data uncompressed on-disk even if COMPRESSED
  attribute is present
- it is not possible to create indexes over compressed columns.
This commit is contained in:
Sergey Vojtovich
2017-04-24 17:54:18 +04:00
parent dd4e9cdded
commit fdc4779235
32 changed files with 2648 additions and 151 deletions

View File

@ -3690,6 +3690,14 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
DBUG_RETURN(TRUE);
}
}
if (sql_field->compression_method())
{
my_error(ER_COMPRESSED_COLUMN_USED_AS_KEY, MYF(0),
column->field_name.str);
DBUG_RETURN(TRUE);
}
cols2.rewind();
if (key->type == Key::FULLTEXT)
{