summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-03-30 13:54:33 +0300
committerMichael Widenius <monty@askmonty.org>2012-03-30 13:54:33 +0300
commit474ee1eedb9348772d73c24400957d3af01b0f56 (patch)
tree73fb7e8173ce543e6fe3008684535a8700425c79
parentbd63a5443d755571ed9589f2a8e2cdb0616ee281 (diff)
parentdeaf220c509ffefdb83bcab1ad2eabb03bb0122a (diff)
downloadmariadb-git-474ee1eedb9348772d73c24400957d3af01b0f56.tar.gz
Merge from 5.2
-rw-r--r--mysql-test/suite/maria/r/maria-autozerofill.result17
-rw-r--r--mysql-test/suite/maria/t/maria-autozerofill.test7
-rw-r--r--storage/maria/ha_maria.cc2
3 files changed, 25 insertions, 1 deletions
diff --git a/mysql-test/suite/maria/r/maria-autozerofill.result b/mysql-test/suite/maria/r/maria-autozerofill.result
index dc3d47bc6cc..22856fe54b0 100644
--- a/mysql-test/suite/maria/r/maria-autozerofill.result
+++ b/mysql-test/suite/maria/r/maria-autozerofill.result
@@ -10,6 +10,8 @@ create table t3 (a int) engine=aria;
INSERT INTO t3 VALUES (1),(2);
create table t4 (a int) engine=aria;
INSERT INTO t4 VALUES (1),(2);
+create table t5 (a int) engine=aria;
+INSERT INTO t5 VALUES (1),(2);
flush tables;
create_rename_lsn has non-magic value
* shut down mysqld, removed logs, restarted it
@@ -34,6 +36,9 @@ mysqltest.t2 check error Corrupt
repair table t2;
Table Op Msg_type Msg_text
mysqltest.t2 repair status OK
+check table t2;
+Table Op Msg_type Msg_text
+mysqltest.t2 check status OK
optimize table t3;
Table Op Msg_type Msg_text
mysqltest.t3 optimize Note Zerofilling moved table ./mysqltest/t3
@@ -42,4 +47,16 @@ analyze table t4;
Table Op Msg_type Msg_text
mysqltest.t4 analyze Note Zerofilling moved table ./mysqltest/t4
mysqltest.t4 analyze status OK
+repair table t5;
+Table Op Msg_type Msg_text
+mysqltest.t5 repair status OK
+check table t5;
+Table Op Msg_type Msg_text
+mysqltest.t5 check status OK
+repair table t5;
+Table Op Msg_type Msg_text
+mysqltest.t5 repair status OK
+check table t5;
+Table Op Msg_type Msg_text
+mysqltest.t5 check status OK
drop database mysqltest;
diff --git a/mysql-test/suite/maria/t/maria-autozerofill.test b/mysql-test/suite/maria/t/maria-autozerofill.test
index a92c9e85ec6..9bb2782105a 100644
--- a/mysql-test/suite/maria/t/maria-autozerofill.test
+++ b/mysql-test/suite/maria/t/maria-autozerofill.test
@@ -31,6 +31,8 @@ create table t3 (a int) engine=aria;
INSERT INTO t3 VALUES (1),(2);
create table t4 (a int) engine=aria;
INSERT INTO t4 VALUES (1),(2);
+create table t5 (a int) engine=aria;
+INSERT INTO t5 VALUES (1),(2);
flush tables;
# Check that table is not zerofilled, not movable
@@ -96,9 +98,14 @@ EOF
check table t2;
check table t2;
repair table t2;
+check table t2;
replace_result \\ /;
optimize table t3;
replace_result \\ /;
analyze table t4;
+repair table t5;
+check table t5;
+repair table t5;
+check table t5;
drop database mysqltest;
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
index d1bfe9ed87e..656f6f43f45 100644
--- a/storage/maria/ha_maria.cc
+++ b/storage/maria/ha_maria.cc
@@ -1683,7 +1683,7 @@ int ha_maria::repair(THD *thd, HA_CHECK *param, bool do_optimize)
{
DBUG_PRINT("info", ("Reseting crashed state"));
share->state.changed&= ~(STATE_CHANGED | STATE_CRASHED_FLAGS |
- STATE_IN_REPAIR);
+ STATE_IN_REPAIR | STATE_MOVED);
file->update |= HA_STATE_CHANGED | HA_STATE_ROW_CHANGED;
}
/*