Commit e254606f authored by unknown's avatar unknown
Browse files

WL #2826: Sixth step, made it work with test cases


BUILD/SETUP.sh:
  Fixed BUILD scripts
BUILD/compile-pentium-debug-max:
  Fixed BUILD scripts
sql/ha_partition.cc:
  Need to handle states differently when creating handler files
sql/mysql_priv.h:
  Some error inject fixes
sql/mysqld.cc:
  Some error inject fixes
sql/set_var.cc:
  Some error inject fixes
sql/sql_partition.cc:
  Fixing a bug with generate partition syntax
  A number of fixes
sql/sql_table.cc:
  Fix a few bugs
sql/table.cc:
  fix
parent 04c95dc2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ pentium_cflags="$check_cpu_cflags"
pentium64_cflags="$check_cpu_cflags -m64"
ppc_cflags="$check_cpu_cflags"
sparc_cflags=""
error_inject_flag="--with-error-inject "
error_inject="--with-error-inject "

# be as fast as we can be without losing our ability to backtrace
fast_cflags="-O3 -fno-omit-frame-pointer"
+2 −2
Original line number Diff line number Diff line
@@ -3,9 +3,9 @@
path=`dirname $0`
. "$path/SETUP.sh" $@ --with-debug=full

extra_flags="$pentium_cflags $debug_cflags $max_cflags $error_inject_flag"
extra_flags="$pentium_cflags $debug_cflags $max_cflags"
c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$pentium_configs $debug_configs $max_configs"
extra_configs="$pentium_configs $debug_configs $max_configs $error_inject"

. "$path/FINISH.sh"
+4 −4
Original line number Diff line number Diff line
@@ -1879,8 +1879,8 @@ bool ha_partition::create_handler_file(const char *name)
  {
    part_elem= part_it++;
    if (part_elem->part_state != PART_NORMAL &&
        part_elem->part_state != PART_IS_ADDED &&
        part_elem->part_state != PART_IS_CHANGED)
        part_elem->part_state != PART_TO_BE_ADDED &&
        part_elem->part_state != PART_CHANGED)
      continue;
    tablename_to_filename(part_elem->partition_name, part_name,
                          FN_REFLEN);
@@ -1931,8 +1931,8 @@ bool ha_partition::create_handler_file(const char *name)
  {
    part_elem= part_it++;
    if (part_elem->part_state != PART_NORMAL &&
        part_elem->part_state != PART_IS_ADDED &&
        part_elem->part_state != PART_IS_CHANGED)
        part_elem->part_state != PART_TO_BE_ADDED &&
        part_elem->part_state != PART_CHANGED)
      continue;
    if (!m_is_sub_partitioned)
    {
+12 −9
Original line number Diff line number Diff line
@@ -608,9 +608,9 @@ struct Query_cache_query_flags
  in various error cases.
*/
#ifndef ERROR_INJECT_SUPPORT
#define ERROR_INJECTOR(x)
#define ERROR_INJECTOR_ACTION(x)
#define ERROR_INJECTOR_CRASH(x)
#define ERROR_INJECT(x) 0
#define ERROR_INJECT_ACTION(x) 0
#define ERROR_INJECT_CRASH(x) 0
#define SET_ERROR_INJECT_CODE(x)
#define SET_ERROR_INJECT_VALUE(x)
#else
@@ -624,7 +624,7 @@ inline bool
my_error_inject(int error)
{
  THD *thd= current_thd;
  if (thd->variables.error_inject_code == error)
  if (thd->variables.error_inject_code == (uint)error)
  {
    thd->variables.error_inject_code= 0;
    return 1;
@@ -632,10 +632,10 @@ my_error_inject(int error)
  return 0;
}

#define ERROR_INJECTOR_CRASH(code) \
  (my_error_inject((code)) ? ((DBUG_ASSERT(0)), 0) : 0
#define ERROR_INJECTOR_ACTION(code, action) \
  (my_error_inject((code)) ? ((action), 0) : 0
#define ERROR_INJECT_CRASH(code) \
  (my_error_inject((code)) ? ((DBUG_ASSERT(0)), 0) : 0)
#define ERROR_INJECT_ACTION(code, action) \
  (my_error_inject((code)) ? ((action), 0) : 0)
#define ERROR_INJECT(code) \
  (my_error_inject((code)) ? 1 : 0)
#endif
@@ -1146,7 +1146,7 @@ bool write_log_ph2_change_partition(ALTER_PARTITION_PARAM_TYPE *lpt);

#define WFRM_WRITE_SHADOW 1
#define WFRM_INSTALL_SHADOW 2
#define WFRM_PACK_FRM
#define WFRM_PACK_FRM 4
bool mysql_write_frm(ALTER_PARTITION_PARAM_TYPE *lpt, uint flags);
bool abort_and_upgrade_lock(ALTER_PARTITION_PARAM_TYPE *lpt);
void close_open_tables_and_downgrade(ALTER_PARTITION_PARAM_TYPE *lpt);
@@ -1317,6 +1317,9 @@ extern ulong delayed_insert_timeout;
extern ulong delayed_insert_limit, delayed_queue_size;
extern ulong delayed_insert_threads, delayed_insert_writes;
extern ulong delayed_rows_in_use,delayed_insert_errors;
#ifdef ERROR_INJECT_SUPPORT
extern ulong error_inject_code, error_inject_value;
#endif
extern ulong slave_open_temp_tables;
extern ulong query_cache_size, query_cache_min_res_unit;
extern ulong slow_launch_threads, slow_launch_time;
+4 −0
Original line number Diff line number Diff line
@@ -503,6 +503,10 @@ ulong aborted_threads, aborted_connects;
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;
Loading