summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Widenius <monty@mysql.com>2008-06-04 12:44:39 +0300
committerMichael Widenius <monty@mysql.com>2008-06-04 12:44:39 +0300
commitab75389acd66dd04756440ea0c7d00ed2be64a66 (patch)
treec72a0a90a2f2f00a3e7d001ba4fe1c200da8b404
parent7d39726ba8249cc59177c56bd98529b0e4214725 (diff)
parent39049addce34d3d2c2dc8379c54c62ced1d828a1 (diff)
downloadmariadb-git-ab75389acd66dd04756440ea0c7d00ed2be64a66.tar.gz
Automatic merge
-rw-r--r--mysql-test/r/maria-recover.result1
-rw-r--r--mysql-test/t/maria-recover.test3
-rw-r--r--storage/maria/ha_maria.cc2
-rw-r--r--storage/maria/ma_static.c1
-rw-r--r--storage/maria/maria_def.h14
5 files changed, 13 insertions, 8 deletions
diff --git a/mysql-test/r/maria-recover.result b/mysql-test/r/maria-recover.result
index 9e0908b478a..f470d05081b 100644
--- a/mysql-test/r/maria-recover.result
+++ b/mysql-test/r/maria-recover.result
@@ -27,7 +27,6 @@ Warnings:
Error 145 Table './mysqltest/t_corrupted2' is marked as crashed and should be repaired
Error 1194 Table 't_corrupted2' is marked as crashed and should be repaired
Error 1034 1 client is using or hasn't closed the table properly
-Error 126 Incorrect key file for table './mysqltest/t_corrupted2.MAI'; try to repair it
Error 1034 Wrong base information on indexpage at page: 1
select * from t_corrupted2;
a
diff --git a/mysql-test/t/maria-recover.test b/mysql-test/t/maria-recover.test
index d6ec28c6b01..d6604d8f94e 100644
--- a/mysql-test/t/maria-recover.test
+++ b/mysql-test/t/maria-recover.test
@@ -1,9 +1,6 @@
# Test of the --maria-recover option.
--source include/have_maria.inc
-# line below will be removed
---source include/have_debug.inc
-
select @@global.maria_recover;
set global maria_recover=off;
diff --git a/storage/maria/ha_maria.cc b/storage/maria/ha_maria.cc
index a6339b28332..5e9554b19d8 100644
--- a/storage/maria/ha_maria.cc
+++ b/storage/maria/ha_maria.cc
@@ -2941,7 +2941,7 @@ static int ha_maria_init(void *p)
maria_recovery_from_log() ||
((force_start_after_recovery_failures != 0) && mark_recovery_success()) ||
ma_checkpoint_init(checkpoint_interval);
- maria_multi_threaded= TRUE;
+ maria_multi_threaded= maria_in_ha_maria= TRUE;
return res ? HA_ERR_INITIALIZATION : 0;
}
diff --git a/storage/maria/ma_static.c b/storage/maria/ma_static.c
index 34bf08a9cb2..923b38dfd9c 100644
--- a/storage/maria/ma_static.c
+++ b/storage/maria/ma_static.c
@@ -35,6 +35,7 @@ ulong maria_block_size= MARIA_KEY_BLOCK_LENGTH;
my_bool maria_flush= 0, maria_single_user= 0;
my_bool maria_delay_key_write= 0, maria_page_checksums= 1;
my_bool maria_inited= FALSE;
+my_bool maria_in_ha_maria= FALSE; /* If used from ha_maria or not */
pthread_mutex_t THR_LOCK_maria;
#if defined(THREAD) && !defined(DONT_USE_RW_LOCKS)
ulong maria_concurrent_insert= 2;
diff --git a/storage/maria/maria_def.h b/storage/maria/maria_def.h
index 1ee30c39a57..7d124119e5a 100644
--- a/storage/maria/maria_def.h
+++ b/storage/maria/maria_def.h
@@ -634,8 +634,16 @@ struct st_maria_handler
#define maria_is_crashed(x) ((x)->s->state.changed & STATE_CRASHED)
#define maria_is_crashed_on_repair(x) ((x)->s->state.changed & STATE_CRASHED_ON_REPAIR)
#ifdef EXTRA_DEBUG
-#define maria_print_error(SHARE, ERRNO) \
- _ma_report_error((ERRNO), (SHARE)->index_file_name)
+/**
+ Brings additional information in certain debug builds and in standalone
+ (non-ha_maria) programs. To help debugging. Not in ha_maria, to not spam the
+ user (some messages can be produced many times per statement, or even
+ wrongly during some repair operations).
+*/
+#define maria_print_error(SHARE, ERRNO) \
+ do{ if (!maria_in_ha_maria) \
+ _ma_report_error((ERRNO), (SHARE)->index_file_name); } \
+ while(0)
#else
#define maria_print_error(SHARE, ERRNO) while (0)
#endif
@@ -728,7 +736,7 @@ extern uint maria_read_vec[], maria_readnext_vec[];
extern uint maria_quick_table_bits;
extern char *maria_data_root;
extern uchar maria_zero_string[];
-extern my_bool maria_inited;
+extern my_bool maria_inited, maria_in_ha_maria;
extern HASH maria_stored_state;
/* This is used by _ma_calc_xxx_key_length och _ma_store_key */