List:Internals« Previous MessageNext Message »
From:Lars Thalmann Date:April 19 2005 9:10am
Subject:bk commit into 5.1 tree (lars:1.1800)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of lars. When lars does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1800 05/04/19 11:09:54 lars@stripped +12 -0
  Merging 5.0->5.1

  configure.in
    1.255 05/04/19 11:09:46 lars@stripped +0 -1
    Merging 5.0->5.1

  sql/sql_parse.cc
    1.442 05/04/19 11:07:39 lars@stripped +0 -0
    Auto merged

  sql/sql_class.h
    1.232 05/04/19 11:07:39 lars@stripped +0 -0
    Auto merged

  sql/mysqld.cc
    1.445 05/04/19 11:07:38 lars@stripped +0 -0
    Auto merged

  sql/mysql_priv.h
    1.289 05/04/19 11:07:38 lars@stripped +0 -0
    Auto merged

  sql/log.cc
    1.160 05/04/19 11:07:38 lars@stripped +0 -0
    Auto merged

  sql/Makefile.am
    1.106 05/04/19 11:07:37 lars@stripped +0 -0
    Auto merged

  scripts/mysql_fix_privilege_tables.sql
    1.17 05/04/19 11:07:37 lars@stripped +0 -0
    Auto merged

  scripts/mysql_create_system_tables.sh
    1.18 05/04/19 11:07:37 lars@stripped +0 -0
    Auto merged

  mysql-test/r/grant.result
    1.40 05/04/19 11:07:37 lars@stripped +0 -0
    Auto merged

  BitKeeper/triggers/post-commit
    1.31 05/04/19 11:07:37 lars@stripped +0 -0
    Auto merged

  BitKeeper/etc/logging_ok
    1.283 05/04/19 11:04:40 lars@stripped +0 -0
    auto-union

# 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:	lars
# Host:	goldfish.(none)
# Root:	/home/bk/mysql-5.1/RESYNC

--- 1.254/configure.in	Fri Apr  1 22:32:05 2005
+++ 1.255/configure.in	Tue Apr 19 11:09:46 2005
@@ -41,7 +41,6 @@
 sinclude(config/ac-macros/ha_example.m4)
 sinclude(config/ac-macros/ha_federated.m4)
 sinclude(config/ac-macros/ha_innodb.m4)
-sinclude(config/ac-macros/ha_isam.m4)
 sinclude(config/ac-macros/ha_ndbcluster.m4)
 sinclude(config/ac-macros/ha_tina.m4)
 sinclude(config/ac-macros/large_file.m4)
@@ -351,11 +350,30 @@
 
   if echo $CXX | grep gcc > /dev/null 2>&1
   then
-    if $CXX -v 2>&1 | grep 'version 3' > /dev/null 2>&1
-    then
-     # Statically link the language support function's found in libsupc++.a
-     LIBS="$LIBS -lsupc++"
-    fi
+    GCC_VERSION=`gcc -v 2>&1 | grep version | sed -e 's/[[^0-9. ]]//g; s/^ *//g; s/ .*//g'`
+    case $SYSTEM_TYPE in
+      *freebsd*)
+        # The libsupc++ library on freebsd with gcc 3.4.2 is dependent on 
+        # libstdc++, disable it  since other solution works fine
+        GCC_VERSION="NOSUPCPP_$GCC_VERSION"
+      ;;
+      *) 
+      ;;
+    esac
+    echo "Using gcc version '$GCC_VERSION'"
+    case "$GCC_VERSION" in
+      3.4.*|3.5.*)
+        # Statically link the language support function's found in libsupc++.a
+        LIBS="$LIBS -lsupc++"
+	echo "Using -libsupc++ for static linking with gcc"
+      ;;
+      *)
+        # Using -lsupc++ doesn't work in gcc 3.3 on SuSE 9.2
+        # (causes link failures when linking things staticly)
+        CXXFLAGS="$CXXFLAGS -DUSE_MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL"
+	echo "Using MYSYS_NEW for static linking with gcc"
+      ;;
+    esac
   fi
 fi
 
@@ -2735,7 +2753,7 @@
  dbug/Makefile scripts/Makefile dnl
  include/Makefile sql-bench/Makefile tools/Makefile dnl
  server-tools/Makefile server-tools/instance-manager/Makefile dnl
- tests/Makefile Docs/Makefile Docs/Images/Makefile support-files/Makefile dnl
+ tests/Makefile Docs/Makefile support-files/Makefile dnl
  support-files/MacOSX/Makefile mysql-test/Makefile dnl
  netware/Makefile dnl
  include/mysql_version.h dnl

--- 1.105/sql/Makefile.am	Fri Apr  1 22:17:22 2005
+++ 1.106/sql/Makefile.am	Tue Apr 19 11:07:37 2005
@@ -49,7 +49,7 @@
 			mysql_priv.h item_geofunc.h sql_bitmap.h \
 			procedure.h sql_class.h sql_lex.h sql_list.h \
 			sql_manager.h sql_map.h sql_string.h unireg.h \
-			field.h handler.h mysqld_suffix.h \
+			sql_error.h field.h handler.h mysqld_suffix.h \
 			ha_myisammrg.h\
 			ha_heap.h ha_myisam.h ha_berkeley.h ha_innodb.h \
 			ha_ndbcluster.h opt_range.h protocol.h \

--- 1.159/sql/log.cc	Fri Apr  1 22:17:22 2005
+++ 1.160/sql/log.cc	Tue Apr 19 11:07:38 2005
@@ -1532,18 +1532,20 @@
   return 0;
 }
 
-
-inline bool sync_binlog(IO_CACHE *cache)
+bool MYSQL_LOG::flush_and_sync()
 {
-  if (sync_binlog_period == ++sync_binlog_counter && sync_binlog_period)
+  int err=0, fd=log_file.file;
+  safe_mutex_assert_owner(&LOCK_log);
+  if (flush_io_cache(&log_file))
+    return 1;
+  if (++sync_binlog_counter >= sync_binlog_period && sync_binlog_period)
   {
     sync_binlog_counter= 0;
-    return my_sync(cache->file, MYF(MY_WME));
+    err=my_sync(fd, MYF(MY_WME));
   }
-  return 0;
+  return err;
 }
 
-
 /*
   Write an event to the binary log
 */
@@ -1677,8 +1679,8 @@
       }
     }
 
-    /* 
-       Write the SQL command 
+    /*
+       Write the SQL command
      */
 
     if (event_info->write(file))
@@ -1686,8 +1688,10 @@
 
     if (file == &log_file) // we are writing to the real log (disk)
     {
-      if (flush_io_cache(file) || sync_binlog(file))
+      if (flush_and_sync())
 	goto err;
+      signal_update();
+      rotate_and_purge(RP_LOCK_LOG_IS_ALREADY_LOCKED);
     }
     error=0;
 
@@ -1700,15 +1704,9 @@
 	my_error(ER_ERROR_ON_WRITE, MYF(0), name, errno);
       write_error=1;
     }
-    if (file == &log_file)
-    {
-      signal_update();
-      rotate_and_purge(RP_LOCK_LOG_IS_ALREADY_LOCKED);
-    }
   }
 
   pthread_mutex_unlock(&LOCK_log);
-
   DBUG_RETURN(error);
 }
 
@@ -1815,7 +1813,7 @@
     if (commit_event->write(&log_file))
       goto err;
 DBUG_skip_commit:
-    if (flush_io_cache(&log_file) || sync_binlog(&log_file))
+    if (flush_and_sync())
       goto err;
     DBUG_EXECUTE_IF("half_binlogged_transaction", abort(););
     if (cache->error)				// Error on read
@@ -1985,26 +1983,26 @@
   SYNOPSIS
     wait_for_update()
     thd			Thread variable
-    master_or_slave     If 0, the caller is the Binlog_dump thread from master;
+    is_slave            If 0, the caller is the Binlog_dump thread from master;
                         if 1, the caller is the SQL thread from the slave. This
                         influences only thd->proc_info.
 
   NOTES
     One must have a lock on LOCK_log before calling this function.
-    This lock will be freed before return! That's required by
+    This lock will be released before return! That's required by
     THD::enter_cond() (see NOTES in sql_class.h).
 */
 
-void MYSQL_LOG::wait_for_update(THD* thd, bool master_or_slave)
+void MYSQL_LOG::wait_for_update(THD* thd, bool is_slave)
 {
   const char *old_msg;
   DBUG_ENTER("wait_for_update");
   old_msg= thd->enter_cond(&update_cond, &LOCK_log,
-                           master_or_slave ?
+                           is_slave ?
                            "Has read all relay log; waiting for the slave I/O "
-                           "thread to update it" : 
+                           "thread to update it" :
                            "Has sent all binlog to slave; waiting for binlog "
-                           "to be updated"); 
+                           "to be updated");
   pthread_cond_wait(&update_cond, &LOCK_log);
   thd->exit_cond(old_msg);
   DBUG_VOID_RETURN;
@@ -2053,7 +2051,12 @@
       my_pwrite(log_file.file, &flags, 1, offset, MYF(0));
     }
 
-    if (my_close(log_file.file,MYF(0)) < 0 && ! write_error)
+    if (my_sync(log_file.file,MYF(MY_WME)) && ! write_error)
+    {
+      write_error=1;
+      sql_print_error(ER(ER_ERROR_ON_WRITE), name, errno);
+    }
+    if (my_close(log_file.file,MYF(MY_WME)) && ! write_error)
     {
       write_error=1;
       sql_print_error(ER(ER_ERROR_ON_WRITE), name, errno);
@@ -2947,8 +2950,10 @@
 
 void TC_LOG_BINLOG::unlog(ulong cookie, my_xid xid)
 {
-  if (thread_safe_dec_and_test(prepared_xids, &LOCK_prep_xids))
+  pthread_mutex_lock(&LOCK_prep_xids);
+  if (--prepared_xids == 0)
     pthread_cond_signal(&COND_prep_xids);
+  pthread_mutex_unlock(&LOCK_prep_xids);
   rotate_and_purge(0);     // as ::write() did not rotate
 }
 

--- 1.288/sql/mysql_priv.h	Thu Apr  7 18:24:08 2005
+++ 1.289/sql/mysql_priv.h	Tue Apr 19 11:07:38 2005
@@ -1125,7 +1125,6 @@
 extern String null_string;
 extern HASH open_cache;
 extern TABLE *unused_tables;
-extern I_List<i_string> binlog_do_db, binlog_ignore_db;
 extern const char* any_db;
 extern struct my_option my_long_options[];
 

--- 1.444/sql/mysqld.cc	Fri Apr  1 22:17:24 2005
+++ 1.445/sql/mysqld.cc	Tue Apr 19 11:07:38 2005
@@ -31,9 +31,6 @@
 #include "ha_innodb.h"
 #endif
 #include "ha_myisam.h"
-#ifdef HAVE_ISAM
-#include "ha_isam.h"
-#endif
 #ifdef HAVE_NDBCLUSTER_DB
 #include "ha_ndbcluster.h"
 #endif
@@ -48,11 +45,6 @@
 #else
 #define OPT_BDB_DEFAULT 0
 #endif
-#ifdef HAVE_ISAM_DB
-#define OPT_ISAM_DEFAULT 1
-#else
-#define OPT_ISAM_DEFAULT 0
-#endif
 #ifdef HAVE_NDBCLUSTER_DB
 #define OPT_NDBCLUSTER_DEFAULT 0
 #if defined(NOT_ENOUGH_TESTED) \
@@ -65,7 +57,6 @@
 #define OPT_NDBCLUSTER_DEFAULT 0
 #endif
 
-#include <nisam.h>
 #include <thr_alarm.h>
 #include <ft_global.h>
 #include <errmsg.h>
@@ -796,15 +787,6 @@
       CloseHandle(hEvent);
     */
   }
-#ifdef HAVE_SMEM
-    /*
-     Send event to smem_event_connect_request for aborting
-    */
-    if (!SetEvent(smem_event_connect_request))
-    {
-      DBUG_PRINT("error",("Got error: %ld from SetEvent of smem_event_connect_request",GetLastError()));
-    }
-#endif  
 #endif
 #elif defined(OS2)
   pthread_cond_signal(&eventShutdown);		// post semaphore
@@ -858,6 +840,18 @@
   else
     sql_print_error(ER(ER_GOT_SIGNAL),my_progname,sig); /* purecov: inspected */
 
+#if defined(HAVE_SMEM) && defined(__WIN__)    
+  /*    
+   Send event to smem_event_connect_request for aborting    
+   */    
+  if (!SetEvent(smem_event_connect_request))    
+  {      
+	  DBUG_PRINT("error",
+		("Got error: %ld from SetEvent of smem_event_connect_request",
+		 GetLastError()));    
+  }
+#endif  
+  
 #if defined(__NETWARE__) || (defined(USE_ONE_SIGNAL_HAND) && !defined(__WIN__) && !defined(OS2))
   my_thread_init();				// If this is a new thread
 #endif
@@ -1032,8 +1026,8 @@
     (void) my_delete(pidfile_name,MYF(0));	// This may not always exist
 #endif
   finish_client_errs();
-  const char **errmsgs= my_error_unregister(ER_ERROR_FIRST, ER_ERROR_LAST);
-  x_free((gptr) errmsgs);	/* Free messages */
+  my_free((gptr) my_error_unregister(ER_ERROR_FIRST, ER_ERROR_LAST),
+          MYF(MY_WME | MY_FAE | MY_ALLOW_ZERO_PTR));
   DBUG_PRINT("quit", ("Error messages freed"));
   /* Tell main we are ready */
   (void) pthread_mutex_lock(&LOCK_thread_count);
@@ -1187,6 +1181,7 @@
 
 err:
   sql_print_error("Fatal error: Can't change to run as user '%s' ;  Please check that the user exists!\n",user);
+  unireg_abort(1);
 #endif
   return NULL;
 }
@@ -1515,6 +1510,7 @@
       thd=thread_cache.get();
       thd->real_id=pthread_self();
       (void) thd->store_globals();
+      thd->thr_create_time= time(NULL);
       threads.append(thd);
       pthread_mutex_unlock(&LOCK_thread_count);
       DBUG_VOID_RETURN;
@@ -2437,8 +2433,10 @@
   {
     struct tm tm_tmp;
     localtime_r(&start_time,&tm_tmp);
-    strmov(system_time_zone, tzname[tm_tmp.tm_isdst != 0 ? 1 : 0]);
-  }
+    strmake(system_time_zone, tzname[tm_tmp.tm_isdst != 0 ? 1 : 0],
+            sizeof(system_time_zone)-1);
+
+ }
 #endif
   /*
     We set SYSTEM time zone as reasonable default and 
@@ -3152,6 +3150,7 @@
 
   if (opt_bootstrap)
   {
+    select_thread_in_use= 0;                    // Allow 'kill' to work
     bootstrap(stdin);
     end_thr_alarm(1);				// Don't allow alarms
     unireg_abort(bootstrap_error ? 1 : 0);
@@ -4344,7 +4343,7 @@
    "Don't try to recover Berkeley DB tables on start.", 0, 0, 0, GET_NO_ARG,
    NO_ARG, 0, 0, 0, 0, 0, 0},
   {"bdb-no-sync", OPT_BDB_NOSYNC,
-   "Disable synchronously flushing logs. This option is deprecated, use --skip-sync-bdb-logs or sync-bdb-logs=0 instead",
+   "This option is deprecated, use --skip-sync-bdb-logs instead",
    //   (gptr*) &opt_sync_bdb_logs, (gptr*) &opt_sync_bdb_logs, 0, GET_BOOL,
    0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
   {"bdb-shared-data", OPT_BDB_SHARED,
@@ -4501,8 +4500,24 @@
 Disable with --skip-innodb-doublewrite.", (gptr*) &innobase_use_doublewrite,
    (gptr*) &innobase_use_doublewrite, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
   {"innodb_fast_shutdown", OPT_INNODB_FAST_SHUTDOWN,
-   "Speeds up server shutdown process.", (gptr*) &innobase_fast_shutdown,
-   (gptr*) &innobase_fast_shutdown, 0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
+   "Speeds up the shutdown process of the InnoDB storage engine. Possible "
+   "values are 0, 1 (faster)"
+   /*
+     NetWare can't close unclosed files, can't automatically kill remaining
+     threads, etc, so on this OS we disable the crash-like InnoDB shutdown.
+   */
+#ifndef __NETWARE__
+   " or 2 (fastest - crash-like)"
+#endif
+   ".",
+   (gptr*) &innobase_fast_shutdown,
+   (gptr*) &innobase_fast_shutdown, 0, GET_ULONG, OPT_ARG, 1, 0,
+#ifndef __NETWARE__
+   2,
+#else
+   1,
+#endif
+   0, 0, 0},
   {"innodb_file_per_table", OPT_INNODB_FILE_PER_TABLE,
    "Stores each InnoDB table to an .ibd file in the database dir.",
    (gptr*) &innobase_file_per_table,
@@ -4553,9 +4568,8 @@
    (gptr*) &global_system_variables.innodb_support_xa,
    0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
 #endif /* End HAVE_INNOBASE_DB */
-  {"isam", OPT_ISAM, "Enable ISAM (if this version of MySQL supports it). \
-Disable with --skip-isam.",
-   (gptr*) &opt_isam, (gptr*) &opt_isam, 0, GET_BOOL, NO_ARG, OPT_ISAM_DEFAULT, 0, 0,
+  {"isam", OPT_ISAM, "Obsolete. ISAM storage engine is no longer supported.",
+   (gptr*) &opt_isam, (gptr*) &opt_isam, 0, GET_BOOL, NO_ARG, 0, 0, 0,
    0, 0, 0},
   {"language", 'L',
    "Client error messages in given language. May be given as a full path.",
@@ -4715,7 +4729,7 @@
    "Specify number of autoincrement values that are prefetched.",
    (gptr*) &global_system_variables.ndb_autoincrement_prefetch_sz,
    (gptr*) &global_system_variables.ndb_autoincrement_prefetch_sz,
-   0, GET_INT, REQUIRED_ARG, 32, 1, 256, 0, 0, 0},
+   0, GET_ULONG, REQUIRED_ARG, 32, 1, 256, 0, 0, 0},
   {"ndb-force-send", OPT_NDB_FORCE_SEND,
    "Force send of buffers to ndb immediately without waiting for "
    "other threads.",
@@ -5182,7 +5196,7 @@
    (gptr*) &dflt_key_cache_var.param_buff_size,
    (gptr*) 0,
    0, (GET_ULL | GET_ASK_ADDR),
-   REQUIRED_ARG, KEY_CACHE_SIZE, MALLOC_OVERHEAD, UINT_MAX32, MALLOC_OVERHEAD,
+   REQUIRED_ARG, KEY_CACHE_SIZE, MALLOC_OVERHEAD, ~(ulong) 0, MALLOC_OVERHEAD,
    IO_SIZE, 0},
   {"key_cache_age_threshold", OPT_KEY_CACHE_AGE_THRESHOLD,
    "This characterizes the number of hits a hot block has to be untouched until it is considered aged enough to be downgraded to a warm block. This specifies the percentage ratio of that number of hits to the total number of blocks in key cache",
@@ -5471,36 +5485,35 @@
    1, 0},
 #ifdef HAVE_BERKELEY_DB
   {"sync-bdb-logs", OPT_BDB_SYNC,
-   "Synchronously flush logs. Enabled by default",
+   "Synchronously flush Berkeley DB logs. Enabled by default",
    (gptr*) &opt_sync_bdb_logs, (gptr*) &opt_sync_bdb_logs, 0, GET_BOOL,
    NO_ARG, 1, 0, 0, 0, 0, 0},
 #endif /* HAVE_BERKELEY_DB */
   {"sync-binlog", OPT_SYNC_BINLOG,
-   "Sync the binlog to disk after every #th event. \
-#=0 (the default) does no sync. Syncing slows MySQL down",
-   (gptr*) &sync_binlog_period,
-   (gptr*) &sync_binlog_period, 0, GET_ULONG, REQUIRED_ARG, 0, 0, ~0L, 0, 1,
-   0},
+   "Synchronously flush binary log to disk after every #th event. "
+   "Use 0 (default) to disable synchronous flushing.",
+   (gptr*) &sync_binlog_period, (gptr*) &sync_binlog_period, 0, GET_ULONG,
+   REQUIRED_ARG, 0, 0, ~0L, 0, 1, 0},
+  {"sync-frm", OPT_SYNC_FRM, "Sync .frm to disk on create. Enabled by default.",
+   (gptr*) &opt_sync_frm, (gptr*) &opt_sync_frm, 0, GET_BOOL, NO_ARG, 1, 0,
+   0, 0, 0, 0},
 #ifdef DOES_NOTHING_YET
   {"sync-replication", OPT_SYNC_REPLICATION,
-   "Enable synchronous replication",
+   "Enable synchronous replication.",
    (gptr*) &global_system_variables.sync_replication,
    (gptr*) &global_system_variables.sync_replication,
    0, GET_ULONG, REQUIRED_ARG, 0, 0, 1, 0, 1, 0},
   {"sync-replication-slave-id", OPT_SYNC_REPLICATION_SLAVE_ID,
-   "Synchronous replication is wished for this slave",
+   "Synchronous replication is wished for this slave.",
    (gptr*) &global_system_variables.sync_replication_slave_id,
    (gptr*) &global_system_variables.sync_replication_slave_id,
    0, GET_ULONG, REQUIRED_ARG, 0, 0, ~0L, 0, 1, 0},
   {"sync-replication-timeout", OPT_SYNC_REPLICATION_TIMEOUT,
-   "Synchronous replication timeout",
+   "Synchronous replication timeout.",
    (gptr*) &global_system_variables.sync_replication_timeout,
    (gptr*) &global_system_variables.sync_replication_timeout,
    0, GET_ULONG, REQUIRED_ARG, 10, 0, ~0L, 0, 1, 0},
 #endif
