Below is the list of changes that have just been committed into a local
5.1 repository of mikron. When mikron does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2105 06/02/03 16:41:26 mikron@stripped +6 -0
WL 2826: Seventh step, more fixes for error injects
Removed session variables for error injects
started using DBUG macros for error injects
sql/set_var.cc
1.164 06/02/03 16:41:14 mikron@stripped +0 -11
Removed session variables for error injects
sql/mysqld.cc
1.530 06/02/03 16:41:14 mikron@stripped +0 -10
Removed session variables for error injects
sql/mysql_priv.h
1.379 06/02/03 16:41:13 mikron@stripped +20 -11
Changed ERROR INJECT macros to use DBUG macros
sql/sql_class.h
1.285 06/02/03 16:41:15 mikron@stripped +3 -4
Removed session variables for error injects
sql/sql_class.cc
1.242 06/02/03 16:41:14 mikron@stripped +3 -0
Removed session variables for error injects
include/my_dbug.h
1.17 06/02/03 16:41:13 mikron@stripped +6 -0
Added new DBUG macros
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: mikron
# Host: c-130be253.1238-1-64736c10.cust.bredbandsbolaget.se
# Root: /Users/mikron/wl2826
--- 1.16/include/my_dbug.h 2005-05-18 20:16:11 +02:00
+++ 1.17/include/my_dbug.h 2006-02-03 16:41:13 +01:00
@@ -72,6 +72,10 @@
#define DBUG_ASSERT(A) assert(A)
#define DBUG_EXECUTE_IF(keyword,a1) \
{if (_db_on_) {if (_db_strict_keyword_ (keyword)) { a1 }}}
+#define DBUG_EXECUTE_COND(keyword, a1) \
+ (_db_on_ ? ((_db_strict_keyword_ (keyword)) ? ((a1), 0) : 0) : 0)
+#define DBUG_COND(keyword) \
+ ((_db_on_ && _db_strict_keyword_ (keyword)) ? 1 : 0)
#else /* No debugger */
#define DBUG_ENTER(a1)
@@ -79,6 +83,8 @@
#define DBUG_VOID_RETURN return
#define DBUG_EXECUTE(keyword,a1) {}
#define DBUG_EXECUTE_IF(keyword,a1) {}
+#define DBUG_EXECUTE_COND(keyword, a1) 0
+#define DBUG_COND(keyword) 0
#define DBUG_PRINT(keyword,arglist) {}
#define DBUG_PUSH(a1) {}
#define DBUG_POP() {}
--- 1.378/sql/mysql_priv.h 2006-02-03 18:05:23 +01:00
+++ 1.379/sql/mysql_priv.h 2006-02-03 16:41:13 +01:00
@@ -608,36 +608,45 @@
in various error cases.
*/
#ifndef ERROR_INJECT_SUPPORT
+
#define ERROR_INJECT(x) 0
-#define ERROR_INJECT_ACTION(x) 0
+#define ERROR_INJECT_ACTION(x,action) 0
#define ERROR_INJECT_CRASH(x) 0
-#define SET_ERROR_INJECT_CODE(x)
+#define ERROR_INJECT_VALUE(x) 0
+#define ERROR_INJECT_VALUE_ACTION(x,action) 0
+#define ERROR_INJECT_VALUE_CRASH(x) 0
#define SET_ERROR_INJECT_VALUE(x)
+
#else
-#define SET_ERROR_INJECT_CODE(x) \
- current_thd->variables.error_inject_code= (x)
#define SET_ERROR_INJECT_VALUE(x) \
- current_thd->variables.error_inject_value= (x)
+ current_thd->error_inject_value= (x)
inline bool
-my_error_inject(int error)
+my_error_inject(int value)
{
THD *thd= current_thd;
- if (thd->variables.error_inject_code == (uint)error)
+ if (thd->error_inject_value == (uint)value)
{
- thd->variables.error_inject_code= 0;
+ thd->error_inject_value= 0;
return 1;
}
return 0;
}
#define ERROR_INJECT_CRASH(code) \
- (my_error_inject((code)) ? ((DBUG_ASSERT(0)), 0) : 0)
+ DBUG_EXECUTE_COND(code, abort();)
#define ERROR_INJECT_ACTION(code, action) \
- (my_error_inject((code)) ? ((action), 0) : 0)
+ DBUG_EXECUTE_COND(code, action)
#define ERROR_INJECT(code) \
- (my_error_inject((code)) ? 1 : 0)
+ DBUG_COND(code)
+#define ERROR_INJECT_VALUE(value) \
+ my_error_inject(value)
+#define ERROR_INJECT_VALUE_ACTION(value,action) \
+ (my_error_inject(value) ? (action) : 0)
+#define ERROR_INJECT_VALUE_CRASH(value) \
+ (my_error_inject(value) ? abort() : 0)
+
#endif
uint build_table_path(char *buff, size_t bufflen, const char *db,
--- 1.529/sql/mysqld.cc 2006-02-03 18:05:23 +01:00
+++ 1.530/sql/mysqld.cc 2006-02-03 16:41:14 +01:00
@@ -503,10 +503,6 @@
ulong delayed_insert_timeout, delayed_insert_limit, delayed_queue_size;
ulong delayed_insert_threads, delayed_insert_writes, delayed_rows_in_use;
ulong delayed_insert_errors,flush_time;
-#ifdef ERROR_INJECT_SUPPORT
-ulong error_inject_code= 0;
-ulong error_inject_value= 0;
-#endif
ulong specialflag=0;
ulong binlog_cache_use= 0, binlog_cache_disk_use= 0;
ulong max_connections, max_connect_errors;
@@ -7059,12 +7055,6 @@
max_system_variables.max_join_size= (ulonglong) HA_POS_ERROR;
global_system_variables.old_passwords= 0;
global_system_variables.old_alter_table= 0;
-#ifdef ERROR_INJECT_SUPPORT
- global_system_variables.error_inject_code= 0;
- global_system_variables.error_inject_value= 0;
- max_system_variables.error_inject_code= ~0;
- max_system_variables.error_inject_value= ~0;
-#endif
/*
Default behavior for 4.1 and 5.0 is to treat NULL values as unequal
--- 1.241/sql/sql_class.cc 2006-01-24 13:33:58 +01:00
+++ 1.242/sql/sql_class.cc 2006-02-03 16:41:14 +01:00
@@ -222,6 +222,9 @@
cuted_fields= sent_row_count= 0L;
limit_found_rows= 0;
statement_id_counter= 0UL;
+#ifdef ERROR_INJECT_SUPPORT
+ error_inject_value= 0UL;
+#endif
// Must be reset to handle error with THD's created for init of mysqld
lex->current_select= 0;
start_time=(time_t) 0;
--- 1.284/sql/sql_class.h 2006-01-31 20:14:49 +01:00
+++ 1.285/sql/sql_class.h 2006-02-03 16:41:15 +01:00
@@ -186,10 +186,6 @@
ha_rows max_join_size;
ulong auto_increment_increment, auto_increment_offset;
ulong bulk_insert_buff_size;
-#ifdef ERROR_INJECT_SUPPORT
- ulong error_inject_code;
- ulong error_inject_value;
-#endif
ulong join_buff_size;
ulong long_query_time;
ulong max_allowed_packet;
@@ -1103,6 +1099,9 @@
query_id_t query_id, warn_id;
ulong thread_id, col_access;
+#ifdef ERROR_INJECT_SUPPORT
+ ulong error_inject_value;
+#endif
/* Statement id is thread-wide. This counter is used to generate ids */
ulong statement_id_counter;
ulong rand_saved_seed1, rand_saved_seed2;
--- 1.163/sql/set_var.cc 2006-02-03 18:05:24 +01:00
+++ 1.164/sql/set_var.cc 2006-02-03 16:41:14 +01:00
@@ -215,13 +215,6 @@
&delayed_insert_timeout);
sys_var_long_ptr sys_delayed_queue_size("delayed_queue_size",
&delayed_queue_size);
-#ifdef ERROR_INJECT_SUPPORT
-sys_var_long_ptr sys_error_inject_code("error_inject_code",
- &error_inject_code);
-sys_var_long_ptr sys_error_inject_value("error_inject_value",
- &error_inject_value);
-#endif
-
sys_var_event_executor sys_event_executor("event_scheduler",
&event_executor_running_global_var);
sys_var_long_ptr sys_expire_logs_days("expire_logs_days",
@@ -736,10 +729,6 @@
{sys_div_precincrement.name,(char*) &sys_div_precincrement,SHOW_SYS},
{sys_engine_condition_pushdown.name,
(char*) &sys_engine_condition_pushdown, SHOW_SYS},
-#ifdef ERROR_INJECT_SUPPORT
- {sys_error_inject_code.name,(char*) &sys_error_inject_code, SHOW_SYS},
- {sys_error_inject_value.name,(char*)&sys_error_inject_value, SHOW_SYS},
-#endif
{sys_event_executor.name, (char*) &sys_event_executor, SHOW_SYS},
{sys_expire_logs_days.name, (char*) &sys_expire_logs_days, SHOW_SYS},
{sys_flush.name, (char*) &sys_flush, SHOW_SYS},
| Thread |
|---|
| • bk commit into 5.1 tree (mikron:1.2105) | mikael | 6 Feb |