1623
1623
SELECT COUNT(t1.a) FROM t1, t1 a, t1 b, t1 c, t1 d, t1 e;
1625
1625
SET @@join_buffer_size= @save_join_buffer_size;
1628
# BUG#47012 archive tables are not upgradeable, and server crashes on any access
1630
let $MYSQLD_DATADIR= `SELECT @@datadir`;
1631
copy_file std_data/bug47012.frm $MYSQLD_DATADIR/test/t1.frm;
1632
copy_file std_data/bug47012.ARZ $MYSQLD_DATADIR/test/t1.ARZ;
1633
copy_file std_data/bug47012.ARM $MYSQLD_DATADIR/test/t1.ARM;
1635
--error ER_TABLE_NEEDS_UPGRADE
1636
SHOW CREATE TABLE t1;
1638
--error ER_TABLE_NEEDS_UPGRADE
1641
--error ER_TABLE_NEEDS_UPGRADE
1642
INSERT INTO t1 (col1, col2) VALUES (1, "value");
1646
remove_file $MYSQLD_DATADIR/test/t1.ARM;
1649
--echo # BUG#48757 - missing .ARZ file causes server crash
1651
CREATE TABLE t1(a INT) ENGINE=ARCHIVE;
1653
--remove_file $MYSQLD_DATADIR/test/t1.ARZ
1654
--error ER_FILE_NOT_FOUND
1656
--error ER_BAD_TABLE_ERROR
1661
--echo # BUG#46565 - repair of partition fail for archive engine
1663
--echo # Installing corrupted table files for t1.
1664
# bug46565 was created, filled and damaged as following:
1665
# CREATE TABLE bug46565(a INT) ENGINE=archive;
1666
# INSERT INTO bug46565 VALUES(1);
1667
# FLUSH TABLE bug46565;
1668
# INSERT INTO bug46565 VALUES(2),(3);
1669
# FLUSH TABLE bug46565;
1670
# dd if=bug46565.ARZ of=std_data/bug46565.ARZ bs=1 count=8670
1671
copy_file std_data/bug46565.frm $MYSQLD_DATADIR/test/t1.frm;
1672
copy_file std_data/bug46565.ARZ $MYSQLD_DATADIR/test/t1.ARZ;
1673
--error ER_CRASHED_ON_USAGE
1676
--error ER_CRASHED_ON_USAGE
1678
REPAIR TABLE t1 EXTENDED;
1683
--echo # BUG#57162 - valgrind errors, random data when returning
1684
--echo # ordered data from archive tables
1686
SET sort_buffer_size=32804;
1687
CREATE TABLE t1(a INT, b CHAR(255), c CHAR(255), d CHAR(255),
1688
e CHAR(255), f INT) ENGINE=ARCHIVE DEFAULT CHARSET utf8;
1689
INSERT INTO t1 VALUES(-1,'b','c','d','e',1);
1690
INSERT INTO t1 SELECT * FROM t1;
1691
INSERT INTO t1 SELECT * FROM t1;
1692
INSERT INTO t1 SELECT t1.* FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6;
1693
SELECT * FROM t1 ORDER BY f LIMIT 1;
1695
SET sort_buffer_size=DEFAULT;
1698
--echo # BUG#11758979 - 51252: ARCHIVE TABLES CAUSE 100% CPU USAGE
1699
--echo # AND HANG IN SHOW TABLE STATUS
1700
--echo # (to be executed with valgrind)
1701
CREATE TABLE t1(a BLOB, b VARCHAR(200)) ENGINE=ARCHIVE;
1702
INSERT INTO t1 VALUES(NULL, '');
1704
--echo # we need this select to workaround BUG#11764364
1706
CHECKSUM TABLE t1 EXTENDED;