summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2018-05-11 17:33:40 +0300
committerMichael Widenius <monty@mariadb.org>2018-05-14 10:08:05 +0300
commitbe6ae0bb6baa8a014c244c8699a34f4ee193338e (patch)
treee648446c7dd7228cfaecbae0acf1dba1fd7f68ac
parentd853042b5f6ae67bddd87045e9f80438e4bd92f4 (diff)
downloadmariadb-git-be6ae0bb6baa8a014c244c8699a34f4ee193338e.tar.gz
Don't report errors from open_table() twice
-rw-r--r--mysql-test/main/delayed.result1
-rw-r--r--mysql-test/main/myisam_recover.result2
-rw-r--r--mysql-test/suite/maria/maria-recover.result1
-rw-r--r--mysql-test/suite/parts/r/partition_recover_myisam.result2
-rw-r--r--sql/table.cc3
5 files changed, 2 insertions, 7 deletions
diff --git a/mysql-test/main/delayed.result b/mysql-test/main/delayed.result
index d54fa40f2da..d10f4ae22cf 100644
--- a/mysql-test/main/delayed.result
+++ b/mysql-test/main/delayed.result
@@ -500,7 +500,6 @@ call mtr.add_suppression("Checking table");
insert delayed into t1 values (2,2);
Warnings:
Error 145 Table './test/t1' is marked as crashed and should be repaired
-Error 1194 Table 't1' is marked as crashed and should be repaired
Error 1034 1 client is using or hasn't closed the table properly
insert delayed into t1 values (3,3);
flush tables t1;
diff --git a/mysql-test/main/myisam_recover.result b/mysql-test/main/myisam_recover.result
index 1af3dbf9ad5..92df67b42d1 100644
--- a/mysql-test/main/myisam_recover.result
+++ b/mysql-test/main/myisam_recover.result
@@ -87,7 +87,6 @@ a
6
Warnings:
Error 145 Table 't1' is marked as crashed and should be repaired
-Error 1194 Table 't1' is marked as crashed and should be repaired
Error 1034 Number of rows changed from 3 to 6
#
# Cleanup
@@ -140,7 +139,6 @@ a
4
Warnings:
Error 145 Table 't1' is marked as crashed and should be repaired
-Error 1194 Table 't1' is marked as crashed and should be repaired
Error 1034 Number of rows changed from 1 to 2
connect con2, localhost, root;
ALTER TABLE t2 ADD val INT;
diff --git a/mysql-test/suite/maria/maria-recover.result b/mysql-test/suite/maria/maria-recover.result
index b96cf8811db..4d0b4317afe 100644
--- a/mysql-test/suite/maria/maria-recover.result
+++ b/mysql-test/suite/maria/maria-recover.result
@@ -27,7 +27,6 @@ ThursdayMorningsMarket
ThursdayMorningsMarketb
Warnings:
Error 145 t_corrupted2' is marked as crashed and should be repaired
-Error 1194 t_corrupted2' is marked as crashed and should be repaired
Error 1034 1 client is using or hasn't closed the table properly
Error 1034 Wrong base information on indexpage at page: 1
select * from t_corrupted2;
diff --git a/mysql-test/suite/parts/r/partition_recover_myisam.result b/mysql-test/suite/parts/r/partition_recover_myisam.result
index ccbc9a6c9ef..4b9e3f5c283 100644
--- a/mysql-test/suite/parts/r/partition_recover_myisam.result
+++ b/mysql-test/suite/parts/r/partition_recover_myisam.result
@@ -18,7 +18,6 @@ a
11
Warnings:
Error 145 Table 't1_will_crash' is marked as crashed and should be repaired
-Error 1194 Table 't1_will_crash' is marked as crashed and should be repaired
Error 1034 1 client is using or hasn't closed the table properly
Error 1034 Size of indexfile is: 1024 Should be: 2048
Error 1034 Size of datafile is: 77 Should be: 7
@@ -48,7 +47,6 @@ a
11
Warnings:
Error 145 Table 't1_will_crash#P#p1' is marked as crashed and should be repaired
-Error 1194 Table 't1_will_crash' is marked as crashed and should be repaired
Error 1034 1 client is using or hasn't closed the table properly
Error 1034 Size of indexfile is: 1024 Should be: 2048
Error 1034 Size of datafile is: 28 Should be: 7
diff --git a/sql/table.cc b/sql/table.cc
index a6e445d0d2e..b99f1a0cbdd 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -3468,7 +3468,8 @@ partititon_err:
/* Set a flag if the table is crashed and it can be auto. repaired */
share->crashed= (outparam->file->auto_repair(ha_err) &&
!(ha_open_flags & HA_OPEN_FOR_REPAIR));
- outparam->file->print_error(ha_err, MYF(0));
+ if (!thd->is_error())
+ outparam->file->print_error(ha_err, MYF(0));
error_reported= TRUE;
if (ha_err == HA_ERR_TABLE_DEF_CHANGED)