Commit ab75389a authored by Michael Widenius's avatar Michael Widenius

Automatic merge

parents 7d39726b 39049add
...@@ -27,7 +27,6 @@ Warnings: ...@@ -27,7 +27,6 @@ Warnings:
Error 145 Table './mysqltest/t_corrupted2' is marked as crashed and should be repaired 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 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 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 Error 1034 Wrong base information on indexpage at page: 1
select * from t_corrupted2; select * from t_corrupted2;
a a
......
# Test of the --maria-recover option. # Test of the --maria-recover option.
--source include/have_maria.inc --source include/have_maria.inc
# line below will be removed
--source include/have_debug.inc
select @@global.maria_recover; select @@global.maria_recover;
set global maria_recover=off; set global maria_recover=off;
......
...@@ -2941,7 +2941,7 @@ static int ha_maria_init(void *p) ...@@ -2941,7 +2941,7 @@ static int ha_maria_init(void *p)
maria_recovery_from_log() || maria_recovery_from_log() ||
((force_start_after_recovery_failures != 0) && mark_recovery_success()) || ((force_start_after_recovery_failures != 0) && mark_recovery_success()) ||
ma_checkpoint_init(checkpoint_interval); ma_checkpoint_init(checkpoint_interval);
maria_multi_threaded= TRUE; maria_multi_threaded= maria_in_ha_maria= TRUE;
return res ? HA_ERR_INITIALIZATION : 0; return res ? HA_ERR_INITIALIZATION : 0;
} }
......
...@@ -35,6 +35,7 @@ ulong maria_block_size= MARIA_KEY_BLOCK_LENGTH; ...@@ -35,6 +35,7 @@ ulong maria_block_size= MARIA_KEY_BLOCK_LENGTH;
my_bool maria_flush= 0, maria_single_user= 0; my_bool maria_flush= 0, maria_single_user= 0;
my_bool maria_delay_key_write= 0, maria_page_checksums= 1; my_bool maria_delay_key_write= 0, maria_page_checksums= 1;
my_bool maria_inited= FALSE; 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; pthread_mutex_t THR_LOCK_maria;
#if defined(THREAD) && !defined(DONT_USE_RW_LOCKS) #if defined(THREAD) && !defined(DONT_USE_RW_LOCKS)
ulong maria_concurrent_insert= 2; ulong maria_concurrent_insert= 2;
......
...@@ -634,8 +634,16 @@ struct st_maria_handler ...@@ -634,8 +634,16 @@ struct st_maria_handler
#define maria_is_crashed(x) ((x)->s->state.changed & STATE_CRASHED) #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) #define maria_is_crashed_on_repair(x) ((x)->s->state.changed & STATE_CRASHED_ON_REPAIR)
#ifdef EXTRA_DEBUG #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 #else
#define maria_print_error(SHARE, ERRNO) while (0) #define maria_print_error(SHARE, ERRNO) while (0)
#endif #endif
...@@ -728,7 +736,7 @@ extern uint maria_read_vec[], maria_readnext_vec[]; ...@@ -728,7 +736,7 @@ extern uint maria_read_vec[], maria_readnext_vec[];
extern uint maria_quick_table_bits; extern uint maria_quick_table_bits;
extern char *maria_data_root; extern char *maria_data_root;
extern uchar maria_zero_string[]; extern uchar maria_zero_string[];
extern my_bool maria_inited; extern my_bool maria_inited, maria_in_ha_maria;
extern HASH maria_stored_state; extern HASH maria_stored_state;
/* This is used by _ma_calc_xxx_key_length och _ma_store_key */ /* This is used by _ma_calc_xxx_key_length och _ma_store_key */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment