28 #if defined (SERVER_MODE) || defined (SA_MODE) 33 #if defined (SERVER_MODE) || defined (SA_MODE) 100 #if defined (SERVER_MODE) 101 if (thread_p ==
NULL)
105 if (thread_p ==
NULL)
112 if (thread_p->fi_test_array ==
NULL)
114 thread_p->fi_test_array = (
FI_TEST_ITEM *) malloc (
sizeof (fi_Test_array));
115 if (thread_p->fi_test_array ==
NULL)
122 fi_test_array = thread_p->fi_test_array;
124 memcpy (fi_test_array, fi_Test_array,
sizeof (fi_Test_array));
130 for (i = 0; i < DIM (fi_Test_array); i++)
148 #if defined (SERVER_MODE) 149 if (thread_p ==
NULL)
153 if (thread_p ==
NULL)
160 if (thread_p->fi_test_array !=
NULL)
184 #if defined(SERVER_MODE) 185 if (thread_p ==
NULL)
189 if (thread_p ==
NULL)
196 fi_test_array = thread_p->fi_test_array;
202 for (i = 0; i < DIM (fi_Test_array); i++)
204 if (fi_test_array[i].code == code)
206 item = &fi_test_array[
i];
241 if (item->
state == state - 1)
306 const int caller_line)
322 if (item->
state == state)
324 return (*item->
func) (thread_p, arg, caller_file, caller_line);
403 static bool init =
false;
413 mod_factor = *((
int *) arg);
418 srand ((
unsigned int) time (
NULL));
432 if ((r % mod_factor) == 0)
436 "fault injection: random exit");
454 static bool init =
false;
464 mod_factor = *((
int *) arg);
469 srand ((
unsigned int) time (
NULL));
474 if ((r % mod_factor) == 0)
477 "fault injection: random fail");
#define ER_FAILED_ASSERTION
static int fi_handler_random_exit(THREAD_ENTRY *thread_p, void *arg, const char *caller_file, const int caller_line)
cubthread::entry * thread_get_thread_entry_info(void)
int fi_set_force(THREAD_ENTRY *thread_p, FI_TEST_CODE code, int state)
FI_TEST_ITEM fi_Test_array[]
void LOG_CS_ENTER(THREAD_ENTRY *thread_p)
FI_TEST_CODE fi_Group_recovery[]
int fi_thread_final(THREAD_ENTRY *thread_p)
static int fi_handler_exit(THREAD_ENTRY *thread_p, void *arg, const char *caller_file, const int caller_line)
void er_set(int severity, const char *file_name, const int line_no, int err_id, int num_args,...)
void logpb_flush_pages_direct(THREAD_ENTRY *thread_p)
FI_TEST_CODE * fi_Groups[FI_GROUP_MAX+1]
bool fi_test_on(FI_TEST_CODE code)
#define ER_OUT_OF_VIRTUAL_MEMORY
void LOG_CS_EXIT(THREAD_ENTRY *thread_p)
static int fi_handler_hang(THREAD_ENTRY *thread_p, void *arg, const char *caller_file, const int caller_line)
void fi_reset(THREAD_ENTRY *thread_p, FI_TEST_CODE code)
void er_print_callstack(const char *file_name, const int line_no, const char *fmt,...)
#define free_and_init(ptr)
static int fi_handler_random_fail(THREAD_ENTRY *thread_p, void *arg, const char *caller_file, const int caller_line)
bool prm_get_bool_value(PARAM_ID prm_id)
int fi_test(THREAD_ENTRY *thread_p, FI_TEST_CODE code, void *arg, int state, const char *caller_file, const int caller_line)
int fi_set(THREAD_ENTRY *thread_p, FI_TEST_CODE code, int state)
int fi_thread_init(THREAD_ENTRY *thread_p)
int fi_state(THREAD_ENTRY *thread_p, FI_TEST_CODE code)
static FI_TEST_ITEM * fi_code_item(THREAD_ENTRY *thread_p, FI_TEST_CODE code)
FI_TEST_CODE fi_Group_none[]
bool sysprm_find_fi_code_in_integer_list(PARAM_ID prm_id, int fi_code)