List:Commits« Previous MessageNext Message »
From:antony Date:May 2 2006 6:12am
Subject:bk commit into 5.1 tree (acurtis:1.2383)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 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
  1.2383 06/05/01 22:45:31 acurtis@stripped +8 -0
  Merge xiphis.org:/home/antony/work2/mysql-5.1
  into  xiphis.org:/home/antony/work2/wl3201-post-review.2

  storage/archive/ha_archive.h
    1.46 06/05/01 22:45:25 acurtis@stripped +0 -0
    Auto merged

  storage/archive/ha_archive.cc
    1.89 06/05/01 22:45:25 acurtis@stripped +0 -0
    Auto merged

  sql/sql_yacc.yy
    1.474 06/05/01 22:45:25 acurtis@stripped +0 -0
    Auto merged

  sql/mysqld.cc
    1.550 06/05/01 22:45:25 acurtis@stripped +0 -0
    Auto merged

  sql/handler.h
    1.206 06/05/01 22:45:25 acurtis@stripped +0 -0
    Auto merged

  sql/ha_ndbcluster.cc
    1.297 06/05/01 22:45:25 acurtis@stripped +0 -0
    Auto merged

  storage/archive/ha_archive.h
    1.42.2.2 06/05/01 22:45:24 acurtis@stripped +0 -0
    Merge rename: sql/ha_archive.h -> storage/archive/ha_archive.h

  storage/archive/ha_archive.cc
    1.85.2.2 06/05/01 22:45:24 acurtis@stripped +0 -0
    Merge rename: sql/ha_archive.cc -> storage/archive/ha_archive.cc

  configure.in
    1.345 06/05/01 22:45:24 acurtis@stripped +0 -0
    Auto merged

  BitKeeper/etc/ignore
    1.240 06/05/01 22:45:16 acurtis@stripped +3 -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:	acurtis
# Host:	xiphis.org
# Root:	/home/antony/work2/wl3201-post-review.2

--- 1.344/configure.in	2006-05-01 21:33:04 -07:00
+++ 1.345/configure.in	2006-05-01 22:45:24 -07:00
@@ -278,6 +278,7 @@ then
 else
   AC_PATH_PROG(AS, as, as)
 fi
+
 # Still need ranlib for readline; local static use only so no libtool.
 AC_PROG_RANLIB
 # We use libtool
@@ -289,6 +290,13 @@ AC_PROG_LIBTOOL
 LIBTOOL="$LIBTOOL --preserve-dup-deps"
 AC_SUBST(LIBTOOL)dnl
 
+AC_SUBST(NM)dnl
+
+# NM= "$NM -X64"
+#archive_expsym_cmds= `echo "$archive_expsym_cmds" | sed -e '/"$(CC)"//'`
+#archive_expsym_cmds= "$CC -q64 $archive_expsym_cmds"
+#  CXXFLAGS=`echo "$CXXFLAGS -Werror" | sed -e 's/-fbranch-probabilities//; s/-Wall//; s/-ansi//; s/-pedantic//; s/-Wcheck//'`
+
 #AC_LIBTOOL_DLOPEN AC_LIBTOOL_WIN32_DLL AC_DISABLE_FAST_INSTALL AC_DISABLE_SHARED AC_DISABLE_STATIC
 
 # AC_PROG_INSTALL
@@ -564,7 +572,7 @@ then
   AC_MSG_ERROR([MySQL requires an ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.])
 fi
 
-NOINST_LDFLAGS=
+NOINST_LDFLAGS="-static"
 
 static_nss=""
 STATIC_NSS_FLAGS=""
@@ -797,9 +805,8 @@ AC_CHECK_FUNC(yp_get_default_domain, ,
 AC_CHECK_FUNC(p2open, , AC_CHECK_LIB(gen, p2open))
 # This may get things to compile even if bind-8 is installed
 AC_CHECK_FUNC(bind, , AC_CHECK_LIB(bind, bind))
-# For crypt() on Linux
-AC_CHECK_LIB(crypt, crypt)
-AC_CHECK_FUNC(crypt, AC_DEFINE([HAVE_CRYPT], [1], [crypt])) 
+# Check if crypt() exists in libc or libcrypt, sets LIBS if needed
+AC_SEARCH_LIBS(crypt, crypt, AC_DEFINE(HAVE_CRYPT, 1, [crypt]))
 
 # For sem_xxx functions on Solaris 2.6
 AC_CHECK_FUNC(sem_init, , AC_CHECK_LIB(posix4, sem_init))

--- 1.205/sql/handler.h	2006-04-24 09:26:21 -07:00
+++ 1.206/sql/handler.h	2006-05-01 22:45:25 -07:00
@@ -233,6 +233,7 @@ enum legacy_db_type
   DB_TYPE_BLACKHOLE_DB,
   DB_TYPE_PARTITION_DB,
   DB_TYPE_BINLOG,
+  DB_TYPE_FIRST_DYNAMIC=32,
   DB_TYPE_DEFAULT=127 // Must be last
 };
 
