List:Commits« Previous MessageNext Message »
From:antony Date:May 23 2007 8:51am
Subject:bk commit into 5.2 tree (acurtis:1.2526)
View as plain text  
Below is the list of changes that have just been committed into a local
5.2 repository of antony. When antony 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@stripped, 2007-05-23 01:51:27-07:00, acurtis@stripped +48 -0
  Merge xiphis.org:/home/antony/SkunkWorks/mysql-5.1-eric_antony
  into  xiphis.org:/home/antony/SkunkWorks/mysql-5.2-eric_antony
  MERGE: 1.2469.1.9

  BitKeeper/deleted/.del-rpl_empty_master_crash.result~31e373eeda4c5148@stripped, 2007-05-23 01:30:01-07:00, acurtis@stripped +0 -0
    Auto merged
    MERGE: 1.14.1.1

  BitKeeper/deleted/.del-rpl_empty_master_crash.result~31e373eeda4c5148@stripped, 2007-05-23 01:30:00-07:00, acurtis@stripped +0 -0
    Merge rename: mysql-test/r/rpl_empty_master_crash.result -> BitKeeper/deleted/.del-rpl_empty_master_crash.result~31e373eeda4c5148

  BitKeeper/triggers/post-commit@stripped, 2007-05-23 01:51:22-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.36.1.1

  client/Makefile.am@stripped, 2007-05-23 01:51:22-07:00, acurtis@stripped +2 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.84.2.1

  configure.in@stripped, 2007-05-23 01:51:22-07:00, acurtis@stripped +0 -1
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.442.1.17

  mysql-test/mysql-test-run.pl@stripped, 2007-05-23 01:51:22-07:00, acurtis@stripped +0 -1
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.283.4.1

  mysql-test/r/ps_1general.result@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.64.1.1

  mysql-test/r/rpl_000015.result@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -2
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.41.3.1

  mysql-test/r/rpl_row_reset_slave.result@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -8
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.1.3.2

  mysql-test/r/rpl_row_until.result@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -6
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.1.3.2

  mysql-test/r/rpl_sp.result@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.35.1.1

  mysql-test/r/rpl_stm_reset_slave.result@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -8
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.14.3.2

  mysql-test/r/rpl_stm_until.result@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.26.3.1

  mysql-test/r/sp-code.result@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.13.2.1

  mysql-test/r/sp-error.result@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.121.1.1

  mysql-test/r/sp.result@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.256.1.1

  mysql-test/r/sp_trans.result@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.14.1.1

  mysql-test/t/ps_1general.test@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.39.1.1

  mysql-test/t/rpl_sp.test@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.30.1.1

  mysql-test/t/show_check.test@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.75.1.1

  mysql-test/t/sp-error.test@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.119.1.1

  mysql-test/t/sp.test@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.223.1.1

  mysql-test/t/sp_trans.test@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.11.1.1

  mysql-test/t/system_mysql_db_fix40123.test@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.5.1.1

  scripts/mysql_system_tables.sql@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.5.2.1

  scripts/mysql_system_tables_fix.sql@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.59.3.1

  sql/handler.h@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.252.3.1

  sql/lex.h@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.170.2.1

  sql/mysql_priv.h@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.485.3.2

  sql/mysqld.cc@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.619.1.2

  sql/repl_failsafe.cc@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.74.2.1

  sql/rpl_mi.cc@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +7 -15
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.2.1.1

  sql/rpl_mi.h@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.2.2.1

  sql/set_var.cc@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -3
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.221.1.1

  sql/set_var.h@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.102.3.1

  sql/share/errmsg.txt@stripped, 2007-05-23 01:51:24-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.148.2.2

  sql/slave.cc@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.293.11.10

  sql/sp_head.cc@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.259.1.1

  sql/sql_lex.h@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.267.1.1

  sql/sql_load.cc@stripped, 2007-05-23 01:51:23-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.119.2.1

  sql/sql_parse.cc@stripped, 2007-05-23 01:51:24-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.641.5.1

  sql/sql_repl.cc@stripped, 2007-05-23 01:51:24-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.164.4.1

  sql/sql_show.cc@stripped, 2007-05-23 01:51:24-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.395.2.1

  sql/sql_table.cc@stripped, 2007-05-23 01:51:24-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.393.4.1

  sql/sql_yacc.yy@stripped, 2007-05-23 01:51:24-07:00, acurtis@stripped +0 -2
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.549.6.1

  storage/myisam/ha_myisam.cc@stripped, 2007-05-23 01:51:24-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.209.9.1

  storage/myisam/ha_myisam.h@stripped, 2007-05-23 01:51:24-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.81.2.1

  storage/ndb/src/common/util/version.c@stripped, 2007-05-23 01:51:24-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.28.1.1

  tests/mysql_client_test.c@stripped, 2007-05-23 01:51:24-07:00, acurtis@stripped +0 -0
    Merge mysql-5.1-eric+antony tree (5.1.19) into 5.2 repository
    MERGE: 1.229.1.1

# 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:	acurtis
# Host:	ltamd64.xiphis.org
# Root:	/home/antony/SkunkWorks/mysql-5.2-eric_antony/RESYNC

--- 1.444/configure.in	2007-05-23 01:51:44 -07:00
+++ 1.445/configure.in	2007-05-23 01:51:44 -07:00
@@ -7,6 +7,9 @@
 AC_CANONICAL_SYSTEM
 # The Docs Makefile.am parses this line!
 # remember to also update version.c in ndb
+#
+# When changing major version number please also check switch statement
+# in mysqlbinlog::check_master_version().
 AM_INIT_AUTOMAKE(mysql, 5.2.0-alpha)
 AM_CONFIG_HEADER(config.h)
 
@@ -21,7 +24,10 @@
 # Remember that regexps needs to quote [ and ] since this is run through m4
 MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[[a-z]]*-.*$||"`
 MYSQL_BASE_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|\.[[^.]]*$||"`
-MYSQL_VERSION_ID=`echo $MYSQL_NO_DASH_VERSION. | sed -e 's/[[^0-9.]]//g; s/\./  /g; s/ \([[0-9]]\) / 0\\1 /g; s/ //g'`
+MYSQL_VERSION_ID=`echo $MYSQL_NO_DASH_VERSION | sed -e 's|[[^0-9.]].*$||;s|$|.|' | sed -e 's/[[^0-9.]]//g; s/\./  /g; s/ \([[0-9]]\) / 0\\1 /g; s/ //g'`
+
+# Add previous major version for debian package upgrade path
+MYSQL_PREVIOUS_BASE_VERSION=5.0
 
 # The port should be constant for a LONG time
 MYSQL_TCP_PORT_DEFAULT=3306
@@ -52,6 +58,7 @@
 AC_SUBST(MYSQL_NO_DASH_VERSION)
 AC_SUBST(MYSQL_BASE_VERSION)
 AC_SUBST(MYSQL_VERSION_ID)
+AC_SUBST(MYSQL_PREVIOUS_BASE_VERSION)
 AC_SUBST(PROTOCOL_VERSION)
 AC_DEFINE_UNQUOTED([PROTOCOL_VERSION], [$PROTOCOL_VERSION],
                    [mysql client protocol version])
@@ -418,6 +425,22 @@
 
 # icheck, used for ABI check
 AC_PATH_PROG(ICHECK, icheck, no)
+# "icheck" is also the name of a file system check program on Tru64.
+# Verify the program found is really the interface checker.
+if test "x$ICHECK" != "xno"
+then
+  AC_MSG_CHECKING(if $ICHECK works as expected)
+  echo "int foo;" > conftest.h
+  $ICHECK --canonify -o conftest.ic conftest.h 2>/dev/null
+  if test -f "conftest.ic"
+  then
+    AC_MSG_RESULT(yes)
+  else
+    AC_MSG_RESULT(no)
+    ICHECK=no
+  fi
+  rm -f conftest.ic conftest.h
+fi
 AC_SUBST(ICHECK)
 
 # Lock for PS
@@ -2258,11 +2281,10 @@
 #MYSQL_CHECK_CPU
 
 libmysqld_dirs=
-linked_libmysqld_targets=
 if test "$with_embedded_server" = "yes"
 then
   libmysqld_dirs=libmysqld
-  linked_libmysqld_targets="linked_libmysqld_sources linked_libmysqldex_sources"
+
   AC_CONFIG_FILES(libmysqld/Makefile libmysqld/examples/Makefile)
   # We can't build embedded library without building the server, because
   # we depend on libmysys, libmystrings, libmyisam, etc.
@@ -2272,7 +2294,6 @@
 # mysql_config --libmysqld-libs will print out something like
 # -L/path/to/lib/mysql -lmysqld -lmyisam -lmysys -lmystrings -ldbug ...
 AC_SUBST([libmysqld_dirs])
-AC_SUBST([linked_libmysqld_targets])
 
 # Shall we build the docs?
 AC_ARG_WITH(docs,
@@ -2296,22 +2317,6 @@
     [with_man=yes]
 )
 
-if test "$with_man" = "yes"
-then
-  man_dirs="man"
-  man1_files=`ls -1 $srcdir/man/*.1 | sed -e 's;^.*man/;;'`
-  man1_files=`echo $man1_files`
-  man8_files=`ls -1 $srcdir/man/*.8 | sed -e 's;^.*man/;;'`
-  man8_files=`echo $man8_files`
-else
-  man_dirs=""
-  man1_files=""
-  man8_files=""
-fi
-AC_SUBST(man_dirs)
-AC_SUBST(man1_files)
-AC_SUBST(man8_files)
-
 # Don't build readline, i have it already
 AC_ARG_WITH(readline,
     [  --without-readline      Use system readline instead of bundled copy.],
@@ -2438,6 +2443,61 @@
 AC_SUBST(readline_h_ln_cmd)
 
 
+
+# Include man pages, if desired, adapted to the configured parts.
+if test X"$with_man" = Xyes
+then
+  # First, create the list of all man pages present.
+  MANLISTFIL=manlist.$$
+  TMPLISTFIL=`echo $MANLISTFIL | sed -e 's/manlist/tmplist/'`
+  if test -f $MANLISTFIL -o -f $TMPLISTFIL
+  then
+    echo "Temp file '$MANLISTFIL' or '$TMPLISTFIL' already exists in '`pwd`' - aborting"
+    exit 1
+  fi
+  touch $MANLISTFIL $TMPLISTFIL
+
+  ls $srcdir/man/*.[[18]] > $MANLISTFIL
+
+  # Then, remove all those pages from the list which are specific to parts
+  # (table handlers, features, ...) which are not configured in this run.
+  AC_MSG_CHECKING("for man pages to remove")
+  MAN_DROP="dropping"
+  if test X"$with_plugin_ndbcluster" != Xyes
+  then
+    MAN_DROP="$MAN_DROP ndbcluster"
+    grep -v '/ndb' $MANLISTFIL > $TMPLISTFIL ; mv -f $TMPLISTFIL $MANLISTFIL
+  fi
+  if test X"$with_embedded_server" != Xyes
+  then
+    MAN_DROP="$MAN_DROP embedded"
+    grep -v 'embedded' $MANLISTFIL > $TMPLISTFIL ; mv -f $TMPLISTFIL $MANLISTFIL
+  fi
+  if test X"$with_plugin_innobase" != Xyes
+  then
+    MAN_DROP="$MAN_DROP innodb"
+    grep -v 'inno' $MANLISTFIL > $TMPLISTFIL ; mv -f $TMPLISTFIL $MANLISTFIL
+  fi
+  AC_MSG_RESULT([$MAN_DROP])
+
+  # Finally, split the man pages into sections 1 and 8.
+  # Get rid of line breaks.
+  man1_files=`sed -n -e '/\.1$/s/^.*man\///p' <$MANLISTFIL`
+  man8_files=`sed -n -e '/\.8$/s/^.*man\///p' <$MANLISTFIL`
+
+  man_dirs="man"
+  man1_files=`echo $man1_files`
+  man8_files=`echo $man8_files`
+  rm -f $MANLISTFIL $TMPLISTFIL
+else
+  man_dirs=""
+  man1_files=""
+  man8_files=""
+fi
+AC_SUBST(man_dirs)
+AC_SUBST(man1_files)
+AC_SUBST(man8_files)
+
 # If we have threads generate some library functions and test programs
 sql_server_dirs=
 sql_server=
@@ -2447,7 +2507,6 @@
 dnl This probably should be cleaned up more - for now the threaded
 dnl client is just using plain-old libs.
 sql_client_dirs=
-linked_client_targets="linked_libmysql_sources"
 
 AM_CONDITIONAL(THREAD_SAFE_CLIENT, test "$THREAD_SAFE_CLIENT" != "no")
 
@@ -2456,7 +2515,6 @@
   sql_client_dirs="strings regex mysys dbug extra libmysql client"
 else
   sql_client_dirs="strings regex mysys dbug extra libmysql libmysql_r client"
-  linked_client_targets="$linked_client_targets linked_libmysql_r_sources"
   AC_CONFIG_FILES(libmysql_r/Makefile)
   AC_DEFINE([THREAD_SAFE_CLIENT], [1], [Should the client be thread safe])
 fi
@@ -2468,18 +2526,14 @@
 AC_SUBST(NON_THREADED_LIBS)
 AC_SUBST(STATIC_NSS_FLAGS)
 AC_SUBST(sql_client_dirs)
-AC_SUBST(linked_client_targets)
 
-# If configuring for NetWare, set up to link sources from and build the netware directory
+# If configuring for NetWare, build the netware directory
 netware_dir=
-linked_netware_sources=
 if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null
 then
   netware_dir="netware"
-  linked_netware_sources="linked_netware_sources"
 fi
 AC_SUBST(netware_dir)
-AC_SUBST(linked_netware_sources)
 AM_CONDITIONAL(HAVE_NETWARE, test "$netware_dir" = "netware")
 
 if test "$with_server" != "no" -o "$THREAD_SAFE_CLIENT" != "no"
@@ -2550,6 +2604,7 @@
  tests/Makefile Docs/Makefile support-files/Makefile dnl
  support-files/MacOSX/Makefile support-files/RHEL4-SElinux/Makefile dnl
  mysql-test/Makefile dnl
+ debian/Makefile debian/defs.mk debian/control dnl
  mysql-test/ndb/Makefile netware/Makefile sql-bench/Makefile dnl
  include/mysql_version.h plugin/Makefile win/Makefile)
 

--- 1.219/storage/myisam/ha_myisam.cc	2007-05-23 01:51:44 -07:00
+++ 1.220/storage/myisam/ha_myisam.cc	2007-05-23 01:51:44 -07:00
@@ -513,91 +513,6 @@
 	  "BTREE");
 }
 
-#ifdef HAVE_REPLICATION
-int ha_myisam::net_read_dump(NET* net)
-{
-  int data_fd = file->dfile;
-  int error = 0;
-
-  my_seek(data_fd, 0L, MY_SEEK_SET, MYF(MY_WME));
-  for (;;)
-  {
-    ulong packet_len = my_net_read(net);
-    if (!packet_len)
-      break ; // end of file
-    if (packet_len == packet_error)
-    {
-      sql_print_error("ha_myisam::net_read_dump - read error ");
-      error= -1;
-      goto err;
-    }
-    if (my_write(data_fd, (byte*)net->read_pos, (uint) packet_len,
-		 MYF(MY_WME|MY_FNABP)))
-    {
-      error = errno;
-      goto err;
-    }
-  }
-err:
-  return error;
-}
-
-
-int ha_myisam::dump(THD* thd, int fd)
-{
-  MYISAM_SHARE* share = file->s;
-  NET* net = &thd->net;
-  uint blocksize = share->blocksize;
-  my_off_t bytes_to_read = share->state.state.data_file_length;
-  int data_fd = file->dfile;
-  byte * buf = (byte*) my_malloc(blocksize, MYF(MY_WME));
-  if (!buf)
-    return ENOMEM;
-
-  int error = 0;
-  my_seek(data_fd, 0L, MY_SEEK_SET, MYF(MY_WME));
-  for (; bytes_to_read > 0;)
-  {
-    uint bytes = my_read(data_fd, buf, blocksize, MYF(MY_WME));
-    if (bytes == MY_FILE_ERROR)
-    {
-      error = errno;
-      goto err;
-    }
-
-    if (fd >= 0)
-    {
-      if (my_write(fd, buf, bytes, MYF(MY_WME | MY_FNABP)))
-      {
-	error = errno ? errno : EPIPE;
-	goto err;
-      }
-    }
-    else
-    {
-      if (my_net_write(net, (char*) buf, bytes))
-      {
-	error = errno ? errno : EPIPE;
-	goto err;
-      }
-    }
-    bytes_to_read -= bytes;
-  }
-
-  if (fd < 0)
-  {
-    if (my_net_write(net, "", 0))
-      error = errno ? errno : EPIPE;
-    net_flush(net);
-  }
-
-err:
-  my_free((gptr) buf, MYF(0));
-  return error;
-}
-#endif /* HAVE_REPLICATION */
-
-
 bool ha_myisam::check_if_locking_is_allowed(uint sql_command,
                                             ulong type, TABLE *table,
                                             uint count, uint current,
@@ -864,113 +779,6 @@
   else if (!mi_is_crashed(file) && !thd->killed)
     mi_mark_crashed(file);
   return error ? HA_ADMIN_CORRUPT : HA_ADMIN_OK;
-}
-
-
-int ha_myisam::restore(THD* thd, HA_CHECK_OPT *check_opt)
-{
-  HA_CHECK_OPT tmp_check_opt;
-  char *backup_dir= thd->lex->backup_dir;
-  char src_path[FN_REFLEN], dst_path[FN_REFLEN];
-  char table_name[FN_REFLEN];
-  int error;
-  const char* errmsg;
-  DBUG_ENTER("restore");
-
-  VOID(tablename_to_filename(table->s->table_name.str, table_name,
-                             sizeof(table_name)));
-
-  if (fn_format_relative_to_data_home(src_path, table_name, backup_dir,
-				      MI_NAME_DEXT))
-    DBUG_RETURN(HA_ADMIN_INVALID);
-
-  strxmov(dst_path, table->s->normalized_path.str, MI_NAME_DEXT, NullS);
-  if (my_copy(src_path, dst_path, MYF(MY_WME)))
-  {
-    error= HA_ADMIN_FAILED;
-    errmsg= "Failed in my_copy (Error %d)";
-    goto err;
-  }
-
-  tmp_check_opt.init();
-  tmp_check_opt.flags |= T_VERY_SILENT | T_CALC_CHECKSUM | T_QUICK;
-  DBUG_RETURN(repair(thd, &tmp_check_opt));
-
- err:
-  {
-    MI_CHECK param;
-    myisamchk_init(&param);
-    param.thd= thd;
-    param.op_name=    "restore";
-    param.db_name=    table->s->db.str;
-    param.table_name= table->s->table_name.str;
-    param.testflag= 0;
-    mi_check_print_error(&param, errmsg, my_errno);
-    DBUG_RETURN(error);
-  }
-}
-
-
-int ha_myisam::backup(THD* thd, HA_CHECK_OPT *check_opt)
-{
-  char *backup_dir= thd->lex->backup_dir;
-  char src_path[FN_REFLEN], dst_path[FN_REFLEN];
-  char table_name[FN_REFLEN];
-  int error;
-  const char *errmsg;
-  DBUG_ENTER("ha_myisam::backup");
-
-  VOID(tablename_to_filename(table->s->table_name.str, table_name,
-                             sizeof(table_name)));
-
-  if (fn_format_relative_to_data_home(dst_path, table_name, backup_dir,
-				      reg_ext))
-  {
-    errmsg= "Failed in fn_format() for .frm file (errno: %d)";
-    error= HA_ADMIN_INVALID;
-    goto err;
-  }
-
-  strxmov(src_path, table->s->normalized_path.str, reg_ext, NullS);
-  if (my_copy(src_path, dst_path,
-	      MYF(MY_WME | MY_HOLD_ORIGINAL_MODES | MY_DONT_OVERWRITE_FILE)))
-  {
-    error = HA_ADMIN_FAILED;
-    errmsg = "Failed copying .frm file (errno: %d)";
-    goto err;
-  }
-
-  /* Change extension */
-  if (fn_format_relative_to_data_home(dst_path, table_name, backup_dir,
-                                      MI_NAME_DEXT))
-  {
-    errmsg = "Failed in fn_format() for .MYD file (errno: %d)";
-    error = HA_ADMIN_INVALID;
-    goto err;
-  }
-
-  strxmov(src_path, table->s->normalized_path.str, MI_NAME_DEXT, NullS);
-  if (my_copy(src_path, dst_path,
-	      MYF(MY_WME | MY_HOLD_ORIGINAL_MODES | MY_DONT_OVERWRITE_FILE)))
-  {
-    errmsg = "Failed copying .MYD file (errno: %d)";
-    error= HA_ADMIN_FAILED;
-    goto err;
-  }
-  DBUG_RETURN(HA_ADMIN_OK);
-
- err:
-  {
-    MI_CHECK param;
-    myisamchk_init(&param);
-    param.thd=        thd;
-    param.op_name=    "backup";
-    param.db_name=    table->s->db.str;
-    param.table_name= table->s->table_name.str;
-    param.testflag =  0;
-    mi_check_print_error(&param,errmsg, my_errno);
-    DBUG_RETURN(error);
-  }
 }
 
 

--- 1.84/storage/myisam/ha_myisam.h	2007-05-23 01:51:44 -07:00
+++ 1.85/storage/myisam/ha_myisam.h	2007-05-23 01:51:44 -07:00
@@ -128,13 +128,7 @@
   bool is_crashed() const;
   bool auto_repair() const { return myisam_recover_options != 0; }
   int optimize(THD* thd, HA_CHECK_OPT* check_opt);
-  int restore(THD* thd, HA_CHECK_OPT* check_opt);
-  int backup(THD* thd, HA_CHECK_OPT* check_opt);
   int assign_to_keycache(THD* thd, HA_CHECK_OPT* check_opt);
   int preload_keys(THD* thd, HA_CHECK_OPT* check_opt);
   bool check_if_incompatible_data(HA_CREATE_INFO *info, uint table_changes);
-#ifdef HAVE_REPLICATION
-  int dump(THD* thd, int fd);
-  int net_read_dump(NET* net);
-#endif
 };

