mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
Enable archive tables to work with mysql_upgrade / repair
Made long file names from previous patch shorter mysql-test/r/archive.result: Added testing of repair (for upgrade) of 5.0 tables. mysql-test/std_data/archive_5_0.ARM: Archive table created in MySQL 5.0 mysql-test/std_data/archive_5_0.ARZ: Archive table created in MySQL 5.0 mysql-test/std_data/archive_5_0.frm: Archive table created in MySQL 5.0 mysql-test/std_data/long_table_name.MYD: Made long file names shorter mysql-test/std_data/long_table_name.MYI: Made long file names shorter mysql-test/std_data/long_table_name.frm: Made long file names shorter mysql-test/t/archive.test: Added testing of repair (for upgrade) of 5.0 tables. sql/sql_table.cc: Allow recreate to open crashed tables. sql/table.cc: Fix error message if storage engine doesn't exists. storage/archive/azio.c: Reset status values in case archive is of old versions storage/archive/ha_archive.cc: Fix to allow one to open old versions of table during repair Reset status variables for old version tables If the the table is of old version, force upgrade with ALTER TABLE when doing repair storage/archive/ha_archive.h: Added variables to detect old versions
This commit is contained in:
parent
a4fff491eb
commit
9f85560212
13 changed files with 72 additions and 15 deletions
|
|
@ -150,6 +150,17 @@ int az_open (azio_stream *s, const char *path, int Flags, File fd)
|
|||
}
|
||||
else
|
||||
{
|
||||
/* Reset values in case of old version of archive file */
|
||||
s->rows= 0;
|
||||
s->forced_flushes= 0;
|
||||
s->shortest_row= 0;
|
||||
s->longest_row= 0;
|
||||
s->auto_increment= 0;
|
||||
s->check_point= 0;
|
||||
s->comment_start_pos= 0;
|
||||
s->comment_length= 0;
|
||||
s->frm_start_pos= 0;
|
||||
s->frm_length= 0;
|
||||
check_header(s); /* skip the .az header */
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue