Big column compressed
(MDEV-11371)
|
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Tests |
| Affects Version/s: | 10.3 |
| Fix Version/s: | N/A |
| Type: | Technical task | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Alice Sherepa |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Sprint: | 10.3.1-2 | ||||||||||||||||||||||||||||||||
| Description |
|
Development tasks: Request before the second round of review (received by email): On Thu, Jun 29, 2017 at 12:22:15PM +0400, Sergey Vojtovich wrote:
Note: Since there is no documentation for the feature, need to explore first. Initial exploration:
– Extra MTR tests needed:
|
| Comments |
| Comment by Alice Sherepa [ 2017-07-24 ] | ||||||||||||||||||||||||||||
|
1)If we have compressed data types on master and compressed on slave, then we get wrong data on slave, for all BLOB and TEXT data types(TINY,...), works correct with VARCHAR and VARBINARY The same if we have compressed on master, but not compressed on slave. 2) tables with partitions and compressed data types crash, when
no crash and correct result if we use compressed column with functions LIKE, NOT LIKE, LENGTH(), ...
| ||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-07-25 ] | ||||||||||||||||||||||||||||
|
Partitioning should be fixed now, please pull. | ||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-07-25 ] | ||||||||||||||||||||||||||||
|
In replication test please also make sure that data is stored in compressed form in binlog (whenever applicable). | ||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-07-27 ] | ||||||||||||||||||||||||||||
|
Replication of BLOB COMPRESSED to BLOB COMPRESSED should be fixed now. Replication of COMPRESSED<->UNCOMPRESSED is not yet solved. We have to extend binlog format to transfer COMPRESSED flag, which has to be discussed with monty. | ||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2017-07-27 ] | ||||||||||||||||||||||||||||
|
I added new test for replication, there is binlog printed at the end. so, for now, (274ab73a89573554d07a6de1deb846ad47eb1004): | ||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-07-27 ] | ||||||||||||||||||||||||||||
|
As I mentioned above not compressed to compressed is not ready yet. Otherwise this change is intentional and makes things inline with varchar. | ||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-08-08 ] | ||||||||||||||||||||||||||||
|
This change is now in bb-10.3-svoj: Fixed replication of compressed->uncompressed and uncompressed->compressed data. Depending on slave_type_conversions it is either rejected or converted properly. To make it work currently, libmariadb has to be patched:
| ||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2017-08-15 ] | ||||||||||||||||||||||||||||
|
Ignore my previous comment (now removed), it belongs to a different task. | ||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2017-08-21 ] | ||||||||||||||||||||||||||||
|
replication test failed for compresssed to not compressed part (Column 0 of table 'test.t1' cannot be converted from type 'tinyblob compressed' to type 'blob') in row replication type | ||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-08-21 ] | ||||||||||||||||||||||||||||
|
Did you set slave_type_conversions? | ||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2017-08-21 ] | ||||||||||||||||||||||||||||
|
alice, Replication test fails as alice said above. svoj, setting slave_type_conversions to either ALL_NON_LOSSY or ALL_LOSSY doesn't seem to make a difference. | ||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-08-23 ] | ||||||||||||||||||||||||||||
|
Back to the discussion about
. It does compress indeed during partition pruning. I'd say it is performance bug. It shouldn't block initial version though. In parts test data is spread differently depending on COMPRESSION flag setting (see output from I_S.PARTITIONS). I don't really like it. | ||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-08-23 ] | ||||||||||||||||||||||||||||
|
Also note that I pushed rebased version to bb-10.3- | ||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-08-23 ] | ||||||||||||||||||||||||||||
|
I confirm there's something wrong with replication. I'll try to get this fixed asap. The fact that it says "'tinyblob compressed' to type 'blob'" is a bug as such. It should say "'blob compressed' to type 'blob'". Reported as MDEV-13629. If I set --slave-type-conversions=ALL_NON_LOSSY it accepts blobs just fine, but then fails with "varchar(10001) compressed' to type 'varchar(10000)". That's something that I'll have to fix. | ||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-08-25 ] | ||||||||||||||||||||||||||||
|
Replication test should be extended to test tinyblob with data length 255 to tinyblob compressed with column_compression_threshold>255. | ||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-08-25 ] | ||||||||||||||||||||||||||||
|
Also VARCHAR(10000) to VARCHAR(9999) COMPRESSED should be an error. | ||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-08-25 ] | ||||||||||||||||||||||||||||
|
Replication should now be fixed in bb-10.3- | ||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-08-25 ] | ||||||||||||||||||||||||||||
|
Data distribution in partitioned tables is now fixed in bb-10.3- | ||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2017-08-29 ] | ||||||||||||||||||||||||||||
|
replication does not work for the biggest value in blob and text (tiny, medium,..) with all kinds (compr to compr, c->n c, n c->c). returns an error (e.g. tinyblob)
| ||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-08-29 ] | ||||||||||||||||||||||||||||
|
It is a bug, it should only fail for nc->c. | ||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2017-08-29 ] | ||||||||||||||||||||||||||||
|
it works for 254, but not 255.
it indeed does not show an error with blobs while ALL_NON_LOSSY is set
| ||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-08-29 ] | ||||||||||||||||||||||||||||
|
It happens on master, which is kind of expected. Max data length for compressed blobs 1 byte shorter than for regular blobs. There's probably a way to fix it, but it was decided not to bother with this in first implementation. | ||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-08-29 ] | ||||||||||||||||||||||||||||
|
If you want to try 255 bytes compressed blob you should do something like this:
| ||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2017-08-29 ] | ||||||||||||||||||||||||||||
|
Are you testing recent bb-10.3- | ||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2017-09-21 ] | ||||||||||||||||||||||||||||
|
column_compression_parts.result |