--- 1.258/sql/handler.h	2007-05-23 01:51:44 -07:00
+++ 1.259/sql/handler.h	2007-05-23 01:51:44 -07:00
@@ -1404,15 +1404,6 @@
   int check_old_types();
   /* to be actually called to get 'check()' functionality*/
   int ha_check(THD *thd, HA_CHECK_OPT *check_opt);
-   
-  virtual int backup(THD* thd, HA_CHECK_OPT* check_opt)
-  { return HA_ADMIN_NOT_IMPLEMENTED; }
-  /*
-    restore assumes .frm file must exist, and that generate_table() has been
-    called; It will just copy the data file and run repair.
-  */
-  virtual int restore(THD* thd, HA_CHECK_OPT* check_opt)
-  { return HA_ADMIN_NOT_IMPLEMENTED; }
 protected:
   virtual int repair(THD* thd, HA_CHECK_OPT* check_opt)
   { return HA_ADMIN_NOT_IMPLEMENTED; }
@@ -1429,7 +1420,6 @@
   /* end of the list of admin commands */
 
   virtual bool check_and_repair(THD *thd) { return HA_ERR_WRONG_COMMAND; }
-  virtual int dump(THD* thd, int fd = -1) { return HA_ERR_WRONG_COMMAND; }
   virtual int disable_indexes(uint mode) { return HA_ERR_WRONG_COMMAND; }
   virtual int enable_indexes(uint mode) { return HA_ERR_WRONG_COMMAND; }
   virtual int indexes_are_disabled(void) {return 0;}
@@ -1445,7 +1435,6 @@
   }
   virtual int discard_or_import_tablespace(my_bool discard)
   {return HA_ERR_WRONG_COMMAND;}
-  virtual int net_read_dump(NET* net) { return HA_ERR_WRONG_COMMAND; }
   virtual char *update_table_comment(const char * comment)
   { return (char*) comment;}
   virtual void append_create_info(String *packet) {}

--- 1.175/sql/lex.h	2007-05-23 01:51:44 -07:00
+++ 1.176/sql/lex.h	2007-05-23 01:51:44 -07:00
@@ -245,8 +245,6 @@
   { "INFILE",		SYM(INFILE)},
   { "INITIAL_SIZE",	SYM(INITIAL_SIZE_SYM)},
   { "INNER",		SYM(INNER_SYM)},
-  { "INNOBASE",		SYM(INNOBASE_SYM)},
-  { "INNODB",		SYM(INNOBASE_SYM)},
   { "INOUT",            SYM(INOUT_SYM)},
   { "INSENSITIVE",      SYM(INSENSITIVE_SYM)},
   { "INSERT",		SYM(INSERT)},

--- 1.505/sql/mysql_priv.h	2007-05-23 01:51:44 -07:00
+++ 1.506/sql/mysql_priv.h	2007-05-23 01:51:44 -07:00
@@ -96,16 +96,39 @@
 #define PREV_BITS(type,A)	((type) (((type) 1 << (A)) -1))
 #define all_bits_set(A,B) ((A) & (B) != (B))
 
-#define WARN_DEPRECATED(Thd,Ver,Old,New)                                             \
-  do {                                                                               \
-    DBUG_ASSERT(strncmp(Ver, MYSQL_SERVER_VERSION, sizeof(Ver)-1) > 0);              \
-    if (((gptr)Thd) != NULL)                                                         \
-      push_warning_printf(((THD *)Thd), MYSQL_ERROR::WARN_LEVEL_WARN,                \
-                        ER_WARN_DEPRECATED_SYNTAX, ER(ER_WARN_DEPRECATED_SYNTAX),    \
-                        (Old), (Ver), (New));                                        \
-    else                                                                             \
-      sql_print_warning("The syntax %s is deprecated and will be removed "           \
-                        "in MySQL %s. Please use %s instead.", (Old), (Ver), (New)); \
+/*
+  Generates a warning that a feature is deprecated. After a specified version
+  asserts that the feature is removed.
+
+  Using it as
+
+    WARN_DEPRECATED(thd, 6,2, "BAD", "'GOOD'");
+
+ Will result in a warning
+
+    "The syntax 'BAD' is deprecated and will be removed in MySQL 6.2. Please
+    use 'GOOD' instead"
+
+ Note that in macro arguments BAD is not quoted, while 'GOOD' is.
+ Note that the version is TWO numbers, separated with a comma
+ (two macro arguments, that is)
+*/
+#ifdef compile_time_assert
+#error change the macro below to use compile_time_assert
+#endif
+#define WARN_DEPRECATED(Thd,VerHi,VerLo,Old,New)                            \
+  do {                                                                      \
+    char t[MYSQL_VERSION_ID < VerHi * 10000 + VerLo * 100 ? 1 : -1]         \
+                __attribute__((unused));                                    \
+    if (Thd)                                                                \
+      push_warning_printf((Thd), MYSQL_ERROR::WARN_LEVEL_WARN,              \
+                        ER_WARN_DEPRECATED_SYNTAX,                          \
+                        ER(ER_WARN_DEPRECATED_SYNTAX),                      \
+                        (Old), #VerHi "." #VerLo, (New));                   \
+    else                                                                    \
+      sql_print_warning("The syntax %s is deprecated and will be removed "  \
+                        "in MySQL %s. Please use %s instead.",              \
+                        (Old), #VerHi "." #VerLo, (New));                   \
   } while(0)
 
 extern CHARSET_INFO *system_charset_info, *files_charset_info ;

--- 1.643/sql/mysqld.cc	2007-05-23 01:51:44 -07:00
+++ 1.644/sql/mysqld.cc	2007-05-23 01:51:44 -07:00
@@ -356,7 +356,6 @@
 my_bool opt_safe_user_create = 0, opt_no_mix_types = 0;
 my_bool opt_show_slave_auth_info, opt_sql_bin_update = 0;
 my_bool opt_log_slave_updates= 0;
-bool slave_warning_issued = false; 
 
 /*
   Legacy global handlerton. These will be removed (please do not add more).
@@ -562,15 +561,11 @@
 File_parser_dummy_hook file_parser_dummy_hook;
 
 /* replication parameters, if master_host is not NULL, we are a slave */
-uint master_port= MYSQL_PORT, master_connect_retry = 60;
 uint report_port= MYSQL_PORT;
 ulong master_retry_count=0;
-char *master_user, *master_password, *master_host, *master_info_file;
+char *master_info_file;
 char *relay_log_info_file, *report_user, *report_password, *report_host;
 char *opt_relay_logname = 0, *opt_relaylog_index_name=0;
-my_bool master_ssl;
-char *master_ssl_key, *master_ssl_cert;
-char *master_ssl_ca, *master_ssl_capath, *master_ssl_cipher;
 char *opt_logname, *opt_slow_logname;
 
 /* Static variables */
@@ -3771,21 +3766,12 @@
 
   if (opt_bin_log && !server_id)
   {
-    server_id= !master_host ? 1 : 2;
+    server_id= 1;
 #ifdef EXTRA_DEBUG
-    switch (server_id) {
-    case 1:
-      sql_print_warning("\
-You have enabled the binary log, but you haven't set server-id to \
-a non-zero value: we force server id to 1; updates will be logged to the \
-binary log, but connections from slaves will not be accepted.");
-      break;
-    case 2:
-      sql_print_warning("\
-You should set server-id to a non-0 value if master_host is set; \
-we force server id to 2, but this MySQL server will not act as a slave.");
-      break;
-    }
+    sql_print_warning("You have enabled the binary log, but you haven't set "
+                      "server-id to a non-zero value: we force server id to 1; "
+                      "updates will be logged to the binary log, but "
+                      "connections from slaves will not be accepted.");
 #endif
   }
 
@@ -4887,13 +4873,8 @@
   OPT_STORAGE_ENGINE,          OPT_INIT_FILE,
   OPT_DELAY_KEY_WRITE_ALL,     OPT_SLOW_QUERY_LOG,
   OPT_DELAY_KEY_WRITE,	       OPT_CHARSETS_DIR,
-  OPT_MASTER_HOST,             OPT_MASTER_USER,
-  OPT_MASTER_PASSWORD,         OPT_MASTER_PORT,
-  OPT_MASTER_INFO_FILE,        OPT_MASTER_CONNECT_RETRY,
+  OPT_MASTER_INFO_FILE,
   OPT_MASTER_RETRY_COUNT,      OPT_LOG_TC, OPT_LOG_TC_SIZE,
-  OPT_MASTER_SSL,              OPT_MASTER_SSL_KEY,
-  OPT_MASTER_SSL_CERT,         OPT_MASTER_SSL_CAPATH,
-  OPT_MASTER_SSL_CIPHER,       OPT_MASTER_SSL_CA,
   OPT_SQL_BIN_UPDATE_SAME,     OPT_REPLICATE_DO_DB,
   OPT_REPLICATE_IGNORE_DB,     OPT_LOG_SLAVE_UPDATES,
   OPT_BINLOG_DO_DB,            OPT_BINLOG_IGNORE_DB,
@@ -5352,60 +5333,15 @@
    (gptr*) &global_system_variables.low_priority_updates,
    (gptr*) &max_system_variables.low_priority_updates,
    0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
-  {"master-connect-retry", OPT_MASTER_CONNECT_RETRY,
-   "The number of seconds the slave thread will sleep before retrying to connect to the master in case the master goes down or the connection is lost.",
-   (gptr*) &master_connect_retry, (gptr*) &master_connect_retry, 0, GET_UINT,
-   REQUIRED_ARG, 60, 0, 0, 0, 0, 0},
-  {"master-host", OPT_MASTER_HOST,
-   "Master hostname or IP address for replication. If not set, the slave thread will not be started. Note that the setting of master-host will be ignored if there exists a valid master.info file.",
-   (gptr*) &master_host, (gptr*) &master_host, 0, GET_STR, REQUIRED_ARG, 0, 0,
-   0, 0, 0, 0},
   {"master-info-file", OPT_MASTER_INFO_FILE,
    "The location and name of the file that remembers the master and where the I/O replication \
 thread is in the master's binlogs.",
    (gptr*) &master_info_file, (gptr*) &master_info_file, 0, GET_STR,
    REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-  {"master-password", OPT_MASTER_PASSWORD,
-   "The password the slave thread will authenticate with when connecting to the master. If not set, an empty password is assumed.The value in master.info will take precedence if it can be read.",
-   (gptr*)&master_password, (gptr*)&master_password, 0,
-   GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-  {"master-port", OPT_MASTER_PORT,
-   "The port the master is listening on. If not set, the compiled setting of MYSQL_PORT is assumed. If you have not tinkered with configure options, this should be 3306. The value in master.info will take precedence if it can be read.",
-   (gptr*) &master_port, (gptr*) &master_port, 0, GET_UINT, REQUIRED_ARG,
-   MYSQL_PORT, 0, 0, 0, 0, 0},
   {"master-retry-count", OPT_MASTER_RETRY_COUNT,
    "The number of tries the slave will make to connect to the master before giving up.",
    (gptr*) &master_retry_count, (gptr*) &master_retry_count, 0, GET_ULONG,
    REQUIRED_ARG, 3600*24, 0, 0, 0, 0, 0},
-  {"master-ssl", OPT_MASTER_SSL,
-   "Enable the slave to connect to the master using SSL.",
-   (gptr*) &master_ssl, (gptr*) &master_ssl, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
-   0, 0},
-  {"master-ssl-ca", OPT_MASTER_SSL_CA,
-   "Master SSL CA file. Only applies if you have enabled master-ssl.",
-   (gptr*) &master_ssl_ca, (gptr*) &master_ssl_ca, 0, GET_STR, OPT_ARG,
-   0, 0, 0, 0, 0, 0},
-  {"master-ssl-capath", OPT_MASTER_SSL_CAPATH,
-   "Master SSL CA path. Only applies if you have enabled master-ssl.",
-   (gptr*) &master_ssl_capath, (gptr*) &master_ssl_capath, 0, GET_STR, OPT_ARG,
-   0, 0, 0, 0, 0, 0},
-  {"master-ssl-cert", OPT_MASTER_SSL_CERT,
-   "Master SSL certificate file name. Only applies if you have enabled \
-master-ssl",
-   (gptr*) &master_ssl_cert, (gptr*) &master_ssl_cert, 0, GET_STR, OPT_ARG,
-   0, 0, 0, 0, 0, 0},
-  {"master-ssl-cipher", OPT_MASTER_SSL_CIPHER,
-   "Master SSL cipher. Only applies if you have enabled master-ssl.",
-   (gptr*) &master_ssl_cipher, (gptr*) &master_ssl_capath, 0, GET_STR, OPT_ARG,
-   0, 0, 0, 0, 0, 0},
-  {"master-ssl-key", OPT_MASTER_SSL_KEY,
-   "Master SSL keyfile name. Only applies if you have enabled master-ssl.",
-   (gptr*) &master_ssl_key, (gptr*) &master_ssl_key, 0, GET_STR, OPT_ARG,
-   0, 0, 0, 0, 0, 0},
-  {"master-user", OPT_MASTER_USER,
-   "The username the slave thread will use for authentication when connecting to the master. The user must have FILE privilege. If the master user is not set, user test is assumed. The value in master.info will take precedence if it can be read.",
-   (gptr*) &master_user, (gptr*) &master_user, 0, GET_STR, REQUIRED_ARG, 0, 0,
-   0, 0, 0, 0},
 #ifdef HAVE_REPLICATION
   {"max-binlog-dump-events", OPT_MAX_BINLOG_DUMP_EVENTS,
    "Option used by mysql-test for debugging and testing of replication.",
@@ -6663,7 +6599,6 @@
   {"Com_alter_event",	       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_ALTER_EVENT]), SHOW_LONG_STATUS},
   {"Com_alter_table",	       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_ALTER_TABLE]), SHOW_LONG_STATUS},
   {"Com_analyze",	       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_ANALYZE]), SHOW_LONG_STATUS},
-  {"Com_backup_table",	       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_BACKUP_TABLE]), SHOW_LONG_STATUS},
   {"Com_begin",		       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_BEGIN]), SHOW_LONG_STATUS},
   {"Com_change_db",	       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CHANGE_DB]), SHOW_LONG_STATUS},
   {"Com_change_master",	       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_CHANGE_MASTER]), SHOW_LONG_STATUS},
@@ -6697,8 +6632,6 @@
   {"Com_insert_select",	       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_INSERT_SELECT]), SHOW_LONG_STATUS},
   {"Com_kill",		       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_KILL]), SHOW_LONG_STATUS},
   {"Com_load",		       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_LOAD]), SHOW_LONG_STATUS},
-  {"Com_load_master_data",     (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_LOAD_MASTER_DATA]), SHOW_LONG_STATUS},
-  {"Com_load_master_table",    (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_LOAD_MASTER_TABLE]), SHOW_LONG_STATUS},
   {"Com_lock_tables",	       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_LOCK_TABLES]), SHOW_LONG_STATUS},
   {"Com_optimize",	       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_OPTIMIZE]), SHOW_LONG_STATUS},
   {"Com_preload_keys",	       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_PRELOAD_KEYS]), SHOW_LONG_STATUS},
@@ -6710,7 +6643,6 @@
   {"Com_replace",	       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_REPLACE]), SHOW_LONG_STATUS},
   {"Com_replace_select",       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_REPLACE_SELECT]), SHOW_LONG_STATUS},
   {"Com_reset",		       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_RESET]), SHOW_LONG_STATUS},
-  {"Com_restore_table",	       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_RESTORE_TABLE]), SHOW_LONG_STATUS},
   {"Com_revoke",	       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_REVOKE]), SHOW_LONG_STATUS},
   {"Com_revoke_all",	       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_REVOKE_ALL]), SHOW_LONG_STATUS},
   {"Com_rollback",	       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_ROLLBACK]), SHOW_LONG_STATUS},
@@ -7040,12 +6972,8 @@
   mysql_data_home_buff[1]=0;
 
   /* Replication parameters */
-  master_user= (char*) "test";
-  master_password= master_host= 0;
   master_info_file= (char*) "master.info",
     relay_log_info_file= (char*) "relay-log.info";
-  master_ssl_key= master_ssl_cert= master_ssl_ca= 
-    master_ssl_capath= master_ssl_cipher= 0;
   report_user= report_password = report_host= 0;	/* TO BE DELETED */
   opt_relay_logname= opt_relaylog_index_name= 0;
 
@@ -7462,29 +7390,6 @@
   case (int) OPT_STANDALONE:		/* Dummy option for NT */
     break;
 #endif
-  /*
-    The following change issues a deprecation warning if the slave
-    configuration is specified either in the my.cnf file or on
-    the command-line. See BUG#21490.
-  */
-  case OPT_MASTER_HOST:
-  case OPT_MASTER_USER:
-  case OPT_MASTER_PASSWORD:
-  case OPT_MASTER_PORT:
-  case OPT_MASTER_CONNECT_RETRY:
-  case OPT_MASTER_SSL:          
-  case OPT_MASTER_SSL_KEY:
-  case OPT_MASTER_SSL_CERT:       
-  case OPT_MASTER_SSL_CAPATH:
-  case OPT_MASTER_SSL_CIPHER:
-  case OPT_MASTER_SSL_CA:
-    if (!slave_warning_issued)                 //only show the warning once
-    {
-      slave_warning_issued = true;   
-      WARN_DEPRECATED(NULL, "5.2", "for replication startup options", 
-        "'CHANGE MASTER'");
-    }
-    break;
   case OPT_CONSOLE:
     if (opt_console)
       opt_error_log= 0;			// Force logs to stdout

--- 1.305/sql/slave.cc	2007-05-23 01:51:44 -07:00
+++ 1.306/sql/slave.cc	2007-05-23 01:51:44 -07:00
@@ -74,9 +74,6 @@
                              bool reconnect, bool suppress_warnings);
 static int safe_sleep(THD* thd, int sec, CHECK_KILLED_FUNC thread_killed,
                       void* thread_killed_arg);
-static int request_table_dump(MYSQL* mysql, const char* db, const char* table);
-static int create_table_from_dump(THD* thd, MYSQL *mysql, const char* db,
-                                  const char* table_name, bool overwrite);
 static int get_master_version_and_clock(MYSQL* mysql, MASTER_INFO* mi);
 static Log_event* next_event(RELAY_LOG_INFO* rli);
 
@@ -175,18 +172,15 @@
   }
 
   if (init_master_info(active_mi,master_info_file,relay_log_info_file,
-                       !master_host, (SLAVE_IO | SLAVE_SQL)))
+                       1, (SLAVE_IO | SLAVE_SQL)))
   {
     sql_print_error("Failed to initialize the master info structure");
     goto err;
   }
 
-  if (server_id && !master_host && active_mi->host[0])
-    master_host= active_mi->host;
-
   /* If server id is not set, start_slave_thread() will say it */
 
-  if (master_host && !opt_skip_slave_start)
+  if (active_mi->host[0] && !opt_skip_slave_start)
   {
     if (start_slave_threads(1 /* need mutex */,
                             0 /* no wait for start*/,
@@ -899,187 +893,6 @@
   DBUG_RETURN(0);
 }
 
-/*
-  Used by fetch_master_table (used by LOAD TABLE tblname FROM MASTER and LOAD
-  DATA FROM MASTER). Drops the table (if 'overwrite' is true) and recreates it
-  from the dump. Honours replication inclusion/exclusion rules.
-  db must be non-zero (guarded by assertion).
-
-  RETURN VALUES
-    0           success
-    1           error
-*/
-
-static int create_table_from_dump(THD* thd, MYSQL *mysql, const char* db,
-                                  const char* table_name, bool overwrite)
-{
-  ulong packet_len;
-  char *query, *save_db;
-  uint32 save_db_length;
-  Vio* save_vio;
-  HA_CHECK_OPT check_opt;
-  TABLE_LIST tables;
-  int error= 1;
-  handler *file;
-  ulonglong save_options;
-  NET *net= &mysql->net;
-  DBUG_ENTER("create_table_from_dump");
-
-  packet_len= my_net_read(net); // read create table statement
-  if (packet_len == packet_error)
-  {
-    my_message(ER_MASTER_NET_READ, ER(ER_MASTER_NET_READ), MYF(0));
-    DBUG_RETURN(1);
-  }
-  if (net->read_pos[0] == 255) // error from master
-  {
-    char *err_msg;
-    err_msg= (char*) net->read_pos + ((mysql->server_capabilities &
-                                       CLIENT_PROTOCOL_41) ?
-                                      3+SQLSTATE_LENGTH+1 : 3);
-    my_error(ER_MASTER, MYF(0), err_msg);
-    DBUG_RETURN(1);
-  }
-  thd->command = COM_TABLE_DUMP;
-  thd->query_length= packet_len;
-  /* Note that we should not set thd->query until the area is initalized */
-  if (!(query = thd->strmake((char*) net->read_pos, packet_len)))
-  {
-    sql_print_error("create_table_from_dump: out of memory");
-    my_message(ER_GET_ERRNO, "Out of memory", MYF(0));
-    DBUG_RETURN(1);
-  }
-  thd->query= query;
-  thd->query_error = 0;
-  thd->net.no_send_ok = 1;
-
-  bzero((char*) &tables,sizeof(tables));
-  tables.db = (char*)db;
-  tables.alias= tables.table_name= (char*)table_name;
-
-  /* Drop the table if 'overwrite' is true */
-  if (overwrite && mysql_rm_table(thd,&tables,1,0)) /* drop if exists */
-  {
-    sql_print_error("create_table_from_dump: failed to drop the table");
-    goto err;
-  }
-
-  /* Create the table. We do not want to log the "create table" statement */
-  save_options = thd->options;
-  thd->options &= ~(ulong) (OPTION_BIN_LOG);
-  thd->proc_info = "Creating table from master dump";
-  // save old db in case we are creating in a different database
-  save_db = thd->db;
-  save_db_length= thd->db_length;
-  thd->db = (char*)db;
-  DBUG_ASSERT(thd->db != 0);
-  thd->db_length= strlen(thd->db);
-  mysql_parse(thd, thd->query, packet_len); // run create table
-  thd->db = save_db;            // leave things the way the were before
-  thd->db_length= save_db_length;
-  thd->options = save_options;
-
-  if (thd->query_error)
-    goto err;                   // mysql_parse took care of the error send
-
-  thd->proc_info = "Opening master dump table";
-  tables.lock_type = TL_WRITE;
-  if (!open_ltable(thd, &tables, TL_WRITE))
-  {
-    sql_print_error("create_table_from_dump: could not open created table");
-    goto err;
-  }
-
-  file = tables.table->file;
-  thd->proc_info = "Reading master dump table data";
-  /* Copy the data file */
-  if (file->net_read_dump(net))
-  {
-    my_message(ER_MASTER_NET_READ, ER(ER_MASTER_NET_READ), MYF(0));
-    sql_print_error("create_table_from_dump: failed in\
- handler::net_read_dump()");
-    goto err;
-  }
-
-  check_opt.init();
-  check_opt.flags|= T_VERY_SILENT | T_CALC_CHECKSUM | T_QUICK;
-  thd->proc_info = "Rebuilding the index on master dump table";
-  /*
-    We do not want repair() to spam us with messages
-    just send them to the error log, and report the failure in case of
-    problems.
-  */
-  save_vio = thd->net.vio;
-  thd->net.vio = 0;
-  /* Rebuild the index file from the copied data file (with REPAIR) */
-  error=file->ha_repair(thd,&check_opt) != 0;
-  thd->net.vio = save_vio;
-  if (error)
-    my_error(ER_INDEX_REBUILD, MYF(0), tables.table->s->table_name.str);
-
-err:
-  close_thread_tables(thd);
-  thd->net.no_send_ok = 0;
-  DBUG_RETURN(error);
-}
-
-
-int fetch_master_table(THD *thd, const char *db_name, const char *table_name,
-                       MASTER_INFO *mi, MYSQL *mysql, bool overwrite)
-{
-  int error= 1;
-  const char *errmsg=0;
-  bool called_connected= (mysql != NULL);
-  DBUG_ENTER("fetch_master_table");
-  DBUG_PRINT("enter", ("db_name: '%s'  table_name: '%s'",
-                       db_name,table_name));
-
-  if (!called_connected)
-  {
-    if (!(mysql = mysql_init(NULL)))
-    {
-      DBUG_RETURN(1);
-    }
-    if (connect_to_master(thd, mysql, mi))
-    {
-      my_error(ER_CONNECT_TO_MASTER, MYF(0), mysql_error(mysql));
-      /*
-        We need to clear the active VIO since, theoretically, somebody
-        might issue an awake() on this thread.  If we are then in the
-        middle of closing and destroying the VIO inside the
-        mysql_close(), we will have a problem.
-       */
-#ifdef SIGNAL_WITH_VIO_CLOSE
-      thd->clear_active_vio();
-#endif
-      mysql_close(mysql);
-      DBUG_RETURN(1);
-    }
-    if (thd->killed)
-      goto err;
-  }
-
-  if (request_table_dump(mysql, db_name, table_name))
-  {
-    error= ER_UNKNOWN_ERROR;
-    errmsg= "Failed on table dump request";
-    goto err;
-  }
-  if (create_table_from_dump(thd, mysql, db_name,
-                             table_name, overwrite))
-    goto err;    // create_table_from_dump have sent the error already
-  error = 0;
-
- err:
-  thd->net.no_send_ok = 0; // Clear up garbage after create_table_from_dump
-  if (!called_connected)
-    mysql_close(mysql);
-  if (errmsg && thd->vio_ok())
-    my_message(error, errmsg, MYF(0));
-  DBUG_RETURN(test(error));                     // Return 1 on error
-}
-
-
 static bool wait_for_relay_log_space(RELAY_LOG_INFO* rli)
 {
   bool slave_killed=0;
@@ -1522,44 +1335,12 @@
     else
       sql_print_error("Error on COM_BINLOG_DUMP: %d  %s, will retry in %d secs",
                       mysql_errno(mysql), mysql_error(mysql),
-                      master_connect_retry);
-    DBUG_RETURN(1);
-  }
-
-  DBUG_RETURN(0);
-}
-
-
-static int request_table_dump(MYSQL* mysql, const char* db, const char* table)
-{
-  char buf[1024];
-  DBUG_ENTER("request_table_dump");
-
-  char * p = buf;
-  uint table_len = (uint) strlen(table);
-  uint db_len = (uint) strlen(db);
-  if (table_len + db_len > sizeof(buf) - 2)
-  {
-    sql_print_error("request_table_dump: Buffer overrun");
-    DBUG_RETURN(1);
-  }
-
-  *p++ = db_len;
-  memcpy(p, db, db_len);
-  p += db_len;
-  *p++ = table_len;
-  memcpy(p, table, table_len);
-
-  if (simple_command(mysql, COM_TABLE_DUMP, buf, p - buf + table_len, 1))
-  {
-    sql_print_error("request_table_dump: Error sending the table dump \
-command");
+                      mi->connect_retry);
     DBUG_RETURN(1);
   }
 
   DBUG_RETURN(0);
 }
-
 
 /*
   Read one event from the master

--- 1.275/sql/sql_lex.h	2007-05-23 01:51:44 -07:00
+++ 1.276/sql/sql_lex.h	2007-05-23 01:51:44 -07:00
@@ -84,10 +84,10 @@
   SQLCOM_ROLLBACK, SQLCOM_ROLLBACK_TO_SAVEPOINT,
   SQLCOM_COMMIT, SQLCOM_SAVEPOINT, SQLCOM_RELEASE_SAVEPOINT,
   SQLCOM_SLAVE_START, SQLCOM_SLAVE_STOP,
-  SQLCOM_BEGIN, SQLCOM_LOAD_MASTER_TABLE, SQLCOM_CHANGE_MASTER,
-  SQLCOM_RENAME_TABLE, SQLCOM_BACKUP_TABLE, SQLCOM_RESTORE_TABLE,
+  SQLCOM_BEGIN, SQLCOM_CHANGE_MASTER,
+  SQLCOM_RENAME_TABLE,
   SQLCOM_RESET, SQLCOM_PURGE, SQLCOM_PURGE_BEFORE, SQLCOM_SHOW_BINLOGS,
-  SQLCOM_SHOW_OPEN_TABLES, SQLCOM_LOAD_MASTER_DATA,
+  SQLCOM_SHOW_OPEN_TABLES,
   SQLCOM_HA_OPEN, SQLCOM_HA_CLOSE, SQLCOM_HA_READ,
   SQLCOM_SHOW_SLAVE_HOSTS, SQLCOM_DELETE_MULTI, SQLCOM_UPDATE_MULTI,
   SQLCOM_SHOW_BINLOG_EVENTS, SQLCOM_SHOW_NEW_MASTER, SQLCOM_DO,

--- 1.123/sql/sql_load.cc	2007-05-23 01:51:44 -07:00
+++ 1.124/sql/sql_load.cc	2007-05-23 01:51:44 -07:00
@@ -287,6 +287,15 @@
     {
       (void) fn_format(name, ex->file_name, mysql_real_data_home, "",
 		       MY_RELATIVE_PATH | MY_UNPACK_FILENAME);
+
+      if (opt_secure_file_priv &&
+          strncmp(opt_secure_file_priv, name, strlen(opt_secure_file_priv)))
+      {
+        /* Read only allowed from within dir specified by secure_file_priv */
+        my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--secure-file-priv");
+        DBUG_RETURN(TRUE);
+      }
+
 #if !defined(__WIN__) && ! defined(__NETWARE__)
       MY_STAT stat_info;
       if (!my_stat(name,&stat_info,MYF(MY_WME)))
@@ -305,15 +314,6 @@
       if ((stat_info.st_mode & S_IFIFO) == S_IFIFO)
 	is_fifo = 1;
 #endif
-
-      if (opt_secure_file_priv &&
-          strncmp(opt_secure_file_priv, name, strlen(opt_secure_file_priv)))
-      {
-        /* Read only allowed from within dir specified by secure_file_priv */
-        my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--secure-file-priv");
-        DBUG_RETURN(TRUE);
-      }
-
     }
     if ((file=my_open(name,O_RDONLY,MYF(MY_WME))) < 0)
       DBUG_RETURN(TRUE);

--- 1.666/sql/sql_parse.cc	2007-05-23 01:51:44 -07:00
+++ 1.667/sql/sql_parse.cc	2007-05-23 01:51:44 -07:00
@@ -203,14 +203,12 @@
   sql_command_flags[SQLCOM_CREATE_DB]=      CF_CHANGES_DATA;
   sql_command_flags[SQLCOM_DROP_DB]=        CF_CHANGES_DATA;
   sql_command_flags[SQLCOM_RENAME_TABLE]=   CF_CHANGES_DATA;
-  sql_command_flags[SQLCOM_BACKUP_TABLE]=   CF_CHANGES_DATA;
-  sql_command_flags[SQLCOM_RESTORE_TABLE]=  CF_CHANGES_DATA;
   sql_command_flags[SQLCOM_DROP_INDEX]=     CF_CHANGES_DATA;
   sql_command_flags[SQLCOM_CREATE_VIEW]=    CF_CHANGES_DATA;
   sql_command_flags[SQLCOM_DROP_VIEW]=      CF_CHANGES_DATA;
   sql_command_flags[SQLCOM_CREATE_EVENT]=   CF_CHANGES_DATA;
   sql_command_flags[SQLCOM_ALTER_EVENT]=    CF_CHANGES_DATA;
-  sql_command_flags[SQLCOM_DROP_EVENT]=     CF_CHANGES_DATA;  
+  sql_command_flags[SQLCOM_DROP_EVENT]=     CF_CHANGES_DATA;
 
   sql_command_flags[SQLCOM_UPDATE]=	    CF_CHANGES_DATA | CF_HAS_ROW_COUNT;
   sql_command_flags[SQLCOM_UPDATE_MULTI]=   CF_CHANGES_DATA | CF_HAS_ROW_COUNT;
@@ -438,81 +436,13 @@
 
 void cleanup_items(Item *item)
 {
-  DBUG_ENTER("cleanup_items");  
+  DBUG_ENTER("cleanup_items");
   for (; item ; item=item->next)
     item->cleanup();
   DBUG_VOID_RETURN;
 }
 
 /*
-  Handle COM_TABLE_DUMP command
-
-  SYNOPSIS
-    mysql_table_dump
-      thd           thread handle
-      db            database name or an empty string. If empty,
-                    the current database of the connection is used
-      tbl_name      name of the table to dump
-
-  NOTES
-    This function is written to handle one specific command only.
-
-  RETURN VALUE
-    0               success
-    1               error, the error message is set in THD
-*/
-
-static
-int mysql_table_dump(THD *thd, LEX_STRING *db, char *tbl_name)
-{
-  TABLE* table;
-  TABLE_LIST* table_list;
-  int error = 0;
-  DBUG_ENTER("mysql_table_dump");
-  if (db->length == 0)
-  {
-    db->str= thd->db;            /* purecov: inspected */
-    db->length= thd->db_length;  /* purecov: inspected */
-  }
-  if (!(table_list = (TABLE_LIST*) thd->calloc(sizeof(TABLE_LIST))))
-    DBUG_RETURN(1); // out of memory
-  table_list->db= db->str;
-  table_list->table_name= table_list->alias= tbl_name;
-  table_list->lock_type= TL_READ_NO_INSERT;
-  table_list->prev_global= &table_list;	// can be removed after merge with 4.1
-
-  if (check_db_name(db))
-  {
-    /* purecov: begin inspected */
-    my_error(ER_WRONG_DB_NAME ,MYF(0), db->str ? db->str : "NULL");
-    goto err;
-    /* purecov: end */
-  }
-  if (lower_case_table_names)
-    my_casedn_str(files_charset_info, tbl_name);
-
-  if (!(table=open_ltable(thd, table_list, TL_READ_NO_INSERT)))
-    DBUG_RETURN(1);
-
-  if (check_one_table_access(thd, SELECT_ACL, table_list))
-    goto err;
-  thd->free_list = 0;
-  thd->query_length=(uint) strlen(tbl_name);
-  thd->query = tbl_name;
-  if ((error = mysqld_dump_create_info(thd, table_list, -1)))
-  {
-    my_error(ER_GET_ERRNO, MYF(0), my_errno);
-    goto err;
-  }
-  net_flush(&thd->net);
-  if ((error= table->file->dump(thd,-1)))
-    my_error(ER_GET_ERRNO, MYF(0), error);
-
-err:
-  DBUG_RETURN(error);
-}
-
-/*
   Ends the current transaction and (maybe) begin the next
 
   SYNOPSIS
@@ -739,37 +669,6 @@
     break;
   }
 #endif
-  case COM_TABLE_DUMP:
-  {
-    char *tbl_name;
-    LEX_STRING db;
-    uint db_len= *(uchar*) packet;
-    if (db_len >= packet_length || db_len > NAME_LEN)
-    {
-      my_message(ER_UNKNOWN_COM_ERROR, ER(ER_UNKNOWN_COM_ERROR), MYF(0));
-      break;
-    }
-    uint tbl_len= *(uchar*) (packet + db_len + 1);
-    if (db_len+tbl_len+2 > packet_length || tbl_len > NAME_LEN)
-    {
-      my_message(ER_UNKNOWN_COM_ERROR, ER(ER_UNKNOWN_COM_ERROR), MYF(0));
-      break;
-    }
-
-    statistic_increment(thd->status_var.com_other, &LOCK_status);
-    thd->enable_slow_log= opt_log_slow_admin_statements;
-    db.str= thd->alloc(db_len + tbl_len + 2);
-    db.length= db_len;
-    if (!db.str)
-    {
-      my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
-      break;
-    }
-    tbl_name= strmake(db.str, packet + 1, db_len)+1;
-    strmake(tbl_name, packet + db_len + 2, tbl_len);
-    mysql_table_dump(thd, &db, tbl_name);
-    break;
-  }
   case COM_CHANGE_USER:
   {
     statistic_increment(thd->status_var.com_other, &LOCK_status);
@@ -1946,30 +1845,6 @@
   }
 #endif
 
-  case SQLCOM_BACKUP_TABLE:
-  {
-    DBUG_ASSERT(first_table == all_tables && first_table != 0);
-    if (check_table_access(thd, SELECT_ACL, all_tables, 0) ||
-	check_global_access(thd, FILE_ACL))
-      goto error; /* purecov: inspected */
-    thd->enable_slow_log= opt_log_slow_admin_statements;
-    res = mysql_backup_table(thd, first_table);
-    select_lex->table_list.first= (byte*) first_table;
-    lex->query_tables=all_tables;
-    break;
-  }
-  case SQLCOM_RESTORE_TABLE:
-  {
-    DBUG_ASSERT(first_table == all_tables && first_table != 0);
-    if (check_table_access(thd, INSERT_ACL, all_tables, 0) ||
-	check_global_access(thd, FILE_ACL))
-      goto error; /* purecov: inspected */
-    thd->enable_slow_log= opt_log_slow_admin_statements;
-    res = mysql_restore_table(thd, first_table);
-    select_lex->table_list.first= (byte*) first_table;
-    lex->query_tables=all_tables;
-    break;
-  }
   case SQLCOM_ASSIGN_TO_KEYCACHE:
   {
     DBUG_ASSERT(first_table == all_tables && first_table != 0);
@@ -2019,13 +1894,6 @@
     break;
   }
 
-  case SQLCOM_LOAD_MASTER_DATA: // sync with master
-    if (check_global_access(thd, SUPER_ACL))
-      goto error;
-    if (end_active_trans(thd))
-      goto error;
-    res = load_master_data(thd);
-    break;
 #endif /* HAVE_REPLICATION */
   case SQLCOM_SHOW_ENGINE_STATUS:
     {
@@ -2041,37 +1909,6 @@
       res = ha_show_status(thd, lex->create_info.db_type, HA_ENGINE_MUTEX);
       break;
     }
-#ifdef HAVE_REPLICATION
-  case SQLCOM_LOAD_MASTER_TABLE:
-  {
-    DBUG_ASSERT(first_table == all_tables && first_table != 0);
-    DBUG_ASSERT(first_table->db); /* Must be set in the parser */
-
-    if (check_access(thd, CREATE_ACL, first_table->db,
-		     &first_table->grant.privilege, 0, 0,
-                     test(first_table->schema_table)))
-      goto error;				/* purecov: inspected */
-    if (grant_option)
-    {
-      /* Check that the first table has CREATE privilege */
-      if (check_grant(thd, CREATE_ACL, all_tables, 0, 1, 0))
-	goto error;
-    }
-    pthread_mutex_lock(&LOCK_active_mi);
-    /*
-      fetch_master_table will send the error to the client on failure.
-      Give error if the table already exists.
-    */
-    if (!fetch_master_table(thd, first_table->db, first_table->table_name,
-			    active_mi, 0, 0))
-    {
-      send_ok(thd);
-    }
-    pthread_mutex_unlock(&LOCK_active_mi);
-    break;
-  }
-#endif /* HAVE_REPLICATION */
-
   case SQLCOM_CREATE_TABLE:
   {
     /* If CREATE TABLE of non-temporary table, do implicit commit */
@@ -2426,6 +2263,7 @@
     DBUG_ASSERT(first_table == all_tables && first_table != 0);
     if (check_table_access(thd, SELECT_ACL | EXTRA_ACL, all_tables, 0))
       goto error; /* purecov: inspected */
+
     res = mysql_checksum_table(thd, first_table, &lex->check_opt);
     break;
   }
@@ -5445,17 +5283,6 @@
   {
     my_error(ER_INVALID_ON_UPDATE, MYF(0), field_name->str);
     DBUG_RETURN(1);
-  }
-
-  if (type == MYSQL_TYPE_TIMESTAMP && length)
-  {
-    /* Display widths are no longer supported for TIMSTAMP as of MySQL 4.1.
-       In other words, for declarations such as TIMESTAMP(2), TIMESTAMP(4),
-       and so on, the display width is ignored.
-    */
-    char buf[32];
-    my_snprintf(buf, sizeof(buf), "TIMESTAMP(%s)", length);
-    WARN_DEPRECATED(thd, "5.2", buf, "'TIMESTAMP'");
   }
 
   if (!(new_field= new create_field()) ||

--- 1.409/sql/sql_show.cc	2007-05-23 01:51:44 -07:00
+++ 1.410/sql/sql_show.cc	2007-05-23 01:51:44 -07:00
@@ -811,33 +811,6 @@
 }
 
 
-int
-mysqld_dump_create_info(THD *thd, TABLE_LIST *table_list, int fd)
-{
-  Protocol *protocol= thd->protocol;
-  String *packet= protocol->storage_packet();
-  DBUG_ENTER("mysqld_dump_create_info");
-  DBUG_PRINT("enter",("table: %s",table_list->table->s->table_name.str));
-
-  protocol->prepare_for_resend();
-  if (store_create_info(thd, table_list, packet, NULL))
-    DBUG_RETURN(-1);
-
-  if (fd < 0)
-  {
-    if (protocol->write())
-      DBUG_RETURN(-1);
-    protocol->flush();
-  }
-  else
-  {
-    if (my_write(fd, (const byte*) packet->ptr(), packet->length(),
-		 MYF(MY_WME)))
-      DBUG_RETURN(-1);
-  }
-  DBUG_RETURN(0);
-}
-
 /*
   Go through all character combinations and ensure that sql_lex.cc can
   parse it as an identifier.

--- 1.415/sql/sql_table.cc	2007-05-23 01:51:44 -07:00
+++ 1.416/sql/sql_table.cc	2007-05-23 01:51:44 -07:00
@@ -3839,70 +3839,6 @@
 }
 
 
-static int prepare_for_restore(THD* thd, TABLE_LIST* table,
-			       HA_CHECK_OPT *check_opt)
-{
-  DBUG_ENTER("prepare_for_restore");
-
-  if (table->table) // do not overwrite existing tables on restore
-  {
-    DBUG_RETURN(send_check_errmsg(thd, table, "restore",
-				  "table exists, will not overwrite on restore"
-				  ));
-  }
-  else
-  {
-    char* backup_dir= thd->lex->backup_dir;
-    char src_path[FN_REFLEN], dst_path[FN_REFLEN], uname[FN_REFLEN];
-    char* table_name= table->table_name;
-    char* db= table->db;
-
-    VOID(tablename_to_filename(table->table_name, uname, sizeof(uname)));
-
-    if (fn_format_relative_to_data_home(src_path, uname, backup_dir, reg_ext))
-      DBUG_RETURN(-1); // protect buffer overflow
-
-    build_table_filename(dst_path, sizeof(dst_path),
-                         db, table_name, reg_ext, 0);
-
-    if (lock_and_wait_for_table_name(thd,table))
-      DBUG_RETURN(-1);
-
-    if (my_copy(src_path, dst_path, MYF(MY_WME)))
-    {
-      pthread_mutex_lock(&LOCK_open);
-      unlock_table_name(thd, table);
-      pthread_mutex_unlock(&LOCK_open);
-      DBUG_RETURN(send_check_errmsg(thd, table, "restore",
-				    "Failed copying .frm file"));
-    }
-    if (mysql_truncate(thd, table, 1))
-    {
-      pthread_mutex_lock(&LOCK_open);
-      unlock_table_name(thd, table);
-      pthread_mutex_unlock(&LOCK_open);
-      DBUG_RETURN(send_check_errmsg(thd, table, "restore",
-				    "Failed generating table from .frm file"));
-    }
-  }
-
-  /*
-    Now we should be able to open the partially restored table
-    to finish the restore in the handler later on
-  */
-  pthread_mutex_lock(&LOCK_open);
-  if (reopen_name_locked_table(thd, table))
-  {
-    unlock_table_name(thd, table);
-    pthread_mutex_unlock(&LOCK_open);
-    DBUG_RETURN(send_check_errmsg(thd, table, "restore",
-                                  "Failed to open partially restored table"));
-  }
-  pthread_mutex_unlock(&LOCK_open);
-  DBUG_RETURN(0);
-}
-
-
 static int prepare_for_repair(THD *thd, TABLE_LIST *table_list,
 			      HA_CHECK_OPT *check_opt)
 {
@@ -4470,25 +4406,6 @@
   if (table)
     table->table=0;
   DBUG_RETURN(TRUE);
-}
-
-
-bool mysql_backup_table(THD* thd, TABLE_LIST* table_list)
-{
-  DBUG_ENTER("mysql_backup_table");
-  DBUG_RETURN(mysql_admin_table(thd, table_list, 0,
-				"backup", TL_READ, 0, 0, 0, 0,
-				&handler::backup, 0));
-}
-
-
-bool mysql_restore_table(THD* thd, TABLE_LIST* table_list)
-{
-  DBUG_ENTER("mysql_restore_table");
-  DBUG_RETURN(mysql_admin_table(thd, table_list, 0,
-				"restore", TL_WRITE, 1, 1, 0,
-				&prepare_for_restore,
-				&handler::restore, 0));
 }
 
 

--- 1.567/sql/sql_yacc.yy	2007-05-23 01:51:44 -07:00
+++ 1.568/sql/sql_yacc.yy	2007-05-23 01:51:44 -07:00
@@ -491,7 +491,7 @@
 
 %pure_parser					/* We have threads */
 /*
-  Currently there is 287 shift/reduce conflict. We should not introduce
+  Currently there is 286 shift/reduce conflict. We should not introduce
   new conflicts any more.
 */
 %expect 286
@@ -719,7 +719,6 @@
 %token  INFILE
 %token  INITIAL_SIZE_SYM
 %token  INNER_SYM                     /* SQL-2003-R */
-%token  INNOBASE_SYM
 %token  INOUT_SYM                     /* SQL-2003-R */
 %token  INSENSITIVE_SYM               /* SQL-2003-R */
 %token  INSERT                        /* SQL-2003-R */
@@ -1220,7 +1219,7 @@
 	show describe load alter optimize keycache preload flush
 	reset purge begin commit rollback savepoint release
 	slave master_def master_defs master_file_def slave_until_opts
-	repair restore backup analyze check start checksum
+	repair analyze check start checksum
 	field_list field_list_item field_spec kill column_def key_def
 	keycache_list assign_to_keycache preload_list preload_keys
 	select_item_list select_item values_list no_braces
@@ -1249,7 +1248,7 @@
         prepare prepare_src execute deallocate
 	statement sp_suid
 	sp_c_chistics sp_a_chistics sp_chistic sp_c_chistic xa
-        load_data opt_field_or_var_spec fields_or_vars opt_load_data_set_spec
+        opt_field_or_var_spec fields_or_vars opt_load_data_set_spec
         definer view_replace_or_algorithm view_replace
         view_algorithm view_or_trigger_or_sp_or_event
         view_or_trigger_or_sp_or_event_tail
@@ -1309,7 +1308,6 @@
 statement:
 	  alter
 	| analyze
-	| backup
 	| binlog_base64_event
 	| call
 	| change
@@ -1343,7 +1341,6 @@
 	| repair
 	| replace
 	| reset
-	| restore
 	| revoke
 	| rollback
 	| savepoint
@@ -4143,13 +4140,6 @@
 
 create_table_option:
 	ENGINE_SYM opt_equal storage_engines    { Lex->create_info.db_type= $3; Lex->create_info.used_fields|= HA_CREATE_USED_ENGINE; }
-	| TYPE_SYM opt_equal storage_engines
-          {
-            Lex->create_info.db_type= $3;
-            WARN_DEPRECATED(yythd, "5.2", "TYPE=storage_engine",
-                            "'ENGINE=storage_engine'");
-            Lex->create_info.used_fields|= HA_CREATE_USED_ENGINE;
-          }
 	| MAX_ROWS opt_equal ulonglong_num	{ Lex->create_info.max_rows= $3; Lex->create_info.used_fields|= HA_CREATE_USED_MAX_ROWS;}
 	| MIN_ROWS opt_equal ulonglong_num	{ Lex->create_info.min_rows= $3; Lex->create_info.used_fields|= HA_CREATE_USED_MIN_ROWS;}
 	| AVG_ROW_LENGTH opt_equal ulong_num	{ Lex->create_info.avg_row_length=$3; Lex->create_info.used_fields|= HA_CREATE_USED_AVG_ROW_LENGTH;}
@@ -4447,21 +4437,19 @@
 	| nvarchar '(' NUM ')' opt_bin_mod { Lex->length=$3.str;
 					  $$= MYSQL_TYPE_VARCHAR;
 					  Lex->charset=national_charset_info; }
-	| VARBINARY '(' NUM ')' 	{ Lex->length=$3.str;
+        | VARBINARY '(' NUM ')'         { Lex->length=$3.str;
 					  Lex->charset=&my_charset_bin;
 					  $$= MYSQL_TYPE_VARCHAR; }
 	| YEAR_SYM opt_len field_options { $$=MYSQL_TYPE_YEAR; }
 	| DATE_SYM			{ $$=MYSQL_TYPE_DATE; }
 	| TIME_SYM			{ $$=MYSQL_TYPE_TIME; }
-	| TIMESTAMP opt_len
+	| TIMESTAMP
 	  {
 	    if (YYTHD->variables.sql_mode & MODE_MAXDB)
 	      $$=MYSQL_TYPE_DATETIME;
 	    else
             {
-              /* 
-                Unlike other types TIMESTAMP fields are NOT NULL by default.
-              */
+              /* Unlike other types TIMESTAMP fields are NOT NULL by default */
               Lex->type|= NOT_NULL_FLAG;
 	      $$=MYSQL_TYPE_TIMESTAMP;
             }
@@ -5601,31 +5589,6 @@
        master_file_def
        | slave_until_opts ',' master_file_def ;
 
-
-restore:
-	RESTORE_SYM table_or_tables
-	{
-	   Lex->sql_command = SQLCOM_RESTORE_TABLE;
-           WARN_DEPRECATED(yythd, "5.2", "RESTORE TABLE",
-                           "MySQL Administrator (mysqldump, mysql)");
-	}
-	table_list FROM TEXT_STRING_sys
-        {
-	  Lex->backup_dir = $6.str;
-        };
-
-backup:
-	BACKUP_SYM table_or_tables
-	{
-	   Lex->sql_command = SQLCOM_BACKUP_TABLE;
-           WARN_DEPRECATED(yythd, "5.2", "BACKUP TABLE",
-                           "MySQL Administrator (mysqldump, mysql)");
-	}
-	table_list TO_SYM TEXT_STRING_sys
-        {
-	  Lex->backup_dir = $6.str;
-        };
-
 checksum:
         CHECKSUM_SYM table_or_tables
 	{
@@ -8478,14 +8441,6 @@
             if (prepare_schema_table(YYTHD, lex, 0, SCH_OPEN_TABLES))
               MYSQL_YYABORT;
 	  }
-        | opt_full PLUGIN_SYM
-	  {
-	    LEX *lex= Lex;
-	    WARN_DEPRECATED(yythd, "5.2", "SHOW PLUGIN", "'SHOW PLUGINS'");
-            lex->sql_command= SQLCOM_SHOW_PLUGINS;
-            if (prepare_schema_table(YYTHD, lex, 0, SCH_PLUGINS))
-              MYSQL_YYABORT;
-	  }
         | PLUGINS_SYM
 	  {
 	    LEX *lex= Lex;
@@ -8543,12 +8498,6 @@
 	    LEX *lex=Lex;
 	    lex->sql_command= SQLCOM_SHOW_COLUMN_TYPES;
 	  }
-	| TABLE_SYM TYPES_SYM
-	  {
-	    LEX *lex=Lex;
-	    lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES;
-	    WARN_DEPRECATED(yythd, "5.2", "SHOW TABLE TYPES", "'SHOW [STORAGE] ENGINES'");
-	  }
 	| opt_storage ENGINES_SYM
 	  {
 	    LEX *lex=Lex;
@@ -8587,30 +8536,6 @@
             if (prepare_schema_table(YYTHD, lex, 0, SCH_STATUS))
               MYSQL_YYABORT;
 	  }
-        | INNOBASE_SYM STATUS_SYM
-          {
-            LEX *lex= Lex;
-            lex->sql_command = SQLCOM_SHOW_ENGINE_STATUS;
-            if (!(lex->create_info.db_type=
-                  ha_resolve_by_legacy_type(YYTHD, DB_TYPE_INNODB)))
-            {
-	      my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), "InnoDB");
-	      MYSQL_YYABORT;
-            }
-            WARN_DEPRECATED(yythd, "5.2", "SHOW INNODB STATUS", "'SHOW ENGINE INNODB STATUS'");
-	  }
-        | MUTEX_SYM STATUS_SYM
-          {
-	    LEX *lex= Lex;
-            lex->sql_command = SQLCOM_SHOW_ENGINE_MUTEX;
-            if (!(lex->create_info.db_type=
-                  ha_resolve_by_legacy_type(YYTHD, DB_TYPE_INNODB)))
-            {
-	      my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), "InnoDB");
-	      MYSQL_YYABORT;
-            }
-            WARN_DEPRECATED(yythd, "5.2", "SHOW MUTEX STATUS", "'SHOW ENGINE INNODB MUTEX'");
-	  }
 	| opt_full PROCESSLIST_SYM
 	  { Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;}
         | opt_var_type  VARIABLES wild_and_where
@@ -8953,34 +8878,15 @@
 	  }
           lex->fname_start= lex->ptr;
         }
-        load_data
-        {}
-        |
-        LOAD TABLE_SYM table_ident FROM MASTER_SYM
-        {
-	  LEX *lex=Lex;
-          WARN_DEPRECATED(yythd, "5.2", "LOAD TABLE FROM MASTER",
-                          "MySQL Administrator (mysqldump, mysql)");
-          if (lex->sphead)
-	  {
-	    my_error(ER_SP_BADSTATEMENT, MYF(0), "LOAD TABLE");
-	    MYSQL_YYABORT;
-	  }
-          lex->sql_command = SQLCOM_LOAD_MASTER_TABLE;
-          if (!Select->add_table_to_list(YYTHD, $3, NULL, TL_OPTION_UPDATING))
-            MYSQL_YYABORT;
-        };
-
-load_data:
 	load_data_lock opt_local INFILE TEXT_STRING_filesystem
 	{
 	  LEX *lex=Lex;
 	  lex->sql_command= SQLCOM_LOAD;
-	  lex->lock_option= $1;
-	  lex->local_file=  $2;
+	  lex->lock_option= $4;
+	  lex->local_file=  $5;
 	  lex->duplicates= DUP_ERROR;
 	  lex->ignore= 0;
-	  if (!(lex->exchange= new sql_exchange($4.str, 0)))
+	  if (!(lex->exchange= new sql_exchange($7.str, 0)))
 	    MYSQL_YYABORT;
         }
         opt_duplicate INTO
@@ -8991,7 +8897,7 @@
         TABLE_SYM table_ident
         {
           LEX *lex=Lex;
-          if (!Select->add_table_to_list(YYTHD, $10, NULL, TL_OPTION_UPDATING,
+          if (!Select->add_table_to_list(YYTHD, $13, NULL, TL_OPTION_UPDATING,
                                          lex->lock_option))
             MYSQL_YYABORT;
           lex->field_list.empty();
@@ -8999,18 +8905,11 @@
           lex->value_list.empty();
         }
         opt_load_data_charset
-	{ Lex->exchange->cs= $12; }
+	{ Lex->exchange->cs= $15; }
         opt_field_term opt_line_term opt_ignore_lines opt_field_or_var_spec
         opt_load_data_set_spec
         {}
-        |
-	FROM MASTER_SYM
-        {
-	  Lex->sql_command = SQLCOM_LOAD_MASTER_DATA;
-          WARN_DEPRECATED(yythd, "5.2", "LOAD DATA FROM MASTER",
-                          "mysqldump or future "
-                          "BACKUP/RESTORE DATABASE facility");
-        };
+        ;
 
 opt_local:
 	/* empty */	{ $$=0;}
@@ -9764,7 +9663,6 @@
 	| INITIAL_SIZE_SYM      {}
 	| ISOLATION		{}
 	| ISSUER_SYM		{}
-	| INNOBASE_SYM		{}
 	| INSERT_METHOD		{}
 	| KEY_BLOCK_SIZE	{}
 	| LAST_SYM		{}

--- 1.155/sql/share/errmsg.txt	2007-05-23 01:51:45 -07:00
+++ 1.156/sql/share/errmsg.txt	2007-05-23 01:51:45 -07:00
@@ -4297,16 +4297,16 @@
 ER_BAD_SLAVE  
         dan "Denne server er ikke konfigureret som slave. Ret in config-filen eller brug kommandoen CHANGE MASTER TO"
         nla "De server is niet geconfigureerd als slave, fix in configuratie bestand of met CHANGE MASTER TO"
-        eng "The server is not configured as slave; fix in config file or with CHANGE MASTER TO"
+        eng "The server is not configured as slave; fix with CHANGE MASTER TO"
-        ger "Der Server ist nicht als Slave konfiguriert. Bitte in der Konfigurationsdatei oder mittels CHANGE MASTER TO beheben"
+        ger "Der Server ist nicht als Slave konfiguriert. Bitte mittels CHANGE MASTER TO beheben"
         ita "Il server non e' configurato come 'slave', correggere il file di configurazione cambiando CHANGE MASTER TO"
 ER_MASTER_INFO  
         eng "Could not initialize master info structure; more error messages can be found in the MySQL error log"

--- 1.30/mysql-test/r/rpl_stm_until.result	2007-05-23 01:51:45 -07:00
+++ 1.31/mysql-test/r/rpl_stm_until.result	2007-05-23 01:51:45 -07:00
@@ -27,7 +27,7 @@
 Connect_Retry	1
 Master_Log_File	master-bin.000001
 Read_Master_Log_Pos	784
-Relay_Log_File	slave-relay-bin.000004
+Relay_Log_File	slave-relay-bin.000003
 Relay_Log_Pos	#
 Relay_Master_Log_File	master-bin.000001
 Slave_IO_Running	#
@@ -69,7 +69,7 @@
 Connect_Retry	1
 Master_Log_File	master-bin.000001
 Read_Master_Log_Pos	784
-Relay_Log_File	slave-relay-bin.000004
+Relay_Log_File	slave-relay-bin.000003
 Relay_Log_Pos	#
 Relay_Master_Log_File	master-bin.000001
 Slave_IO_Running	#
@@ -96,7 +96,7 @@
 Master_SSL_Key	
 Seconds_Behind_Master	#
 Master_SSL_Verify_Server_Cert	No
-start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746;
+start slave until relay_log_file='slave-relay-bin.000003', relay_log_pos=746;
 select * from t2;
 n
 1
@@ -109,7 +109,7 @@
 Connect_Retry	1
 Master_Log_File	master-bin.000001
 Read_Master_Log_Pos	784
-Relay_Log_File	slave-relay-bin.000004
+Relay_Log_File	slave-relay-bin.000003
 Relay_Log_Pos	#
 Relay_Master_Log_File	master-bin.000001
 Slave_IO_Running	#
@@ -126,7 +126,7 @@
 Exec_Master_Log_Pos	616
 Relay_Log_Space	#
 Until_Condition	Relay
-Until_Log_File	slave-relay-bin.000004
+Until_Log_File	slave-relay-bin.000003
 Until_Log_Pos	746
 Master_SSL_Allowed	No
 Master_SSL_CA_File	
@@ -147,7 +147,7 @@
 Connect_Retry	1
 Master_Log_File	master-bin.000001
 Read_Master_Log_Pos	784
-Relay_Log_File	slave-relay-bin.000004
+Relay_Log_File	slave-relay-bin.000003
 Relay_Log_Pos	#
 Relay_Master_Log_File	master-bin.000001
 Slave_IO_Running	Yes

--- 1.38/mysql-test/r/rpl_sp.result	2007-05-23 01:51:45 -07:00
+++ 1.39/mysql-test/r/rpl_sp.result	2007-05-23 01:51:45 -07:00
@@ -179,9 +179,6 @@
 return unix_timestamp();
 end|
 ERROR HY000: You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
-set global log_bin_trust_routine_creators=1;
-Warnings:
-Warning	1543	The syntax 'log_bin_trust_routine_creators' is deprecated and will be removed in MySQL 5.2. Please use 'log_bin_trust_function_creators' instead
 set global log_bin_trust_function_creators=0;
 set global log_bin_trust_function_creators=1;
 set global log_bin_trust_function_creators=1;

--- 1.32/mysql-test/t/rpl_sp.test	2007-05-23 01:51:45 -07:00
+++ 1.33/mysql-test/t/rpl_sp.test	2007-05-23 01:51:45 -07:00
@@ -3,11 +3,6 @@
 # Test of replication of stored procedures (WL#2146 for MySQL 5.0)
 # Modified by WL#2971.
 
-# Note that in the .opt files we still use the old variable name
-# log-bin-trust-routine-creators so that this test checks that it's
-# still accepted (this test also checks that the new name is
-# accepted). The old name could be removed in 5.1 or 6.0.
-
 source include/have_binlog_format_mixed.inc;
 source include/master-slave.inc;
 
@@ -240,9 +235,6 @@
 end|
 delimiter ;|
 connection master;
-# test old variable name:
-set global log_bin_trust_routine_creators=1;
-# now use new name:
 set global log_bin_trust_function_creators=0;
 set global log_bin_trust_function_creators=1;
 # slave needs it too otherwise will not execute what master allowed:

--- 1.65/mysql-test/r/ps_1general.result	2007-05-23 01:51:45 -07:00
+++ 1.66/mysql-test/r/ps_1general.result	2007-05-23 01:51:45 -07:00
@@ -405,8 +405,6 @@
 prepare stmt1 from ' analyze table t1 ' ;
 prepare stmt1 from ' checksum table t1 ' ;
 prepare stmt1 from ' repair table t1 ' ;
-prepare stmt1 from ' restore table t1 from ''data.txt'' ' ;
-ERROR HY000: This command is not supported in the prepared statement protocol yet
 prepare stmt1 from ' handler t1 open ';
 ERROR HY000: This command is not supported in the prepared statement protocol yet
 prepare stmt3 from ' commit ' ;

--- 1.40/mysql-test/t/ps_1general.test	2007-05-23 01:51:45 -07:00
+++ 1.41/mysql-test/t/ps_1general.test	2007-05-23 01:51:45 -07:00
@@ -447,8 +447,6 @@
 prepare stmt1 from ' analyze table t1 ' ;
 prepare stmt1 from ' checksum table t1 ' ;
 prepare stmt1 from ' repair table t1 ' ;
---error ER_UNSUPPORTED_PS
-prepare stmt1 from ' restore table t1 from ''data.txt'' ' ;
 ## handler
 --error ER_UNSUPPORTED_PS
 prepare stmt1 from ' handler t1 open ';

--- 1.18/mysql-test/r/rpl_stm_reset_slave.result	2007-05-23 01:51:45 -07:00
+++ 1.19/mysql-test/r/rpl_stm_reset_slave.result	2007-05-23 01:51:45 -07:00
@@ -5,21 +5,146 @@
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	106	#	#	master-bin.000001	Yes	Yes				#			0		0	106	#	None		0	No						#	No
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	root
+Master_Port	MASTER_PORT
+Connect_Retry	1
+Master_Log_File	master-bin.000001
+Read_Master_Log_Pos	102
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000001
+Slave_IO_Running	Yes
+Slave_SQL_Running	Yes
+Replicate_Do_DB	
+Replicate_Ignore_DB	
+Replicate_Do_Table	
+Replicate_Ignore_Table	#
+Replicate_Wild_Do_Table	
+Replicate_Wild_Ignore_Table	
+Last_Errno	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	102
+Relay_Log_Space	#
+Until_Condition	None
+Until_Log_File	
+Until_Log_Pos	0
+Master_SSL_Allowed	No
+Master_SSL_CA_File	
+Master_SSL_CA_Path	
+Master_SSL_Cert	
+Master_SSL_Cipher	
+Master_SSL_Key	
+Seconds_Behind_Master	#
 stop slave;
 change master to master_user='test';
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
-#	127.0.0.1	test	MASTER_PORT	1	master-bin.000001	106	#	#	master-bin.000001	No	No				#			0		0	106	#	None		0	No						#	No
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	test
+Master_Port	MASTER_PORT
+Connect_Retry	1
+Master_Log_File	master-bin.000001
+Read_Master_Log_Pos	102
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000001
+Slave_IO_Running	No
+Slave_SQL_Running	No
+Replicate_Do_DB	
+Replicate_Ignore_DB	
+Replicate_Do_Table	
+Replicate_Ignore_Table	#
+Replicate_Wild_Do_Table	
+Replicate_Wild_Ignore_Table	
+Last_Errno	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	102
+Relay_Log_Space	#
+Until_Condition	None
+Until_Log_File	
+Until_Log_Pos	0
+Master_SSL_Allowed	No
+Master_SSL_CA_File	
+Master_SSL_CA_Path	
+Master_SSL_Cert	
+Master_SSL_Cipher	
+Master_SSL_Key	
+Seconds_Behind_Master	#
 reset slave;
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
-#	127.0.0.1	root	MASTER_PORT	1		4	#	#		No	No				#			0		0	0	#	None		0	No						#	No
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	test
+Master_Port	MASTER_PORT
+Connect_Retry	1
+Master_Log_File	
+Read_Master_Log_Pos	4
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	
+Slave_IO_Running	No
+Slave_SQL_Running	No
+Replicate_Do_DB	
+Replicate_Ignore_DB	
+Replicate_Do_Table	
+Replicate_Ignore_Table	#
+Replicate_Wild_Do_Table	
+Replicate_Wild_Ignore_Table	
+Last_Errno	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	0
+Relay_Log_Space	#
+Until_Condition	None
+Until_Log_File	
+Until_Log_Pos	0
+Master_SSL_Allowed	No
+Master_SSL_CA_File	
+Master_SSL_CA_Path	
+Master_SSL_Cert	
+Master_SSL_Cipher	
+Master_SSL_Key	
+Seconds_Behind_Master	#
+change master to master_user='root';
 start slave;
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	106	#	#	master-bin.000001	Yes	Yes				#			0		0	106	#	None		0	No						#	No
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	root
+Master_Port	MASTER_PORT
+Connect_Retry	1
+Master_Log_File	master-bin.000001
+Read_Master_Log_Pos	102
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000001
+Slave_IO_Running	Yes
+Slave_SQL_Running	Yes
+Replicate_Do_DB	
+Replicate_Ignore_DB	
+Replicate_Do_Table	
+Replicate_Ignore_Table	#
+Replicate_Wild_Do_Table	
+Replicate_Wild_Ignore_Table	
+Last_Errno	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	102
+Relay_Log_Space	#
+Until_Condition	None
+Until_Log_File	
+Until_Log_Pos	0
+Master_SSL_Allowed	No
+Master_SSL_CA_File	
+Master_SSL_CA_Path	
+Master_SSL_Cert	
+Master_SSL_Cipher	
+Master_SSL_Key	
+Seconds_Behind_Master	#
 stop slave;
 reset slave;
 start slave;

--- 1.305/mysql-test/mysql-test-run.pl	2007-05-23 01:51:45 -07:00
+++ 1.306/mysql-test/mysql-test-run.pl	2007-05-23 01:51:45 -07:00
@@ -737,7 +737,6 @@
   else
   {
     $mysqld_variables{'port'}= 3306;
-    $mysqld_variables{'master-port'}= 3306;
   }
 
   if ( $opt_comment )
@@ -1092,9 +1091,9 @@
    idx           => 0,
    path_myddir   => "$opt_vardir/master-data",
    path_myerr    => "$opt_vardir/log/master.err",
-   path_pid    => "$opt_vardir/run/master.pid",
-   path_sock   => "$sockdir/master.sock",
-   port   =>  $opt_master_myport,
+   path_pid      => "$opt_vardir/run/master.pid",
+   path_sock     => "$sockdir/master.sock",
+   port          =>  $opt_master_myport,
    start_timeout =>  400, # enough time create innodb tables
    cluster       =>  0, # index in clusters list
    start_opts    => [],
@@ -1107,9 +1106,9 @@
    idx           => 1,
    path_myddir   => "$opt_vardir/master1-data",
    path_myerr    => "$opt_vardir/log/master1.err",
-   path_pid    => "$opt_vardir/run/master1.pid",
-   path_sock   => "$sockdir/master1.sock",
-   port   => $opt_master_myport + 1,
+   path_pid      => "$opt_vardir/run/master1.pid",
+   path_sock     => "$sockdir/master1.sock",
+   port          => $opt_master_myport + 1,
    start_timeout => 400, # enough time create innodb tables
    cluster       =>  0, # index in clusters list
    start_opts    => [],
@@ -1168,8 +1167,8 @@
    path_pid =>        "$opt_vardir/run/im.pid",
    path_angel_pid =>  "$opt_vardir/run/im.angel.pid",
    path_sock =>       "$sockdir/im.sock",
-   port =>            $im_port,
-   start_timeout =>   $master->[0]->{'start_timeout'},
+   port =>             $im_port,
+   start_timeout =>    $master->[0]->{'start_timeout'},
    admin_login =>     'im_admin',
    admin_password =>  'im_admin_secret',
    admin_sha1 =>      '*598D51AD2DFF7792045D6DF3DDF9AA1AF737B295',
@@ -1823,7 +1822,6 @@
   $ENV{'SLAVE_MYPORT1'}=      $slave->[1]->{'port'};
   $ENV{'SLAVE_MYPORT2'}=      $slave->[2]->{'port'};
   $ENV{'MYSQL_TCP_PORT'}=     $mysqld_variables{'port'};
-  $ENV{'DEFAULT_MASTER_PORT'}= $mysqld_variables{'master-port'};
 
   $ENV{'IM_PATH_SOCK'}=       $instance_manager->{path_sock};
   $ENV{'IM_USERNAME'}=        $instance_manager->{admin_login};
@@ -3864,12 +3862,6 @@
     }
     else
     {
-      mtr_add_arg($args, "%s--master-user=root", $prefix);
-      mtr_add_arg($args, "%s--master-connect-retry=1", $prefix);
-      mtr_add_arg($args, "%s--master-host=127.0.0.1", $prefix);
-      mtr_add_arg($args, "%s--master-password=", $prefix);
-      mtr_add_arg($args, "%s--master-port=%d", $prefix,
-                  $master->[0]->{'port'}); # First master
 
       my $slave_server_id=  2 + $idx;
       my $slave_rpl_rank= $slave_server_id;

--- 1.4/sql/rpl_mi.cc	2007-05-23 01:51:45 -07:00
+++ 1.5/sql/rpl_mi.cc	2007-05-23 01:51:45 -07:00
@@ -21,6 +21,7 @@
 
 #ifdef HAVE_REPLICATION
 
+#define DEFAULT_CONNECT_RETRY 60
 
 // Defined in slave.cc
 int init_intvar_from_file(int* var, IO_CACHE* f, int default_val);
@@ -28,7 +29,8 @@
 			  const char *default_val);
 
 MASTER_INFO::MASTER_INFO()
-  :ssl(0), fd(-1),  io_thd(0), inited(0),
+  :ssl(0), fd(-1),  io_thd(0), port(MYSQL_PORT),
+   connect_retry(DEFAULT_CONNECT_RETRY), inited(0),
    abort_slave(0),slave_running(0),
    ssl_verify_server_cert(0), slave_run_id(0)
 {
@@ -54,35 +56,13 @@
 }
 
 
-void init_master_info_with_options(MASTER_INFO* mi)
+void init_master_log_pos(MASTER_INFO* mi)
 {
-  DBUG_ENTER("init_master_info_with_options");
+  DBUG_ENTER("init_master_log_pos");
 
   mi->master_log_name[0] = 0;
   mi->master_log_pos = BIN_LOG_HEADER_SIZE;             // skip magic number
 
-  if (master_host)
-    strmake(mi->host, master_host, sizeof(mi->host) - 1);
-  if (master_user)
-    strmake(mi->user, master_user, sizeof(mi->user) - 1);
-  if (master_password)
-    strmake(mi->password, master_password, MAX_PASSWORD_LENGTH);
-  mi->port = master_port;
-  mi->connect_retry = master_connect_retry;
-
-  mi->ssl= master_ssl;
-  if (master_ssl_ca)
-    strmake(mi->ssl_ca, master_ssl_ca, sizeof(mi->ssl_ca)-1);
-  if (master_ssl_capath)
-    strmake(mi->ssl_capath, master_ssl_capath, sizeof(mi->ssl_capath)-1);
-  if (master_ssl_cert)
-    strmake(mi->ssl_cert, master_ssl_cert, sizeof(mi->ssl_cert)-1);
-  if (master_ssl_cipher)
-    strmake(mi->ssl_cipher, master_ssl_cipher, sizeof(mi->ssl_cipher)-1);
-  if (master_ssl_key)
-    strmake(mi->ssl_key, master_ssl_key, sizeof(mi->ssl_key)-1);
-  /* Intentionally init ssl_verify_server_cert to 0, no option available  */
-  mi->ssl_verify_server_cert= 0;
   DBUG_VOID_RETURN;
 }
 
@@ -169,7 +149,7 @@
     }
 
     mi->fd = fd;
-    init_master_info_with_options(mi);
+    init_master_log_pos(mi);
 
   }
   else // file exists
@@ -241,36 +221,33 @@
       lines= 7;
 
     if (init_intvar_from_file(&master_log_pos, &mi->file, 4) ||
-        init_strvar_from_file(mi->host, sizeof(mi->host), &mi->file,
-                              master_host) ||
-        init_strvar_from_file(mi->user, sizeof(mi->user), &mi->file,
-                              master_user) ||
+        init_strvar_from_file(mi->host, sizeof(mi->host), &mi->file, 0) ||
+        init_strvar_from_file(mi->user, sizeof(mi->user), &mi->file, "test") ||
         init_strvar_from_file(mi->password, SCRAMBLED_PASSWORD_CHAR_LENGTH+1,
-                              &mi->file, master_password) ||
-        init_intvar_from_file(&port, &mi->file, master_port) ||
-        init_intvar_from_file(&connect_retry, &mi->file,
-                              master_connect_retry))
+                              &mi->file, 0 ) ||
+        init_intvar_from_file(&port, &mi->file, MYSQL_PORT) ||
+        init_intvar_from_file(&connect_retry, &mi->file, DEFAULT_CONNECT_RETRY))
       goto errwithmsg;
 
     /*
-       If file has ssl part use it even if we have server without
-       SSL support. But these option will be ignored later when
-       slave will try connect to master, so in this case warning
-       is printed.
-     */
+      If file has ssl part use it even if we have server without
+      SSL support. But these option will be ignored later when
+      slave will try connect to master, so in this case warning
+      is printed.
+    */
     if (lines >= LINES_IN_MASTER_INFO_WITH_SSL)
     {
-      if (init_intvar_from_file(&ssl, &mi->file, master_ssl) ||
+      if (init_intvar_from_file(&ssl, &mi->file, 0) ||
           init_strvar_from_file(mi->ssl_ca, sizeof(mi->ssl_ca),
-                                &mi->file, master_ssl_ca) ||
+                                &mi->file, 0) ||
           init_strvar_from_file(mi->ssl_capath, sizeof(mi->ssl_capath),
-                                &mi->file, master_ssl_capath) ||
+                                &mi->file, 0) ||
           init_strvar_from_file(mi->ssl_cert, sizeof(mi->ssl_cert),
-                                &mi->file, master_ssl_cert) ||
+                                &mi->file, 0) ||
           init_strvar_from_file(mi->ssl_cipher, sizeof(mi->ssl_cipher),
-                                &mi->file, master_ssl_cipher) ||
+                                &mi->file, 0) ||
           init_strvar_from_file(mi->ssl_key, sizeof(mi->ssl_key),
-                                &mi->file, master_ssl_key))
+                                &mi->file, 0))
         goto errwithmsg;
 
       /*
@@ -286,8 +263,8 @@
 #ifndef HAVE_OPENSSL
     if (ssl)
       sql_print_warning("SSL information in the master info file "
-                      "('%s') are ignored because this MySQL slave was compiled "
-                      "without SSL support.", fname);
+                      "('%s') are ignored because this MySQL slave was "
+                      "compiled without SSL support.", fname);
 #endif /* HAVE_OPENSSL */
 
     /*

--- 1.4/sql/rpl_mi.h	2007-05-23 01:51:45 -07:00
+++ 1.5/sql/rpl_mi.h	2007-05-23 01:51:45 -07:00
@@ -101,7 +101,7 @@
   long clock_diff_with_master;
 };
 
-void init_master_info_with_options(MASTER_INFO* mi);
+void init_master_log_pos(MASTER_INFO* mi);
 int init_master_info(MASTER_INFO* mi, const char* master_info_fname,
 		     const char* slave_info_fname,
 		     bool abort_if_no_master_info_file,

--- 1.5/mysql-test/r/rpl_row_reset_slave.result	2007-05-23 01:51:45 -07:00
+++ 1.6/mysql-test/r/rpl_row_reset_slave.result	2007-05-23 01:51:45 -07:00
@@ -5,21 +5,146 @@
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 start slave;
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	106	#	#	master-bin.000001	Yes	Yes				#			0		0	106	#	None		0	No						#	No
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	root
+Master_Port	MASTER_PORT
+Connect_Retry	1
+Master_Log_File	master-bin.000001
+Read_Master_Log_Pos	102
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000001
+Slave_IO_Running	Yes
+Slave_SQL_Running	Yes
+Replicate_Do_DB	
+Replicate_Ignore_DB	
+Replicate_Do_Table	
+Replicate_Ignore_Table	#
+Replicate_Wild_Do_Table	
+Replicate_Wild_Ignore_Table	
+Last_Errno	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	102
+Relay_Log_Space	#
+Until_Condition	None
+Until_Log_File	
+Until_Log_Pos	0
+Master_SSL_Allowed	No
+Master_SSL_CA_File	
+Master_SSL_CA_Path	
+Master_SSL_Cert	
+Master_SSL_Cipher	
+Master_SSL_Key	
+Seconds_Behind_Master	#
 stop slave;
 change master to master_user='test';
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
-#	127.0.0.1	test	MASTER_PORT	1	master-bin.000001	106	#	#	master-bin.000001	No	No				#			0		0	106	#	None		0	No						#	No
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	test
+Master_Port	MASTER_PORT
+Connect_Retry	1
+Master_Log_File	master-bin.000001
+Read_Master_Log_Pos	102
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000001
+Slave_IO_Running	No
+Slave_SQL_Running	No
+Replicate_Do_DB	
+Replicate_Ignore_DB	
+Replicate_Do_Table	
+Replicate_Ignore_Table	#
+Replicate_Wild_Do_Table	
+Replicate_Wild_Ignore_Table	
+Last_Errno	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	102
+Relay_Log_Space	#
+Until_Condition	None
+Until_Log_File	
+Until_Log_Pos	0
+Master_SSL_Allowed	No
+Master_SSL_CA_File	
+Master_SSL_CA_Path	
+Master_SSL_Cert	
+Master_SSL_Cipher	
+Master_SSL_Key	
+Seconds_Behind_Master	#
 reset slave;
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
-#	127.0.0.1	root	MASTER_PORT	1		4	#	#		No	No				#			0		0	0	#	None		0	No						#	No
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	test
+Master_Port	MASTER_PORT
+Connect_Retry	1
+Master_Log_File	
+Read_Master_Log_Pos	4
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	
+Slave_IO_Running	No
+Slave_SQL_Running	No
+Replicate_Do_DB	
+Replicate_Ignore_DB	
+Replicate_Do_Table	
+Replicate_Ignore_Table	#
+Replicate_Wild_Do_Table	
+Replicate_Wild_Ignore_Table	
+Last_Errno	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	0
+Relay_Log_Space	#
+Until_Condition	None
+Until_Log_File	
+Until_Log_Pos	0
+Master_SSL_Allowed	No
+Master_SSL_CA_File	
+Master_SSL_CA_Path	
+Master_SSL_Cert	
+Master_SSL_Cipher	
+Master_SSL_Key	
+Seconds_Behind_Master	#
+change master to master_user='root';
 start slave;
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
-#	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	106	#	#	master-bin.000001	Yes	Yes				#			0		0	106	#	None		0	No						#	No
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	root
+Master_Port	MASTER_PORT
+Connect_Retry	1
+Master_Log_File	master-bin.000001
+Read_Master_Log_Pos	102
+Relay_Log_File	#
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000001
+Slave_IO_Running	Yes
+Slave_SQL_Running	Yes
+Replicate_Do_DB	
+Replicate_Ignore_DB	
+Replicate_Do_Table	
+Replicate_Ignore_Table	#
+Replicate_Wild_Do_Table	
+Replicate_Wild_Ignore_Table	
+Last_Errno	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	102
+Relay_Log_Space	#
+Until_Condition	None
+Until_Log_File	
+Until_Log_Pos	0
+Master_SSL_Allowed	No
+Master_SSL_CA_File	
+Master_SSL_CA_Path	
+Master_SSL_Cert	
+Master_SSL_Cipher	
+Master_SSL_Key	
+Seconds_Behind_Master	#
 stop slave;
 reset slave;
 start slave;

--- 1.5/mysql-test/r/rpl_row_until.result	2007-05-23 01:51:45 -07:00
+++ 1.6/mysql-test/r/rpl_row_until.result	2007-05-23 01:51:45 -07:00
@@ -20,8 +20,39 @@
 3
 4
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
-#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	744	slave-relay-bin.000004	#	master-bin.000001	#	No							0		0	315	#	Master	master-bin.000001	311	No						#	No
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	root
+Master_Port	MASTER_MYPORT
+Connect_Retry	1
+Master_Log_File	master-bin.000001
+Read_Master_Log_Pos	740
+Relay_Log_File	slave-relay-bin.000003
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000001
+Slave_IO_Running	#
+Slave_SQL_Running	No
+Replicate_Do_DB	
+Replicate_Ignore_DB	
+Replicate_Do_Table	
+Replicate_Ignore_Table	
+Replicate_Wild_Do_Table	
+Replicate_Wild_Ignore_Table	
+Last_Errno	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	311
+Relay_Log_Space	#
+Until_Condition	Master
+Until_Log_File	master-bin.000001
+Until_Log_Pos	311
+Master_SSL_Allowed	No
+Master_SSL_CA_File	
+Master_SSL_CA_Path	
+Master_SSL_Cert	
+Master_SSL_Cipher	
+Master_SSL_Key	
+Seconds_Behind_Master	#
 start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
 select * from t1;
 n
@@ -30,22 +61,115 @@
 3
 4
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
-#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	744	slave-relay-bin.000004	#	master-bin.000001	#	No							0		0	315	#	Master	master-no-such-bin.000001	291	No						#	No
-start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728;
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	root
+Master_Port	MASTER_MYPORT
+Connect_Retry	1
+Master_Log_File	master-bin.000001
+Read_Master_Log_Pos	740
+Relay_Log_File	slave-relay-bin.000003
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000001
+Slave_IO_Running	#
+Slave_SQL_Running	No
+Replicate_Do_DB	
+Replicate_Ignore_DB	
+Replicate_Do_Table	
+Replicate_Ignore_Table	
+Replicate_Wild_Do_Table	
+Replicate_Wild_Ignore_Table	
+Last_Errno	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	311
+Relay_Log_Space	#
+Until_Condition	Master
+Until_Log_File	master-no-such-bin.000001
+Until_Log_Pos	291
+Master_SSL_Allowed	No
+Master_SSL_CA_File	
+Master_SSL_CA_Path	
+Master_SSL_Cert	
+Master_SSL_Cipher	
+Master_SSL_Key	
+Seconds_Behind_Master	#
+start slave until relay_log_file='slave-relay-bin.000003', relay_log_pos=728;
 select * from t2;
 n
 1
 2
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
-#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	744	slave-relay-bin.000004	#	master-bin.000001	#	No							0		0	590	#	Relay	slave-relay-bin.000004	728	No						#	No
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	root
+Master_Port	MASTER_MYPORT
+Connect_Retry	1
+Master_Log_File	master-bin.000001
+Read_Master_Log_Pos	740
+Relay_Log_File	slave-relay-bin.000003
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000001
+Slave_IO_Running	#
+Slave_SQL_Running	No
+Replicate_Do_DB	
+Replicate_Ignore_DB	
+Replicate_Do_Table	
+Replicate_Ignore_Table	
+Replicate_Wild_Do_Table	
+Replicate_Wild_Ignore_Table	
+Last_Errno	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	586
+Relay_Log_Space	#
+Until_Condition	Relay
+Until_Log_File	slave-relay-bin.000003
+Until_Log_Pos	728
+Master_SSL_Allowed	No
+Master_SSL_CA_File	
+Master_SSL_CA_Path	
+Master_SSL_Cert	
+Master_SSL_Cipher	
+Master_SSL_Key	
+Seconds_Behind_Master	#
 start slave;
 stop slave;
 start slave until master_log_file='master-bin.000001', master_log_pos=740;
 show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
-#	127.0.0.1	root	MASTER_MYPORT	1	master-bin.000001	744	slave-relay-bin.000004	#	master-bin.000001	Yes	No							0		0	744	#	Master	master-bin.000001	740	No						#	No
+Slave_IO_State	#
+Master_Host	127.0.0.1
+Master_User	root
+Master_Port	MASTER_MYPORT
+Connect_Retry	1
+Master_Log_File	master-bin.000001
+Read_Master_Log_Pos	740
+Relay_Log_File	slave-relay-bin.000003
+Relay_Log_Pos	#
+Relay_Master_Log_File	master-bin.000001
+Slave_IO_Running	Yes
+Slave_SQL_Running	No
+Replicate_Do_DB	
+Replicate_Ignore_DB	
+Replicate_Do_Table	
+Replicate_Ignore_Table	
+Replicate_Wild_Do_Table	
+Replicate_Wild_Ignore_Table	
+Last_Errno	0
+Last_Error	
+Skip_Counter	0
+Exec_Master_Log_Pos	740
+Relay_Log_Space	#
+Until_Condition	Master
+Until_Log_File	master-bin.000001
+Until_Log_Pos	740
+Master_SSL_Allowed	No
+Master_SSL_CA_File	
+Master_SSL_CA_Path	
+Master_SSL_Cert	
+Master_SSL_Cipher	
+Master_SSL_Key	
+Seconds_Behind_Master	#
 start slave until master_log_file='master-bin', master_log_pos=561;
 ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
 start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;

--- 1.29/storage/ndb/src/common/util/version.c	2007-05-23 01:51:45 -07:00
+++ 1.30/storage/ndb/src/common/util/version.c	2007-05-23 01:51:45 -07:00
@@ -92,7 +92,8 @@
 #ifndef TEST_VERSION
 struct NdbUpGradeCompatible ndbCompatibleTable_full[] = {
   { MAKE_VERSION(5,2,NDB_VERSION_BUILD), MAKE_VERSION(5,2,0), UG_Range},
-  { MAKE_VERSION(5,1,NDB_VERSION_BUILD), MAKE_VERSION(5,1,0), UG_Range},
+  { MAKE_VERSION(5,1,NDB_VERSION_BUILD), MAKE_VERSION(5,1,18), UG_Range},
+  { MAKE_VERSION(5,1,17), MAKE_VERSION(5,1,0), UG_Range},
   { MAKE_VERSION(5,0,NDB_VERSION_BUILD), MAKE_VERSION(5,0,12), UG_Range},
   { MAKE_VERSION(5,0,11), MAKE_VERSION(5,0,2), UG_Range},
   { MAKE_VERSION(4,1,NDB_VERSION_BUILD), MAKE_VERSION(4,1,15), UG_Range },

--- 1.76/mysql-test/t/show_check.test	2007-05-23 01:51:45 -07:00
+++ 1.77/mysql-test/t/show_check.test	2007-05-23 01:51:45 -07:00
@@ -543,11 +543,6 @@
 #
 
 --disable_result_log
-show full plugin;
---enable_result_log
-show warnings;
---disable_result_log
-show plugin;
 show plugins;
 --enable_result_log
 

--- 1.230/sql/set_var.cc	2007-05-23 01:51:45 -07:00
+++ 1.231/sql/set_var.cc	2007-05-23 01:51:45 -07:00
@@ -236,9 +236,6 @@
 							      param_age_threshold));
 static sys_var_bool_ptr	sys_local_infile(&vars, "local_infile",
 					 &opt_local_infile);
-static sys_var_trust_routine_creators
-sys_trust_routine_creators(&vars, "log_bin_trust_routine_creators",
-                           &trust_function_creators);
 static sys_var_bool_ptr       
 sys_trust_function_creators(&vars, "log_bin_trust_function_creators",
                             &trust_function_creators);
@@ -428,8 +425,6 @@
                                &SV::updatable_views_with_limit,
                                &updatable_views_with_limit_typelib);
 
-static sys_var_thd_table_type  sys_table_type(&vars, "table_type",
-				       &SV::table_plugin);
 static sys_var_thd_storage_engine sys_storage_engine(&vars, "storage_engine",
 				       &SV::table_plugin);
 static sys_var_bool_ptr	sys_sync_frm(&vars, "sync_frm", &opt_sync_frm);
@@ -3245,24 +3240,6 @@
   return 0;
 }
 
-void sys_var_thd_table_type::warn_deprecated(THD *thd)
-{
-  WARN_DEPRECATED(thd, "5.2", "table_type", "'storage_engine'");
-}
-
-void sys_var_thd_table_type::set_default(THD *thd, enum_var_type type)
-{
-  warn_deprecated(thd);
-  sys_var_thd_storage_engine::set_default(thd, type);
-}
-
-bool sys_var_thd_table_type::update(THD *thd, set_var *var)
-{
-  warn_deprecated(thd);
-  return sys_var_thd_storage_engine::update(thd, var);
-}
-
-
 /****************************************************************************
  Functions to handle sql_mode
 ****************************************************************************/
@@ -3504,24 +3481,6 @@
   return 0;
 }
 
-
-void sys_var_trust_routine_creators::warn_deprecated(THD *thd)
-{
-  WARN_DEPRECATED(thd, "5.2", "log_bin_trust_routine_creators",
-                      "'log_bin_trust_function_creators'");
-}
-
-void sys_var_trust_routine_creators::set_default(THD *thd, enum_var_type type)
-{
-  warn_deprecated(thd);
-  sys_var_bool_ptr::set_default(thd, type);
-}
-
-bool sys_var_trust_routine_creators::update(THD *thd, set_var *var)
-{
-  warn_deprecated(thd);
-  return sys_var_bool_ptr::update(thd, var);
-}
 
 bool sys_var_opt_readonly::update(THD *thd, set_var *var)
 {

--- 1.106/sql/set_var.h	2007-05-23 01:51:45 -07:00
+++ 1.107/sql/set_var.h	2007-05-23 01:51:45 -07:00
@@ -492,18 +492,6 @@
   byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base);
 };
 
-class sys_var_thd_table_type :public sys_var_thd_storage_engine
-{
-public:
-  sys_var_thd_table_type(sys_var_chain *chain, const char *name_arg, 
-                         plugin_ref SV::*offset_arg)
-    :sys_var_thd_storage_engine(chain, name_arg, offset_arg)
-  {}
-  void warn_deprecated(THD *thd);
-  void set_default(THD *thd, enum_var_type type);
-  bool update(THD *thd, set_var *var);
-};
-
 class sys_var_thd_bit :public sys_var_thd
 {
   sys_check_func check_func;
@@ -911,19 +899,6 @@
   SHOW_TYPE show_type() { return SHOW_INT; }
   byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base);
 };
-
-class sys_var_trust_routine_creators :public sys_var_bool_ptr
-{
-  /* We need a derived class only to have a warn_deprecated() */
-public:
-  sys_var_trust_routine_creators(sys_var_chain *chain, const char *name_arg, 
-                                 my_bool *value_arg) :
-    sys_var_bool_ptr(chain, name_arg, value_arg) {};
-  void warn_deprecated(THD *thd);
-  void set_default(THD *thd, enum_var_type type);
-  bool update(THD *thd, set_var *var);
-};
-
 
 /**
   Handler for setting the system variable --read-only.

--- 1.61/scripts/mysql_system_tables_fix.sql	2007-05-23 01:51:45 -07:00
+++ 1.62/scripts/mysql_system_tables_fix.sql	2007-05-23 01:51:45 -07:00
@@ -328,7 +328,7 @@
     COLLATE utf8_general_ci NOT NULL AFTER Routine_name;
 
 ALTER TABLE procs_priv
-  MODIFY Timestamp timestamp(14) AFTER Proc_priv;
+  MODIFY Timestamp timestamp AFTER Proc_priv;
 
 #
 # proc

--- 1.6/mysql-test/t/system_mysql_db_fix40123.test	2007-05-23 01:51:45 -07:00
+++ 1.7/mysql-test/t/system_mysql_db_fix40123.test	2007-05-23 01:51:45 -07:00
@@ -30,7 +30,7 @@
 # create system tables as in mysql-4.1.23
 # created by executing "./mysql_create_system_tables real ."
 
-set table_type=myisam;
+set storage_engine=myisam;
 CREATE TABLE db (   Host char(60) binary DEFAULT '' NOT NULL,   Db char(64) binary DEFAULT '' NOT NULL,   User char(16) binary DEFAULT '' NOT NULL,   Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,   Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,   Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,   Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,   Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,   Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,   Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,   References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,   Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,   Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,   Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,   Lock_tables_pri!
 v enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db,User), KEY User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
 INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
 INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
@@ -45,8 +45,8 @@
 CREATE TABLE func (   name char(64) binary DEFAULT '' NOT NULL,   ret tinyint(1) DEFAULT '0' NOT NULL,   dl char(128) DEFAULT '' NOT NULL,   type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL,   PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin   comment='User defined functions';
 
 
-CREATE TABLE tables_priv (   Host char(60) binary DEFAULT '' NOT NULL,   Db char(64) binary DEFAULT '' NOT NULL,   User char(16) binary DEFAULT '' NOT NULL,   Table_name char(64) binary DEFAULT '' NOT NULL,   Grantor char(77) DEFAULT '' NOT NULL,   Timestamp timestamp(14),   Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') COLLATE utf8_general_ci DEFAULT '' NOT NULL,   Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL,   PRIMARY KEY (Host,Db,User,Table_name),   KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin   comment='Table privileges';
-CREATE TABLE columns_priv (   Host char(60) binary DEFAULT '' NOT NULL,   Db char(64) binary DEFAULT '' NOT NULL,   User char(16) binary DEFAULT '' NOT NULL,   Table_name char(64) binary DEFAULT '' NOT NULL,   Column_name char(64) binary DEFAULT '' NOT NULL,   Timestamp timestamp(14),   Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL,   PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin   comment='Column privileges';
+CREATE TABLE tables_priv (   Host char(60) binary DEFAULT '' NOT NULL,   Db char(64) binary DEFAULT '' NOT NULL,   User char(16) binary DEFAULT '' NOT NULL,   Table_name char(64) binary DEFAULT '' NOT NULL,   Grantor char(77) DEFAULT '' NOT NULL,   Timestamp timestamp,   Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') COLLATE utf8_general_ci DEFAULT '' NOT NULL,   Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL,   PRIMARY KEY (Host,Db,User,Table_name),   KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin   comment='Table privileges';
+CREATE TABLE columns_priv (   Host char(60) binary DEFAULT '' NOT NULL,   Db char(64) binary DEFAULT '' NOT NULL,   User char(16) binary DEFAULT '' NOT NULL,   Table_name char(64) binary DEFAULT '' NOT NULL,   Column_name char(64) binary DEFAULT '' NOT NULL,   Timestamp timestamp,   Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL,   PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin   comment='Column privileges';
 
 CREATE TABLE help_topic (   help_topic_id    int unsigned not null,   name             varchar(64) not null,   help_category_id smallint unsigned not null,   description      text not null,   example          text not null,   url              varchar(128) not null,   primary key      (help_topic_id),   unique index     (name) ) engine=MyISAM CHARACTER SET utf8   comment='help topics';
 CREATE TABLE help_category (   help_category_id   smallint unsigned not null,   name               varchar(64) not null,   parent_category_id smallint unsigned null,   url                varchar(128) not null,   primary key        (help_category_id),   unique index       (name) ) engine=MyISAM CHARACTER SET utf8   comment='help categories';

--- 1.11/scripts/mysql_system_tables.sql	2007-05-23 01:51:45 -07:00
+++ 1.12/scripts/mysql_system_tables.sql	2007-05-23 01:51:45 -07:00
@@ -27,9 +27,9 @@
 CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT '', Host char(64) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(64) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper char(64) NOT NULL DEFAULT '', Owner char(64) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) CHARACTER SET utf8 comment='MySQL Foreign Servers table';
 
 
-CREATE TABLE IF NOT EXISTS tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp(14), Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin   comment='Table privileges';
+CREATE TABLE IF NOT EXISTS tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin   comment='Table privileges';
 
-CREATE TABLE IF NOT EXISTS columns_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp(14), Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin   comment='Column privileges';
+CREATE TABLE IF NOT EXISTS columns_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin   comment='Column privileges';
 
 
 CREATE TABLE IF NOT EXISTS help_topic ( help_topic_id int unsigned not null, name char(64) not null, help_category_id smallint unsigned not null, description text not null, example  text not null, url char(128) not null, primary key (help_topic_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8   comment='help topics';
@@ -62,7 +62,7 @@
 CREATE TABLE IF NOT EXISTS proc ( db char(64) collate utf8_bin DEFAULT '' NOT NULL, name  char(64) DEFAULT '' NOT NULL, type  enum('FUNCTION','PROCEDURE') NOT NULL, specific_name char(64) DEFAULT '' NOT NULL, language char(64) DEFAULT 'SQL' NOT NULL, sql_data_access enum('CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA' ) DEFAULT 'CONTAINS_SQL' NOT NULL, is_deterministic  enum('YES','NO') DEFAULT 'NO' NOT NULL, security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL, param_list  blob NOT NULL, returns char(64) DEFAULT '' NOT NULL, body  longblob NOT NULL, definer char(77) collate utf8_bin DEFAULT '' NOT NULL, created timestamp, modified timestamp, sql_mode set( 'REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'NOT_USED', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'MYSQL40', 'ANSI', 'NO_AUT!
 O_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE' ) DEFAULT '' NOT NULL, comment char(64) collate utf8_bin DEFAULT '' NOT NULL, PRIMARY KEY (db,name,type) ) engine=MyISAM character set utf8 comment='Stored Procedures';
 
 
-CREATE TABLE IF NOT EXISTS procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Routine_name char(64) binary DEFAULT '' NOT NULL, Routine_type enum('FUNCTION','PROCEDURE') NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Timestamp timestamp(14), PRIMARY KEY (Host,Db,User,Routine_name,Routine_type), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin   comment='Procedure privileges';
+CREATE TABLE IF NOT EXISTS procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Routine_name char(64) binary DEFAULT '' NOT NULL, Routine_type enum('FUNCTION','PROCEDURE') NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Timestamp timestamp, PRIMARY KEY (Host,Db,User,Routine_name,Routine_type), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin   comment='Procedure privileges';
 
 
 delimiter ;;

--- 1.15/mysql-test/r/sp-code.result	2007-05-23 01:51:45 -07:00
+++ 1.16/mysql-test/r/sp-code.result	2007-05-23 01:51:45 -07:00
@@ -155,11 +155,11 @@
 0	stmt 9 "drop temporary table if exists sudoku..."
 1	stmt 1 "create temporary table sudoku_work ( ..."
 2	stmt 1 "create temporary table sudoku_schedul..."
-3	stmt 95 "call sudoku_init()"
+3	stmt 91 "call sudoku_init()"
 4	jump_if_not 7(8) p_naive@0
 5	stmt 4 "update sudoku_work set cnt = 0 where ..."
 6	jump 8
-7	stmt 95 "call sudoku_count()"
+7	stmt 91 "call sudoku_count()"
 8	stmt 6 "insert into sudoku_schedule (row,col)..."
 9	set v_scounter@2 0
 10	set v_i@3 1

--- 1.124/mysql-test/r/sp-error.result	2007-05-23 01:51:45 -07:00
+++ 1.125/mysql-test/r/sp-error.result	2007-05-23 01:51:45 -07:00
@@ -917,10 +917,6 @@
 ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.
 CREATE FUNCTION bug_13627_f() returns int BEGIN DROP TRIGGER test1; return 1; END |
 ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.
-CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN load table t1 from master; END |
-ERROR 0A000: LOAD TABLE is not allowed in stored procedures
-CREATE FUNCTION bug_13627_f() returns int BEGIN load table t1 from master; return 1; END |
-ERROR 0A000: LOAD TABLE is not allowed in stored procedures
 CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN create table t2 (a int); END |
 ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.
 CREATE FUNCTION bug_13627_f() returns int BEGIN create table t2 (a int); return 1; END |
@@ -1095,18 +1091,6 @@
 CREATE FUNCTION bug13012() RETURNS INT
 BEGIN
 REPAIR TABLE t1;
-RETURN 1;
-END|
-ERROR 0A000: Not allowed to return a result set from a function
-CREATE FUNCTION bug13012() RETURNS INT
-BEGIN
-BACKUP TABLE t1 TO '/tmp';
-RETURN 1;
-END|
-ERROR 0A000: Not allowed to return a result set from a function
-CREATE FUNCTION bug13012() RETURNS INT
-BEGIN
-RESTORE TABLE t1 FROM '/tmp';
 RETURN 1;
 END|
 ERROR 0A000: Not allowed to return a result set from a function

--- 1.269/mysql-test/r/sp.result	2007-05-23 01:51:45 -07:00
+++ 1.270/mysql-test/r/sp.result	2007-05-23 01:51:45 -07:00
@@ -4396,17 +4396,10 @@
 create procedure bug13012()
 BEGIN
 REPAIR TABLE t1;
-BACKUP TABLE t1 to '../tmp';
-DROP TABLE t1;
-RESTORE TABLE t1 FROM '../tmp';
 END|
 call bug13012()|
 Table	Op	Msg_type	Msg_text
 test.t1	repair	status	OK
-Table	Op	Msg_type	Msg_text
-test.t1	backup	status	OK
-Table	Op	Msg_type	Msg_text
-test.t1	restore	status	OK
 drop procedure bug13012|
 create view v1 as select * from t1|
 create procedure bug13012()

--- 1.120/mysql-test/t/sp-error.test	2007-05-23 01:51:45 -07:00
+++ 1.121/mysql-test/t/sp-error.test	2007-05-23 01:51:45 -07:00
@@ -1321,11 +1321,6 @@
 -- error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
 CREATE FUNCTION bug_13627_f() returns int BEGIN DROP TRIGGER test1; return 1; END |
 
--- error ER_SP_BADSTATEMENT
-CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN load table t1 from master; END |
--- error ER_SP_BADSTATEMENT
-CREATE FUNCTION bug_13627_f() returns int BEGIN load table t1 from master; return 1; END |
-
 -- error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
 CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN create table t2 (a int); END |
 -- error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
@@ -1563,18 +1558,6 @@
 CREATE FUNCTION bug13012() RETURNS INT
 BEGIN
   REPAIR TABLE t1;
-  RETURN 1;
-END|
---error ER_SP_NO_RETSET
-CREATE FUNCTION bug13012() RETURNS INT
-BEGIN
-  BACKUP TABLE t1 TO '/tmp';
-  RETURN 1;
-END|
---error ER_SP_NO_RETSET
-CREATE FUNCTION bug13012() RETURNS INT
-BEGIN
-  RESTORE TABLE t1 FROM '/tmp';
   RETURN 1;
 END|
 create table t1 (a int)|

--- 1.235/mysql-test/t/sp.test	2007-05-23 01:51:45 -07:00
+++ 1.236/mysql-test/t/sp.test	2007-05-23 01:51:45 -07:00
@@ -5251,16 +5251,12 @@
 #
 --disable_warnings
 drop procedure if exists bug13012|
-# Disable warnings also for BACKUP/RESTORE: they are deprecated.
+--enable_warnings
 create procedure bug13012()
 BEGIN
   REPAIR TABLE t1;
-  BACKUP TABLE t1 to '../tmp';
-  DROP TABLE t1;
-  RESTORE TABLE t1 FROM '../tmp';
 END|
 call bug13012()|
---enable_warnings
 drop procedure bug13012|
 create view v1 as select * from t1|
 create procedure bug13012()

--- 1.267/sql/sp_head.cc	2007-05-23 01:51:45 -07:00
+++ 1.268/sql/sp_head.cc	2007-05-23 01:51:45 -07:00
@@ -161,7 +161,6 @@
     }
     /* fallthrough */
   case SQLCOM_ANALYZE:
-  case SQLCOM_BACKUP_TABLE:
   case SQLCOM_OPTIMIZE:
   case SQLCOM_PRELOAD_KEYS:
   case SQLCOM_ASSIGN_TO_KEYCACHE:
@@ -206,7 +205,6 @@
   case SQLCOM_SHOW_VARIABLES:
   case SQLCOM_SHOW_WARNS:
   case SQLCOM_REPAIR:
