[MDEV-4442] Definition of ARCHIVE table is not re-discovered after replacing ARZ file Created: 2013-04-26 Updated: 2013-06-16 Resolved: 2013-06-16 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.2 |
| Fix Version/s: | 10.0.4 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Elena Stepanova | Assignee: | Sergei Golubchik |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
It's not quite clear from the KB whether it should work or not, so I'll file it just in case, please close if it's not a bug I create an ARCHIVE table and get the .frm file be created. Then I replace .ARZ file by one from a table with a different definition. On some reason, I couldn't reproduce it via MTR, so the test below is supposed to be executed via MySQL client. Output (with comments):
SQL:
|
| Comments |
| Comment by Elena Stepanova [ 2013-04-26 ] | ||||||||||||||||||||
|
Following IRC comments, I've compared what's done in archive.discover test with what the one in this report does. #############################################
MariaDB [test]> create table t1 (a int) engine=archive; MariaDB [test]> system cp data/test/t1.ARZ data/ MariaDB [test]> insert into t1 values (1); MariaDB [test]> show create table t1;
------
------ MariaDB [test]> system cp data/t1.ARZ data/test/
------
------ MariaDB [test]> flush tables; MariaDB [test]> show create table t1;
------
------ MariaDB [test]> ##########################################################
##########################################################
MariaDB [test]> create table t1 (a int, b int) engine=archive; MariaDB [test]> system cp data/test/t1.ARZ data/ MariaDB [test]> insert into t1 values (1); MariaDB [test]> show create table t1;
------
------ MariaDB [test]> system cp data/t1.ARZ data/test/
------
------ MariaDB [test]> flush tables; MariaDB [test]> show create table t1; | ||||||||||||||||||||
| Comment by Sergei Golubchik [ 2013-06-16 ] | ||||||||||||||||||||
|
It's not a bug. You copy t1.ARZ over t2.ARZ, while t2 table is still open. When later you close t2, it overwrites part of the new t2.ARZ. As a result you get a non-functional corrupted ARZ file. If you execute FLUSH TABLES before copying files around, t2 will be discovered correctly. |