-  {"sync-frm", OPT_SYNC_FRM, "Sync .frm to disk on create. Enabled by default",
-   (gptr*) &opt_sync_frm, (gptr*) &opt_sync_frm, 0, GET_BOOL, NO_ARG, 1, 0,
-   0, 0, 0, 0},
   {"table_cache", OPT_TABLE_CACHE,
    "The number of open tables for all threads.", (gptr*) &table_cache_size,
    (gptr*) &table_cache_size, 0, GET_ULONG, REQUIRED_ARG, 64, 1, 512*1024L,
@@ -5957,11 +5970,7 @@
 #else
   have_innodb=SHOW_OPTION_NO;
 #endif
-#ifdef HAVE_ISAM
-  have_isam=SHOW_OPTION_YES;
-#else
   have_isam=SHOW_OPTION_NO;
-#endif
 #ifdef HAVE_EXAMPLE_DB
   have_example_db= SHOW_OPTION_YES;
 #else
@@ -6111,16 +6120,6 @@
     sf_malloc_mem_limit = atoi(argument);
 #endif
     break;
-#ifdef EMBEDDED_LIBRARY
-  case OPT_MAX_ALLOWED_PACKET:
-    max_allowed_packet= atoi(argument);
-    global_system_variables.max_allowed_packet= max_allowed_packet;
-    break;
-  case OPT_NET_BUFFER_LENGTH:
-    net_buffer_length=  atoi(argument);
-    global_system_variables.net_buffer_length= net_buffer_length;
-    break;
-#endif
 #include <sslopt-case.h>
   case 'V':
     print_version();
@@ -6351,9 +6350,6 @@
       opt_error_log= 0;			// Force logs to stdout
     break;
   case (int) OPT_FLUSH:
-#ifdef HAVE_ISAM
-    nisam_flush=1;
-#endif
     myisam_flush=1;
     flush_time=0;			// No auto flush
     break;
@@ -6367,9 +6363,10 @@
   case OPT_STORAGE_ENGINE:
   {
     if ((enum db_type)((global_system_variables.table_type=
-	  ha_resolve_by_name(argument, strlen(argument)))) == DB_TYPE_UNKNOWN)
+                        ha_resolve_by_name(argument, strlen(argument)))) ==
+        DB_TYPE_UNKNOWN)
     {
-      fprintf(stderr,"Unknown table type: %s\n",argument);
+      fprintf(stderr,"Unknown/unsupported table type: %s\n",argument);
       exit(1);
     }
     break;