-  case SQLCOM_RESTORE_TABLE:
     flags= sp_head::MULTI_RESULTS;
     break;
   /*
@@ -258,7 +256,6 @@
   case SQLCOM_COMMIT:
   case SQLCOM_ROLLBACK:
   case SQLCOM_LOAD:
-  case SQLCOM_LOAD_MASTER_DATA:
   case SQLCOM_LOCK_TABLES:
   case SQLCOM_CREATE_PROCEDURE:
   case SQLCOM_CREATE_SPFUNCTION:

--- 1.37/BitKeeper/triggers/post-commit	2007-05-23 01:51:45 -07:00
+++ 1.38/BitKeeper/triggers/post-commit	2007-05-23 01:51:45 -07:00
@@ -5,7 +5,7 @@
 COMMITS=commits@stripped
 DOCS=docs-commit@stripped
 LIMIT=10000
-VERSION="5.1"
+VERSION="5.2"
 BKROOT=`bk root`
 
 if [ -x /usr/sbin/sendmail ]; then

--- 1.45/mysql-test/r/rpl_000015.result	2007-05-23 01:51:45 -07:00
+++ 1.46/mysql-test/r/rpl_000015.result	2007-05-23 01:51:45 -07:00
@@ -5,12 +5,8 @@
 reset slave;
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
-change master to master_host='127.0.0.1';
-show slave status;
-Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
-#	127.0.0.1	test	DEFAULT_MASTER_PORT	7		4	#	#		No	No							0		0	0	#	None		0	No						#	No
 change master to master_host='127.0.0.1',master_user='root',
-master_password='',master_port=MASTER_PORT;
+master_password='',master_port=MASTER_PORT, MASTER_CONNECT_RETRY=7;
 show slave status;
 Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master	Master_SSL_Verify_Server_Cert
 #	127.0.0.1	root	MASTER_PORT	7		4	#	#		No	No							0		0	0	#	None		0	No						#	No

--- 1.76/sql/repl_failsafe.cc	2007-05-23 01:51:45 -07:00
+++ 1.77/sql/repl_failsafe.cc	2007-05-23 01:51:45 -07:00
@@ -678,322 +678,5 @@
   DBUG_RETURN(FALSE);
 }
 
-
-int connect_to_master(THD *thd, MYSQL* mysql, MASTER_INFO* mi)
-{
-  DBUG_ENTER("connect_to_master");
-
-  if (!mi->host || !*mi->host)			/* empty host */
-  {
-    strmov(mysql->net.last_error, "Master is not configured");
-    DBUG_RETURN(1);
-  }
-  mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (char *) &slave_net_timeout);
-  mysql_options(mysql, MYSQL_OPT_READ_TIMEOUT, (char *) &slave_net_timeout);
-
-#ifdef HAVE_OPENSSL
-  if (mi->ssl)
-  {
-    mysql_ssl_set(mysql, 
-        mi->ssl_key[0]?mi->ssl_key:0,
-        mi->ssl_cert[0]?mi->ssl_cert:0,
-        mi->ssl_ca[0]?mi->ssl_ca:0, 
-        mi->ssl_capath[0]?mi->ssl_capath:0,
-        mi->ssl_cipher[0]?mi->ssl_cipher:0);
-    mysql_options(mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
-                  &mi->ssl_verify_server_cert);
-  }
-#endif
-    
-  mysql_options(mysql, MYSQL_SET_CHARSET_NAME, default_charset_info->csname);
-  mysql_options(mysql, MYSQL_SET_CHARSET_DIR, (char *) charsets_dir);
-  if (!mysql_real_connect(mysql, mi->host, mi->user, mi->password, 0,
-			mi->port, 0, 0))
-    DBUG_RETURN(1);
-  mysql->reconnect= 1;
-  DBUG_RETURN(0);
-}
-
-
-static inline void cleanup_mysql_results(MYSQL_RES* db_res,
-					 MYSQL_RES** cur, MYSQL_RES** start)
-{
-  for (; cur >= start; --cur)
-  {
-    if (*cur)
-      mysql_free_result(*cur);
-  }
-  mysql_free_result(db_res);
-}
-
-
-static int fetch_db_tables(THD *thd, MYSQL *mysql, const char *db,
-			   MYSQL_RES *table_res, MASTER_INFO *mi)
-{
-  MYSQL_ROW row;
-  for (row = mysql_fetch_row(table_res); row;
-       row = mysql_fetch_row(table_res))
-  {
-    TABLE_LIST table;
-    const char* table_name= row[0];
-    int error;
-    if (rpl_filter->is_on())
-    {
-      bzero((char*) &table, sizeof(table)); //just for safe
-      table.db= (char*) db;
-      table.table_name= (char*) table_name;
-      table.updating= 1;
-
-      if (!rpl_filter->tables_ok(thd->db, &table))
-	continue;
-    }
-    /* download master's table and overwrite slave's table */
-    if ((error= fetch_master_table(thd, db, table_name, mi, mysql, 1)))
-      return error;
-  }
-  return 0;
-}
-
-/*
-  Load all MyISAM tables from master to this slave.
-
-  REQUIREMENTS
-   - No active transaction (flush_relay_log_info would not work in this case)
-*/
-
-bool load_master_data(THD* thd)
-{
-  MYSQL mysql;
-  MYSQL_RES* master_status_res = 0;
-  int error = 0;
-  const char* errmsg=0;
-  int restart_thread_mask;
-  HA_CREATE_INFO create_info;
-
-  mysql_init(&mysql);
-
-  /*
-    We do not want anyone messing with the slave at all for the entire
-    duration of the data load.
-  */
-  pthread_mutex_lock(&LOCK_active_mi);
-  lock_slave_threads(active_mi);
-  init_thread_mask(&restart_thread_mask,active_mi,0 /*not inverse*/);
-  if (restart_thread_mask &&
-      (error=terminate_slave_threads(active_mi,restart_thread_mask,
-				     1 /*skip lock*/)))
-  {
-    my_message(error, ER(error), MYF(0));
-    unlock_slave_threads(active_mi);
-    pthread_mutex_unlock(&LOCK_active_mi);
-    return TRUE;
-  }
-  
-  if (connect_to_master(thd, &mysql, active_mi))
-  {
-    my_error(error= ER_CONNECT_TO_MASTER, MYF(0), mysql_error(&mysql));
-    goto err;
-  }
-
-  // now that we are connected, get all database and tables in each
-  {
-    MYSQL_RES *db_res, **table_res, **table_res_end, **cur_table_res;
-    uint num_dbs;
-
-    if (mysql_real_query(&mysql, STRING_WITH_LEN("SHOW DATABASES")) ||
-	!(db_res = mysql_store_result(&mysql)))
-    {
-      my_error(error= ER_QUERY_ON_MASTER, MYF(0), mysql_error(&mysql));
-      goto err;
-    }
-
-    if (!(num_dbs = (uint) mysql_num_rows(db_res)))
-      goto err;
-    /*
-      In theory, the master could have no databases at all
-      and run with skip-grant
-    */
-
-    if (!(table_res = (MYSQL_RES**)thd->alloc(num_dbs * sizeof(MYSQL_RES*))))
-    {
-      my_message(error = ER_OUTOFMEMORY, ER(ER_OUTOFMEMORY), MYF(0));
-      goto err;
-    }
-
-    /*
-      This is a temporary solution until we have online backup
-      capabilities - to be replaced once online backup is working
-      we wait to issue FLUSH TABLES WITH READ LOCK for as long as we
-      can to minimize the lock time.
-    */
-    if (mysql_real_query(&mysql,
-                         STRING_WITH_LEN("FLUSH TABLES WITH READ LOCK")) ||
-	mysql_real_query(&mysql, STRING_WITH_LEN("SHOW MASTER STATUS")) ||
-	!(master_status_res = mysql_store_result(&mysql)))
-    {
-      my_error(error= ER_QUERY_ON_MASTER, MYF(0), mysql_error(&mysql));
-      goto err;
-    }
-
-    /*
-      Go through every table in every database, and if the replication
-      rules allow replicating it, get it
-    */
-
-    table_res_end = table_res + num_dbs;
-
-    for (cur_table_res = table_res; cur_table_res < table_res_end;
-	 cur_table_res++)
-    {
-      // since we know how many rows we have, this can never be NULL
-      MYSQL_ROW row = mysql_fetch_row(db_res);
-      char* db = row[0];
-
-      /*
-	Do not replicate databases excluded by rules. We also test
-	replicate_wild_*_table rules (replicate_wild_ignore_table='db1.%' will
-	be considered as "ignore the 'db1' database as a whole, as it already
-	works for CREATE DATABASE and DROP DATABASE).
-	Also skip 'mysql' database - in most cases the user will
-	mess up and not exclude mysql database with the rules when
-	he actually means to - in this case, he is up for a surprise if
-	his priv tables get dropped and downloaded from master
-	TODO - add special option, not enabled
-	by default, to allow inclusion of mysql database into load
-	data from master
-      */
-
-      if (!rpl_filter->db_ok(db) || 
-	  !rpl_filter->db_ok_with_wild_table(db) || 
-	  !strcmp(db,"mysql") ||
-          is_schema_db(db))
-      {
-	*cur_table_res = 0;
-	continue;
-      }
-
-      bzero((char*) &create_info, sizeof(create_info));
-      create_info.options= HA_LEX_CREATE_IF_NOT_EXISTS;
-
-      if (mysql_create_db(thd, db, &create_info, 1))
-      {
-	cleanup_mysql_results(db_res, cur_table_res - 1, table_res);
-	goto err;
-      }
-
-      if (mysql_select_db(&mysql, db) ||
-	  mysql_real_query(&mysql, STRING_WITH_LEN("SHOW TABLES")) ||
-	  !(*cur_table_res = mysql_store_result(&mysql)))
-      {
-	my_error(error= ER_QUERY_ON_MASTER, MYF(0), mysql_error(&mysql));
-	cleanup_mysql_results(db_res, cur_table_res - 1, table_res);
-	goto err;
-      }
-
-      if ((error = fetch_db_tables(thd,&mysql,db,*cur_table_res,active_mi)))
-      {
-	// we do not report the error - fetch_db_tables handles it
-	cleanup_mysql_results(db_res, cur_table_res, table_res);
-	goto err;
-      }
-    }
-
-    cleanup_mysql_results(db_res, cur_table_res - 1, table_res);
-
-    // adjust replication coordinates from the master
-    if (master_status_res)
-    {
-      MYSQL_ROW row = mysql_fetch_row(master_status_res);
-
-      /*
-	We need this check because the master may not be running with
-	log-bin, but it will still allow us to do all the steps
-	of LOAD DATA FROM MASTER - no reason to forbid it, really,
-	although it does not make much sense for the user to do it
-      */
-      if (row && row[0] && row[1])
-      {
-        /*
-          If the slave's master info is not inited, we init it, then we write
-          the new coordinates to it. Must call init_master_info() *before*
-          setting active_mi, because init_master_info() sets active_mi with
-          defaults.
-        */
-        int error_2;
-
-        if (init_master_info(active_mi, master_info_file, relay_log_info_file, 
-			     0, (SLAVE_IO | SLAVE_SQL)))
-          my_message(ER_MASTER_INFO, ER(ER_MASTER_INFO), MYF(0));
-	strmake(active_mi->master_log_name, row[0],
-		sizeof(active_mi->master_log_name));
-	active_mi->master_log_pos= my_strtoll10(row[1], (char**) 0, &error_2);
-        /* at least in recent versions, the condition below should be false */
-	if (active_mi->master_log_pos < BIN_LOG_HEADER_SIZE)
-	  active_mi->master_log_pos = BIN_LOG_HEADER_SIZE;
-        /*
-          Relay log's IO_CACHE may not be inited (even if we are sure that some
-          host was specified; there could have been a problem when replication
-          started, which led to relay log's IO_CACHE to not be inited.
-        */
-        if (flush_master_info(active_mi, 0))
-          sql_print_error("Failed to flush master info file");
-      }
-      mysql_free_result(master_status_res);
-    }
-
-    if (mysql_real_query(&mysql, STRING_WITH_LEN("UNLOCK TABLES")))
-    {
-      my_error(error= ER_QUERY_ON_MASTER, MYF(0), mysql_error(&mysql));
-      goto err;
-    }
-  }
-  thd->proc_info="purging old relay logs";
-  if (purge_relay_logs(&active_mi->rli,thd,
-		       0 /* not only reset, but also reinit */,
-		       &errmsg))
-  {
-    my_error(ER_RELAY_LOG_FAIL, MYF(0), errmsg);
-    unlock_slave_threads(active_mi);
-    pthread_mutex_unlock(&LOCK_active_mi);
-    return TRUE;
-  }
-  pthread_mutex_lock(&active_mi->rli.data_lock);
-  active_mi->rli.group_master_log_pos = active_mi->master_log_pos;
-  strmake(active_mi->rli.group_master_log_name,active_mi->master_log_name,
-	  sizeof(active_mi->rli.group_master_log_name)-1);
-  /*
-     Cancel the previous START SLAVE UNTIL, as the fact to download
-     a new copy logically makes UNTIL irrelevant.
-  */
-  active_mi->rli.clear_until_condition();
-
-  /*
-    No need to update rli.event* coordinates, they will be when the slave
-    threads start ; only rli.group* coordinates are necessary here.
-  */
-  flush_relay_log_info(&active_mi->rli);
-  pthread_cond_broadcast(&active_mi->rli.data_cond);
-  pthread_mutex_unlock(&active_mi->rli.data_lock);
-  thd->proc_info = "starting slave";
-  if (restart_thread_mask)
-  {
-    error=start_slave_threads(0 /* mutex not needed */,
-			      1 /* wait for start */,
-			      active_mi,master_info_file,relay_log_info_file,
-			      restart_thread_mask);
-  }
-
-err:
-  unlock_slave_threads(active_mi);
-  pthread_mutex_unlock(&LOCK_active_mi);
-  thd->proc_info = 0;
-
-  mysql_close(&mysql); // safe to call since we always do mysql_init()
-  if (!error)
-    send_ok(thd);
-
-  return error;
-}
-
 #endif /* HAVE_REPLICATION */
 

--- 1.168/sql/sql_repl.cc	2007-05-23 01:51:45 -07:00
+++ 1.169/sql/sql_repl.cc	2007-05-23 01:51:45 -07:00
@@ -977,14 +977,8 @@
 			       &errmsg)))
     goto err;
 
-  /*
-    Clear master's log coordinates and reset host/user/etc to the values
-    specified in mysqld's options (only for good display of SHOW SLAVE STATUS;
-    next init_master_info() (in start_slave() for example) would have set them
-    the same way; but here this is for the case where the user does SHOW SLAVE
-    STATUS; before doing START SLAVE;
-  */
-  init_master_info_with_options(mi);
+  /* Clear master's log coordinates */
+  init_master_log_pos(mi);
   /*
      Reset errors (the idea is that we forget about the
      old master).

--- 1.17/mysql-test/r/sp_trans.result	2007-05-23 01:51:45 -07:00
+++ 1.18/mysql-test/r/sp_trans.result	2007-05-23 01:51:45 -07:00
@@ -533,9 +533,7 @@
 CREATE DATABASE db_bug7787|
 use db_bug7787|
 CREATE PROCEDURE p1()
-SHOW INNODB STATUS; |
-Warnings:
-Warning	1543	The syntax 'SHOW INNODB STATUS' is deprecated and will be removed in MySQL 5.2. Please use 'SHOW ENGINE INNODB STATUS' instead
+SHOW ENGINE INNODB STATUS; |
 GRANT EXECUTE ON PROCEDURE p1 TO user_bug7787@localhost|
 DROP DATABASE db_bug7787|
 drop user user_bug7787@localhost|

--- 1.14/mysql-test/t/sp_trans.test	2007-05-23 01:51:45 -07:00
+++ 1.15/mysql-test/t/sp_trans.test	2007-05-23 01:51:45 -07:00
@@ -564,7 +564,7 @@
 # Test.
 
 CREATE PROCEDURE p1()
-  SHOW INNODB STATUS; |
+  SHOW ENGINE INNODB STATUS; |
 
 GRANT EXECUTE ON PROCEDURE p1 TO user_bug7787@localhost|
 

--- 1.236/tests/mysql_client_test.c	2007-05-23 01:51:45 -07:00
+++ 1.237/tests/mysql_client_test.c	2007-05-23 01:51:45 -07:00
@@ -1486,7 +1486,7 @@
   myquery(rc);
 
   rc= mysql_query(mysql, "CREATE TABLE test_prepare_field_result(int_c int, "
-                         "var_c varchar(50), ts_c timestamp(14), "
+                         "var_c varchar(50), ts_c timestamp, "
                          "char_c char(4), date_c date, extra tinyint)");
   myquery(rc);
 
@@ -4240,11 +4240,11 @@
   myquery(rc);
 
   rc= mysql_query(mysql, "CREATE TABLE test_bind_result(c1 date, c2 time, \
-                                                        c3 timestamp(14), \
+                                                        c3 timestamp, \
                                                         c4 year, \
                                                         c5 datetime, \
-                                                        c6 timestamp(4), \
-                                                        c7 timestamp(6))");
+                                                        c6 timestamp, \
+                                                        c7 timestamp)");
   myquery(rc);
 
   rc= mysql_query(mysql, "SET SQL_MODE=''");
@@ -4558,7 +4558,7 @@
                " c12 numeric(8, 4),"
                " c13 date,"
                " c14 datetime,"
-               " c15 timestamp(14),"
+               " c15 timestamp,"
                " c16 time,"
                " c17 year,"
                " c18 bit,"
@@ -5589,7 +5589,7 @@
   }
   if (mysql_query(mysql, "CREATE TABLE test_table(col1 int, col2 varchar(50), \
                                                  col3 smallint, \
-                                                 col4 timestamp(14))"))
+                                                 col4 timestamp)"))
   {
     fprintf(stderr, "\n create table failed");
     fprintf(stderr, "\n %s", mysql_error(mysql));
@@ -6485,7 +6485,7 @@
   rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_date");
   myquery(rc);
 
-  rc= mysql_query(mysql, "CREATE TABLE test_date(c1 TIMESTAMP(14), \
+  rc= mysql_query(mysql, "CREATE TABLE test_date(c1 TIMESTAMP, \
                                                  c2 TIME, \
                                                  c3 DATETIME, \
                                                  c4 DATE)");
@@ -6551,10 +6551,10 @@
   rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_date");
   myquery(rc);
 
-  rc= mysql_query(mysql, "CREATE TABLE test_date(c1 TIMESTAMP(10), \
-                                                 c2 TIMESTAMP(14), \
+  rc= mysql_query(mysql, "CREATE TABLE test_date(c1 TIMESTAMP, \
+                                                 c2 TIMESTAMP, \
                                                  c3 TIMESTAMP, \
-                                                 c4 TIMESTAMP(6))");
+                                                 c4 TIMESTAMP)");
 
   myquery(rc);
 
@@ -7231,7 +7231,7 @@
   mysql_free_result(result);
   mysql_stmt_close(stmt);
 
-  stmt= mysql_simple_prepare(mysql, "SELECT @@table_type");
+  stmt= mysql_simple_prepare(mysql, "SELECT @@storage_engine");
   check_stmt(stmt);
 
   rc= mysql_stmt_execute(stmt);
@@ -7256,7 +7256,7 @@
 
   mysql_stmt_close(stmt);
 
-  stmt= mysql_simple_prepare(mysql, "SELECT @@table_type");
+  stmt= mysql_simple_prepare(mysql, "SELECT @@storage_engine");
   check_stmt(stmt);
 
   result= mysql_stmt_result_metadata(stmt);
@@ -7269,7 +7269,7 @@
   DIE_UNLESS(1 == my_process_stmt_result(stmt));
 
   verify_prepare_field(result, 0,
-                       "@@table_type", "",   /* field and its org name */
+                       "@@storage_engine", "",   /* field and its org name */
                        mysql_get_server_version(mysql) <= 50000 ?
                        MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
                        "", "",              /* table and its org name */
@@ -8290,7 +8290,7 @@
 
   myquery(rc);
 
-  rc= mysql_query(mysql, "create table t1(c1 int primary key auto_increment, c2 char(10), c3 timestamp(14))");
+  rc= mysql_query(mysql, "create table t1(c1 int primary key auto_increment, c2 char(10), c3 timestamp)");
   myquery(rc);
 
   rc= mysql_query(mysql, "insert into t1(c2) values('venu'), ('mysql'), ('open'), ('source')");
Thread
bk commit into 5.2 tree (acurtis:1.2526)antony23 May