1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-29 00:08:14 +03:00

Merge fix for BUG46565 to mysql-5.1-bugteam.

This commit is contained in:
Sergey Vojtovich
2010-03-26 14:20:10 +04:00
5 changed files with 52 additions and 4 deletions

View File

@@ -12737,3 +12737,22 @@ SELECT * FROM t1;
ERROR HY000: Can't find file: 't1' (errno: 2)
DROP TABLE t1;
ERROR 42S02: Unknown table 't1'
#
# BUG#46565 - repair of partition fail for archive engine
#
# Installing corrupted table files for t1.
SELECT * FROM t1;
ERROR HY000: Table 't1' is marked as crashed and should be repaired
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair error Corrupt
SELECT * FROM t1;
ERROR HY000: Table 't1' is marked as crashed and should be repaired
REPAIR TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 repair status OK
SELECT * FROM t1;
a
1
2
DROP TABLE t1;

Binary file not shown.

Binary file not shown.

View File

@@ -1655,3 +1655,26 @@ FLUSH TABLE t1;
SELECT * FROM t1;
--error ER_BAD_TABLE_ERROR
DROP TABLE t1;
--echo #
--echo # BUG#46565 - repair of partition fail for archive engine
--echo #
--echo # Installing corrupted table files for t1.
# bug46565 was created, filled and damaged as following:
# CREATE TABLE bug46565(a INT) ENGINE=archive;
# INSERT INTO bug46565 VALUES(1);
# FLUSH TABLE bug46565;
# INSERT INTO bug46565 VALUES(2),(3);
# FLUSH TABLE bug46565;
# dd if=bug46565.ARZ of=std_data/bug46565.ARZ bs=1 count=8670
copy_file std_data/bug46565.frm $MYSQLD_DATADIR/test/t1.frm;
copy_file std_data/bug46565.ARZ $MYSQLD_DATADIR/test/t1.ARZ;
--error ER_CRASHED_ON_USAGE
SELECT * FROM t1;
REPAIR TABLE t1;
--error ER_CRASHED_ON_USAGE
SELECT * FROM t1;
REPAIR TABLE t1 EXTENDED;
SELECT * FROM t1;
DROP TABLE t1;