@@ -6460,14 +6457,6 @@
       have_berkeley_db= SHOW_OPTION_DISABLED;
 #endif
     break;
-  case OPT_ISAM:
-#ifdef HAVE_ISAM
-    if (opt_isam)
-      have_isam= SHOW_OPTION_YES;
-    else
-      have_isam= SHOW_OPTION_DISABLED;
-#endif
-    break;
   case OPT_NDBCLUSTER:
 #ifdef HAVE_NDBCLUSTER_DB
     if (opt_ndbcluster)
@@ -6518,9 +6507,6 @@
   case OPT_INNODB_LOG_ARCHIVE:
     innobase_log_archive= argument ? test(atoi(argument)) : 1;
     break;
-  case OPT_INNODB_FAST_SHUTDOWN:
-    innobase_fast_shutdown= argument ? test(atoi(argument)) : 1;
-    break;
 #endif /* HAVE_INNOBASE_DB */
   case OPT_MYISAM_RECOVER:
   {
@@ -6654,6 +6640,22 @@
     sql_print_warning("this binary does not contain BDB storage engine");
 #endif
 
+  /*
+    Check that the default storage engine is actually available.
+  */
+  if (!ha_storage_engine_is_enabled((enum db_type)
+                                    global_system_variables.table_type))
+  {
+    if (!opt_bootstrap)
+    {
+      sql_print_error("Default storage engine (%s) is not available",
+                      ha_get_storage_engine((enum db_type)
+                                            global_system_variables.table_type));
+      exit(1);
+    }
+    global_system_variables.table_type= DB_TYPE_MYISAM;
+  }
+
   if (argc > 0)
   {
     fprintf(stderr, "%s: Too many arguments (first extra is '%s').\nUse --help to get a list of available options\n", my_progname, *argv);
@@ -6689,6 +6691,9 @@
 #ifndef EMBEDDED_LIBRARY
   if (mysqld_chroot)
     set_root(mysqld_chroot);
+#else
+  max_allowed_packet= global_system_variables.max_allowed_packet;
+  net_buffer_length= global_system_variables.net_buffer_length;
 #endif
   fix_paths();
 

--- 1.231/sql/sql_class.h	Tue Apr  5 13:22:05 2005
+++ 1.232/sql/sql_class.h	Tue Apr 19 11:07:39 2005
@@ -467,19 +467,20 @@
 class i_string: public ilink
 {
 public:
-  char* ptr;
+  const char* ptr;
   i_string():ptr(0) { }
-  i_string(char* s) : ptr(s) {}
+  i_string(const char* s) : ptr(s) {}
 };
 
 /* needed for linked list of two strings for replicate-rewrite-db */
 class i_string_pair: public ilink
 {
 public:
-  char* key;
-  char* val;
+  const char* key;
+  const char* val;
   i_string_pair():key(0),val(0) { }
-  i_string_pair(char* key_arg, char* val_arg) : key(key_arg),val(val_arg) {}
+  i_string_pair(const char* key_arg, const char* val_arg) : 
+    key(key_arg),val(val_arg) {}
 };
 
 

--- 1.441/sql/sql_parse.cc	Thu Apr 14 11:56:08 2005
+++ 1.442/sql/sql_parse.cc	Tue Apr 19 11:07:39 2005
@@ -16,6 +16,7 @@
 
 #include "mysql_priv.h"
 #include "sql_repl.h"
+#include "rpl_filter.h"
 #include "repl_failsafe.h"
 #include <m_ctype.h>
 #include <myisam.h>
@@ -166,10 +167,12 @@
 #ifdef HAVE_REPLICATION
 inline bool all_tables_not_ok(THD *thd, TABLE_LIST *tables)
 {
-  return (table_rules_on && tables && !tables_ok(thd,tables) &&
+  return (rpl_filter->is_on() && tables && 
+	  !rpl_filter->tables_ok(thd->db, tables) &&
           ((thd->lex->sql_command != SQLCOM_DELETE_MULTI) ||
-           !tables_ok(thd,
-		      (TABLE_LIST *)thd->lex->auxilliary_table_list.first)));
+           !rpl_filter->tables_ok(thd->db,
+				  (TABLE_LIST *)
+				  thd->lex->auxilliary_table_list.first)));
 }
 #endif
 
@@ -3439,9 +3442,9 @@
       above was not called. So we have to check rules again here.
     */
 #ifdef HAVE_REPLICATION
-    if (thd->slave_thread &&
-	(!db_ok(lex->name, replicate_do_db, replicate_ignore_db) ||
-	 !db_ok_with_wild_table(lex->name)))
+    if (thd->slave_thread && 
+	(!rpl_filter->db_ok(lex->name) ||
+	 !rpl_filter->db_ok_with_wild_table(lex->name)))
     {
       my_message(ER_SLAVE_IGNORED_TABLE, ER(ER_SLAVE_IGNORED_TABLE), MYF(0));
       break;
@@ -3469,8 +3472,8 @@
     */
 #ifdef HAVE_REPLICATION
     if (thd->slave_thread && 
-	(!db_ok(lex->name, replicate_do_db, replicate_ignore_db) ||
-	 !db_ok_with_wild_table(lex->name)))
+	(!rpl_filter->db_ok(lex->name) ||
+	 !rpl_filter->db_ok_with_wild_table(lex->name)))
     {
       my_message(ER_SLAVE_IGNORED_TABLE, ER(ER_SLAVE_IGNORED_TABLE), MYF(0));
       break;
@@ -3509,8 +3512,8 @@
     */
 #ifdef HAVE_REPLICATION
     if (thd->slave_thread &&
-	(!db_ok(db, replicate_do_db, replicate_ignore_db) ||
-	 !db_ok_with_wild_table(db)))
+	(!rpl_filter->db_ok(lex->name) ||
+	 !rpl_filter->db_ok_with_wild_table(lex->name)))
     {
       my_message(ER_SLAVE_IGNORED_TABLE, ER(ER_SLAVE_IGNORED_TABLE), MYF(0));
       break;

--- 1.282/BitKeeper/etc/logging_ok	Fri Apr  1 22:32:16 2005
+++ 1.283/BitKeeper/etc/logging_ok	Tue Apr 19 11:04:40 2005
@@ -9,6 +9,7 @@
 WAX@stripped
 acurtis@stripped
 acurtis@stripped
+acurtis@stripped
 administrador@stripped
 ahlentz@stripped
 akishkin@stripped
@@ -56,8 +57,10 @@
 georg@stripped
 georg@stripped
 gerberb@stripped
+gluh@stripped
 gluh@gluh.(none)
 gluh@stripped
+gluh@stripped
 gordon@stripped
 greg@stripped
 greg@stripped

--- 1.39/mysql-test/r/grant.result	Fri Apr  1 22:17:21 2005
+++ 1.40/mysql-test/r/grant.result	Tue Apr 19 11:07:37 2005
@@ -157,6 +157,10 @@
 1
 1
 insert into mysql.user (host, user) values ('localhost', 'test11');
+Warnings:
+Warning	1364	Field 'ssl_cipher' doesn't have a default value
+Warning	1364	Field 'x509_issuer' doesn't have a default value
+Warning	1364	Field 'x509_subject' doesn't have a default value
 insert into mysql.db (host, db, user, select_priv) values 
 ('localhost', 'a%', 'test11', 'Y'), ('localhost', 'ab%', 'test11', 'Y');
 alter table mysql.db order by db asc;
@@ -461,3 +465,11 @@
 Super	Server Admin	To use KILL thread, SET GLOBAL, CHANGE MASTER, etc.
 Update	Tables	To update existing rows
 Usage	Server Admin	No privileges - allow connect only
+create database mysqltest;
+create table mysqltest.t1 (a int,b int,c int);
+grant all on mysqltest.t1 to mysqltest_1@localhost;
+alter table t1 rename t2;
+ERROR 42000: INSERT,CREATE command denied to user 'mysqltest_1'@'localhost' for table 't2'
+revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
+delete from mysql.user where user=_binary'mysqltest_1';
+drop database mysqltest;

--- 1.16/scripts/mysql_fix_privilege_tables.sql	Fri Apr  1 22:17:22 2005
+++ 1.17/scripts/mysql_fix_privilege_tables.sql	Tue Apr 19 11:07:37 2005
@@ -9,6 +9,8 @@
 -- this sql script.
 -- On windows you should do 'mysql --force mysql < mysql_fix_privilege_tables.sql'
 
+set table_type=MyISAM;
+
 CREATE TABLE IF NOT EXISTS func (
   name char(64) binary DEFAULT '' NOT NULL,
   ret tinyint(1) DEFAULT '0' NOT NULL,

--- 1.30/BitKeeper/triggers/post-commit	Fri Mar 18 02:16:29 2005
+++ 1.31/BitKeeper/triggers/post-commit	Tue Apr 19 11:07:37 2005
@@ -27,6 +27,7 @@
 fi
 
 CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet`
+CSETKEY=`bk -R prs -r+ -h -d':KEY:' ChangeSet`
 BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/\1/p'`
 WL=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Ww][Ll] *# *\([0-9][0-9]*\).*$/ WL#\1/p'`
 
@@ -52,6 +53,7 @@
 From: $FROM
 To: $TO
 Subject: bk commit - $VERSION tree ($CHANGESET)${BS}${WL}
+X-CSetKey: <$CSETKEY>
 $BH
 EOF
   bk changes -v -r+
@@ -68,6 +70,7 @@
 From: $FROM
 To: $INTERNALS
 Subject: bk commit into $VERSION tree ($CHANGESET)$BS
+X-CSetKey: <$CSETKEY>
 $BH
 Below is the list of changes that have just been committed into a local
 $VERSION repository of $USER. When $USER does a push these changes will

--- 1.17/scripts/mysql_create_system_tables.sh	Fri Apr  1 22:17:21 2005
+++ 1.18/scripts/mysql_create_system_tables.sh	Tue Apr 19 11:07:37 2005
@@ -722,6 +722,7 @@
 
 cat << END_OF_DATA
 use mysql;
+set table_type=myisam;
 $c_d
 $i_d
 
Thread
bk commit into 5.1 tree (lars:1.1800)Lars Thalmann19 Apr