Column Compression Extensions for 5.7

Registered by Yura Sorokin

https://github.com/percona/percona-server/pull/1147

Add support for compressed JSON columns.

Add support for indexes on virtual columns based on compressed fields:
- Purge threads now also need to have access to prebuilt object.

Add support for COMPRESSED attribute in STORED generated columns.
It should be possible to make generated columns compressed with optional compression dictionary. Please, notice that this makes sense only for STORED generated columns, for VIRTUAL ones the ER_UNSUPPORTED_COMPRESSED_COLUMN_TYPE error must be reported.

New generated column definition syntax:
col_name data_type [GENERATED ALWAYS] AS (expression)
  [VIRTUAL | STORED] [UNIQUE [KEY]] [COMMENT comment]
  [[NOT] NULL] [[PRIMARY] KEY]
  [COLUMN_FORMAT {DEFAULT|COMPRESSED} [WITH COMPRESSION_DICTIONARY dict_name]]

The new syntax is allowed in both 'CREATE TABLE' and 'ALTER TABLE' statements. The latter can also be used to apply/remove COMPRESSED attribute to/from an existing STORED generated column.
For instance
ALTER TABLE t MODIFY g BLOB GENERATED ALWAYS AS (a) STORED COLUMN_FORMAT COMPRESSED
or
ALTER TABLE t MODIFY g BLOB GENERATED ALWAYS AS (a) STORED COLUMN_FORMAT DEFAULT

Blueprint information

Status:
Complete
Approver:
Laurynas Biveinis
Priority:
High
Drafter:
Yura Sorokin
Direction:
Approved
Assignee:
Yura Sorokin
Definition:
Approved
Series goal:
Accepted for 5.7
Implementation:
Implemented
Milestone target:
milestone icon 5.7.17-11
Started by
Yura Sorokin
Completed by
Yura Sorokin

Related branches

Sprints

Whiteboard

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.