[MDEV-13423] myisampack returns error when trying to compress a table with index on persistent column Created: 2017-08-02  Updated: 2023-04-27

Status: Confirmed
Project: MariaDB Server
Component/s: Storage Engine - MyISAM, Virtual Columns
Affects Version/s: 10.2, 10.3, 10.4
Fix Version/s: 10.4

Type: Bug Priority: Minor
Reporter: Alice Sherepa Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Ubuntu 16.04



 Description   

Myisampack returns error 138 when trying to compress a table with index on persistent column

test/t2.MYI gave error 138 on open

If there is no key on persistent column, then data is compressed as expected.
Test:

let $MYSQLD_DATADIR= `select @@datadir`;
CREATE TABLE t1 (DATA varchar(10000), d1 VARCHAR(40) AS (substring(DATA,1,40)) persistent, KEY (d1) )engine=myisam;
INSERT INTO t1 (data) VALUES (NULL),(repeat('a',1000)),('abcabs'),(repeat('b',1000));
 
flush table t1;
--exec $MYISAMPACK -sf $MYSQLD_DATADIR/test/t1
--exec $MYISAMCHK -srnq $MYSQLD_DATADIR/test/t1
check table t1;
checksum table t1;
drop table t1;


Generated at Thu Feb 08 08:05:29 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.