17 #ifndef TEST_UTILS_INCLUDED
18 #define TEST_UTILS_INCLUDED
20 #include "sql_error.h"
21 #include "sql_class.h"
27 extern uint opt_debug_sync_timeout;
28 extern "C" void sql_alloc_error_handler(
void);
31 template <
class T,
int size>
32 int array_size(
const T (&)[
size])
37 namespace my_testing {
39 void setup_server_for_unit_tests();
40 void teardown_server_for_unit_tests();
57 static void set_expected_error(uint val);
59 THD *thd()
const {
return m_thd; }
76 virtual bool handle_condition(THD *thd,
79 Sql_condition::enum_warning_level
level,
83 int handle_called()
const {
return m_handle_called; }
86 uint m_expected_error;
93 #endif // TEST_UTILS_INCLUDED