Commit 520dffb5 authored by unknown's avatar unknown
Browse files

WL 2826: First step in error handling of ALTER TABLE for partitioning


BUILD/SETUP.sh:
  Add possibility for BUILD scripts to add error inject flag
BUILD/compile-pentium-debug-max:
  Add error inject flag to this script
configure.in:
  Add handling of --with-error-inject in configure script
sql/ha_ndbcluster.cc:
  Add possibility to rename handler file
sql/ha_ndbcluster.h:
  Add possibility to rename handler file
sql/ha_partition.cc:
  Add possibility to rename handler file
sql/ha_partition.h:
  Add possibility to rename handler file
sql/handler.h:
  Add possibility to rename handler file
sql/mysql_priv.h:
  Add error inject macros
sql/mysqld.cc:
  Add error inject system variables
sql/set_var.cc:
  Add error inject system variables
sql/sql_class.h:
  Add error inject system variables
sql/sql_table.cc:
  Start modifying code for introducing table log, Step 1
sql/unireg.cc:
  Add rename flag to handler file call
sql/sql_partition.cc:
  Changes to ADD/DROP/CHANGE partitions
parent 3a2b70f8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -71,6 +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 "

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

extra_flags="$pentium_cflags $debug_cflags $max_cflags"
extra_flags="$pentium_cflags $debug_cflags $max_cflags $error_inject_flag"
c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$pentium_configs $debug_configs $max_configs"
+13 −0
Original line number Diff line number Diff line
@@ -654,6 +654,7 @@ else
  AC_MSG_RESULT([no])
fi

  
MYSQL_SYS_LARGEFILE

# Types that must be checked AFTER large file support is checked
@@ -1554,6 +1555,18 @@ then
  DEBUG_OPTIMIZE_CXX=""
fi

# If we should allow error injection tests
AC_ARG_WITH(error-inject,
    [ --with-error-inject    Enable error injection in MySQL Server],
    [ with_error_inject=$withval ],
    [ with_error_inject=no ])

if test "$with_error_inject" = "yes"
then
  CFLAGS="-DERROR_INJECT_SUPPORT $CFLAGS"
  CXXFLAGS="-DERROR_INJECT_SUPPORT $CXXFLAGS"
fi

AC_ARG_WITH(debug,
    [  --without-debug         Build a production version without debugging code],
    [with_debug=$withval],
+7 −1
Original line number Diff line number Diff line
@@ -4399,7 +4399,9 @@ int ha_ndbcluster::create(const char *name,
  DBUG_RETURN(my_errno);
}

int ha_ndbcluster::create_handler_files(const char *file) 
int ha_ndbcluster::create_handler_files(const char *file,
                                        const char *old_name,
                                        bool rename_flag) 
{ 
  const char *name;
  Ndb* ndb;
@@ -4410,6 +4412,10 @@ int ha_ndbcluster::create_handler_files(const char *file)

  DBUG_ENTER("create_handler_files");

  if (rename_flag)
  {
    DBUG_RETURN(FALSE);
  }
  if (!(ndb= get_ndb()))
    DBUG_RETURN(HA_ERR_NO_CONNECTION);

+2 −1
Original line number Diff line number Diff line
@@ -588,7 +588,8 @@ class ha_ndbcluster: public handler
  int rename_table(const char *from, const char *to);
  int delete_table(const char *name);
  int create(const char *name, TABLE *form, HA_CREATE_INFO *info);
  int create_handler_files(const char *file);
  int create_handler_files(const char *file, const char *old_name,
                           bool rename_flag);
  int get_default_no_partitions(ulonglong max_rows);
  bool get_no_parts(const char *name, uint *no_parts);
  void set_auto_partitions(partition_info *part_info);
Loading