← Back to team overview

maria-discuss team mailing list archive

Re: columns compression

 

Hi Sergey! I'm using a Azure VM (ubuntu), mariadb ubuntu package
Server version: 10.3.5-MariaDB-10.3.5+maria~xenial mariadb.org binary
distribution


MariaDB [test]>  *CREATE TABLE `table_without_compression` (*
*  `id` int(11) NOT NULL DEFAULT 0,*
*  `gmtime` decimal(22,7) NOT NULL DEFAULT 0.0000000,*
*  `data` blob NOT NULL,*
*  PRIMARY KEY (`id`,`gmtime`)*
*)  ENGINE=InnoDB DEFAULT CHARSET=latin1;*
*Query OK, 0 rows affected (0.385 sec)*

MariaDB [test]>  *CREATE TABLE `table_compressed` (*
*  `id` int(11) NOT NULL DEFAULT 0,*
*  `gmtime` decimal(22,7) NOT NULL DEFAULT 0.0000000,*
*  `data` blob COMPRESSED NOT NULL DEFAULT '',*
*  PRIMARY KEY (`id`,`gmtime`)*
*)  ENGINE=InnoDB DEFAULT CHARSET=latin1;*
*Query OK, 0 rows affected (0.385 sec)*


MariaDB [test]> INSERT INTO *table_without_compression VALUES
(1,0,repeat('a',65535));*
*Query OK, 1 row affected (0.135 sec)*

MariaDB [test]> * INSERT INTO  table_without_compression VALUES
(1,1,repeat('a',65536));*
*ERROR 1406 (22001): Data too long for column 'data' at row 1   <- JUST TO
CHECK IF WE GOT MAX SIZE OF BLOB COLUMN, maybe that's the problem,
internally compression consider the from/to column instead of a bigger
column (long blob for example when using blob/longblob, i will test with
TEXT/LONG TEXT and VARCHAR too)*

MariaDB [test]> *INSERT INTO table_compressed SELECT * FROM
table_without_compression;*
*ERROR 1406 (22001): Data too long for column 'data' at row 1 <- that's the
error*

Should I include at Jira?

Follow ups

References