List:Commits« Previous MessageNext Message »
From:antony Date:January 23 2006 9:42pm
Subject:bk commit into 5.1 tree (acurtis:1.2069)
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.2069 06/01/23 13:42:38 acurtis@stripped +11 -0
  Merge acurtis@bk-internal:/home/bk/mysql-5.1-new
  into  xiphis.org:/home/antony/work2/mysql-5.1-plugable.2a

  storage/csv/Makefile.am
    1.6 06/01/23 13:42:35 acurtis@stripped +8 -6
    manual merge

  configure.in
    1.333 06/01/23 13:42:35 acurtis@stripped +1 -2
    manual merge

  config/ac-macros/storage.m4
    1.5 06/01/23 13:42:35 acurtis@stripped +0 -4
    manual merge

  storage/csv/ha_tina.cc
    1.30 06/01/23 12:52:26 acurtis@stripped +0 -5
    Auto merged

  sql/sql_lex.h
    1.213 06/01/23 12:52:26 acurtis@stripped +0 -6
    Auto merged

  sql/sql_class.h
    1.284 06/01/23 12:52:26 acurtis@stripped +0 -5
    Auto merged

  sql/sql_class.cc
    1.234 06/01/23 12:52:26 acurtis@stripped +0 -0
    Auto merged

  sql/mysql_priv.h
    1.372 06/01/23 12:52:25 acurtis@stripped +0 -13
    Auto merged

  sql/item.h
    1.189 06/01/23 12:52:25 acurtis@stripped +0 -2
    Auto merged

  sql/handler.h
    1.184 06/01/23 12:52:25 acurtis@stripped +0 -4
    Auto merged

  sql/handler.cc
    1.214 06/01/23 12:52:25 acurtis@stripped +0 -6
    Auto merged

# 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:	localhost.(none)
# Root:	/home/antony/work2/mysql-5.1-plugable.2a/RESYNC

--- 1.332/configure.in	2006-01-19 01:41:34 -08:00
+++ 1.333/configure.in	2006-01-23 13:42:35 -08:00
@@ -663,6 +663,7 @@
 # Check for requested features
 #--------------------------------------------------------------------
 
+
 MYSQL_STORAGE_ENGINE(example,,,,,,storage/example,,
  \$(top_builddir)/storage/archive/libexample.a,yes,[
   AC_CONFIG_FILES(storage/example/Makefile)
@@ -1455,6 +1456,7 @@
 if test "$with_named_thread" != "no"
 then
   LIBS="$with_named_thread $LIBS $with_named_thread"
+  CLIENT_THREAD_LIBS="$with_named_thread"
   with_posix_threads="yes"
   AC_MSG_RESULT("$with_named_thread")
 else
@@ -1471,6 +1473,7 @@
     AC_MSG_CHECKING("for pthread_create in -lpthread");
     ac_save_LIBS="$LIBS"
     LIBS="$LIBS -lpthread"
+    CLIENT_THREAD_LIBS="-lpthread"
     AC_TRY_LINK(
     [#include <pthread.h>],
     [ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
@@ -1479,6 +1482,7 @@
     if test "$with_posix_threads" = "no"
     then
       LIBS=" $ac_save_LIBS -lpthreads"
+      CLIENT_THREAD_LIBS="-lpthreads"
       AC_MSG_CHECKING("for pthread_create in -lpthreads");
       AC_TRY_LINK(
       [#include <pthread.h>],
@@ -1489,6 +1493,7 @@
       then
         # This is for FreeBSD
         LIBS="$ac_save_LIBS -pthread"
+        CLIENT_THREAD_LIBS="-pthread"
         AC_MSG_CHECKING("for pthread_create in -pthread");
         AC_TRY_LINK(
         [#include <pthread.h>],
@@ -2442,6 +2447,7 @@
 CLIENT_LIBS="$NON_THREADED_LIBS $openssl_libs $ZLIB_LIBS $STATIC_NSS_FLAGS"
 
 AC_SUBST(CLIENT_LIBS)
+AC_SUBST(CLIENT_THREAD_LIBS)
 AC_SUBST(NON_THREADED_LIBS)
 AC_SUBST(STATIC_NSS_FLAGS)
 AC_SUBST(sql_client_dirs)

--- 1.183/sql/handler.h	2006-01-19 01:41:34 -08:00
+++ 1.184/sql/handler.h	2006-01-23 12:52:25 -08:00
@@ -1033,6 +1033,7 @@
 
   void ha_statistic_increment(ulong SSV::*offset) const;
 
+
 private:
   virtual int reset() { return extra(HA_EXTRA_RESET); }
 public:
@@ -1115,7 +1116,10 @@
       TRUE      Locking is allowed
       FALSE     Locking is not allowed. The error was thrown.
   */
-  virtual bool check_if_locking_is_allowed(THD *thd, TABLE *table, uint count)
+  virtual bool check_if_locking_is_allowed(uint sql_command,
+                                           ulong type, TABLE *table,
+                                           uint count,
+                                           bool called_by_logger_thread)
   {
     return TRUE;
   }

--- 1.371/sql/mysql_priv.h	2006-01-19 01:37:13 -08:00
+++ 1.372/sql/mysql_priv.h	2006-01-23 12:52:25 -08:00
@@ -477,6 +477,7 @@
 }
 #define current_thd _current_thd()
 
+/* below functions are required for plugins as THD class is opaque */
 my_bool thd_in_lock_tables(const THD *thd);
 my_bool thd_tablespace_op(const THD *thd);
 const char *thd_proc_info(THD *thd, const char *info);
@@ -1188,8 +1189,8 @@
 void sql_print_information(const char *format, ...);
 
 /* type of the log table */
-#define LOG_SLOW 1
-#define LOG_GENERAL 2
+#define QUERY_LOG_SLOW 1
+#define QUERY_LOG_GENERAL 2
 
 int error_log_print(enum loglevel level, const char *format,
                     va_list args);
@@ -1531,6 +1532,9 @@
 void make_truncated_value_warning(THD *thd, const char *str_val,
 				  uint str_length, timestamp_type time_type,
                                   const char *field_name);
+
+bool date_add_interval(TIME *ltime, interval_type int_type, INTERVAL interval);
+
 extern DATE_TIME_FORMAT *date_time_format_make(timestamp_type format_type,
 					       const char *format_str,
 					       uint format_length);

--- 1.233/sql/sql_class.cc	2006-01-19 01:37:13 -08:00
+++ 1.234/sql/sql_class.cc	2006-01-23 12:52:26 -08:00
@@ -167,6 +167,25 @@
   reset_open_tables_state();
 }
 
+my_bool thd_in_lock_tables(const THD *thd)
+{
+  return thd->in_lock_tables;
+}
+
+
+my_bool thd_tablespace_op(const THD *thd)
+{
+  return thd->tablespace_op;
+}
+
+
+const char *thd_proc_info(THD *thd, const char *info)
+{
+  const char *old_info= thd->proc_info;
+  thd->proc_info= info;
+  return old_info;
+}
+
 
 my_bool thd_in_lock_tables(const THD *thd)
 {
@@ -986,7 +1005,9 @@
   thd->sent_row_count++;
   if (!thd->vio_ok())
     DBUG_RETURN(0);
-  if (!thd->net.report_error)
+  if (thd->net.report_error)
+    protocol->remove_last_row();
+  else
     DBUG_RETURN(protocol->write());
   DBUG_RETURN(1);
 }
@@ -2037,10 +2058,8 @@
   cuted_fields= 0;
   transaction.savepoints= 0;
 
-#ifndef EMBEDDED_LIBRARY
   /* Surpress OK packets in case if we will execute statements */
   net.no_send_ok= TRUE;
-#endif
 }
 
 

--- 1.5/storage/csv/Makefile.am	2006-01-07 15:35:26 -08:00
+++ 1.6/storage/csv/Makefile.am	2006-01-23 13:42:35 -08:00
@@ -24,12 +24,9 @@
 			-I$(top_srcdir)/regex \
 			-I$(top_srcdir)/sql \
                         -I$(srcdir)
-WRAPLIBS=
-
 LDADD =
 
 DEFS =                  @DEFS@
-
 noinst_HEADERS	  =	ha_tina.h
 
 EXTRA_LTLIBRARIES =	ha_csv.la
@@ -37,7 +34,6 @@
 ha_csv_la_LDFLAGS =	-module -rpath $(MYSQLLIBdir)
 ha_csv_la_CXXFLAGS =	$(AM_CFLAGS) -DMYSQL_PLUGIN
 ha_csv_la_SOURCES =	ha_tina.cc
-
 
 EXTRA_LIBRARIES =	libcsv.a
 noinst_LIBRARIES =	@ha_csv_static_target@

--- 1.29/storage/csv/ha_tina.cc	2006-01-19 01:41:34 -08:00
+++ 1.30/storage/csv/ha_tina.cc	2006-01-23 12:52:26 -08:00
@@ -592,7 +592,10 @@
 }
 
 
-bool ha_tina::check_if_locking_is_allowed(THD *thd, TABLE *table, uint count)
+bool ha_tina::check_if_locking_is_allowed(uint sql_command,
+                                          ulong type, TABLE *table,
+                                          uint count,
+                                          bool called_by_logger_thread)
 {
   /*
     Deny locking of the log tables, which is incompatible with
@@ -600,11 +603,10 @@
     general_log_thd or slow_log_thd.
   */
   if (table->s->log_table &&
-      thd->lex->sql_command != SQLCOM_TRUNCATE &&
-      !(thd->lex->sql_command == SQLCOM_FLUSH &&
-        thd->lex->type & REFRESH_LOG) &&
-      (thd != logger.get_general_log_thd()) &&
-      (thd != logger.get_slow_log_thd()) &&
+      sql_command != SQLCOM_TRUNCATE &&
+      !(sql_command == SQLCOM_FLUSH &&
+        type & REFRESH_LOG) &&
+      !called_by_logger_thread &&
       (table->reginfo.lock_type >= TL_READ_NO_INSERT))
   {
     /*
@@ -764,77 +766,6 @@
   DBUG_RETURN(0);
 }
 
-/*
-  Fill buf with value from key. Simply this is used for a single index read
-  with a key.
-*/
-int ha_tina::index_read(byte * buf, const byte * key,
-                        uint key_len __attribute__((unused)),
-                        enum ha_rkey_function find_flag
-                        __attribute__((unused)))
-{
-  DBUG_ENTER("ha_tina::index_read");
-  DBUG_ASSERT(0);
-  DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED);
-}
-
-/*
-  Fill buf with value from key. Simply this is used for a single index read
-  with a key.
-  Whatever the current key is we will use it. This is what will be in "index".
-*/
-int ha_tina::index_read_idx(byte * buf, uint index, const byte * key,
-                            uint key_len __attribute__((unused)),
-                            enum ha_rkey_function find_flag
-                            __attribute__((unused)))
-{
-  DBUG_ENTER("ha_tina::index_read_idx");
-  DBUG_ASSERT(0);
-  DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED);
-}
-
-
-/*
-  Read the next position in the index.
-*/
-int ha_tina::index_next(byte * buf)
-{
-  DBUG_ENTER("ha_tina::index_next");
-  DBUG_ASSERT(0);
-  DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED);
-}
-
-/*
-  Read the previous position in the index.
-*/
-int ha_tina::index_prev(byte * buf)
-{
-  DBUG_ENTER("ha_tina::index_prev");
-  DBUG_ASSERT(0);
-  DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED);
-}
-
-/*
-  Read the first position in the index
-*/
-int ha_tina::index_first(byte * buf)
-{
-  DBUG_ENTER("ha_tina::index_first");
-  DBUG_ASSERT(0);
-  DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED);
-}
-
-/*
-  Read the last position in the index
-  With this we don't need to do a filesort() with index.
-  We just read the last row and call previous.
-*/
-int ha_tina::index_last(byte * buf)
-{
-  DBUG_ENTER("ha_tina::index_last");
-  DBUG_ASSERT(0);
-  DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED);
-}
 
 /*
   All table scans call this first.
@@ -976,17 +907,6 @@
 }
 
 /*
-  This is no longer used.
-*/
-int ha_tina::reset(void)
-{
-  DBUG_ENTER("ha_tina::reset");
-  ha_tina::extra(HA_EXTRA_RESET);
-  DBUG_RETURN(0);
-}
-
-
-/*
   Called after each table scan. In particular after deletes,
   and updates. In the last case we employ chain of deleted
   slots to clean up all of the dead space we have collected while
@@ -1061,15 +981,6 @@
 
   records=0;
   DBUG_RETURN(rc);
-}
-
-/*
-  Always called by the start of a transaction (or by "lock tables");
-*/
-int ha_tina::external_lock(THD *thd, int lock_type)
-{
-  DBUG_ENTER("ha_tina::external_lock");
-  DBUG_RETURN(0);          // No external locking
 }
 
 /*
Thread
bk commit into 5.1 tree (acurtis:1.2069)antony23 Jan