[MDEV-15592] Column COMPRESSED should select a 'high order' datatype Created: 2018-03-17 Updated: 2018-05-29 Resolved: 2018-05-11 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.3 |
| Fix Version/s: | 10.3.7 |
| Type: | Bug | Priority: | Major |
| Reporter: | roberto spadim | Assignee: | Sergey Vojtovich |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||
| Sprint: | 10.3.6-1 | ||||||||||||||||||||
| Description |
|
I'm using a Azure VM (ubuntu), mariadb ubuntu package
—
—
—
Possible solutions: —
at compression source code, we have LENGTH-1 as field size maybe solution is here (i don't know the full source): instead of: use: |
| Comments |
| Comment by roberto spadim [ 2018-03-17 ] |
|
comment included the problem: — CREATE TABLE `v255` ( MariaDB [test]> insert into v255 values (repeat('a',255)); that's just a problem about documentation and field limit at BLOB types |
| Comment by roberto spadim [ 2018-03-17 ] |
|
i think just documentation is ok, we could close this issue (no code changes) |
| Comment by Sergey Vojtovich [ 2018-03-19 ] |
|
If we simplify this even further, we'll end up with something like: We reserver 1 byte for compressed blobs to be able to store compression Unless I miss something, this is only required when we need to store data So this is pretty valid bug report. If there was some other restriction, we |
| Comment by roberto spadim [ 2018-03-19 ] |
|
yeap, the problem is the edge case but with some particular cases maybe just documentation resolve this issue I got the problem copying a old table (uncompressed) using SHOW CREATE TABLE xxxx, rewriting some columns with COMPRESSED, and trying to INSERT INTO yyy SELECT * FROM xxx, I didn`t checked that the LENGTH of some fields could be reduced (that wasn`t documented) I included some comments at documentation, maybe a review and it could be ok: https://mariadb.com/kb/en/library/storage-engine-independent-column-compression/ Using BLOB, with max length = 65535, and inserting into BLOB COMPRESSED with max length=65534 generate an error (ERROR 1406 (22001): Data too long for column 'xxx' at row 1), increase the COMPRESSED LENGTH to +1 changing from BLOB COMPRESSED to LONGBLOB COMPRESSED to solve this problem" |
| Comment by Sergey Vojtovich [ 2018-04-03 ] |
|
Found |
| Comment by Sergey Vojtovich [ 2018-04-05 ] |
|
serg, please review patch attached to this issue. This and all other column compression patches are also available via bb-10.3-svoj. Chronologically this one should be reviewed after |
| Comment by Sergey Vojtovich [ 2018-05-03 ] |
|
bar, please review updated patch b4853b2b0ed39c4a26b50c56b9e6a1578235824c. |
| Comment by Alexander Barkov [ 2018-05-11 ] |
|
The patch |