@@ -1553,8 +1554,8 @@ static inline bool ha_storage_engine_is_
 
 /* basic stuff */
 int ha_init(void);
-int ha_register_builtin_plugins();
-int ha_initialize_handlerton(handlerton *hton);
+int ha_initialize_handlerton(st_plugin_int *plugin);
+int ha_finalize_handlerton(st_plugin_int *plugin);
 
 TYPELIB *ha_known_exts(void);
 int ha_panic(enum ha_panic_function flag);

--- 1.473/sql/sql_yacc.yy	2006-04-25 13:21:38 -07:00
+++ 1.474/sql/sql_yacc.yy	2006-05-01 22:45:25 -07:00
@@ -8038,7 +8038,7 @@ show_param:
             if (prepare_schema_table(YYTHD, lex, 0, SCH_OPEN_TABLES))
               YYABORT;
 	  }
-        | PLUGIN_SYM
+        | opt_full PLUGIN_SYM
 	  {
 	    LEX *lex= Lex;
 	    WARN_DEPRECATED(yythd, "5.2", "SHOW PLUGIN", "'SHOW PLUGINS'");

--- 1.85.2.1/sql/ha_archive.cc	2006-04-29 17:43:21 -07:00
+++ 1.89/storage/archive/ha_archive.cc	2006-05-01 22:45:25 -07:00
@@ -19,10 +19,13 @@
 #endif
 
 #include "mysql_priv.h"
+#include <myisam.h>
 
 #include "ha_archive.h"
 #include <my_dir.h>
 
+#include <mysql/plugin.h>
+
 /*
   First, if you want to understand storage engines you should look at 
   ha_example.cc and ha_example.h. 
@@ -214,6 +217,8 @@ static byte* archive_get_key(ARCHIVE_SHA
 bool archive_db_init()
 {
   DBUG_ENTER("archive_db_init");
+  if (archive_inited)
+    DBUG_RETURN(FALSE);
   if (pthread_mutex_init(&archive_mutex, MY_MUTEX_INIT_FAST))
     goto error;
   if (hash_init(&archive_open_tables, system_charset_info, 32, 0, 0,
@@ -227,7 +232,6 @@ bool archive_db_init()
     DBUG_RETURN(FALSE);
   }
 error:
-  have_archive_db= SHOW_OPTION_DISABLED;	// If we couldn't use handler
   DBUG_RETURN(TRUE);
 }
 
@@ -235,14 +239,14 @@ error:
   Release the archive handler.
 
   SYNOPSIS
-    archive_db_end()
+    archive_db_done()
     void
 
   RETURN
     FALSE       OK
 */
 
-int archive_db_end(ha_panic_function type)
+int archive_db_done()
 {
   if (archive_inited)
   {
@@ -253,6 +257,12 @@ int archive_db_end(ha_panic_function typ
   return 0;
 }
 
+
+int archive_db_end(ha_panic_function type)
+{
+  return archive_db_done();
+}
+
 ha_archive::ha_archive(TABLE_SHARE *table_arg)
   :handler(&archive_hton, table_arg), delayed_insert(0), bulk_insert(0)
 {
@@ -838,7 +848,7 @@ int ha_archive::write_row(byte *buf)
   if (share->crashed)
       DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE);
 
-  statistic_increment(table->in_use->status_var.ha_write_count, &LOCK_status);
+  ha_statistic_increment(&SSV::ha_write_count);
   if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT)
     table->timestamp_field->set_time();
   pthread_mutex_lock(&share->mutex);
@@ -1158,8 +1168,7 @@ int ha_archive::rnd_next(byte *buf)
     DBUG_RETURN(HA_ERR_END_OF_FILE);
   scan_rows--;
 
-  statistic_increment(table->in_use->status_var.ha_read_rnd_next_count,
-		      &LOCK_status);
+  ha_statistic_increment(&SSV::ha_read_rnd_next_count);
   current_position= aztell(&archive);
   rc= get_row(&archive, buf);
 
@@ -1195,8 +1204,7 @@ void ha_archive::position(const byte *re
 int ha_archive::rnd_pos(byte * buf, byte *pos)
 {
   DBUG_ENTER("ha_archive::rnd_pos");
-  statistic_increment(table->in_use->status_var.ha_read_rnd_next_count,
-		      &LOCK_status);
+  ha_statistic_increment(&SSV::ha_read_rnd_next_count);
   current_position= (my_off_t)my_get_ptr(pos, ref_length);
   (void)azseek(&archive, current_position, SEEK_SET);
 
@@ -1384,8 +1392,8 @@ THR_LOCK_DATA **ha_archive::store_lock(T
     */
 
     if ((lock_type >= TL_WRITE_CONCURRENT_INSERT &&
-         lock_type <= TL_WRITE) && !thd->in_lock_tables
-        && !thd->tablespace_op)
+         lock_type <= TL_WRITE) && !thd_in_lock_tables(thd)
+        && !thd_tablespace_op(thd))
       lock_type = TL_WRITE_ALLOW_WRITE;
 
     /* 
@@ -1396,7 +1404,7 @@ THR_LOCK_DATA **ha_archive::store_lock(T
       concurrent inserts to t2. 
     */
 
-    if (lock_type == TL_READ_NO_INSERT && !thd->in_lock_tables) 
+    if (lock_type == TL_READ_NO_INSERT && !thd_in_lock_tables(thd)) 
       lock_type = TL_READ;
 
     lock.type=lock_type;
@@ -1509,11 +1517,11 @@ int ha_archive::check(THD* thd, HA_CHECK
 {
   int rc= 0;
   byte *buf; 
-  const char *old_proc_info=thd->proc_info;
+  const char *old_proc_info;
   ha_rows count= share->rows_recorded;
   DBUG_ENTER("ha_archive::check");
 
-  thd->proc_info= "Checking table";
+  old_proc_info= thd_proc_info(thd, "Checking table");
   /* Flush any waiting data */
   azflush(&(share->archive_write), Z_SYNC_FLUSH);
   share->forced_flushes++;
@@ -1538,7 +1546,7 @@ int ha_archive::check(THD* thd, HA_CHECK
 
   my_free((char*)buf, MYF(0));
 
-  thd->proc_info= old_proc_info;
+  thd_proc_info(thd, old_proc_info);
 
   if ((rc && rc != HA_ERR_END_OF_FILE) || count)  
   {
@@ -1563,3 +1571,17 @@ bool ha_archive::check_and_repair(THD *t
 
   DBUG_RETURN(repair(thd, &check_opt));
 }
+
+
+mysql_declare_plugin(archive)
+{
+  MYSQL_STORAGE_ENGINE_PLUGIN,
+  &archive_hton,
+  archive_hton.name,
+  "Brian Aker, MySQL AB",
+  "Archive Storage Engine",
+  NULL, /* Plugin Init */
+  archive_db_done, /* Plugin Deinit */
+  0x0100 /* 1.0 */,
+}
+mysql_declare_plugin_end;

--- 1.42.2.1/sql/ha_archive.h	2006-04-29 17:43:21 -07:00
+++ 1.46/storage/archive/ha_archive.h	2006-05-01 22:45:25 -07:00
@@ -19,7 +19,7 @@
 #endif
 
 #include <zlib.h>
-#include "../storage/archive/azlib.h"
+#include "azlib.h"
 
 /*
   Please read ha_archive.cc first. If you are looking for more general

--- 1.296/sql/ha_ndbcluster.cc	2006-04-24 13:28:17 -07:00
+++ 1.297/sql/ha_ndbcluster.cc	2006-05-01 22:45:25 -07:00
@@ -7270,11 +7270,24 @@ ndb_get_table_statistics(Ndb* ndb, const
 {
   DBUG_ENTER("ndb_get_table_statistics");
   DBUG_PRINT("enter", ("table: %s", table));
-  NdbTransaction* pTrans= ndb->startTransaction();
-  if (pTrans == NULL)
-    ERR_RETURN(ndb->getNdbError());
-  do 
+  NdbTransaction* pTrans;
+  int retries= 10;
+  int retry_sleep= 30 * 1000; /* 30 milliseconds */
+
+  do
   {
+    pTrans= ndb->startTransaction();
+    if (pTrans == NULL)
+    {
+      if (ndb->getNdbError().status == NdbError::TemporaryError &&
+          retries--)
+      {
+        my_sleep(retry_sleep);
+        continue;
+      }
+      ERR_RETURN(ndb->getNdbError());
+    }
+
     NdbScanOperation* pOp= pTrans->getNdbScanOperation(table);
     if (pOp == NULL)
       break;
@@ -7297,8 +7310,18 @@ ndb_get_table_statistics(Ndb* ndb, const
                            NdbTransaction::AbortOnError,
                            TRUE);
     if (check == -1)
+    {
+      if (pTrans->getNdbError().status == NdbError::TemporaryError &&
+          retries--)
+      {
+        ndb->closeTransaction(pTrans);
+        pTrans= 0;
+        my_sleep(retry_sleep);
+        continue;
+      }
       break;
-    
+    }
+
     Uint32 count= 0;
     Uint64 sum_rows= 0;
     Uint64 sum_commits= 0;
@@ -7332,7 +7355,7 @@ ndb_get_table_statistics(Ndb* ndb, const
                         sum_mem, count));
 
     DBUG_RETURN(0);
-  } while (0);
+  } while(1);
 
   if (pTrans)
     ndb->closeTransaction(pTrans);
@@ -8951,7 +8974,9 @@ void ndb_serialize_cond(const Item *item
           prev_cond->next= curr_cond;
           curr_cond->ndb_item= new Ndb_item(NDB_END_COND);
           // Pop rewrite stack
-          context->rewrite_stack= context->rewrite_stack->next;
+          context->rewrite_stack=  rewrite_context->next;
+          rewrite_context->next= NULL;
+          delete(rewrite_context);
         }
       }
     }

--- 1.239/BitKeeper/etc/ignore	2006-04-30 12:52:24 -07:00
+++ 1.240/BitKeeper/etc/ignore	2006-05-01 22:45:16 -07:00
@@ -291,6 +291,7 @@ client/my_decimal.h
 client/my_user.c
 client/mysql
 client/mysql.cpp
+client/mysql_upgrade
 client/mysqladmin
 client/mysqladmin.c
 client/mysqladmin.cpp
@@ -321,6 +322,7 @@ cmd-line-utils/libedit/makelist
 comon.h
 comp_err/*.ds?
 comp_err/*.vcproj
+compile
 config.cache
 config.guess
 config.h
@@ -367,6 +369,9 @@ extra/resolve_stack_dump
 extra/resolveip
 extra/sql_state.h
 extra/tztime.cc
+extra/yassl/taocrypt/benchmark/benchmark
+extra/yassl/taocrypt/test/test
+extra/yassl/testsuite/testsuite
 fcns.c
 fcns.h
 gdbinit
@@ -549,6 +554,7 @@ libmysqld/spatial.cc
 libmysqld/sql_acl.cc
 libmysqld/sql_analyse.cc
 libmysqld/sql_base.cc
+libmysqld/sql_builtin.cc
 libmysqld/sql_cache.cc
 libmysqld/sql_class.cc
 libmysqld/sql_command
@@ -679,6 +685,7 @@ mysql-test/mysql-test-run.log
 mysql-test/mysql_test_run_new
 mysql-test/ndb/ndbcluster
 mysql-test/r/*.err
+mysql-test/r/*.log
 mysql-test/r/*.out
 mysql-test/r/*.reject
 mysql-test/r/alter_table.err
@@ -1174,6 +1181,7 @@ sql/share/gmon.out
 sql/share/mysql
 sql/share/norwegian-ny/errmsg.sys
 sql/share/norwegian/errmsg.sys
+sql/sql_builtin.cc
 sql/sql_select.cc.orig
 sql/sql_yacc.cc
 sql/sql_yacc.h
@@ -1747,6 +1755,10 @@ tools/mysqlmanager
 tools/mysqlmngd
 tools/mysqltestmanager
 tools/mysys_priv.h
+unittest/examples/*.t
+unittest/mysys/*.t
+unittest/mytap/t/*.t
+unittest/unit
 vi.h
 vio/*.ds?
 vio/*.vcproj
@@ -1758,12 +1770,3 @@ vio/viotest-sslconnect.cpp
 vio/viotest.cpp
 zlib/*.ds?
 zlib/*.vcproj
-mysql-test/r/*.log
-client/mysql_upgrade
-unittest/examples/*.t
-unittest/mysys/*.t
-unittest/mytap/t/*.t
-unittest/unit
-compile
-libmysqld/sql_builtin.cc
-sql/sql_builtin.cc
Thread
bk commit into 5.1 tree (acurtis:1.2383)antony2 May