]> git.pld-linux.org Git - packages/mysql.git/commitdiff
- mysql 5.0.75 by Eero Hänninen
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 8 Jan 2009 12:53:45 +0000 (12:53 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mysql-microslow_innodb.patch -> 1.1.2.3
    mysql-show_patches.patch -> 1.1.2.2
    mysql-split_buf_pool_mutex_fixed_optimistic_safe.patch -> 1.1.2.2
    mysql-userstatv2.patch -> 1.1.2.3

mysql-microslow_innodb.patch
mysql-show_patches.patch
mysql-split_buf_pool_mutex_fixed_optimistic_safe.patch
mysql-userstatv2.patch

index 1143f28a8e57ff15e02642d0b48940fc0691975a..1613b480d99ed35e2446c366cd57081d8273810e 100644 (file)
@@ -1,6 +1,19 @@
-diff -r bb81fcdd7db2 include/my_time.h
---- a/include/my_time.h        Mon Sep 08 16:38:33 2008 -0700
-+++ b/include/my_time.h        Mon Sep 08 16:38:46 2008 -0700
+diff -r 25523be1816e include/my_getopt.h
+--- a/include/my_getopt.h      Mon Dec 22 00:25:06 2008 -0800
++++ b/include/my_getopt.h      Mon Dec 22 00:26:39 2008 -0800
+@@ -28,7 +28,8 @@
+ #define GET_ULL        8
+ #define GET_STR        9
+ #define GET_STR_ALLOC 10
+-#define GET_DISABLED  11
++#define GET_DOUBLE    11
++#define GET_DISABLED  12
+ #define GET_ASK_ADDR   128
+ #define GET_TYPE_MASK  127
+diff -r 25523be1816e include/my_time.h
+--- a/include/my_time.h        Mon Dec 22 00:25:06 2008 -0800
++++ b/include/my_time.h        Mon Dec 22 00:26:39 2008 -0800
 @@ -140,7 +140,7 @@
  int my_date_to_str(const MYSQL_TIME *l_time, char *to);
  int my_datetime_to_str(const MYSQL_TIME *l_time, char *to);
@@ -10,18 +23,20 @@ diff -r bb81fcdd7db2 include/my_time.h
  C_MODE_END
  
  #endif /* _my_time_h_ */
-diff -r bb81fcdd7db2 innobase/buf/buf0buf.c
---- a/innobase/buf/buf0buf.c   Mon Sep 08 16:38:33 2008 -0700
-+++ b/innobase/buf/buf0buf.c   Mon Sep 08 16:38:46 2008 -0700
-@@ -37,6 +37,7 @@
+diff -r 25523be1816e innobase/buf/buf0buf.c
+--- a/innobase/buf/buf0buf.c   Mon Dec 22 00:25:06 2008 -0800
++++ b/innobase/buf/buf0buf.c   Mon Dec 22 00:26:39 2008 -0800
+@@ -37,6 +37,9 @@
  #include "log0log.h"
  #include "trx0undo.h"
  #include "srv0srv.h"
-+#include "thr0loc.h"
++
++/* prototypes for new functions added to ha_innodb.cc */
++trx_t* innobase_get_trx();
  
  /*
                IMPLEMENTATION OF THE BUFFER POOL
-@@ -1086,6 +1087,31 @@
+@@ -1086,6 +1089,36 @@
        return(block);
  }
  
@@ -33,9 +48,14 @@ diff -r bb81fcdd7db2 innobase/buf/buf0buf.c
 +
 +      ut_ad(block);
 +
-+      if (!trx || !trx->distinct_page_access_hash)
++      if (!srv_slow_log || !trx || !trx->take_stats)
 +              return;
 +
++      if (!trx->distinct_page_access_hash) {
++              trx->distinct_page_access_hash = mem_alloc(DPAH_SIZE);
++              memset(trx->distinct_page_access_hash, 0, DPAH_SIZE);
++      }
++
 +        block_hash = ut_hash_ulint((block->space << 20) + block->space +
 +                                      block->offset, DPAH_SIZE << 3);
 +      block_hash_byte = block_hash >> 3;
@@ -53,11 +73,11 @@ diff -r bb81fcdd7db2 innobase/buf/buf0buf.c
  /************************************************************************
  This is the general function used to get access to a database page. */
  
-@@ -1108,6 +1134,11 @@
+@@ -1108,6 +1141,11 @@
        ulint           fix_type;
        ibool           success;
        ibool           must_read;
-+      trx_t*          trx;
++      trx_t*          trx = NULL;
 +      ulint           sec;
 +      ulint           ms;
 +      ib_longlong     start_time;
@@ -65,15 +85,17 @@ diff -r bb81fcdd7db2 innobase/buf/buf0buf.c
        
        ut_ad(mtr);
        ut_ad((rw_latch == RW_S_LATCH)
-@@ -1119,6 +1150,7 @@
+@@ -1119,6 +1157,9 @@
  #ifndef UNIV_LOG_DEBUG
        ut_ad(!ibuf_inside() || ibuf_page(space, offset));
  #endif
-+      trx = thr_local_get_trx(os_thread_get_curr_id());
++      if (srv_slow_log) {
++              trx = innobase_get_trx();
++      }
        buf_pool->n_page_gets++;
  loop:
        block = NULL;
-@@ -1148,7 +1180,7 @@
+@@ -1148,7 +1189,7 @@
                        return(NULL);
                }
  
@@ -82,11 +104,11 @@ diff -r bb81fcdd7db2 innobase/buf/buf0buf.c
  
  #ifdef UNIV_DEBUG
                buf_dbg_counter++;
-@@ -1261,6 +1293,11 @@
+@@ -1261,6 +1302,11 @@
                        /* Let us wait until the read operation
                        completes */
  
-+                      if (trx)
++                      if (srv_slow_log && trx && trx->take_stats)
 +                      {
 +                              ut_usectime(&sec, &ms);
 +                              start_time = (ib_longlong)sec * 1000000 + ms;
@@ -94,12 +116,12 @@ diff -r bb81fcdd7db2 innobase/buf/buf0buf.c
                        for (;;) {
                                mutex_enter(&block->mutex);
  
-@@ -1275,6 +1312,12 @@
+@@ -1275,6 +1321,12 @@
  
                                       break;
                                }
 +                      }
-+                      if (trx)
++                      if (srv_slow_log && trx && trx->take_stats && start_time)
 +                      {
 +                              ut_usectime(&sec, &ms);
 +                              finish_time = (ib_longlong)sec * 1000000 + ms;
@@ -107,7 +129,7 @@ diff -r bb81fcdd7db2 innobase/buf/buf0buf.c
                        }
                }
  
-@@ -1296,12 +1339,15 @@
+@@ -1296,12 +1348,17 @@
                /* In the case of a first access, try to apply linear
                read-ahead */
  
@@ -119,20 +141,22 @@ diff -r bb81fcdd7db2 innobase/buf/buf0buf.c
        ut_a(ibuf_count_get(block->space, block->offset) == 0);
  #endif
 +
-+      _increment_page_get_statistics(block, trx);
++      if (srv_slow_log) {
++              _increment_page_get_statistics(block, trx);
++      }
 +      
        return(block->frame);           
  }
  
-@@ -1326,6 +1372,7 @@
+@@ -1326,6 +1383,7 @@
        ibool           accessed;
        ibool           success;
        ulint           fix_type;
-+      trx_t*          trx;
++      trx_t*          trx = NULL;
  
        ut_ad(mtr && block);
        ut_ad((rw_latch == RW_S_LATCH) || (rw_latch == RW_X_LATCH));
-@@ -1440,13 +1487,16 @@
+@@ -1440,13 +1498,18 @@
                read-ahead */
  
                buf_read_ahead_linear(buf_frame_get_space_id(guess),
@@ -145,32 +169,36 @@ diff -r bb81fcdd7db2 innobase/buf/buf0buf.c
  #endif
        buf_pool->n_page_gets++;
 +
-+      trx = thr_local_get_trx(os_thread_get_curr_id());
-+      _increment_page_get_statistics(block, trx);
++      if (srv_slow_log) {
++              trx = innobase_get_trx();
++              _increment_page_get_statistics(block, trx);
++      }
  
        return(TRUE);
  }
-@@ -1470,6 +1520,7 @@
+@@ -1470,6 +1533,7 @@
        buf_block_t*    block;
        ibool           success;
        ulint           fix_type;
-+      trx_t*          trx;
++      trx_t*          trx = NULL;
  
        ut_ad(mtr);
        ut_ad((rw_latch == RW_S_LATCH) || (rw_latch == RW_X_LATCH));
-@@ -1558,6 +1609,9 @@
+@@ -1558,6 +1622,11 @@
                || (ibuf_count_get(block->space, block->offset) == 0));
  #endif
        buf_pool->n_page_gets++;
 +
-+      trx = thr_local_get_trx(os_thread_get_curr_id());
-+      _increment_page_get_statistics(block, trx);
++      if (srv_slow_log) {
++              trx = innobase_get_trx();
++              _increment_page_get_statistics(block, trx);
++      }
  
        return(TRUE);
  }
-diff -r bb81fcdd7db2 innobase/buf/buf0rea.c
---- a/innobase/buf/buf0rea.c   Mon Sep 08 16:38:33 2008 -0700
-+++ b/innobase/buf/buf0rea.c   Mon Sep 08 16:38:46 2008 -0700
+diff -r 25523be1816e innobase/buf/buf0rea.c
+--- a/innobase/buf/buf0rea.c   Mon Dec 22 00:25:06 2008 -0800
++++ b/innobase/buf/buf0rea.c   Mon Dec 22 00:26:39 2008 -0800
 @@ -70,7 +70,8 @@
                        treat the tablespace as dropped; this is a timestamp we
                        use to stop dangling page reads from a tablespace
@@ -287,9 +315,9 @@ diff -r bb81fcdd7db2 innobase/buf/buf0rea.c
                }
        }
        
-diff -r bb81fcdd7db2 innobase/fil/fil0fil.c
---- a/innobase/fil/fil0fil.c   Mon Sep 08 16:38:33 2008 -0700
-+++ b/innobase/fil/fil0fil.c   Mon Sep 08 16:38:46 2008 -0700
+diff -r 25523be1816e innobase/fil/fil0fil.c
+--- a/innobase/fil/fil0fil.c   Mon Dec 22 00:25:06 2008 -0800
++++ b/innobase/fil/fil0fil.c   Mon Dec 22 00:26:39 2008 -0800
 @@ -3527,7 +3527,7 @@
                        node->name, node->handle, buf,
                        offset_low, offset_high,
@@ -328,9 +356,9 @@ diff -r bb81fcdd7db2 innobase/fil/fil0fil.c
  #endif
        ut_a(ret);
  
-diff -r bb81fcdd7db2 innobase/include/buf0rea.h
---- a/innobase/include/buf0rea.h       Mon Sep 08 16:38:33 2008 -0700
-+++ b/innobase/include/buf0rea.h       Mon Sep 08 16:38:46 2008 -0700
+diff -r 25523be1816e innobase/include/buf0rea.h
+--- a/innobase/include/buf0rea.h       Mon Dec 22 00:25:06 2008 -0800
++++ b/innobase/include/buf0rea.h       Mon Dec 22 00:26:39 2008 -0800
 @@ -10,6 +10,7 @@
  #define buf0rea_h
  
@@ -360,9 +388,9 @@ diff -r bb81fcdd7db2 innobase/include/buf0rea.h
  /************************************************************************
  Issues read requests for pages which the ibuf module wants to read in, in
  order to contract the insert buffer tree. Technically, this function is like
-diff -r bb81fcdd7db2 innobase/include/fil0fil.h
---- a/innobase/include/fil0fil.h       Mon Sep 08 16:38:33 2008 -0700
-+++ b/innobase/include/fil0fil.h       Mon Sep 08 16:38:46 2008 -0700
+diff -r 25523be1816e innobase/include/fil0fil.h
+--- a/innobase/include/fil0fil.h       Mon Dec 22 00:25:06 2008 -0800
++++ b/innobase/include/fil0fil.h       Mon Dec 22 00:26:39 2008 -0800
 @@ -534,8 +534,11 @@
  /************************************************************************
  Reads or writes data. This operation is asynchronous (aio). */
@@ -387,9 +415,9 @@ diff -r bb81fcdd7db2 innobase/include/fil0fil.h
  /************************************************************************
  Reads data from a space to a buffer. Remember that the possible incomplete
  blocks at the end of file are ignored: they are not taken into account when
-diff -r bb81fcdd7db2 innobase/include/os0file.h
---- a/innobase/include/os0file.h       Mon Sep 08 16:38:33 2008 -0700
-+++ b/innobase/include/os0file.h       Mon Sep 08 16:38:46 2008 -0700
+diff -r 25523be1816e innobase/include/os0file.h
+--- a/innobase/include/os0file.h       Mon Dec 22 00:25:06 2008 -0800
++++ b/innobase/include/os0file.h       Mon Dec 22 00:26:39 2008 -0800
 @@ -10,6 +10,8 @@
  #define os0file_h
  
@@ -432,56 +460,26 @@ diff -r bb81fcdd7db2 innobase/include/os0file.h
  /****************************************************************************
  Wakes up all async i/o threads so that they know to exit themselves in
  shutdown. */
-diff -r bb81fcdd7db2 innobase/include/thr0loc.h
---- a/innobase/include/thr0loc.h       Mon Sep 08 16:38:33 2008 -0700
-+++ b/innobase/include/thr0loc.h       Mon Sep 08 16:38:46 2008 -0700
-@@ -15,6 +15,7 @@
- #include "univ.i"
- #include "os0thread.h"
-+#include "trx0trx.h"
- /********************************************************************
- Initializes the thread local storage module. */
-@@ -36,6 +37,14 @@
- /*===========*/
-       os_thread_id_t  id);    /* in: thread id */
- /***********************************************************************
-+Gets trx */
-+
-+trx_t*
-+thr_local_get_trx(
-+/*==================*/
-+                              /* out: trx for mysql */
-+      os_thread_id_t  id);    /* in: thread id of the thread */
-+/***********************************************************************
- Gets the slot number in the thread table of a thread. */
- ulint
-@@ -43,6 +52,14 @@
- /*==================*/
-                               /* out: slot number */
-       os_thread_id_t  id);    /* in: thread id of the thread */
-+/***********************************************************************
-+Sets in the local storage the slot number in the thread table of a thread. */
-+
-+void
-+thr_local_set_trx(
-+/*==================*/
-+      os_thread_id_t  id,     /* in: thread id of the thread */
-+      trx_t*          trx);   /* in: slot number */
- /***********************************************************************
- Sets in the local storage the slot number in the thread table of a thread. */
-diff -r bb81fcdd7db2 innobase/include/trx0trx.h
---- a/innobase/include/trx0trx.h       Mon Sep 08 16:38:33 2008 -0700
-+++ b/innobase/include/trx0trx.h       Mon Sep 08 16:38:46 2008 -0700
+diff -r 25523be1816e innobase/include/srv0srv.h
+--- a/innobase/include/srv0srv.h       Mon Dec 22 00:25:06 2008 -0800
++++ b/innobase/include/srv0srv.h       Mon Dec 22 00:26:39 2008 -0800
+@@ -26,6 +26,8 @@
+ at a time */
+ #define SRV_AUTO_EXTEND_INCREMENT     \
+       (srv_auto_extend_increment * ((1024 * 1024) / UNIV_PAGE_SIZE))
++
++extern ibool  srv_slow_log;
+ /* This is set to TRUE if the MySQL user has set it in MySQL */
+ extern ibool  srv_lower_case_table_names;
+diff -r 25523be1816e innobase/include/trx0trx.h
+--- a/innobase/include/trx0trx.h       Mon Dec 22 00:25:06 2008 -0800
++++ b/innobase/include/trx0trx.h       Mon Dec 22 00:26:39 2008 -0800
 @@ -668,6 +668,17 @@
        /*------------------------------*/
        char detailed_error[256];       /* detailed error message for last
                                        error, or empty. */
 +      /*------------------------------*/
-+      os_thread_id_t  trx_thread_id;
 +      ulint           io_reads;
 +      ib_longlong     io_read;
 +      ulint           io_reads_wait_timer;
@@ -491,12 +489,13 @@ diff -r bb81fcdd7db2 innobase/include/trx0trx.h
 +      ulint           distinct_page_access;
 +#define       DPAH_SIZE       8192
 +      byte*           distinct_page_access_hash;
++      ibool           take_stats;
  };
  
  #define TRX_MAX_N_THREADS     32      /* maximum number of concurrent
-diff -r bb81fcdd7db2 innobase/lock/lock0lock.c
---- a/innobase/lock/lock0lock.c        Mon Sep 08 16:38:33 2008 -0700
-+++ b/innobase/lock/lock0lock.c        Mon Sep 08 16:38:46 2008 -0700
+diff -r 25523be1816e innobase/lock/lock0lock.c
+--- a/innobase/lock/lock0lock.c        Mon Dec 22 00:25:06 2008 -0800
++++ b/innobase/lock/lock0lock.c        Mon Dec 22 00:26:39 2008 -0800
 @@ -1806,6 +1806,8 @@
  {
        lock_t* lock;
@@ -506,16 +505,18 @@ diff -r bb81fcdd7db2 innobase/lock/lock0lock.c
        
  #ifdef UNIV_SYNC_DEBUG
        ut_ad(mutex_own(&kernel_mutex));
-@@ -1861,6 +1863,8 @@
+@@ -1861,6 +1863,10 @@
        trx->que_state = TRX_QUE_LOCK_WAIT;
        trx->was_chosen_as_deadlock_victim = FALSE;
        trx->wait_started = time(NULL);
-+      ut_usectime(&sec, &ms);
-+      trx->lock_que_wait_ustarted = (ib_longlong)sec * 1000000 + ms;
++      if (srv_slow_log && trx->take_stats) {
++              ut_usectime(&sec, &ms);
++              trx->lock_que_wait_ustarted = (ib_longlong)sec * 1000000 + ms;
++      }
  
        ut_a(que_thr_stop(thr));
  
-@@ -3514,7 +3518,9 @@
+@@ -3514,7 +3520,9 @@
  {
        lock_t* lock;
        trx_t*  trx;
@@ -526,30 +527,20 @@ diff -r bb81fcdd7db2 innobase/lock/lock0lock.c
  #ifdef UNIV_SYNC_DEBUG
        ut_ad(mutex_own(&kernel_mutex));
  #endif /* UNIV_SYNC_DEBUG */
-@@ -3563,7 +3569,10 @@
-       
+@@ -3564,6 +3572,10 @@
                return(DB_SUCCESS);
        }
--      
-+
-+      trx->wait_started = time(NULL);
-+      ut_usectime(&sec, &ms);
-+      trx->lock_que_wait_ustarted = (ib_longlong)sec * 1000000 + ms;
+       
++      if (srv_slow_log && trx->take_stats) {
++              ut_usectime(&sec, &ms);
++              trx->lock_que_wait_ustarted = (ib_longlong)sec * 1000000 + ms;
++      }
        trx->que_state = TRX_QUE_LOCK_WAIT;
        trx->was_chosen_as_deadlock_victim = FALSE;
        trx->wait_started = time(NULL);
-@@ -4289,7 +4298,7 @@
-       ulint   i;
-       mtr_t   mtr;
-       trx_t*  trx;
--
-+      
-       fprintf(file, "LIST OF TRANSACTIONS FOR EACH SESSION:\n");
-       /* First print info on non-active transactions */
-diff -r bb81fcdd7db2 innobase/os/os0file.c
---- a/innobase/os/os0file.c    Mon Sep 08 16:38:33 2008 -0700
-+++ b/innobase/os/os0file.c    Mon Sep 08 16:38:46 2008 -0700
+diff -r 25523be1816e innobase/os/os0file.c
+--- a/innobase/os/os0file.c    Mon Dec 22 00:25:06 2008 -0800
++++ b/innobase/os/os0file.c    Mon Dec 22 00:26:39 2008 -0800
 @@ -14,6 +14,7 @@
  #include "srv0start.h"
  #include "fil0fil.h"
@@ -558,15 +549,7 @@ diff -r bb81fcdd7db2 innobase/os/os0file.c
  
  #if defined(UNIV_HOTBACKUP) && defined(__WIN__)
  /* Add includes for the _stat() call to compile on Windows */
-@@ -101,6 +102,7 @@
-       struct aiocb    control;        /* Posix control block for aio
-                                       request */
- #endif
-+        trx_t*                trx;
- };
- /* The aio array structure */
-@@ -1903,9 +1905,13 @@
+@@ -1903,9 +1904,13 @@
  #ifndef __WIN__
  /***********************************************************************
  Does a synchronous read operation in Posix. */
@@ -581,7 +564,7 @@ diff -r bb81fcdd7db2 innobase/os/os0file.c
  /*==========*/
                                /* out: number of bytes read, -1 if error */
        os_file_t       file,   /* in: handle to a file */
-@@ -1913,12 +1919,17 @@
+@@ -1913,12 +1918,17 @@
        ulint           n,      /* in: number of bytes to read */       
        ulint           offset, /* in: least significant 32 bits of file
                                offset from where to read */
@@ -602,12 +585,12 @@ diff -r bb81fcdd7db2 innobase/os/os0file.c
        ut_a((offset & 0xFFFFFFFFUL) == offset);
          
          /* If off_t is > 4 bytes in size, then we assume we can pass a
-@@ -1937,7 +1948,13 @@
+@@ -1937,7 +1947,13 @@
          }
  
        os_n_file_reads++;
 -
-+      if (trx)
++      if (srv_slow_log && trx && trx->take_stats)
 +      {
 +              trx->io_reads++;
 +              trx->io_read += n;
@@ -617,11 +600,11 @@ diff -r bb81fcdd7db2 innobase/os/os0file.c
  #if defined(HAVE_PREAD) && !defined(HAVE_BROKEN_PREAD)
          os_mutex_enter(os_file_count_mutex);
        os_file_n_pending_preads++;
-@@ -1951,6 +1968,13 @@
+@@ -1951,6 +1967,13 @@
        os_n_pending_reads--;
          os_mutex_exit(os_file_count_mutex);
  
-+        if (trx)
++        if (srv_slow_log && trx && trx->take_stats && start_time)
 +        {
 +              ut_usectime(&sec, &ms);
 +              finish_time = (ib_longlong)sec * 1000000 + ms;
@@ -631,12 +614,12 @@ diff -r bb81fcdd7db2 innobase/os/os0file.c
        return(n_bytes);
  #else
        {
-@@ -1980,6 +2004,13 @@
+@@ -1980,6 +2003,13 @@
          os_mutex_enter(os_file_count_mutex);
        os_n_pending_reads--;
          os_mutex_exit(os_file_count_mutex);
 +
-+        if (trx)
++        if (srv_slow_log && trx && trx->take_stats && start_time)
 +        {
 +              ut_usectime(&sec, &ms);
 +              finish_time = (ib_longlong)sec * 1000000 + ms;
@@ -645,7 +628,7 @@ diff -r bb81fcdd7db2 innobase/os/os0file.c
  
        return(ret);
        }
-@@ -2103,7 +2134,7 @@
+@@ -2103,7 +2133,7 @@
  Requests a synchronous positioned read operation. */
  
  ibool
@@ -654,7 +637,7 @@ diff -r bb81fcdd7db2 innobase/os/os0file.c
  /*=========*/
                                /* out: TRUE if request was
                                successful, FALSE if fail */
-@@ -2113,7 +2144,8 @@
+@@ -2113,7 +2143,8 @@
                                offset where to read */
        ulint           offset_high, /* in: most significant 32 bits of
                                offset */
@@ -664,16 +647,6 @@ diff -r bb81fcdd7db2 innobase/os/os0file.c
  {
  #ifdef __WIN__
        BOOL            ret;
-@@ -2128,8 +2160,7 @@
-       os_n_file_reads++;
-       os_bytes_read_since_printout += n;
--
--try_again:    
-+try_again:
-       ut_ad(file);
-       ut_ad(buf);
-       ut_ad(n > 0);
 @@ -2177,7 +2208,7 @@
        os_bytes_read_since_printout += n;
  
@@ -693,15 +666,6 @@ diff -r bb81fcdd7db2 innobase/os/os0file.c
  {
        os_aio_slot_t*  slot;
  #ifdef WIN_ASYNC_IO
-@@ -3196,7 +3228,7 @@
-       slot->offset   = offset;
-       slot->offset_high = offset_high;
-       slot->io_already_done = FALSE;
--      
-+
- #ifdef WIN_ASYNC_IO           
-       control = &(slot->control);
-       control->Offset = (DWORD)offset;
 @@ -3390,7 +3422,8 @@
                                can be used to identify a completed aio
                                operation); if mode is OS_AIO_SYNC, these
@@ -723,7 +687,7 @@ diff -r bb81fcdd7db2 innobase/os/os0file.c
                }
  
                ut_a(type == OS_FILE_WRITE);
-@@ -3463,14 +3496,19 @@
+@@ -3463,8 +3496,13 @@
                ut_error;
        }
        
@@ -738,37 +702,19 @@ diff -r bb81fcdd7db2 innobase/os/os0file.c
        if (type == OS_FILE_READ) {
                if (os_aio_use_native_aio) {
  #ifdef WIN_ASYNC_IO
-                       os_n_file_reads++;
-                       os_bytes_read_since_printout += len;
--                      
-+
-                       ret = ReadFile(file, buf, (DWORD)n, &len,
-                                                       &(slot->control));
- #elif defined(POSIX_ASYNC_IO)
-@@ -4038,7 +4076,7 @@
-                       ut_memcpy(consecutive_ios[i]->buf, combined_buf + offs, 
-                                               consecutive_ios[i]->len);
--                      offs += consecutive_ios[i]->len;
-+                      offs += consecutive_ios[i]->len;                        
-               }
-       }
-@@ -4050,9 +4088,8 @@
-       /* Mark the i/os done in slots */
--      for (i = 0; i < n_consecutive; i++) {
-+      for (i = 0; i < n_consecutive; i++) 
-               consecutive_ios[i]->io_already_done = TRUE;
--      }
+diff -r 25523be1816e innobase/srv/srv0srv.c
+--- a/innobase/srv/srv0srv.c   Mon Dec 22 00:25:06 2008 -0800
++++ b/innobase/srv/srv0srv.c   Mon Dec 22 00:26:39 2008 -0800
+@@ -47,6 +47,8 @@
+ #include "dict0boot.h"
+ #include "srv0start.h"
+ #include "row0mysql.h"
++
++ibool srv_slow_log = 0;
  
-       /* We return the messages for the first slot now, and if there were
-       several slots, the messages will be returned with subsequent calls
-diff -r bb81fcdd7db2 innobase/srv/srv0srv.c
---- a/innobase/srv/srv0srv.c   Mon Sep 08 16:38:33 2008 -0700
-+++ b/innobase/srv/srv0srv.c   Mon Sep 08 16:38:46 2008 -0700
-@@ -996,6 +996,10 @@
+ /* This is set to TRUE if the MySQL user has set it in MySQL; currently
+ affects only FOREIGN KEY definition parsing */
+@@ -996,6 +998,10 @@
        ibool                   has_slept = FALSE;
        srv_conc_slot_t*        slot      = NULL;
        ulint                   i;
@@ -779,7 +725,7 @@ diff -r bb81fcdd7db2 innobase/srv/srv0srv.c
  
        /* If trx has 'free tickets' to enter the engine left, then use one
        such ticket */
-@@ -1054,6 +1058,7 @@
+@@ -1054,6 +1060,7 @@
      if (SRV_THREAD_SLEEP_DELAY > 0)
      {
        os_thread_sleep(SRV_THREAD_SLEEP_DELAY);
@@ -787,12 +733,14 @@ diff -r bb81fcdd7db2 innobase/srv/srv0srv.c
      }
  
                trx->op_info = "";
-@@ -1109,11 +1114,18 @@
+@@ -1109,11 +1116,22 @@
        /* Go to wait for the event; when a thread leaves InnoDB it will
        release this thread */
  
-+      ut_usectime(&sec, &ms);
-+      start_time = (ib_longlong)sec * 1000000 + ms;
++      if (srv_slow_log && trx->take_stats) {
++              ut_usectime(&sec, &ms);
++              start_time = (ib_longlong)sec * 1000000 + ms;
++      }
 +
        trx->op_info = "waiting in InnoDB queue";
  
@@ -800,99 +748,18 @@ diff -r bb81fcdd7db2 innobase/srv/srv0srv.c
  
        trx->op_info = "";
 +
-+      ut_usectime(&sec, &ms);
-+      finish_time = (ib_longlong)sec * 1000000 + ms;
-+      trx->innodb_que_wait_timer += (ulint)(finish_time - start_time);
++      if (srv_slow_log && trx->take_stats && start_time) {
++              ut_usectime(&sec, &ms);
++              finish_time = (ib_longlong)sec * 1000000 + ms;
++              trx->innodb_que_wait_timer += (ulint)(finish_time - start_time);
++      }
  
        os_fast_mutex_lock(&srv_conc_mutex);
  
-diff -r bb81fcdd7db2 innobase/thr/thr0loc.c
---- a/innobase/thr/thr0loc.c   Mon Sep 08 16:38:33 2008 -0700
-+++ b/innobase/thr/thr0loc.c   Mon Sep 08 16:38:46 2008 -0700
-@@ -45,6 +45,7 @@
-                               for this thread */
-       ibool           in_ibuf;/* TRUE if the the thread is doing an ibuf
-                               operation */
-+      trx_t*          trx;
-       hash_node_t     hash;   /* hash chain node */
-       ulint           magic_n;
- };
-@@ -113,6 +114,29 @@
- }
- /***********************************************************************
-+Gets trx */
-+
-+trx_t*
-+thr_local_get_trx(
-+/*==================*/
-+                              /* out: trx for mysql */
-+      os_thread_id_t  id)     /* in: thread id of the thread */
-+{
-+      trx_t*          trx;
-+      thr_local_t*    local;
-+
-+      mutex_enter(&thr_local_mutex);
-+
-+      local = thr_local_get(id);
-+
-+      trx = local->trx;
-+
-+      mutex_exit(&thr_local_mutex);
-+
-+      return(trx);
-+}
-+
-+/***********************************************************************
- Sets the slot number in the thread table of a thread. */
- void
-@@ -124,11 +148,31 @@
-       thr_local_t*    local;
-       mutex_enter(&thr_local_mutex);
--      
-+
-       local = thr_local_get(id);
-       local->slot_no = slot_no;
--      
-+
-+      mutex_exit(&thr_local_mutex);
-+}
-+
-+/***********************************************************************
-+Sets trx */
-+
-+void
-+thr_local_set_trx(
-+/*==================*/
-+      os_thread_id_t  id,     /* in: thread id of the thread */
-+      trx_t*          trx)    /* in: trx */
-+{
-+      thr_local_t*    local;
-+
-+      mutex_enter(&thr_local_mutex);
-+
-+      local = thr_local_get(id);
-+
-+      local->trx = trx;
-+
-       mutex_exit(&thr_local_mutex);
- }
-@@ -172,6 +216,7 @@
-       local->magic_n = THR_LOCAL_MAGIC_N;
-       local->in_ibuf = FALSE;
-+      local->trx = NULL;
-       
-       mutex_enter(&thr_local_mutex);
-diff -r bb81fcdd7db2 innobase/trx/trx0trx.c
---- a/innobase/trx/trx0trx.c   Mon Sep 08 16:38:33 2008 -0700
-+++ b/innobase/trx/trx0trx.c   Mon Sep 08 16:38:46 2008 -0700
-@@ -190,6 +190,16 @@
+diff -r 25523be1816e innobase/trx/trx0trx.c
+--- a/innobase/trx/trx0trx.c   Mon Dec 22 00:25:06 2008 -0800
++++ b/innobase/trx/trx0trx.c   Mon Dec 22 00:26:39 2008 -0800
+@@ -190,6 +190,15 @@
        trx->global_read_view_heap = mem_heap_create(256);
        trx->global_read_view = NULL;
        trx->read_view = NULL;
@@ -904,32 +771,23 @@ diff -r bb81fcdd7db2 innobase/trx/trx0trx.c
 +      trx->innodb_que_wait_timer = 0;
 +      trx->distinct_page_access = 0;
 +      trx->distinct_page_access_hash = NULL;
-+      trx->trx_thread_id = os_thread_get_curr_id();
-+      thr_local_set_trx(trx->trx_thread_id, NULL);
++      trx->take_stats = FALSE;
  
        /* Set X/Open XA transaction identification to NULL */
        memset(&trx->xid, 0, sizeof(trx->xid));
-@@ -230,6 +240,10 @@
+@@ -230,6 +239,11 @@
  
        trx->mysql_process_no = os_proc_get_number();
        
-+      trx->distinct_page_access_hash = mem_alloc(DPAH_SIZE);
-+      memset(trx->distinct_page_access_hash, 0, DPAH_SIZE);
-+      thr_local_set_trx(trx->mysql_thread_id, trx);
++      if (srv_slow_log && trx->take_stats) {
++              trx->distinct_page_access_hash = mem_alloc(DPAH_SIZE);
++              memset(trx->distinct_page_access_hash, 0, DPAH_SIZE);
++      }
 +
        return(trx);
  }
  
-@@ -355,6 +369,8 @@
-       ut_a(trx->read_view == NULL);
-       
-+      thr_local_free(trx->trx_thread_id);
-+      
-       mem_free(trx);
- }
-@@ -366,6 +382,12 @@
+@@ -366,6 +380,12 @@
  /*===============*/
        trx_t*  trx)    /* in, own: trx object */
  {
@@ -942,7 +800,20 @@ diff -r bb81fcdd7db2 innobase/trx/trx0trx.c
        thr_local_free(trx->mysql_thread_id);
  
        mutex_enter(&kernel_mutex);
-@@ -1064,7 +1086,10 @@
+@@ -389,6 +409,12 @@
+ /*====================*/
+       trx_t*  trx)    /* in, own: trx object */
+ {
++      if (trx->distinct_page_access_hash)
++      {
++              mem_free(trx->distinct_page_access_hash);
++              trx->distinct_page_access_hash= NULL;
++      }
++
+       mutex_enter(&kernel_mutex);
+       
+       trx_free(trx);
+@@ -1064,7 +1090,10 @@
        trx_t*  trx)    /* in: transaction */
  {
        que_thr_t*      thr;
@@ -954,17 +825,19 @@ diff -r bb81fcdd7db2 innobase/trx/trx0trx.c
  #ifdef UNIV_SYNC_DEBUG
        ut_ad(mutex_own(&kernel_mutex));
  #endif /* UNIV_SYNC_DEBUG */
-@@ -1080,6 +1105,9 @@
+@@ -1080,6 +1109,11 @@
                thr = UT_LIST_GET_FIRST(trx->wait_thrs);
        }
  
-+      ut_usectime(&sec, &ms);
-+      now = (ib_longlong)sec * 1000000 + ms;
-+      trx->lock_que_wait_timer += (ulint)(now - trx->lock_que_wait_ustarted);
++      if (srv_slow_log && trx->take_stats) {
++              ut_usectime(&sec, &ms);
++              now = (ib_longlong)sec * 1000000 + ms;
++              trx->lock_que_wait_timer += (ulint)(now - trx->lock_que_wait_ustarted);
++      }
        trx->que_state = TRX_QUE_RUNNING;
  }
  
-@@ -1093,6 +1121,9 @@
+@@ -1093,6 +1127,9 @@
        trx_t*  trx)    /* in: transaction in the TRX_QUE_LOCK_WAIT state */
  {
        que_thr_t*      thr;
@@ -974,29 +847,53 @@ diff -r bb81fcdd7db2 innobase/trx/trx0trx.c
  
  #ifdef UNIV_SYNC_DEBUG
        ut_ad(mutex_own(&kernel_mutex));
-@@ -1109,6 +1140,9 @@
+@@ -1109,6 +1146,11 @@
                thr = UT_LIST_GET_FIRST(trx->wait_thrs);
        }
  
-+      ut_usectime(&sec, &ms);
-+      now = (ib_longlong)sec * 1000000 + ms;
-+      trx->lock_que_wait_timer += (ulint)(now - trx->lock_que_wait_ustarted);
++      if (srv_slow_log && trx->take_stats) {
++              ut_usectime(&sec, &ms);
++              now = (ib_longlong)sec * 1000000 + ms;
++              trx->lock_que_wait_timer += (ulint)(now - trx->lock_que_wait_ustarted);
++      }
        trx->que_state = TRX_QUE_RUNNING;
  }
  
-diff -r bb81fcdd7db2 patch_info/microslow_innodb.info
+diff -r 25523be1816e mysys/my_getopt.c
+--- a/mysys/my_getopt.c        Mon Dec 22 00:25:06 2008 -0800
++++ b/mysys/my_getopt.c        Mon Dec 22 00:26:39 2008 -0800
+@@ -1061,6 +1061,9 @@
+       case GET_ULONG:
+       printf("%lu\n", *((ulong*) value));
+       break;
++      case GET_DOUBLE:
++      printf("%6f\n", *((double*) value));
++      break;
+       case GET_LL:
+       printf("%s\n", llstr(*((longlong*) value), buff));
+       break;
+diff -r 25523be1816e patch_info/microslow_innodb.info
 --- /dev/null  Thu Jan 01 00:00:00 1970 +0000
-+++ b/patch_info/microslow_innodb.info Mon Sep 08 16:38:46 2008 -0700
-@@ -0,0 +1,6 @@
++++ b/patch_info/microslow_innodb.info Mon Dec 22 00:26:39 2008 -0800
+@@ -0,0 +1,15 @@
 +File=microslow_innodb.patch
 +Name=Extended statistics in slow.log
-+Version=1.0
++Version=1.1
 +Author=Percona <info@percona.com>
 +License=GPL
 +Comment=
-diff -r bb81fcdd7db2 scripts/mysqldumpslow.sh
---- a/scripts/mysqldumpslow.sh Mon Sep 08 16:38:33 2008 -0700
-+++ b/scripts/mysqldumpslow.sh Mon Sep 08 16:38:46 2008 -0700
++Changelog
++2008-11-26
++YK: Fix inefficient determination of trx, Make not to call useless gettimeofday when don't use slow log. Make log_slow_queries dynamic (bool).
++
++2008-11-07
++VT: Moved log_slow_rate_limit in SHOW VARIABLE into right place
++
++2008-11
++Arjen Lentz: Fixups (backward compatibility) by Arjen Lentz <arjen@openquery.com.au>
+diff -r 25523be1816e scripts/mysqldumpslow.sh
+--- a/scripts/mysqldumpslow.sh Mon Dec 22 00:25:06 2008 -0800
++++ b/scripts/mysqldumpslow.sh Mon Dec 22 00:26:39 2008 -0800
 @@ -83,8 +83,8 @@
      s/^#? Time: \d{6}\s+\d+:\d+:\d+.*\n//;
      my ($user,$host) = s/^#? User\@Host:\s+(\S+)\s+\@\s+(\S+).*\n// ? ($1,$2) : ('','');
@@ -1008,9 +905,9 @@ diff -r bb81fcdd7db2 scripts/mysqldumpslow.sh
      $t -= $l unless $opt{l};
  
      # remove fluff that mysqld writes to log when it (re)starts:
-diff -r bb81fcdd7db2 sql-common/my_time.c
---- a/sql-common/my_time.c     Mon Sep 08 16:38:33 2008 -0700
-+++ b/sql-common/my_time.c     Mon Sep 08 16:38:46 2008 -0700
+diff -r 25523be1816e sql-common/my_time.c
+--- a/sql-common/my_time.c     Mon Dec 22 00:25:06 2008 -0800
++++ b/sql-common/my_time.c     Mon Dec 22 00:26:39 2008 -0800
 @@ -1252,3 +1252,37 @@
    return 0;
  }
@@ -1049,9 +946,9 @@ diff -r bb81fcdd7db2 sql-common/my_time.c
 +    *ltime= newtime;
 +  return newtime;
 +}
-diff -r bb81fcdd7db2 sql/filesort.cc
---- a/sql/filesort.cc  Mon Sep 08 16:38:33 2008 -0700
-+++ b/sql/filesort.cc  Mon Sep 08 16:38:46 2008 -0700
+diff -r 25523be1816e sql/filesort.cc
+--- a/sql/filesort.cc  Mon Dec 22 00:25:06 2008 -0800
++++ b/sql/filesort.cc  Mon Dec 22 00:26:39 2008 -0800
 @@ -180,6 +180,7 @@
    {
      statistic_increment(thd->status_var.filesort_scan_count, &LOCK_status);
@@ -1076,15 +973,111 @@ diff -r bb81fcdd7db2 sql/filesort.cc
    if (param->not_killable)
    {
      killed= &not_killable;
-diff -r bb81fcdd7db2 sql/ha_innodb.cc
---- a/sql/ha_innodb.cc Mon Sep 08 16:38:33 2008 -0700
-+++ b/sql/ha_innodb.cc Mon Sep 08 16:38:46 2008 -0700
+diff -r 25523be1816e sql/ha_innodb.cc
+--- a/sql/ha_innodb.cc Mon Dec 22 00:25:06 2008 -0800
++++ b/sql/ha_innodb.cc Mon Dec 22 00:26:39 2008 -0800
 @@ -1,3 +1,4 @@
 +
  /* Copyright (C) 2000-2005 MySQL AB & Innobase Oy
  
     This program is free software; you can redistribute it and/or modify
-@@ -6098,6 +6099,7 @@
+@@ -805,9 +806,34 @@
+               trx->check_unique_secondary = TRUE;
+       }
++      if (thd->variables.log_slow_verbosity & SLOG_V_INNODB) {
++              trx->take_stats = TRUE;
++      } else {
++              trx->take_stats = FALSE;
++      }
++
+       return(trx);
+ }
++/*************************************************************************
++Gets current trx. */
++extern "C"
++trx_t*
++innobase_get_trx()
++{
++      THD *thd=current_thd;
++      if (likely(thd != 0)) {
++              return((trx_t*) thd->ha_data[innobase_hton.slot]);
++      } else {
++              return(NULL);
++      }
++}
++
++void
++innobase_update_var_slow_log()
++{
++      srv_slow_log = (ibool) opt_slow_log;
++}
+ /*************************************************************************
+ Construct ha_innobase handler. */
+@@ -1309,6 +1335,8 @@
+       }
+       /* -------------- Log files ---------------------------*/
++
++      srv_slow_log = (ibool) opt_slow_log;
+       /* The default dir for log files is the datadir of MySQL */
+@@ -4673,6 +4701,12 @@
+               trx->check_unique_secondary = FALSE;
+       }
++      if (thd->variables.log_slow_verbosity & SLOG_V_INNODB) {
++              trx->take_stats = TRUE;
++      } else {
++              trx->take_stats = FALSE;
++      }
++
+       if (lower_case_table_names) {
+               srv_lower_case_table_names = TRUE;
+       } else {
+@@ -4938,6 +4972,12 @@
+               trx->check_unique_secondary = FALSE;
+       }
++      if (thd->variables.log_slow_verbosity & SLOG_V_INNODB) {
++              trx->take_stats = TRUE;
++      } else {
++              trx->take_stats = FALSE;
++      }
++
+       name_len = strlen(name);
+       assert(name_len < 1000);
+@@ -5025,6 +5065,12 @@
+               trx->check_foreigns = FALSE;
+       }
++      if (current_thd->variables.log_slow_verbosity & SLOG_V_INNODB) {
++              trx->take_stats = TRUE;
++      } else {
++              trx->take_stats = FALSE;
++      }
++
+       error = row_drop_database_for_mysql(namebuf, trx);
+       my_free(namebuf, MYF(0));
+@@ -5089,6 +5135,12 @@
+       if (current_thd->options & OPTION_NO_FOREIGN_KEY_CHECKS) {
+               trx->check_foreigns = FALSE;
++      }
++
++      if (current_thd->variables.log_slow_verbosity & SLOG_V_INNODB) {
++              trx->take_stats = TRUE;
++      } else {
++              trx->take_stats = FALSE;
+       }
+       name_len1 = strlen(from);
+@@ -6098,6 +6150,7 @@
  {
        row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt;
        trx_t*          trx;
@@ -1092,7 +1085,7 @@ diff -r bb81fcdd7db2 sql/ha_innodb.cc
  
        DBUG_ENTER("ha_innobase::external_lock");
        DBUG_PRINT("enter",("lock_type: %d", lock_type));
-@@ -6221,7 +6223,24 @@
+@@ -6221,7 +6274,24 @@
  
        if (trx->n_mysql_tables_in_use == 0) {
  
@@ -1118,10 +1111,22 @@ diff -r bb81fcdd7db2 sql/ha_innodb.cc
                prebuilt->used_in_HANDLER = FALSE;
  
                if (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) {
-diff -r bb81fcdd7db2 sql/log.cc
---- a/sql/log.cc       Mon Sep 08 16:38:33 2008 -0700
-+++ b/sql/log.cc       Mon Sep 08 16:38:46 2008 -0700
-@@ -2229,10 +2229,11 @@
+diff -r 25523be1816e sql/ha_innodb.h
+--- a/sql/ha_innodb.h  Mon Dec 22 00:25:06 2008 -0800
++++ b/sql/ha_innodb.h  Mon Dec 22 00:26:39 2008 -0800
+@@ -266,6 +266,8 @@
+ int innobase_start_trx_and_assign_read_view(THD* thd);
++void innobase_update_var_slow_log();
++
+ /***********************************************************************
+ This function is used to prepare X/Open XA distributed transaction   */
+diff -r 25523be1816e sql/log.cc
+--- a/sql/log.cc       Mon Dec 22 00:25:06 2008 -0800
++++ b/sql/log.cc       Mon Dec 22 00:26:39 2008 -0800
+@@ -2229,11 +2229,12 @@
  */
  
  bool MYSQL_LOG::write(THD *thd,const char *query, uint query_length,
@@ -1130,10 +1135,12 @@ diff -r bb81fcdd7db2 sql/log.cc
  {
    bool error=0;
    time_t current_time;
+-  if (!is_open())
 +  ulonglong current_timer;
-   if (!is_open())
++  if (!opt_slow_log || !is_open())
      return 0;
    DBUG_ENTER("MYSQL_LOG::write");
 @@ -2243,7 +2244,8 @@
      int tmp_errno=0;
      char buff[80],*end;
@@ -1144,7 +1151,7 @@ diff -r bb81fcdd7db2 sql/log.cc
      {
        VOID(pthread_mutex_unlock(&LOCK_log));
        DBUG_RETURN(0);
-@@ -2273,22 +2275,69 @@
+@@ -2273,22 +2275,71 @@
        if (my_b_printf(&log_file, "# User@Host: %s[%s] @ %s [%s]\n",
                        sctx->priv_user ?
                        sctx->priv_user : "",
@@ -1176,11 +1183,14 @@ diff -r bb81fcdd7db2 sql/log.cc
 -                      (ulong) (current_time - query_start_arg),
 -                      (ulong) (thd->time_after_lock - query_start_arg),
 +                      "# Thread_id: %lu  Schema: %s\n" \
-+                      "# Query_time: %s  Lock_time: %s  Rows_sent: %lu  Rows_examined: %lu\n", 
++                      "# Query_time: %s  Lock_time: %s  Rows_sent: %lu  Rows_examined: %lu  Rows_affected: %lu  Rows_read: %lu\n", 
 +                      (ulong) thd->thread_id, (thd->db ? thd->db : ""),
 +                      buf[0], buf[1],
                        (ulong) thd->sent_row_count,
-                       (ulong) thd->examined_row_count) == (uint) -1)
+-                      (ulong) thd->examined_row_count) == (uint) -1)
++                      (ulong) thd->examined_row_count,
++                      ((long) thd->row_count_func > 0 ) ? (ulong) thd->row_count_func : 0,
++                      (ulong) thd->row_count) == (uint) -1)
          tmp_errno=errno;
 +      if ((thd->variables.log_slow_verbosity & SLOG_V_QUERY_PLAN) &&
 +           my_b_printf(&log_file,
@@ -1219,9 +1229,9 @@ diff -r bb81fcdd7db2 sql/log.cc
      }
      if (thd->db && strcmp(thd->db,db))
      {                                         // Database changed
-diff -r bb81fcdd7db2 sql/log_event.cc
---- a/sql/log_event.cc Mon Sep 08 16:38:33 2008 -0700
-+++ b/sql/log_event.cc Mon Sep 08 16:38:46 2008 -0700
+diff -r 25523be1816e sql/log_event.cc
+--- a/sql/log_event.cc Mon Dec 22 00:25:06 2008 -0800
++++ b/sql/log_event.cc Mon Dec 22 00:26:39 2008 -0800
 @@ -2039,6 +2039,7 @@
        /* Execute the query (note that we bypass dispatch_command()) */
        const char* found_semicolon= NULL;
@@ -1230,10 +1240,10 @@ diff -r bb81fcdd7db2 sql/log_event.cc
  
      }
      else
-diff -r bb81fcdd7db2 sql/mysql_priv.h
---- a/sql/mysql_priv.h Mon Sep 08 16:38:33 2008 -0700
-+++ b/sql/mysql_priv.h Mon Sep 08 16:38:46 2008 -0700
-@@ -484,6 +484,78 @@
+diff -r 25523be1816e sql/mysql_priv.h
+--- a/sql/mysql_priv.h Mon Dec 22 00:25:06 2008 -0800
++++ b/sql/mysql_priv.h Mon Dec 22 00:26:39 2008 -0800
+@@ -489,6 +489,78 @@
  #define WEEK_FIRST_WEEKDAY   4
  
  #define STRING_BUFFER_USUAL_SIZE 80
@@ -1312,7 +1322,15 @@ diff -r bb81fcdd7db2 sql/mysql_priv.h
  
  enum enum_parsing_place
  {
-@@ -1333,7 +1405,7 @@
+@@ -1345,6 +1417,7 @@
+ extern bool using_update_log, opt_large_files, server_id_supplied;
+ extern bool opt_update_log, opt_bin_log, opt_error_log;
+ extern my_bool opt_log, opt_slow_log, opt_log_queries_not_using_indexes;
++extern char *opt_slow_logname;
+ extern bool opt_disable_networking, opt_skip_show_db;
+ extern my_bool opt_character_set_client_handshake;
+ extern bool volatile abort_loop, shutdown_in_progress, grant_option;
+@@ -1356,7 +1429,7 @@
  extern my_bool opt_enable_named_pipe, opt_sync_frm, opt_allow_suspicious_udfs;
  extern my_bool opt_secure_auth;
  extern char* opt_secure_file_priv;
@@ -1321,9 +1339,9 @@ diff -r bb81fcdd7db2 sql/mysql_priv.h
  extern my_bool sp_automatic_privileges, opt_noacl;
  extern my_bool opt_old_style_user_limits, trust_function_creators;
  extern uint opt_crash_binlog_innodb;
-diff -r bb81fcdd7db2 sql/mysqld.cc
---- a/sql/mysqld.cc    Mon Sep 08 16:38:33 2008 -0700
-+++ b/sql/mysqld.cc    Mon Sep 08 16:38:46 2008 -0700
+diff -r 25523be1816e sql/mysqld.cc
+--- a/sql/mysqld.cc    Mon Dec 22 00:25:06 2008 -0800
++++ b/sql/mysqld.cc    Mon Dec 22 00:26:39 2008 -0800
 @@ -175,7 +175,6 @@
  static void getvolumename();
  static void getvolumeID(BYTE *volumeName);
@@ -1332,7 +1350,7 @@ diff -r bb81fcdd7db2 sql/mysqld.cc
  
  #ifdef _AIX41
  int initgroups(const char *,unsigned int);
-@@ -406,6 +405,7 @@
+@@ -409,10 +408,12 @@
  my_bool opt_secure_auth= 0;
  char* opt_secure_file_priv= 0;
  my_bool opt_log_slow_admin_statements= 0;
@@ -1340,7 +1358,12 @@ diff -r bb81fcdd7db2 sql/mysqld.cc
  my_bool lower_case_file_system= 0;
  my_bool opt_large_pages= 0;
  uint    opt_large_page_size= 0;
-@@ -503,6 +503,7 @@
+ my_bool opt_old_style_user_limits= 0, trust_function_creators= 0;
++char* opt_slow_logname= 0;
+ /*
+   True if there is at least one per-hour limit for some user, so we should
+   check them before each query (and possibly reset counters when hour is
+@@ -507,6 +508,7 @@
  Ge_creator ge_creator;
  Le_creator le_creator;
  
@@ -1348,7 +1371,16 @@ diff -r bb81fcdd7db2 sql/mysqld.cc
  
  FILE *bootstrap_file;
  int bootstrap_error;
-@@ -3649,6 +3650,8 @@
+@@ -584,7 +586,7 @@
+ static int cleanup_done;
+ static ulong opt_specialflag, opt_myisam_block_size;
+ static char *opt_logname, *opt_update_logname, *opt_binlog_index_name;
+-static char *opt_slow_logname, *opt_tc_heuristic_recover;
++static char *opt_tc_heuristic_recover;
+ static char *mysql_home_ptr, *pidfile_name_ptr;
+ static char **defaults_argv;
+ static char *opt_bin_logname;
+@@ -3655,6 +3657,8 @@
        unireg_abort(1);
      }
    }
@@ -1357,7 +1389,7 @@ diff -r bb81fcdd7db2 sql/mysqld.cc
  #endif /* __WIN__ */
  
    if (init_common_variables(MYSQL_CONFIG_NAME,
-@@ -4892,7 +4895,7 @@
+@@ -4901,7 +4905,7 @@
    OPT_INTERACTIVE_TIMEOUT, OPT_JOIN_BUFF_SIZE,
    OPT_KEY_BUFFER_SIZE, OPT_KEY_CACHE_BLOCK_SIZE,
    OPT_KEY_CACHE_DIVISION_LIMIT, OPT_KEY_CACHE_AGE_THRESHOLD,
@@ -1366,7 +1398,7 @@ diff -r bb81fcdd7db2 sql/mysqld.cc
    OPT_LOWER_CASE_TABLE_NAMES, OPT_MAX_ALLOWED_PACKET,
    OPT_MAX_BINLOG_CACHE_SIZE, OPT_MAX_BINLOG_SIZE,
    OPT_MAX_CONNECTIONS, OPT_MAX_CONNECT_ERRORS,
-@@ -4983,6 +4986,10 @@
+@@ -4992,11 +4996,17 @@
    OPT_TIMED_MUTEXES,
    OPT_OLD_STYLE_USER_LIMITS,
    OPT_LOG_SLOW_ADMIN_STATEMENTS,
@@ -1375,24 +1407,52 @@ diff -r bb81fcdd7db2 sql/mysqld.cc
 +  OPT_LOG_SLOW_VERBOSITY,
 +  OPT_LOG_SLOW_FILTER,
    OPT_TABLE_LOCK_WAIT_TIMEOUT,
+   OPT_PLUGIN_DIR,
    OPT_PORT_OPEN_TIMEOUT,
    OPT_MERGE,
-@@ -5374,6 +5381,11 @@
-    "Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements to the slow log if it is open.",
+   OPT_PROFILING,
++  OPT_SLOW_LOG,
++  OPT_SLOW_QUERY_LOG_FILE,
+   OPT_INNODB_ROLLBACK_ON_TIMEOUT,
+   OPT_SECURE_FILE_PRIV,
+   OPT_KEEP_FILES_ON_CREATE,
+@@ -5386,8 +5396,17 @@
     (gptr*) &opt_log_slow_admin_statements,
     (gptr*) &opt_log_slow_admin_statements,
-+   0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
+    0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
 +  {"log-slow-slave-statements", OPT_LOG_SLOW_SLAVE_STATEMENTS,
 +   "Log slow replicated statements to the slow log if it is open.",
 +   (gptr*) &opt_log_slow_slave_statements,
 +   (gptr*) &opt_log_slow_slave_statements,
-    0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
++   0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
    {"log-slow-queries", OPT_SLOW_QUERY_LOG,
      "Log slow queries to this log file. Defaults logging to hostname-slow.log file. Must be enabled to activate other slow log options.",
-@@ -6038,11 +6050,27 @@
++   (gptr*) &opt_slow_logname, (gptr*) &opt_slow_logname, 0, GET_STR, OPT_ARG,
++   0, 0, 0, 0, 0, 0},
++  {"slow_query_log_file", OPT_SLOW_QUERY_LOG_FILE,
++    "Log slow queries to given log file. Defaults logging to hostname-slow.log. Must be enabled to activate other slow log options.",
+    (gptr*) &opt_slow_logname, (gptr*) &opt_slow_logname, 0, GET_STR, OPT_ARG,
+    0, 0, 0, 0, 0, 0},
+   {"log-tc", OPT_LOG_TC,
+@@ -5753,6 +5772,9 @@
+    "Tells the slave thread to continue replication when a query returns an error from the provided list.",
+    0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ #endif
++  {"slow-query-log", OPT_SLOW_LOG,
++   "Enable|disable slow query log", (gptr*) &opt_slow_log,
++   (gptr*) &opt_slow_log, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
+   {"socket", OPT_SOCKET, "Socket file to use for connection.",
+    (gptr*) &mysqld_unix_port, (gptr*) &mysqld_unix_port, 0, GET_STR,
+    REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+@@ -6055,11 +6077,27 @@
     (gptr*) 0,
     0, (GET_ULONG | GET_ASK_ADDR) , REQUIRED_ARG, 100,
     1, 100, 0, 1, 0},
+-  {"long_query_time", OPT_LONG_QUERY_TIME,
+-   "Log all queries that have taken more than long_query_time seconds to execute to file.",
+-   (gptr*) &global_system_variables.long_query_time,
+-   (gptr*) &max_system_variables.long_query_time, 0, GET_ULONG,
+-   REQUIRED_ARG, 10, 1, LONG_TIMEOUT, 0, 1, 0},
 +  {"log_slow_filter", OPT_LOG_SLOW_FILTER,
 +    "Log only the queries that followed certain execution plan. Multiple flags allowed in a comma-separated string. [qc_miss, full_scan, full_join, tmp_table, tmp_table_on_disk, filesort, filesort_on_disk]",
 +    0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, SLOG_F_NONE, 0, 0},
@@ -1400,36 +1460,37 @@ diff -r bb81fcdd7db2 sql/mysqld.cc
 +    "Rate limit statement writes to slow log to only those from every (1/log_slow_rate_limit) session.",
 +    (gptr*) &global_system_variables.log_slow_rate_limit,
 +    (gptr*) &max_system_variables.log_slow_rate_limit, 0, GET_ULONG,
-+    REQUIRED_ARG, 1, 1, ~0L, 0, 1L, 0},
++    REQUIRED_ARG, 1, 1, LONG_MAX, 0, 1L, 0},
 +  {"log_slow_verbosity", OPT_LOG_SLOW_VERBOSITY,
 +    "Choose how verbose the messages to your slow log will be. Multiple flags allowed in a comma-separated string. [microtime, query_plan, innodb]",
 +    0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, SLOG_V_MICROTIME, 0, 0},
-   {"long_query_time", OPT_LONG_QUERY_TIME,
-    "Log all queries that have taken more than long_query_time seconds to execute to file.",
-    (gptr*) &global_system_variables.long_query_time,
-    (gptr*) &max_system_variables.long_query_time, 0, GET_ULONG,
--   REQUIRED_ARG, 10, 1, LONG_TIMEOUT, 0, 1, 0},
++   {"long_query_time", OPT_LONG_QUERY_TIME,
++    "Log all queries that have taken more than long_query_time seconds to execute to file.",
++    (gptr*) &global_system_variables.long_query_time,
++    (gptr*) &max_system_variables.long_query_time, 0, GET_DOUBLE,
 +    REQUIRED_ARG, 10000000, 0, LONG_TIMEOUT * 1000000, 0, 1, 0},
 +  {"min_examined_row_limit", OPT_MIN_EXAMINED_ROW_LIMIT,
 +    "Don't log queries which examine less than min_examined_row_limit rows to file.",
 +    (gptr*) &global_system_variables.min_examined_row_limit,
 +    (gptr*) &max_system_variables.min_examined_row_limit, 0, GET_ULONG,
-+    REQUIRED_ARG, 0, 0, ~0L, 0, 1L, 0},
++    REQUIRED_ARG, 0, 0, LONG_MAX, 0, 1L, 0},
    {"lower_case_table_names", OPT_LOWER_CASE_TABLE_NAMES,
     "If set to 1 table names are stored in lowercase on disk and table names will be case-insensitive.  Should be set to 2 if you are using a case insensitive file system",
     (gptr*) &lower_case_table_names,
-@@ -6810,7 +6838,9 @@
+@@ -6835,7 +6873,11 @@
    global_system_variables.max_join_size= (ulonglong) HA_POS_ERROR;
    max_system_variables.max_join_size=   (ulonglong) HA_POS_ERROR;
    global_system_variables.old_passwords= 0;
 -
++  global_system_variables.long_query_time = 10000000;
++  max_system_variables.long_query_time = LONG_TIMEOUT * 1000000;
 +  global_system_variables.log_slow_verbosity= SLOG_V_MICROTIME;
 +  global_system_variables.log_slow_filter= SLOG_F_NONE;
 +  
    /*
      Default behavior for 4.1 and 5.0 is to treat NULL values as unequal
      when collecting index statistics for MyISAM tables.
-@@ -7271,6 +7301,24 @@
+@@ -7296,6 +7338,35 @@
    case OPT_BOOTSTRAP:
      opt_noacl=opt_bootstrap=1;
      break;
@@ -1438,7 +1499,7 @@ diff -r bb81fcdd7db2 sql/mysqld.cc
 +          msl_flag_resolve_by_name(slog_filter, argument,
 +                                   SLOG_F_NONE, SLOG_F_INVALID)) == SLOG_F_INVALID)
 +    {
-+      fprintf(stderr,"Invalid argument to log_slow_filter\n");
++      fprintf(stderr,"Invalid argument in log_slow_filter: %s\n", argument);
 +      exit(1);
 +    }
 +    break;
@@ -1447,14 +1508,25 @@ diff -r bb81fcdd7db2 sql/mysqld.cc
 +         msl_flag_resolve_by_name(slog_verb, argument,
 +                                  SLOG_V_NONE, SLOG_V_INVALID)) == SLOG_V_INVALID)
 +    {
-+      fprintf(stderr,"Invalid argument to log_slow_verbosity\n");
++      fprintf(stderr,"Invalid argument in log_slow_verbosity: %s\n", argument);
++      exit(1);
++    }
++    break;
++  case OPT_LONG_QUERY_TIME:
++  {
++    double doubleslow = strtod(argument,NULL);
++    if (doubleslow < 0 || doubleslow > (LONG_TIMEOUT))
++    {
++      fprintf(stderr,"Out of range long_query_time value: %s\n", argument);
 +      exit(1);
 +    }
++    global_system_variables.long_query_time = (ulonglong) (doubleslow * 1000000);
 +    break;
++  }
    case OPT_STORAGE_ENGINE:
    {
      if ((enum db_type)((global_system_variables.table_type=
-@@ -7603,10 +7651,14 @@
+@@ -7628,10 +7699,14 @@
    if (opt_bdb)
      sql_print_warning("this binary does not contain BDB storage engine");
  #endif
@@ -1472,19 +1544,23 @@ diff -r bb81fcdd7db2 sql/mysqld.cc
    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);
-diff -r bb81fcdd7db2 sql/set_var.cc
---- a/sql/set_var.cc   Mon Sep 08 16:38:33 2008 -0700
-+++ b/sql/set_var.cc   Mon Sep 08 16:38:46 2008 -0700
-@@ -215,7 +215,7 @@
+diff -r 25523be1816e sql/set_var.cc
+--- a/sql/set_var.cc   Mon Dec 22 00:25:06 2008 -0800
++++ b/sql/set_var.cc   Mon Dec 22 00:26:39 2008 -0800
+@@ -217,9 +217,11 @@
    sys_log_queries_not_using_indexes("log_queries_not_using_indexes",
                                      &opt_log_queries_not_using_indexes);
  sys_var_thd_ulong     sys_log_warnings("log_warnings", &SV::log_warnings);
 -sys_var_thd_ulong     sys_long_query_time("long_query_time",
-+sys_var_thd_ulonglong  sys_long_query_time("long_query_time",
++sys_var_thd_microtime  sys_long_query_time("long_query_time",
                                             &SV::long_query_time);
  sys_var_bool_const_ptr sys_log_slow("log_slow_queries", &opt_slow_log);
++sys_var_log_slow      sys_slow_query_log("slow_query_log", &opt_slow_log);
++sys_var_const_str_ptr sys_slow_query_log_file("slow_query_log_file", &opt_slow_logname);
  sys_var_thd_bool      sys_low_priority_updates("low_priority_updates",
-@@ -281,6 +281,8 @@
+                                                &SV::low_priority_updates,
+                                                fix_low_priority_updates);
+@@ -283,6 +285,8 @@
                                           &SV::max_tmp_tables);
  sys_var_long_ptr      sys_max_write_lock_count("max_write_lock_count",
                                                 &max_write_lock_count);
@@ -1493,7 +1569,7 @@ diff -r bb81fcdd7db2 sql/set_var.cc
  sys_var_thd_ulong       sys_multi_range_count("multi_range_count",
                                                &SV::multi_range_count);
  sys_var_long_ptr      sys_myisam_data_pointer_size("myisam_data_pointer_size",
-@@ -324,6 +326,20 @@
+@@ -327,6 +331,20 @@
  sys_var_bool_ptr      sys_relay_log_purge("relay_log_purge",
                                              &relay_log_purge);
  #endif
@@ -1514,7 +1590,7 @@ diff -r bb81fcdd7db2 sql/set_var.cc
  sys_var_long_ptr      sys_rpl_recovery_rank("rpl_recovery_rank",
                                              &rpl_recovery_rank);
  sys_var_long_ptr      sys_query_cache_size("query_cache_size",
-@@ -675,6 +691,9 @@
+@@ -694,6 +712,9 @@
    &sys_log_off,
    &sys_log_queries_not_using_indexes,
    &sys_log_slow,
@@ -1524,7 +1600,7 @@ diff -r bb81fcdd7db2 sql/set_var.cc
    &sys_log_update,
    &sys_log_warnings,
    &sys_long_query_time,
-@@ -698,6 +717,7 @@
+@@ -717,6 +738,7 @@
    &sys_max_tmp_tables,
    &sys_max_user_connections,
    &sys_max_write_lock_count,
@@ -1532,16 +1608,29 @@ diff -r bb81fcdd7db2 sql/set_var.cc
    &sys_multi_range_count,
    &sys_myisam_data_pointer_size,
    &sys_myisam_max_sort_file_size,
-@@ -963,6 +983,8 @@
+@@ -770,6 +792,8 @@
+   &sys_slave_skip_counter,
+ #endif
+   &sys_slow_launch_time,
++  &sys_slow_query_log,
++  &sys_slow_query_log_file,
+   &sys_sort_buffer,
+   &sys_sql_big_tables,
+   &sys_sql_low_priority_updates,
+@@ -986,8 +1010,11 @@
    {"log_slave_updates",       (char*) &opt_log_slave_updates,       SHOW_MY_BOOL},
  #endif
    {sys_log_slow.name,         (char*) &sys_log_slow,                SHOW_SYS},
 +  {sys_log_slow_filter.name, (char*) &sys_log_slow_filter, SHOW_SYS},
++  {sys_log_slow_rate_limit.name, (char*) &sys_log_slow_rate_limit, SHOW_SYS},
 +  {sys_log_slow_verbosity.name, (char*) &sys_log_slow_verbosity, SHOW_SYS},
    {sys_log_warnings.name,     (char*) &sys_log_warnings,          SHOW_SYS},
-   {sys_long_query_time.name,  (char*) &sys_long_query_time,       SHOW_SYS},
+-  {sys_long_query_time.name,  (char*) &sys_long_query_time,       SHOW_SYS},
++  {sys_long_query_time.name,  (char*) &sys_long_query_time,       SHOW_MICROTIME},
    {sys_low_priority_updates.name, (char*) &sys_low_priority_updates, SHOW_SYS},
-@@ -991,6 +1013,7 @@
+   {"lower_case_file_system",  (char*) &lower_case_file_system,      SHOW_MY_BOOL},
+   {"lower_case_table_names",  (char*) &lower_case_table_names,      SHOW_INT},
+@@ -1014,6 +1041,7 @@
    {sys_max_tmp_tables.name,   (char*) &sys_max_tmp_tables,        SHOW_SYS},
    {sys_max_user_connections.name,(char*) &sys_max_user_connections, SHOW_SYS},
    {sys_max_write_lock_count.name, (char*) &sys_max_write_lock_count,SHOW_SYS},
@@ -1549,73 +1638,85 @@ diff -r bb81fcdd7db2 sql/set_var.cc
    {sys_multi_range_count.name,  (char*) &sys_multi_range_count,     SHOW_SYS},
    {sys_myisam_data_pointer_size.name, (char*) &sys_myisam_data_pointer_size, SHOW_SYS},
    {sys_myisam_max_sort_file_size.name, (char*) &sys_myisam_max_sort_file_size,
-@@ -1043,6 +1066,7 @@
-   {sys_query_prealloc_size.name, (char*) &sys_query_prealloc_size,  SHOW_SYS},
-   {sys_range_alloc_block_size.name, (char*) &sys_range_alloc_block_size,
-    SHOW_SYS},
-+  {sys_log_slow_rate_limit.name, (char*) &sys_log_slow_rate_limit, SHOW_SYS},
-   {sys_read_buff_size.name,   (char*) &sys_read_buff_size,        SHOW_SYS},
-   {sys_readonly.name,         (char*) &sys_readonly,                SHOW_SYS},
-   {sys_read_rnd_buff_size.name,(char*) &sys_read_rnd_buff_size,           SHOW_SYS},
-@@ -1639,6 +1663,57 @@
-   return (byte*) &(thd->variables.*offset);
+@@ -1101,6 +1129,8 @@
+   {sys_slave_trans_retries.name,(char*) &sys_slave_trans_retries,   SHOW_SYS},
+ #endif
+   {sys_slow_launch_time.name, (char*) &sys_slow_launch_time,        SHOW_SYS},
++  {sys_slow_query_log.name,   (char*) &sys_slow_query_log,          SHOW_SYS},
++  {sys_slow_query_log_file.name,(char*) &sys_slow_query_log_file,   SHOW_SYS},
+ #ifdef HAVE_SYS_UN_H
+   {"socket",                  (char*) &mysqld_unix_port,             SHOW_CHAR_PTR},
+ #endif
+@@ -1769,6 +1799,17 @@
  }
  
-+void sys_var_thd_microtime::set_default(THD *thd, enum_var_type type)
-+{
-+  pthread_mutex_lock(&LOCK_global_system_variables);
-+  global_system_variables.*offset= (ulonglong) option_limits->def_value;
-+  pthread_mutex_unlock(&LOCK_global_system_variables);
-+}
-+
 +bool sys_var_thd_microtime::check(THD *thd, set_var *var)
 +{
 +  if (var->value->result_type() == DECIMAL_RESULT)
 +    var->save_result.ulonglong_value= (ulonglong)(var->value->val_real() * 1000000);
-+  else 
-+    var->save_result.ulonglong_value= (ulonglong)var->value->val_int() * 1000000;
++  else
++    var->save_result.ulonglong_value= (ulonglong)(var->value->val_int() * 1000000);
++
 +  return 0;
 +}
 +
-+byte *sys_var_thd_microtime::value_ptr(THD *thd, enum_var_type type,
-+                                 LEX_STRING *base)
-+{
-+  if (type == OPT_GLOBAL)
-+    return (byte*) &(global_system_variables.*offset);
-+  return (byte*) &(thd->variables.*offset);
-+}
 +
-+bool sys_var_thd_microtime::update(THD *thd,  set_var *var)
-+{
-+  bool fixed= FALSE;
-+  ulonglong tmp= var->save_result.ulonglong_value;
+ bool sys_var_thd_bool::update(THD *thd,  set_var *var)
+ {
+   if (var->type == OPT_GLOBAL)
+@@ -1924,6 +1965,19 @@
+     value= *(longlong*) value_ptr(thd, var_type, base);
+     pthread_mutex_unlock(&LOCK_global_system_variables);
+     return new Item_int(value);
++  }
++  case SHOW_MICROTIME:
++  {
++    longlong value;
++    char buff[80];
++    int len;
 +
-+  if (tmp > max_system_variables.*offset)
-+    tmp= max_system_variables.*offset;
++    pthread_mutex_lock(&LOCK_global_system_variables);
++    value= *(longlong*) value_ptr(thd, var_type, base);
++    pthread_mutex_unlock(&LOCK_global_system_variables);
 +
-+  if (option_limits)
-+    tmp= getopt_ull_limit_value(tmp, option_limits, &fixed);
++    len = snprintf(buff, 80, "%f", ((double) value) / 1000000.0);
++    return new Item_float(buff,len);
+   }
+   case SHOW_HA_ROWS:
+   {
+@@ -2757,6 +2811,30 @@
+ }
++bool sys_var_log_slow::update(THD *thd, set_var *var)
++{
++  bool ret;
 +
-+  if (fixed)
-+    throw_bounds_warning(thd, option_limits->name, tmp);
-+  
-+  /* Lock is needed to make things safe on 32 bit systems */
-+  if (var->type == OPT_GLOBAL)
++  pthread_mutex_lock(&LOCK_global_system_variables);
++  if (var->save_result.ulong_value)
 +  {
-+    /* Lock is needed to make things safe on 32 bit systems */
-+    pthread_mutex_lock(&LOCK_global_system_variables);
-+    global_system_variables.*offset= tmp;
-+    pthread_mutex_unlock(&LOCK_global_system_variables);
++    if(!mysql_slow_log.is_open())
++    {
++      mysql_slow_log.open_slow_log(opt_slow_logname);
++    }
 +  }
-+  else
-+    thd->variables.*offset= (ulonglong) tmp;
++  pthread_mutex_unlock(&LOCK_global_system_variables);
 +
-+  return 0;
++  ret = sys_var_bool_ptr::update(thd, var);
++
++#ifdef HAVE_INNOBASE_DB
++  innobase_update_var_slow_log();
++#endif
++
++  return(ret);
 +}
- bool sys_var_thd_ha_rows::update(THD *thd, set_var *var)
++
++
+ #ifdef HAVE_REPLICATION
+ bool sys_var_slave_skip_counter::check(THD *thd, set_var *var)
  {
-@@ -3483,6 +3558,191 @@
+@@ -3519,6 +3597,191 @@
  #endif
  }
  
@@ -1807,10 +1908,10 @@ diff -r bb81fcdd7db2 sql/set_var.cc
  /****************************************************************************
   Functions to handle table_type
  ****************************************************************************/
-diff -r bb81fcdd7db2 sql/set_var.h
---- a/sql/set_var.h    Mon Sep 08 16:38:33 2008 -0700
-+++ b/sql/set_var.h    Mon Sep 08 16:38:46 2008 -0700
-@@ -123,6 +123,7 @@
+diff -r 25523be1816e sql/set_var.h
+--- a/sql/set_var.h    Mon Dec 22 00:25:06 2008 -0800
++++ b/sql/set_var.h    Mon Dec 22 00:26:39 2008 -0800
+@@ -132,6 +132,7 @@
  };
  
  
@@ -1818,7 +1919,21 @@ diff -r bb81fcdd7db2 sql/set_var.h
  class sys_var_ulonglong_ptr :public sys_var
  {
  public:
-@@ -309,7 +310,6 @@
+@@ -168,6 +169,13 @@
+   bool check_update_type(Item_result type) { return 0; }
+ };
++class sys_var_log_slow :public sys_var_bool_ptr
++{
++public:
++  sys_var_log_slow(const char *name_arg, my_bool *value_arg)
++    :sys_var_bool_ptr(name_arg, value_arg) {}
++  bool update(THD *thd, set_var *var);
++};
+ class sys_var_bool_const_ptr : public sys_var
+ {
+@@ -340,7 +348,6 @@
    }
  };
  
@@ -1826,31 +1941,15 @@ diff -r bb81fcdd7db2 sql/set_var.h
  class sys_var_thd_ulong :public sys_var_thd
  {
    sys_check_func check_func;
-@@ -329,6 +329,23 @@
+@@ -360,7 +367,6 @@
    byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base);
  };
  
-+class sys_var_thd_microtime :public sys_var_thd
-+{
-+public:
-+  ulonglong SV::*offset;
-+  sys_var_thd_microtime(const char *name_arg, ulonglong SV::*offset_arg)
-+    :sys_var_thd(name_arg), offset(offset_arg)
-+  {}
-+  bool update(THD *thd, set_var *var);
-+  void set_default(THD *thd, enum_var_type type);
-+  SHOW_TYPE type() { return SHOW_MICROTIME; }
-+  byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base);
-+  bool check(THD *thd, set_var *var);
-+  bool check_update_type(Item_result type)
-+  { 
-+    return type != INT_RESULT && type != DECIMAL_RESULT;
-+  }
-+};
+-
  class sys_var_thd_ha_rows :public sys_var_thd
  {
-@@ -346,7 +363,6 @@
+ public:
+@@ -377,7 +383,6 @@
    SHOW_TYPE show_type() { return SHOW_HA_ROWS; }
    byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base);
  };
@@ -1858,15 +1957,27 @@ diff -r bb81fcdd7db2 sql/set_var.h
  
  class sys_var_thd_ulonglong :public sys_var_thd
  {
-@@ -376,7 +392,6 @@
+@@ -407,6 +412,19 @@
    }
  };
  
--
++class sys_var_thd_microtime :public sys_var_thd_ulonglong
++{
++public:
++  sys_var_thd_microtime(const char *name_arg, ulonglong SV::*offset_arg)
++    :sys_var_thd_ulonglong(name_arg, offset_arg)
++  {}
++  SHOW_TYPE show_type() { return SHOW_MICROTIME; }
++  bool check(THD *thd, set_var *var);
++  bool check_update_type(Item_result type)
++  {
++    return type != INT_RESULT && type != DECIMAL_RESULT;
++  }
++};
  class sys_var_thd_bool :public sys_var_thd
  {
- public:
-@@ -446,6 +461,66 @@
+@@ -477,6 +495,66 @@
                                              ulong *length);
  };
  
@@ -1933,7 +2044,7 @@ diff -r bb81fcdd7db2 sql/set_var.h
  
  class sys_var_thd_storage_engine :public sys_var_thd
  {
-@@ -1042,3 +1117,11 @@
+@@ -1087,3 +1165,11 @@
  bool process_key_caches(int (* func) (const char *name, KEY_CACHE *));
  void delete_elements(I_List<NAMED_LIST> *list,
                     void (*free_element)(const char*, gptr));
@@ -1945,9 +2056,9 @@ diff -r bb81fcdd7db2 sql/set_var.h
 +                               const ulong none_val, const ulong invalid_val);
 +const char *msl_option_get_name(const struct msl_opts *opts, ulong val);
 +char *msl_flag_get_name(const struct msl_opts *opts, char *buf, ulong val);
-diff -r bb81fcdd7db2 sql/slave.cc
---- a/sql/slave.cc     Mon Sep 08 16:38:33 2008 -0700
-+++ b/sql/slave.cc     Mon Sep 08 16:38:46 2008 -0700
+diff -r 25523be1816e sql/slave.cc
+--- a/sql/slave.cc     Mon Dec 22 00:25:06 2008 -0800
++++ b/sql/slave.cc     Mon Dec 22 00:26:39 2008 -0800
 @@ -2925,6 +2925,12 @@
      + MAX_LOG_EVENT_HEADER;  /* note, incr over the global not session var */
    thd->slave_thread = 1;
@@ -1961,10 +2072,10 @@ diff -r bb81fcdd7db2 sql/slave.cc
    thd->client_capabilities = CLIENT_LOCAL_FILES;
    thd->real_id=pthread_self();
    pthread_mutex_lock(&LOCK_thread_count);
-diff -r bb81fcdd7db2 sql/sql_cache.cc
---- a/sql/sql_cache.cc Mon Sep 08 16:38:33 2008 -0700
-+++ b/sql/sql_cache.cc Mon Sep 08 16:38:46 2008 -0700
-@@ -1334,6 +1334,7 @@
+diff -r 25523be1816e sql/sql_cache.cc
+--- a/sql/sql_cache.cc Mon Dec 22 00:25:06 2008 -0800
++++ b/sql/sql_cache.cc Mon Dec 22 00:26:39 2008 -0800
+@@ -1341,6 +1341,7 @@
  
    thd->limit_found_rows = query->found_rows();
    thd->status_var.last_query_cost= 0.0;
@@ -1972,7 +2083,7 @@ diff -r bb81fcdd7db2 sql/sql_cache.cc
  
    BLOCK_UNLOCK_RD(query_block);
    DBUG_RETURN(1);                             // Result sent to client
-@@ -1341,6 +1342,7 @@
+@@ -1348,6 +1349,7 @@
  err_unlock:
    STRUCT_UNLOCK(&structure_guard_mutex);
  err:
@@ -1980,10 +2091,10 @@ diff -r bb81fcdd7db2 sql/sql_cache.cc
    DBUG_RETURN(0);                             // Query was not cached
  }
  
-diff -r bb81fcdd7db2 sql/sql_class.cc
---- a/sql/sql_class.cc Mon Sep 08 16:38:33 2008 -0700
-+++ b/sql/sql_class.cc Mon Sep 08 16:38:46 2008 -0700
-@@ -174,7 +174,7 @@
+diff -r 25523be1816e sql/sql_class.cc
+--- a/sql/sql_class.cc Mon Dec 22 00:25:06 2008 -0800
++++ b/sql/sql_class.cc Mon Dec 22 00:26:39 2008 -0800
+@@ -188,7 +188,7 @@
     lock_id(&main_lock_id),
     user_time(0), in_sub_stmt(0), global_read_lock(0), is_fatal_error(0),
     transaction_rollback_request(0), is_fatal_sub_stmt_error(0),
@@ -1992,7 +2103,7 @@ diff -r bb81fcdd7db2 sql/sql_class.cc
     last_insert_id_used(0), last_insert_id_used_bin_log(0), insert_id_used(0),
     clear_next_insert_id(0), in_lock_tables(0), bootstrap(0),
     derived_tables_processing(FALSE), spcont(NULL),
-@@ -2198,6 +2198,12 @@
+@@ -2224,6 +2224,12 @@
    backup->cuted_fields=     cuted_fields;
    backup->client_capabilities= client_capabilities;
    backup->savepoints= transaction.savepoints;
@@ -2005,7 +2116,7 @@ diff -r bb81fcdd7db2 sql/sql_class.cc
  
    if (!lex->requires_prelocking() || is_update_query(lex->sql_command))
      options&= ~OPTION_BIN_LOG;
-@@ -2214,7 +2220,13 @@
+@@ -2240,7 +2246,13 @@
    sent_row_count= 0;
    cuted_fields= 0;
    transaction.savepoints= 0;
@@ -2020,7 +2131,7 @@ diff -r bb81fcdd7db2 sql/sql_class.cc
    /* Surpress OK packets in case if we will execute statements */
    net.no_send_ok= TRUE;
  }
-@@ -2267,6 +2279,12 @@
+@@ -2293,6 +2305,12 @@
    */
    examined_row_count+= backup->examined_row_count;
    cuted_fields+=       backup->cuted_fields;
@@ -2033,20 +2144,14 @@ diff -r bb81fcdd7db2 sql/sql_class.cc
  }
  
  
-diff -r bb81fcdd7db2 sql/sql_class.h
---- a/sql/sql_class.h  Mon Sep 08 16:38:33 2008 -0700
-+++ b/sql/sql_class.h  Mon Sep 08 16:38:46 2008 -0700
-@@ -43,6 +43,13 @@
+diff -r ea2366a3ea79 sql/sql_class.h
+--- a/sql/sql_class.h  Thu Dec 04 00:30:51 2008 -0800
++++ b/sql/sql_class.h  Thu Dec 04 00:32:56 2008 -0800
+@@ -43,6 +43,7 @@
  extern char internal_table_name[2];
  extern char empty_c_string[1];
  extern const char **errmesg;
-+#ifdef __cplusplus
-+__BEGIN_DECLS
-+#endif
 +extern ulonglong frequency;
-+#ifdef __cplusplus
-+__END_DECLS
-+#endif
  
  #define TC_LOG_PAGE_SIZE   8192
  #define TC_LOG_MIN_SIZE    (3*TC_LOG_PAGE_SIZE)
@@ -2075,9 +2180,9 @@ diff -r bb81fcdd7db2 sql/sql_class.h
    ulong multi_range_count;
    ulong myisam_repair_threads;
    ulong myisam_sort_buff_size;
-@@ -541,10 +549,13 @@
-   ulong optimizer_search_depth;
+@@ -542,10 +550,13 @@
    ulong preload_buff_size;
+   ulong profiling_history_size;
    ulong query_cache_type;
 +  ulong log_slow_rate_limit;
    ulong read_buff_size;
@@ -2089,7 +2194,7 @@ diff -r bb81fcdd7db2 sql/sql_class.h
    ulong table_type;
    ulong tx_isolation;
    ulong completion_type;
-@@ -1111,6 +1122,12 @@
+@@ -1121,6 +1132,12 @@
    uint in_sub_stmt;
    bool enable_slow_log, insert_id_used, clear_next_insert_id;
    bool last_insert_id_used;
@@ -2102,7 +2207,7 @@ diff -r bb81fcdd7db2 sql/sql_class.h
    my_bool no_send_ok;
    SAVEPOINT *savepoints;
  };
-@@ -1167,6 +1184,11 @@
+@@ -1177,6 +1194,11 @@
  class THD :public Statement,
             public Open_tables_state
  {
@@ -2114,7 +2219,7 @@ diff -r bb81fcdd7db2 sql/sql_class.h
  public:
    /*
      Constant for THD::where initialization in the beginning of every query.
-@@ -1272,10 +1294,24 @@
+@@ -1285,10 +1307,24 @@
    */
    const char *where;
    time_t     start_time,time_after_lock,user_time;
@@ -2139,7 +2244,7 @@ diff -r bb81fcdd7db2 sql/sql_class.h
    /* <> 0 if we are inside of trigger or stored function. */
    uint in_sub_stmt;
  
-@@ -1661,11 +1697,11 @@
+@@ -1678,11 +1714,11 @@
        sql_print_information("time() failed with %d", errno);
    }
  
@@ -2156,9 +2261,9 @@ diff -r bb81fcdd7db2 sql/sql_class.h
    inline void insert_id(ulonglong id_arg)
    {
      last_insert_id= id_arg;
-diff -r bb81fcdd7db2 sql/sql_parse.cc
---- a/sql/sql_parse.cc Mon Sep 08 16:38:33 2008 -0700
-+++ b/sql/sql_parse.cc Mon Sep 08 16:38:46 2008 -0700
+diff -r 25523be1816e sql/sql_parse.cc
+--- a/sql/sql_parse.cc Mon Dec 22 00:25:06 2008 -0800
++++ b/sql/sql_parse.cc Mon Dec 22 00:26:39 2008 -0800
 @@ -20,6 +20,7 @@
  #include <m_ctype.h>
  #include <myisam.h>
@@ -2167,7 +2272,7 @@ diff -r bb81fcdd7db2 sql/sql_parse.cc
  
  #ifdef HAVE_INNOBASE_DB
  #include "ha_innodb.h"
-@@ -1180,6 +1181,15 @@
+@@ -1227,6 +1228,15 @@
      my_net_set_read_timeout(net, thd->variables.net_read_timeout);
      my_net_set_write_timeout(net, thd->variables.net_write_timeout);
  
@@ -2183,7 +2288,7 @@ diff -r bb81fcdd7db2 sql/sql_parse.cc
      while (!net->error && net->vio != 0 &&
             !(thd->killed == THD::KILL_CONNECTION))
      {
-@@ -2255,26 +2265,52 @@
+@@ -2353,27 +2363,53 @@
      return;                                     // Don't set time for sub stmt
  
    start_of_query= thd->start_time;
@@ -2221,7 +2326,7 @@ diff -r bb81fcdd7db2 sql/sql_parse.cc
 +      (!thd->user_time || (thd->slave_thread && opt_log_slow_slave_statements))
 +     )
    {
-     thd->proc_info="logging slow query";
+     thd_proc_info(thd, "logging slow query");
  
 -    if ((ulong) (thd->start_time - thd->time_after_lock) >
 -      thd->variables.long_query_time ||
@@ -2239,13 +2344,14 @@ diff -r bb81fcdd7db2 sql/sql_parse.cc
 +         thd->lex->orig_sql_command == SQLCOM_END) &&
 +        thd->examined_row_count >= thd->variables.min_examined_row_limit)
      {
+       thd_proc_info(thd, "logging slow query");
        thd->status_var.long_query_count++;
 -      mysql_slow_log.write(thd, thd->query, thd->query_length, start_of_query);
 +      mysql_slow_log.write(thd, thd->query, thd->query_length, start_of_query, start_of_query_timer);
      }
    }
  }
-@@ -5949,6 +5985,15 @@
+@@ -6084,6 +6120,15 @@
      thd->total_warn_count=0;                  // Warnings for this query
      thd->rand_used= 0;
      thd->sent_row_count= thd->examined_row_count= 0;
@@ -2261,10 +2367,10 @@ diff -r bb81fcdd7db2 sql/sql_parse.cc
    }
    DBUG_VOID_RETURN;
  }
-diff -r bb81fcdd7db2 sql/sql_select.cc
---- a/sql/sql_select.cc        Mon Sep 08 16:38:33 2008 -0700
-+++ b/sql/sql_select.cc        Mon Sep 08 16:38:46 2008 -0700
-@@ -6198,8 +6198,11 @@
+diff -r 25523be1816e sql/sql_select.cc
+--- a/sql/sql_select.cc        Mon Dec 22 00:25:06 2008 -0800
++++ b/sql/sql_select.cc        Mon Dec 22 00:26:39 2008 -0800
+@@ -6221,8 +6221,11 @@
          {
            join->thd->server_status|=SERVER_QUERY_NO_INDEX_USED;
            if (statistics)
@@ -2276,7 +2382,7 @@ diff -r bb81fcdd7db2 sql/sql_select.cc
          }
        }
        else
-@@ -6214,8 +6217,11 @@
+@@ -6237,8 +6240,11 @@
          {
            join->thd->server_status|=SERVER_QUERY_NO_INDEX_USED;
            if (statistics)
@@ -2288,7 +2394,7 @@ diff -r bb81fcdd7db2 sql/sql_select.cc
          }
        }
        if (!table->no_keyread)
-@@ -9265,6 +9271,7 @@
+@@ -9302,6 +9308,7 @@
                      (ulong) rows_limit,test(group)));
  
    statistic_increment(thd->status_var.created_tmp_tables, &LOCK_status);
@@ -2296,7 +2402,7 @@ diff -r bb81fcdd7db2 sql/sql_select.cc
  
    if (use_temp_pool && !(test_flags & TEST_KEEP_TMP_TABLES))
      temp_pool_slot = bitmap_set_next(&temp_pool);
-@@ -10125,6 +10132,7 @@
+@@ -10162,6 +10169,7 @@
    }
    statistic_increment(table->in_use->status_var.created_tmp_disk_tables,
                      &LOCK_status);
@@ -2304,28 +2410,33 @@ diff -r bb81fcdd7db2 sql/sql_select.cc
    table->s->db_record_offset= 1;
    DBUG_RETURN(0);
   err:
-diff -r bb81fcdd7db2 sql/sql_show.cc
---- a/sql/sql_show.cc  Mon Sep 08 16:38:33 2008 -0700
-+++ b/sql/sql_show.cc  Mon Sep 08 16:38:46 2008 -0700
-@@ -1531,6 +1531,9 @@
+diff -r 25523be1816e sql/sql_show.cc
+--- a/sql/sql_show.cc  Mon Dec 22 00:25:06 2008 -0800
++++ b/sql/sql_show.cc  Mon Dec 22 00:26:39 2008 -0800
+@@ -1532,6 +1532,12 @@
            value= ((char *) status_var + (ulonglong) value);
          case SHOW_LONGLONG:
            end= longlong10_to_str(*(longlong*) value, buff, 10);
 +          break;
 +        case SHOW_MICROTIME:
-+          end= buff + sprintf(buff, "%.6f", (*(ulonglong*)value) / 1000000.0);
++          show_type= ((sys_var*) value)->show_type();
++          value=     (char*) ((sys_var*) value)->value_ptr(thd, value_type,
++                                                           &null_lex_str);
++          end= buff + sprintf(buff, "%f", (((double) (*(ulonglong*)value))) / 1000000.0);
            break;
          case SHOW_HA_ROWS:
            end= longlong10_to_str((longlong) *(ha_rows*) value, buff, 10);
-diff -r bb81fcdd7db2 sql/structs.h
---- a/sql/structs.h    Mon Sep 08 16:38:33 2008 -0700
-+++ b/sql/structs.h    Mon Sep 08 16:38:46 2008 -0700
-@@ -168,7 +168,7 @@
+diff -r 25523be1816e sql/structs.h
+--- a/sql/structs.h    Mon Dec 22 00:25:06 2008 -0800
++++ b/sql/structs.h    Mon Dec 22 00:26:39 2008 -0800
+@@ -168,8 +168,8 @@
  enum SHOW_TYPE
  {
    SHOW_UNDEF,
 -  SHOW_LONG, SHOW_LONGLONG, SHOW_INT, SHOW_CHAR, SHOW_CHAR_PTR, 
+-  SHOW_DOUBLE_STATUS,
 +  SHOW_LONG, SHOW_LONGLONG, SHOW_MICROTIME, SHOW_INT, SHOW_CHAR, SHOW_CHAR_PTR, 
-   SHOW_DOUBLE_STATUS,
++  SHOW_DOUBLE_STATUS, 
    SHOW_BOOL, SHOW_MY_BOOL, SHOW_OPENTABLES, SHOW_STARTTIME, 
    SHOW_LONG_CONST, SHOW_INT_CONST, SHOW_HAVE, SHOW_SYS, SHOW_HA_ROWS,
+   SHOW_VARS,
index 1e63c12196d9e8ee9997723cf3f43c2538750529..7f1d4318560f60f428474950fea917ed39173b96 100644 (file)
@@ -1,6 +1,6 @@
-diff -r a36b98c5e2e3 patch_info/show_patches.info
+diff -r c3e57b0c22c4 patch_info/show_patches.info
 --- /dev/null  Thu Jan 01 00:00:00 1970 +0000
-+++ b/patch_info/show_patches.info     Mon Sep 08 16:38:33 2008 -0700
++++ b/patch_info/show_patches.info     Mon Dec 22 00:25:06 2008 -0800
 @@ -0,0 +1,6 @@
 +File=show_patches.patch
 +Name=SHOW PATCHES
@@ -8,19 +8,19 @@ diff -r a36b98c5e2e3 patch_info/show_patches.info
 +Author=Jeremy Cole
 +License=N/A
 +Comment
-diff -r a36b98c5e2e3 sql/Makefile.am
---- a/sql/Makefile.am  Mon Sep 08 16:37:00 2008 -0700
-+++ b/sql/Makefile.am  Mon Sep 08 16:38:33 2008 -0700
-@@ -116,7 +116,7 @@
+diff -r c3e57b0c22c4 sql/Makefile.am
+--- a/sql/Makefile.am  Mon Dec 22 00:20:06 2008 -0800
++++ b/sql/Makefile.am  Mon Dec 22 00:25:06 2008 -0800
+@@ -118,7 +118,7 @@
                        -DSHAREDIR="\"$(MYSQLSHAREdir)\"" \
                        @DEFS@
  
 -BUILT_SOURCES =               sql_yacc.cc sql_yacc.h lex_hash.h
 +BUILT_SOURCES =               sql_yacc.cc sql_yacc.h lex_hash.h patch_info.h
  EXTRA_DIST =          $(BUILT_SOURCES) nt_servc.cc nt_servc.h \
-                       message.mc examples/CMakeLists.txt CMakeLists.txt \
-                       udf_example.c udf_example.def
-@@ -172,6 +172,8 @@
+                       message.mc message.h message.rc MSG00001.bin \
+                       examples/CMakeLists.txt CMakeLists.txt \
+@@ -175,6 +175,8 @@
  udf_example_la_SOURCES= udf_example.c
  udf_example_la_LDFLAGS= -module -rpath $(pkglibdir)
  
@@ -29,19 +29,19 @@ diff -r a36b98c5e2e3 sql/Makefile.am
  
  # Don't update the files from bitkeeper
  %::SCCS/s.%
-diff -r a36b98c5e2e3 sql/Makefile.in
---- a/sql/Makefile.in  Mon Sep 08 16:37:00 2008 -0700
-+++ b/sql/Makefile.in  Mon Sep 08 16:38:33 2008 -0700
-@@ -556,7 +556,7 @@
+diff -r c3e57b0c22c4 sql/Makefile.in
+--- a/sql/Makefile.in  Mon Dec 22 00:20:06 2008 -0800
++++ b/sql/Makefile.in  Mon Dec 22 00:25:06 2008 -0800
+@@ -561,7 +561,7 @@
  gen_lex_hash_LDADD = $(LDADD) $(CXXLDFLAGS)
  mysql_tzinfo_to_sql_SOURCES = mysql_tzinfo_to_sql.cc
  mysql_tzinfo_to_sql_LDADD = @MYSQLD_EXTRA_LDFLAGS@ $(LDADD) $(CXXLDFLAGS)
 -BUILT_SOURCES = sql_yacc.cc sql_yacc.h lex_hash.h
 +BUILT_SOURCES = sql_yacc.cc sql_yacc.h lex_hash.h patch_info.h
  EXTRA_DIST = $(BUILT_SOURCES) nt_servc.cc nt_servc.h \
-                       message.mc examples/CMakeLists.txt CMakeLists.txt \
-                       udf_example.c udf_example.def
-@@ -1230,6 +1230,9 @@
+                       message.mc message.h message.rc MSG00001.bin \
+                       examples/CMakeLists.txt CMakeLists.txt \
+@@ -1237,6 +1237,9 @@
                ./gen_lex_hash$(EXEEXT) > $@-t
                $(MV) $@-t $@
  
@@ -51,10 +51,10 @@ diff -r a36b98c5e2e3 sql/Makefile.in
  # Don't update the files from bitkeeper
  %::SCCS/s.%
  # Tell versions [3.59,3.63) of GNU make to not export all variables.
-diff -r a36b98c5e2e3 sql/lex.h
---- a/sql/lex.h        Mon Sep 08 16:37:00 2008 -0700
-+++ b/sql/lex.h        Mon Sep 08 16:38:33 2008 -0700
-@@ -359,6 +359,7 @@
+diff -r c3e57b0c22c4 sql/lex.h
+--- a/sql/lex.h        Mon Dec 22 00:20:06 2008 -0800
++++ b/sql/lex.h        Mon Dec 22 00:25:06 2008 -0800
+@@ -367,6 +367,7 @@
    { "PACK_KEYS",      SYM(PACK_KEYS_SYM)},
    { "PARTIAL",                SYM(PARTIAL)},
    { "PASSWORD",               SYM(PASSWORD)},
@@ -62,10 +62,10 @@ diff -r a36b98c5e2e3 sql/lex.h
    { "PHASE",            SYM(PHASE_SYM)},
    { "POINT",          SYM(POINT_SYM)},
    { "POLYGON",                SYM(POLYGON)},
-diff -r a36b98c5e2e3 sql/mysql_priv.h
---- a/sql/mysql_priv.h Mon Sep 08 16:37:00 2008 -0700
-+++ b/sql/mysql_priv.h Mon Sep 08 16:38:33 2008 -0700
-@@ -948,6 +948,7 @@
+diff -r c3e57b0c22c4 sql/mysql_priv.h
+--- a/sql/mysql_priv.h Mon Dec 22 00:20:06 2008 -0800
++++ b/sql/mysql_priv.h Mon Dec 22 00:25:06 2008 -0800
+@@ -968,6 +968,7 @@
  int mysqld_show_status(THD *thd);
  int mysqld_show_variables(THD *thd,const char *wild);
  bool mysqld_show_storage_engines(THD *thd);
@@ -73,9 +73,9 @@ diff -r a36b98c5e2e3 sql/mysql_priv.h
  bool mysqld_show_privileges(THD *thd);
  bool mysqld_show_column_types(THD *thd);
  bool mysqld_help (THD *thd, const char *text);
-diff -r a36b98c5e2e3 sql/patch_info.h.pl
+diff -r c3e57b0c22c4 sql/patch_info.h.pl
 --- /dev/null  Thu Jan 01 00:00:00 1970 +0000
-+++ b/sql/patch_info.h.pl      Mon Sep 08 16:38:33 2008 -0700
++++ b/sql/patch_info.h.pl      Mon Dec 22 00:25:06 2008 -0800
 @@ -0,0 +1,65 @@
 +use strict;
 +
@@ -142,10 +142,10 @@ diff -r a36b98c5e2e3 sql/patch_info.h.pl
 +};    
 +
 +HEADER
-diff -r a36b98c5e2e3 sql/sp_head.cc
---- a/sql/sp_head.cc   Mon Sep 08 16:37:00 2008 -0700
-+++ b/sql/sp_head.cc   Mon Sep 08 16:38:33 2008 -0700
-@@ -188,6 +188,7 @@
+diff -r c3e57b0c22c4 sql/sp_head.cc
+--- a/sql/sp_head.cc   Mon Dec 22 00:20:06 2008 -0800
++++ b/sql/sp_head.cc   Mon Dec 22 00:25:06 2008 -0800
+@@ -191,6 +191,7 @@
    case SQLCOM_SHOW_MUTEX_STATUS:
    case SQLCOM_SHOW_NEW_MASTER:
    case SQLCOM_SHOW_OPEN_TABLES:
@@ -153,26 +153,21 @@ diff -r a36b98c5e2e3 sql/sp_head.cc
    case SQLCOM_SHOW_PRIVILEGES:
    case SQLCOM_SHOW_PROCESSLIST:
    case SQLCOM_SHOW_SLAVE_HOSTS:
-diff -r a36b98c5e2e3 sql/sql_lex.h
---- a/sql/sql_lex.h    Mon Sep 08 16:37:00 2008 -0700
-+++ b/sql/sql_lex.h    Mon Sep 08 16:38:33 2008 -0700
-@@ -81,9 +81,9 @@
-   SQLCOM_SHOW_SLAVE_HOSTS, SQLCOM_DELETE_MULTI, SQLCOM_UPDATE_MULTI,
-   SQLCOM_SHOW_BINLOG_EVENTS, SQLCOM_SHOW_NEW_MASTER, SQLCOM_DO,
-   SQLCOM_SHOW_WARNS, SQLCOM_EMPTY_QUERY, SQLCOM_SHOW_ERRORS,
--  SQLCOM_SHOW_COLUMN_TYPES, SQLCOM_SHOW_STORAGE_ENGINES, SQLCOM_SHOW_PRIVILEGES,
--  SQLCOM_HELP, SQLCOM_CREATE_USER, SQLCOM_DROP_USER, SQLCOM_RENAME_USER,
--  SQLCOM_REVOKE_ALL, SQLCOM_CHECKSUM,
-+  SQLCOM_SHOW_COLUMN_TYPES, SQLCOM_SHOW_PATCHES, SQLCOM_SHOW_STORAGE_ENGINES, 
-+      SQLCOM_SHOW_PRIVILEGES, SQLCOM_HELP, SQLCOM_CREATE_USER, SQLCOM_DROP_USER, 
-+      SQLCOM_RENAME_USER, SQLCOM_REVOKE_ALL, SQLCOM_CHECKSUM,
-   SQLCOM_CREATE_PROCEDURE, SQLCOM_CREATE_SPFUNCTION, SQLCOM_CALL,
-   SQLCOM_DROP_PROCEDURE, SQLCOM_ALTER_PROCEDURE,SQLCOM_ALTER_FUNCTION,
-   SQLCOM_SHOW_CREATE_PROC, SQLCOM_SHOW_CREATE_FUNC,
-diff -r a36b98c5e2e3 sql/sql_parse.cc
---- a/sql/sql_parse.cc Mon Sep 08 16:37:00 2008 -0700
-+++ b/sql/sql_parse.cc Mon Sep 08 16:38:33 2008 -0700
-@@ -3826,6 +3826,9 @@
+diff -r c3e57b0c22c4 sql/sql_lex.h
+--- a/sql/sql_lex.h    Mon Dec 22 00:20:06 2008 -0800
++++ b/sql/sql_lex.h    Mon Dec 22 00:25:06 2008 -0800
+@@ -95,6 +95,7 @@
+   SQLCOM_XA_COMMIT, SQLCOM_XA_ROLLBACK, SQLCOM_XA_RECOVER,
+   SQLCOM_SHOW_PROC_CODE, SQLCOM_SHOW_FUNC_CODE,
+   SQLCOM_SHOW_PROFILE, SQLCOM_SHOW_PROFILES,
++  SQLCOM_SHOW_PATCHES,
+   /*
+     When a command is added here, be sure it's also added in mysqld.cc
+diff -r c3e57b0c22c4 sql/sql_parse.cc
+--- a/sql/sql_parse.cc Mon Dec 22 00:20:06 2008 -0800
++++ b/sql/sql_parse.cc Mon Dec 22 00:25:06 2008 -0800
+@@ -3947,6 +3947,9 @@
      break;
    case SQLCOM_SHOW_STORAGE_ENGINES:
      res= mysqld_show_storage_engines(thd);
@@ -182,9 +177,9 @@ diff -r a36b98c5e2e3 sql/sql_parse.cc
      break;
    case SQLCOM_SHOW_PRIVILEGES:
      res= mysqld_show_privileges(thd);
-diff -r a36b98c5e2e3 sql/sql_prepare.cc
---- a/sql/sql_prepare.cc       Mon Sep 08 16:37:00 2008 -0700
-+++ b/sql/sql_prepare.cc       Mon Sep 08 16:38:33 2008 -0700
+diff -r c3e57b0c22c4 sql/sql_prepare.cc
+--- a/sql/sql_prepare.cc       Mon Dec 22 00:20:06 2008 -0800
++++ b/sql/sql_prepare.cc       Mon Dec 22 00:25:06 2008 -0800
 @@ -1790,6 +1790,7 @@
    case SQLCOM_SHOW_DATABASES:
    case SQLCOM_SHOW_PROCESSLIST:
@@ -193,9 +188,9 @@ diff -r a36b98c5e2e3 sql/sql_prepare.cc
    case SQLCOM_SHOW_PRIVILEGES:
    case SQLCOM_SHOW_COLUMN_TYPES:
    case SQLCOM_SHOW_STATUS:
-diff -r a36b98c5e2e3 sql/sql_show.cc
---- a/sql/sql_show.cc  Mon Sep 08 16:37:00 2008 -0700
-+++ b/sql/sql_show.cc  Mon Sep 08 16:38:33 2008 -0700
+diff -r c3e57b0c22c4 sql/sql_show.cc
+--- a/sql/sql_show.cc  Mon Dec 22 00:20:06 2008 -0800
++++ b/sql/sql_show.cc  Mon Dec 22 00:25:06 2008 -0800
 @@ -22,6 +22,7 @@
  #include "sp.h"
  #include "sp_head.h"
@@ -204,11 +199,10 @@ diff -r a36b98c5e2e3 sql/sql_show.cc
  #include <my_dir.h>
  
  #ifdef HAVE_BERKELEY_DB
-@@ -45,6 +46,48 @@
+@@ -45,6 +46,47 @@
  static int
  view_store_create_info(THD *thd, TABLE_LIST *table, String *buff);
- static bool schema_table_store_record(THD *thd, TABLE *table);
-+
+ bool schema_table_store_record(THD *thd, TABLE *table);
 +
 +/***************************************************************************
 +** List patches built into this release
@@ -217,7 +211,7 @@ diff -r a36b98c5e2e3 sql/sql_show.cc
 +bool mysqld_show_patches(THD *thd)
 +{
 +  List<Item> field_list;
-+       int i = 0;
++      int i = 0;
 +  Protocol *protocol= thd->protocol;
 +  DBUG_ENTER("mysqld_show_patches");
 +
@@ -231,19 +225,19 @@ diff -r a36b98c5e2e3 sql/sql_show.cc
 +  if (protocol->send_fields(&field_list, Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
 +    DBUG_RETURN(TRUE);
 +
-+       for (i = 0; patches[i].file; i++)
-+       {
-+         protocol->prepare_for_resend();
-+       protocol->store(patches[i].file, system_charset_info);
-+       protocol->store(patches[i].name, system_charset_info);
-+       protocol->store(patches[i].version, system_charset_info);
-+       protocol->store(patches[i].author, system_charset_info);
-+       protocol->store(patches[i].license, system_charset_info);
-+       protocol->store(patches[i].comment, system_charset_info);
++      for (i = 0; patches[i].file; i++)
++      {
++        protocol->prepare_for_resend();
++      protocol->store(patches[i].file, system_charset_info);
++      protocol->store(patches[i].name, system_charset_info);
++      protocol->store(patches[i].version, system_charset_info);
++      protocol->store(patches[i].author, system_charset_info);
++      protocol->store(patches[i].license, system_charset_info);
++      protocol->store(patches[i].comment, system_charset_info);
 +
-+       if (protocol->write())
-+       DBUG_RETURN(TRUE);
-+       }       
++      if (protocol->write())
++      DBUG_RETURN(TRUE);
++      }       
 +
 +   
 +  send_eof(thd);
@@ -253,18 +247,18 @@ diff -r a36b98c5e2e3 sql/sql_show.cc
  
  
  /***************************************************************************
-diff -r a36b98c5e2e3 sql/sql_yacc.yy
---- a/sql/sql_yacc.yy  Mon Sep 08 16:37:00 2008 -0700
-+++ b/sql/sql_yacc.yy  Mon Sep 08 16:38:33 2008 -0700
-@@ -816,6 +816,7 @@
- %token  PACK_KEYS_SYM
+diff -r c3e57b0c22c4 sql/sql_yacc.yy
+--- a/sql/sql_yacc.yy  Mon Dec 22 00:20:06 2008 -0800
++++ b/sql/sql_yacc.yy  Mon Dec 22 00:25:06 2008 -0800
+@@ -824,6 +824,7 @@
+ %token  PAGE_SYM
  %token  PARTIAL
  %token  PASSWORD
 +%token  PATCHES
  %token  PARAM_MARKER
  %token  PHASE_SYM
  %token  POINTFROMTEXT
-@@ -7948,7 +7949,7 @@
+@@ -8019,7 +8020,7 @@
        ;
  
  show_param:
@@ -273,7 +267,7 @@ diff -r a36b98c5e2e3 sql/sql_yacc.yy
           {
             LEX *lex= Lex;
             lex->sql_command= SQLCOM_SELECT;
-@@ -8048,6 +8049,10 @@
+@@ -8119,6 +8120,10 @@
            LEX *lex=Lex;
            lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES;
            WARN_DEPRECATED("SHOW TABLE TYPES", "SHOW [STORAGE] ENGINES");
@@ -284,8 +278,8 @@ diff -r a36b98c5e2e3 sql/sql_yacc.yy
          }
        | opt_storage ENGINES_SYM
          {
-@@ -9466,6 +9471,7 @@
-       | PACK_KEYS_SYM         {}
+@@ -9554,6 +9559,7 @@
+       | PAGE_SYM              {}
        | PARTIAL               {}
        | PASSWORD              {}
 +      | PATCHES {}
index b20ad8ff787ce42dde81c3ef38c44962dd71418b..016d6673e4660cf3dd84dca55a064d1e916ee73e 100644 (file)
@@ -1,7 +1,7 @@
-diff -r 72a897774060 innobase/buf/buf0buf.c
---- a/innobase/buf/buf0buf.c   Mon Sep 08 16:40:20 2008 -0700
-+++ b/innobase/buf/buf0buf.c   Mon Sep 08 16:40:27 2008 -0700
-@@ -546,6 +546,19 @@
+diff -r 2e0c46e78b50 innobase/buf/buf0buf.c
+--- a/innobase/buf/buf0buf.c   Mon Dec 22 00:33:53 2008 -0800
++++ b/innobase/buf/buf0buf.c   Mon Dec 22 00:33:59 2008 -0800
+@@ -548,6 +548,19 @@
        mutex_create(&(buf_pool->mutex));
        mutex_set_level(&(buf_pool->mutex), SYNC_BUF_POOL);
  
@@ -21,7 +21,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
        mutex_enter(&(buf_pool->mutex));
  
        if (srv_use_awe) {
-@@ -718,6 +731,10 @@
+@@ -723,6 +736,10 @@
                block->in_free_list = TRUE;
        }
  
@@ -32,7 +32,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
        mutex_exit(&(buf_pool->mutex));
  
        if (srv_use_adaptive_hash_indexes) {
-@@ -854,12 +871,12 @@
+@@ -859,12 +876,12 @@
        if (buf_pool->freed_page_clock >= block->freed_page_clock 
                                + 1 + (buf_pool->curr_size / 4)) {
  
@@ -47,7 +47,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
        }
  }
  
-@@ -875,7 +892,7 @@
+@@ -880,7 +897,7 @@
  {
        buf_block_t*    block;
        
@@ -56,7 +56,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        block = buf_block_align(frame);
  
-@@ -883,7 +900,7 @@
+@@ -888,7 +905,7 @@
  
        buf_LRU_make_block_young(block);
  
@@ -65,7 +65,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  }
  
  /************************************************************************
-@@ -894,7 +911,7 @@
+@@ -899,7 +916,7 @@
  /*===========*/
        buf_block_t*    block)  /* in, own: block to be freed */
  {
@@ -74,7 +74,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        mutex_enter(&block->mutex);
  
-@@ -904,7 +921,7 @@
+@@ -909,7 +926,7 @@
  
        mutex_exit(&block->mutex);
  
@@ -83,7 +83,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  }
  
  /*************************************************************************
-@@ -945,11 +962,11 @@
+@@ -950,11 +967,11 @@
  {
        buf_block_t*    block;
  
@@ -97,7 +97,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        return(block);
  }
-@@ -966,7 +983,7 @@
+@@ -971,7 +988,7 @@
  {
        buf_block_t*    block;
  
@@ -106,7 +106,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        block = buf_page_hash_get(space, offset);
  
-@@ -974,7 +991,7 @@
+@@ -979,7 +996,7 @@
                block->check_index_page_at_flush = FALSE;
        }
        
@@ -115,7 +115,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  }
  
  /************************************************************************
-@@ -993,7 +1010,7 @@
+@@ -998,7 +1015,7 @@
        buf_block_t*    block;
        ibool           is_hashed;
  
@@ -124,7 +124,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        block = buf_page_hash_get(space, offset);
  
-@@ -1003,7 +1020,7 @@
+@@ -1008,7 +1025,7 @@
                is_hashed = block->is_hashed;
        }
  
@@ -133,7 +133,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        return(is_hashed);
  }
-@@ -1045,7 +1062,7 @@
+@@ -1050,7 +1067,7 @@
  {
        buf_block_t*    block;
  
@@ -142,7 +142,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        block = buf_page_hash_get(space, offset);
  
-@@ -1053,7 +1070,7 @@
+@@ -1058,7 +1075,7 @@
                block->file_page_was_freed = TRUE;
        }
  
@@ -151,7 +151,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        return(block);
  }
-@@ -1074,7 +1091,7 @@
+@@ -1079,7 +1096,7 @@
  {
        buf_block_t*    block;
  
@@ -160,7 +160,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        block = buf_page_hash_get(space, offset);
  
-@@ -1082,7 +1099,7 @@
+@@ -1087,7 +1104,7 @@
                block->file_page_was_freed = FALSE;
        }
  
@@ -169,7 +169,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        return(block);
  }
-@@ -1154,26 +1171,33 @@
+@@ -1166,26 +1183,33 @@
        buf_pool->n_page_gets++;
  loop:
        block = NULL;
@@ -205,7 +205,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
                if (mode == BUF_GET_IF_IN_POOL) {
  
-@@ -1192,7 +1216,7 @@
+@@ -1204,7 +1228,7 @@
                goto loop;
        }
  
@@ -214,7 +214,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        ut_a(block->state == BUF_BLOCK_FILE_PAGE);
  
-@@ -1204,7 +1228,7 @@
+@@ -1216,7 +1240,7 @@
  
                if (mode == BUF_GET_IF_IN_POOL) {
                        /* The page is only being read to buffer */
@@ -223,7 +223,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
                        mutex_exit(&block->mutex);
  
                        return(NULL);
-@@ -1221,7 +1245,9 @@
+@@ -1233,7 +1257,9 @@
                LRU list and we must put it to awe_LRU_free_mapped list once
                mapped to a frame */
                
@@ -233,7 +233,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
        }
        
  #ifdef UNIV_SYNC_DEBUG
-@@ -1229,7 +1255,7 @@
+@@ -1241,7 +1267,7 @@
  #else
        buf_block_buf_fix_inc(block);
  #endif
@@ -242,7 +242,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        /* Check if this is the first access to the page */
  
-@@ -1773,7 +1799,8 @@
+@@ -1791,7 +1817,8 @@
  
        ut_a(block);
  
@@ -252,7 +252,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
        mutex_enter(&block->mutex);
  
        if (fil_tablespace_deleted_or_being_deleted_in_mem(space,
-@@ -1788,7 +1815,8 @@
+@@ -1806,7 +1833,8 @@
                being deleted, or the page is already in buf_pool, return */
  
                mutex_exit(&block->mutex);
@@ -262,7 +262,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
                buf_block_free(block);
  
-@@ -1803,10 +1831,14 @@
+@@ -1821,10 +1849,14 @@
        ut_ad(block);
        
        buf_page_init(space, offset, block);
@@ -277,7 +277,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
        
        block->io_fix = BUF_IO_READ;
  
-@@ -1855,7 +1887,8 @@
+@@ -1873,7 +1905,8 @@
  
        free_block = buf_LRU_get_free_block();
        
@@ -287,7 +287,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        block = buf_page_hash_get(space, offset);
  
-@@ -1866,7 +1899,8 @@
+@@ -1884,7 +1917,8 @@
                block->file_page_was_freed = FALSE;
  
                /* Page can be found in buf_pool */
@@ -297,7 +297,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
                buf_block_free(free_block);
  
-@@ -1889,6 +1923,7 @@
+@@ -1907,6 +1941,7 @@
        mutex_enter(&block->mutex);
  
        buf_page_init(space, offset, block);
@@ -305,7 +305,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        /* The block must be put to the LRU list */
        buf_LRU_add_block(block, FALSE);
-@@ -1900,7 +1935,7 @@
+@@ -1918,7 +1953,7 @@
  #endif
        buf_pool->n_pages_created++;
  
@@ -314,7 +314,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        mtr_memo_push(mtr, block, MTR_MEMO_BUF_FIX);
  
-@@ -1914,7 +1949,7 @@
+@@ -1932,7 +1967,7 @@
        ibuf_merge_or_delete_for_page(NULL, space, offset, TRUE);
  
        /* Flush pages from the end of the LRU list if necessary */
@@ -323,15 +323,15 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        frame = block->frame;
  
-@@ -1950,6 +1985,7 @@
+@@ -1968,6 +2003,7 @@
  {
        ulint           io_type;
        ulint           read_page_no;
 +      ulint           flush_type;
        
-       ut_ad(block);
-@@ -2029,9 +2065,6 @@
+       buf_io_counter_t*       io_counter;
+       ulint           fold;
+@@ -2050,9 +2086,6 @@
                }
        }
        
@@ -341,7 +341,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  #ifdef UNIV_IBUF_DEBUG
        ut_a(ibuf_count_get(block->space, block->offset) == 0);
  #endif
-@@ -2040,9 +2073,12 @@
+@@ -2061,9 +2094,12 @@
        removes the newest lock debug record, without checking the thread
        id. */
  
@@ -356,16 +356,16 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
                /* NOTE that the call to ibuf may have moved the ownership of
                the x-latch to this OS thread: do not let this confuse you in
                debugging! */           
-@@ -2053,6 +2089,8 @@
-               rw_lock_x_unlock_gen(&(block->lock), BUF_IO_READ);
+@@ -2094,6 +2130,8 @@
+               }
+               }
  
 +              mutex_exit(&(buf_pool->mutex));
 +              mutex_exit(&block->mutex);
  #ifdef UNIV_DEBUG
                if (buf_debug_prints) {
                        fputs("Has read ", stderr);
-@@ -2061,14 +2099,32 @@
+@@ -2102,10 +2140,25 @@
        } else {
                ut_ad(io_type == BUF_IO_WRITE);
  
@@ -383,22 +383,25 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
                routine in the flush system */
  
                buf_flush_write_complete(block);
++
 +              mutex_exit(&(buf_pool->flush_list_mutex));
 +              if (flush_type == BUF_FLUSH_LRU) { /* optimistic! */
 +                      mutex_exit(&(buf_pool->LRU_mutex));
 +              }
-+
                rw_lock_s_unlock_gen(&(block->lock), BUF_IO_WRITE);
+               /* io_counter here */
+@@ -2131,6 +2184,9 @@
  
                buf_pool->n_pages_written++;
-+
 +              mutex_exit(&(buf_pool->mutex));
 +              mutex_exit(&block->mutex);
++
  #ifdef UNIV_DEBUG
                if (buf_debug_prints) {
-@@ -2077,9 +2133,6 @@
+                       fputs("Has written ", stderr);
+@@ -2138,9 +2194,6 @@
  #endif /* UNIV_DEBUG */
        }
        
@@ -408,7 +411,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  #ifdef UNIV_DEBUG
        if (buf_debug_prints) {
                fprintf(stderr, "page space %lu page no %lu\n",
-@@ -2107,11 +2160,11 @@
+@@ -2168,11 +2221,11 @@
                freed = buf_LRU_search_and_free_block(100);
        }
        
@@ -422,7 +425,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  }
  
  /*************************************************************************
-@@ -2130,10 +2183,22 @@
+@@ -2191,10 +2244,22 @@
        ulint           n_flush         = 0;
        ulint           n_free          = 0;
        ulint           n_page          = 0;
@@ -445,7 +448,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        for (i = 0; i < buf_pool->curr_size; i++) {
  
-@@ -2201,11 +2266,14 @@
+@@ -2262,11 +2327,14 @@
        }
        ut_a(UT_LIST_GET_LEN(buf_pool->flush_list) == n_flush);
  
@@ -464,7 +467,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        ut_a(buf_LRU_validate());
        ut_a(buf_flush_validate());
-@@ -2237,7 +2305,9 @@
+@@ -2298,7 +2366,9 @@
        index_ids = mem_alloc(sizeof(dulint) * size);
        counts = mem_alloc(sizeof(ulint) * size);
  
@@ -475,7 +478,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
        
        fprintf(stderr,
                "buf_pool size %lu\n"
-@@ -2290,7 +2360,9 @@
+@@ -2351,7 +2421,9 @@
                }
        }
  
@@ -486,7 +489,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        for (i = 0; i < n_found; i++) {
                index = dict_index_get_if_in_cache(index_ids[i]);
-@@ -2325,8 +2397,6 @@
+@@ -2386,8 +2458,6 @@
          ulint i;
          ulint fixed_pages_number = 0;
  
@@ -495,7 +498,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
          for (i = 0; i < buf_pool->curr_size; i++) {
  
                block = buf_pool_get_nth_block(buf_pool, i);
-@@ -2342,7 +2412,6 @@
+@@ -2403,7 +2473,6 @@
                }
          }
  
@@ -503,7 +506,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
          return fixed_pages_number;
  }
  #endif /* UNIV_DEBUG */
-@@ -2370,7 +2439,9 @@
+@@ -2431,7 +2500,9 @@
  {
        ulint   ratio;
  
@@ -514,7 +517,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        ratio = (100 * UT_LIST_GET_LEN(buf_pool->flush_list))
                     / (1 + UT_LIST_GET_LEN(buf_pool->LRU)
-@@ -2378,7 +2449,9 @@
+@@ -2439,7 +2510,9 @@
  
                       /* 1 + is there to avoid division by zero */   
  
@@ -525,7 +528,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        return(ratio);
  }
-@@ -2398,6 +2471,9 @@
+@@ -2459,6 +2532,9 @@
        ut_ad(buf_pool);
        size = buf_pool->curr_size;
  
@@ -535,7 +538,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
        mutex_enter(&(buf_pool->mutex));
        
        if (srv_use_awe) {
-@@ -2469,6 +2545,9 @@
+@@ -2532,6 +2608,9 @@
        buf_pool->n_pages_written_old = buf_pool->n_pages_written;
        buf_pool->n_pages_awe_remapped_old = buf_pool->n_pages_awe_remapped;
  
@@ -545,7 +548,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
        mutex_exit(&(buf_pool->mutex));
  }
  
-@@ -2499,8 +2578,6 @@
+@@ -2562,8 +2641,6 @@
        
        ut_ad(buf_pool);
  
@@ -554,7 +557,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
        for (i = 0; i < buf_pool->curr_size; i++) {
  
                block = buf_pool_get_nth_block(buf_pool, i);
-@@ -2521,8 +2598,6 @@
+@@ -2584,8 +2661,6 @@
  
                mutex_exit(&block->mutex);
        }
@@ -563,7 +566,7 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        return(TRUE);
  }     
-@@ -2562,11 +2637,11 @@
+@@ -2625,11 +2700,11 @@
  {
        ulint   len;
  
@@ -577,9 +580,9 @@ diff -r 72a897774060 innobase/buf/buf0buf.c
  
        return(len);
  }
-diff -r 72a897774060 innobase/buf/buf0flu.c
---- a/innobase/buf/buf0flu.c   Mon Sep 08 16:40:20 2008 -0700
-+++ b/innobase/buf/buf0flu.c   Mon Sep 08 16:40:27 2008 -0700
+diff -r 2e0c46e78b50 innobase/buf/buf0flu.c
+--- a/innobase/buf/buf0flu.c   Mon Dec 22 00:33:53 2008 -0800
++++ b/innobase/buf/buf0flu.c   Mon Dec 22 00:33:59 2008 -0800
 @@ -117,12 +117,14 @@
        ut_ad(mutex_own(&block->mutex));
  #endif /* UNIV_SYNC_DEBUG */
@@ -596,7 +599,7 @@ diff -r 72a897774060 innobase/buf/buf0flu.c
                return(FALSE);
        }
  
-@@ -535,18 +537,20 @@
+@@ -536,18 +538,20 @@
        ut_ad(flush_type == BUF_FLUSH_LRU || flush_type == BUF_FLUSH_LIST
                                || flush_type == BUF_FLUSH_SINGLE_PAGE);
  
@@ -619,7 +622,7 @@ diff -r 72a897774060 innobase/buf/buf0flu.c
  
        if (flush_type == BUF_FLUSH_LIST
            && buf_flush_ready_for_flush(block, flush_type)) {
-@@ -743,7 +747,7 @@
+@@ -744,7 +748,7 @@
                high = fil_space_get_size(space);
        }
  
@@ -628,7 +631,7 @@ diff -r 72a897774060 innobase/buf/buf0flu.c
  
        for (i = low; i < high; i++) {
  
-@@ -777,7 +781,7 @@
+@@ -778,7 +782,7 @@
  
                                mutex_exit(&block->mutex);
  
@@ -637,7 +640,7 @@ diff -r 72a897774060 innobase/buf/buf0flu.c
  
                                /* Note: as we release the buf_pool mutex
                                above, in buf_flush_try_page we cannot be sure
-@@ -788,14 +792,14 @@
+@@ -789,14 +793,14 @@
                                count += buf_flush_try_page(space, i,
                                                            flush_type);
  
@@ -654,7 +657,7 @@ diff -r 72a897774060 innobase/buf/buf0flu.c
  
        return(count);
  }
-@@ -848,7 +852,14 @@
+@@ -849,7 +853,14 @@
        }
  
        (buf_pool->init_flush)[flush_type] = TRUE;
@@ -669,7 +672,7 @@ diff -r 72a897774060 innobase/buf/buf0flu.c
        for (;;) {
                /* If we have flushed enough, leave the loop */
                if (page_count >= min_n) {
-@@ -894,7 +905,10 @@
+@@ -895,7 +906,10 @@
                                offset = block->offset;
            
                                mutex_exit(&block->mutex);
@@ -681,7 +684,7 @@ diff -r 72a897774060 innobase/buf/buf0flu.c
  
                                old_page_count = page_count;
                                
-@@ -907,7 +921,10 @@
+@@ -908,7 +922,10 @@
                                flush_type, offset,
                                page_count - old_page_count); */
  
@@ -693,7 +696,7 @@ diff -r 72a897774060 innobase/buf/buf0flu.c
  
                        } else if (flush_type == BUF_FLUSH_LRU) {
  
-@@ -929,6 +946,13 @@
+@@ -930,6 +947,13 @@
                        break;
                }
        }
@@ -707,7 +710,7 @@ diff -r 72a897774060 innobase/buf/buf0flu.c
  
        (buf_pool->init_flush)[flush_type] = FALSE;
  
-@@ -988,10 +1012,14 @@
+@@ -989,10 +1013,14 @@
        buf_block_t*    block;
        ulint           n_replaceable;
        ulint           distance        = 0;
@@ -724,7 +727,7 @@ diff -r 72a897774060 innobase/buf/buf0flu.c
  
        block = UT_LIST_GET_LAST(buf_pool->LRU);
  
-@@ -1013,7 +1041,7 @@
+@@ -1014,7 +1042,7 @@
                block = UT_LIST_GET_PREV(LRU, block);
        }
        
@@ -733,7 +736,7 @@ diff -r 72a897774060 innobase/buf/buf0flu.c
  
        if (n_replaceable >= BUF_FLUSH_FREE_BLOCK_MARGIN) {
  
-@@ -1032,8 +1060,9 @@
+@@ -1033,8 +1061,9 @@
  immediately, without waiting. */ 
  
  void
@@ -744,7 +747,7 @@ diff -r 72a897774060 innobase/buf/buf0flu.c
  {
        ulint   n_to_flush;
        ulint   n_flushed;
-@@ -1043,7 +1072,7 @@
+@@ -1044,7 +1073,7 @@
        if (n_to_flush > 0) {
                n_flushed = buf_flush_batch(BUF_FLUSH_LRU, n_to_flush,
                                                        ut_dulint_zero);
@@ -753,7 +756,7 @@ diff -r 72a897774060 innobase/buf/buf0flu.c
                        /* There was an LRU type flush batch already running;
                        let us wait for it to end */
                   
-@@ -1093,11 +1122,11 @@
+@@ -1094,11 +1123,11 @@
  {
        ibool   ret;
        
@@ -767,9 +770,9 @@ diff -r 72a897774060 innobase/buf/buf0flu.c
  
        return(ret);
  }
-diff -r 72a897774060 innobase/buf/buf0lru.c
---- a/innobase/buf/buf0lru.c   Mon Sep 08 16:40:20 2008 -0700
-+++ b/innobase/buf/buf0lru.c   Mon Sep 08 16:40:27 2008 -0700
+diff -r 2e0c46e78b50 innobase/buf/buf0lru.c
+--- a/innobase/buf/buf0lru.c   Mon Dec 22 00:33:53 2008 -0800
++++ b/innobase/buf/buf0lru.c   Mon Dec 22 00:33:59 2008 -0800
 @@ -79,7 +79,10 @@
        ibool           all_freed;
  
@@ -1021,9 +1024,9 @@ diff -r 72a897774060 innobase/buf/buf0lru.c
 -      mutex_exit(&(buf_pool->mutex));
 +      mutex_exit(&(buf_pool->LRU_mutex));
  }
-diff -r 72a897774060 innobase/buf/buf0rea.c
---- a/innobase/buf/buf0rea.c   Mon Sep 08 16:40:20 2008 -0700
-+++ b/innobase/buf/buf0rea.c   Mon Sep 08 16:40:27 2008 -0700
+diff -r 2e0c46e78b50 innobase/buf/buf0rea.c
+--- a/innobase/buf/buf0rea.c   Mon Dec 22 00:33:53 2008 -0800
++++ b/innobase/buf/buf0rea.c   Mon Dec 22 00:33:59 2008 -0800
 @@ -236,10 +236,12 @@
  
                return(0);
@@ -1137,18 +1140,18 @@ diff -r 72a897774060 innobase/buf/buf0rea.c
  
  #ifdef UNIV_DEBUG
        if (buf_debug_prints) {
-diff -r 72a897774060 innobase/include/buf0buf.h
---- a/innobase/include/buf0buf.h       Mon Sep 08 16:40:20 2008 -0700
-+++ b/innobase/include/buf0buf.h       Mon Sep 08 16:40:27 2008 -0700
-@@ -929,6 +929,7 @@
-                                       currently always the same as
-                                       max_size */
+diff -r 2e0c46e78b50 innobase/include/buf0buf.h
+--- a/innobase/include/buf0buf.h       Mon Dec 22 00:33:53 2008 -0800
++++ b/innobase/include/buf0buf.h       Mon Dec 22 00:33:59 2008 -0800
+@@ -946,6 +946,7 @@
+       mem_heap_t*     io_counter_heap;
+       ulint           io_counters;
        hash_table_t*   page_hash;      /* hash table of the file pages */
 +      mutex_t         hash_mutex;
  
        ulint           n_pend_reads;   /* number of pending read operations */
  
-@@ -961,6 +962,7 @@
+@@ -978,6 +979,7 @@
        UT_LIST_BASE_NODE_T(buf_block_t) flush_list;
                                        /* base node of the modified block
                                        list */
@@ -1156,7 +1159,7 @@ diff -r 72a897774060 innobase/include/buf0buf.h
        ibool           init_flush[BUF_FLUSH_LIST + 1];
                                        /* this is TRUE when a flush of the
                                        given type is being initialized */
-@@ -994,8 +996,10 @@
+@@ -1011,8 +1013,10 @@
                                        in the case of AWE, at the start are
                                        always free blocks for which the
                                        physical memory is mapped to a frame */
@@ -1167,9 +1170,9 @@ diff -r 72a897774060 innobase/include/buf0buf.h
        buf_block_t*    LRU_old;        /* pointer to the about 3/8 oldest
                                        blocks in the LRU list; NULL if LRU
                                        length less than BUF_LRU_OLD_MIN_LEN */
-diff -r 72a897774060 innobase/include/buf0buf.ic
---- a/innobase/include/buf0buf.ic      Mon Sep 08 16:40:20 2008 -0700
-+++ b/innobase/include/buf0buf.ic      Mon Sep 08 16:40:27 2008 -0700
+diff -r 2e0c46e78b50 innobase/include/buf0buf.ic
+--- a/innobase/include/buf0buf.ic      Mon Dec 22 00:33:53 2008 -0800
++++ b/innobase/include/buf0buf.ic      Mon Dec 22 00:33:59 2008 -0800
 @@ -112,7 +112,7 @@
        buf_block_t*    block;
        dulint          lsn;
@@ -1240,9 +1243,9 @@ diff -r 72a897774060 innobase/include/buf0buf.ic
        }
  
        mutex_enter(&block->mutex);
-diff -r 72a897774060 innobase/include/buf0flu.h
---- a/innobase/include/buf0flu.h       Mon Sep 08 16:40:20 2008 -0700
-+++ b/innobase/include/buf0flu.h       Mon Sep 08 16:40:27 2008 -0700
+diff -r 2e0c46e78b50 innobase/include/buf0flu.h
+--- a/innobase/include/buf0flu.h       Mon Dec 22 00:33:53 2008 -0800
++++ b/innobase/include/buf0flu.h       Mon Dec 22 00:33:59 2008 -0800
 @@ -26,8 +26,9 @@
  a margin of replaceable pages there. */
  
@@ -1254,9 +1257,9 @@ diff -r 72a897774060 innobase/include/buf0flu.h
  /************************************************************************
  Initializes a page for writing to the tablespace. */
  
-diff -r 72a897774060 innobase/include/buf0flu.ic
---- a/innobase/include/buf0flu.ic      Mon Sep 08 16:40:20 2008 -0700
-+++ b/innobase/include/buf0flu.ic      Mon Sep 08 16:40:27 2008 -0700
+diff -r 2e0c46e78b50 innobase/include/buf0flu.ic
+--- a/innobase/include/buf0flu.ic      Mon Dec 22 00:33:53 2008 -0800
++++ b/innobase/include/buf0flu.ic      Mon Dec 22 00:33:59 2008 -0800
 @@ -84,7 +84,7 @@
        ut_ad(rw_lock_own(&(block->lock), RW_LOCK_EX));
  #endif /* UNIV_SYNC_DEBUG */
@@ -1273,9 +1276,9 @@ diff -r 72a897774060 innobase/include/buf0flu.ic
 -      mutex_exit(&(buf_pool->mutex));
 +      mutex_exit(&(buf_pool->flush_list_mutex));
  }
-diff -r 72a897774060 innobase/log/log0recv.c
---- a/innobase/log/log0recv.c  Mon Sep 08 16:40:20 2008 -0700
-+++ b/innobase/log/log0recv.c  Mon Sep 08 16:40:27 2008 -0700
+diff -r 2e0c46e78b50 innobase/log/log0recv.c
+--- a/innobase/log/log0recv.c  Mon Dec 22 00:33:53 2008 -0800
++++ b/innobase/log/log0recv.c  Mon Dec 22 00:33:59 2008 -0800
 @@ -1693,11 +1693,11 @@
  
        mtr_start(&mtr);
@@ -1290,9 +1293,9 @@ diff -r 72a897774060 innobase/log/log0recv.c
  
        replica = buf_page_get(space + RECV_REPLICA_SPACE_ADD, page_no,
                                                        RW_X_LATCH, &mtr);
-diff -r 72a897774060 patch_info/split_buf_pool_mutex_fixed_optimistic_safe.info
+diff -r 2e0c46e78b50 patch_info/split_buf_pool_mutex_fixed_optimistic_safe.info
 --- /dev/null  Thu Jan 01 00:00:00 1970 +0000
-+++ b/patch_info/split_buf_pool_mutex_fixed_optimistic_safe.info       Mon Sep 08 16:40:27 2008 -0700
++++ b/patch_info/split_buf_pool_mutex_fixed_optimistic_safe.info       Mon Dec 22 00:33:59 2008 -0800
 @@ -0,0 +1,6 @@
 +File=split_buf_pool_mutex_fixed_optimistic_safe.patch
 +Name=InnoDB patch to fix buffer pool scalability
index fe40cdfab49a5bd655f2d8044ccf08b7f53def45..08fbfb370c798cc31b911ece6b0a3979c5057657 100644 (file)
@@ -1,7 +1,7 @@
-diff -r 0bb04c127c7e BUILD/Makefile.in
---- a/BUILD/Makefile.in        Fri Sep 12 01:25:08 2008 -0700
-+++ b/BUILD/Makefile.in        Fri Sep 12 01:26:21 2008 -0700
-@@ -167,6 +167,7 @@
+diff -r d35bd12bba15 BUILD/Makefile.in
+--- a/BUILD/Makefile.in        Mon Dec 22 22:51:44 2008 -0800
++++ b/BUILD/Makefile.in        Mon Dec 22 22:53:26 2008 -0800
+@@ -169,6 +169,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -9,10 +9,10 @@ diff -r 0bb04c127c7e BUILD/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e Docs/Makefile.in
---- a/Docs/Makefile.in Fri Sep 12 01:25:08 2008 -0700
-+++ b/Docs/Makefile.in Fri Sep 12 01:26:21 2008 -0700
-@@ -165,6 +165,7 @@
+diff -r d35bd12bba15 Docs/Makefile.in
+--- a/Docs/Makefile.in Mon Dec 22 22:51:44 2008 -0800
++++ b/Docs/Makefile.in Mon Dec 22 22:53:26 2008 -0800
+@@ -167,6 +167,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -20,10 +20,10 @@ diff -r 0bb04c127c7e Docs/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e Makefile.in
---- a/Makefile.in      Fri Sep 12 01:25:08 2008 -0700
-+++ b/Makefile.in      Fri Sep 12 01:26:21 2008 -0700
-@@ -189,6 +189,7 @@
+diff -r d35bd12bba15 Makefile.in
+--- a/Makefile.in      Mon Dec 22 22:51:44 2008 -0800
++++ b/Makefile.in      Mon Dec 22 22:53:26 2008 -0800
+@@ -191,6 +191,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -31,10 +31,10 @@ diff -r 0bb04c127c7e Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e SSL/Makefile.in
---- a/SSL/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/SSL/Makefile.in  Fri Sep 12 01:26:21 2008 -0700
-@@ -165,6 +165,7 @@
+diff -r d35bd12bba15 SSL/Makefile.in
+--- a/SSL/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/SSL/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -167,6 +167,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -42,9 +42,9 @@ diff -r 0bb04c127c7e SSL/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e aclocal.m4
---- a/aclocal.m4       Fri Sep 12 01:25:08 2008 -0700
-+++ b/aclocal.m4       Fri Sep 12 01:26:21 2008 -0700
+diff -r d35bd12bba15 aclocal.m4
+--- a/aclocal.m4       Mon Dec 22 22:51:44 2008 -0800
++++ b/aclocal.m4       Mon Dec 22 22:53:26 2008 -0800
 @@ -1597,7 +1597,7 @@
  
    # Append ld.so.conf contents to the search path
@@ -112,10 +112,10 @@ diff -r 0bb04c127c7e aclocal.m4
  AC_MSG_RESULT([$SED])
  ])
  
-diff -r 0bb04c127c7e client/Makefile.in
---- a/client/Makefile.in       Fri Sep 12 01:25:08 2008 -0700
-+++ b/client/Makefile.in       Fri Sep 12 01:26:21 2008 -0700
-@@ -266,6 +266,7 @@
+diff -r d35bd12bba15 client/Makefile.in
+--- a/client/Makefile.in       Mon Dec 22 22:51:44 2008 -0800
++++ b/client/Makefile.in       Mon Dec 22 22:53:26 2008 -0800
+@@ -268,6 +268,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -123,10 +123,10 @@ diff -r 0bb04c127c7e client/Makefile.in
  LIBS = @CLIENT_LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e cmd-line-utils/Makefile.in
---- a/cmd-line-utils/Makefile.in       Fri Sep 12 01:25:08 2008 -0700
-+++ b/cmd-line-utils/Makefile.in       Fri Sep 12 01:26:21 2008 -0700
-@@ -175,6 +175,7 @@
+diff -r d35bd12bba15 cmd-line-utils/Makefile.in
+--- a/cmd-line-utils/Makefile.in       Mon Dec 22 22:51:44 2008 -0800
++++ b/cmd-line-utils/Makefile.in       Mon Dec 22 22:53:26 2008 -0800
+@@ -177,6 +177,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -134,10 +134,10 @@ diff -r 0bb04c127c7e cmd-line-utils/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e cmd-line-utils/libedit/Makefile.in
---- a/cmd-line-utils/libedit/Makefile.in       Fri Sep 12 01:25:08 2008 -0700
-+++ b/cmd-line-utils/libedit/Makefile.in       Fri Sep 12 01:26:21 2008 -0700
-@@ -195,6 +195,7 @@
+diff -r d35bd12bba15 cmd-line-utils/libedit/Makefile.in
+--- a/cmd-line-utils/libedit/Makefile.in       Mon Dec 22 22:51:44 2008 -0800
++++ b/cmd-line-utils/libedit/Makefile.in       Mon Dec 22 22:53:26 2008 -0800
+@@ -197,6 +197,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -145,10 +145,10 @@ diff -r 0bb04c127c7e cmd-line-utils/libedit/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e cmd-line-utils/readline/Makefile.in
---- a/cmd-line-utils/readline/Makefile.in      Fri Sep 12 01:25:08 2008 -0700
-+++ b/cmd-line-utils/readline/Makefile.in      Fri Sep 12 01:26:21 2008 -0700
-@@ -193,6 +193,7 @@
+diff -r d35bd12bba15 cmd-line-utils/readline/Makefile.in
+--- a/cmd-line-utils/readline/Makefile.in      Mon Dec 22 22:51:44 2008 -0800
++++ b/cmd-line-utils/readline/Makefile.in      Mon Dec 22 22:53:26 2008 -0800
+@@ -195,6 +195,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -156,10 +156,123 @@ diff -r 0bb04c127c7e cmd-line-utils/readline/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e configure.in
---- a/configure.in     Fri Sep 12 01:25:08 2008 -0700
-+++ b/configure.in     Fri Sep 12 01:26:21 2008 -0700
-@@ -2090,7 +2090,18 @@
+diff -r d35bd12bba15 configure
+--- a/configure        Mon Dec 22 22:51:44 2008 -0800
++++ b/configure        Mon Dec 22 22:53:26 2008 -0800
+@@ -38236,7 +38236,91 @@
+       # We also disable for SCO for the time being, the headers for the
+       # thread library we use conflicts with other headers.
+     ;;
+- *)
++*)
++   # most systems require the program be linked with librt library to use
++   # the function clock_gettime
++   my_save_LIBS="$LIBS"
++   LIBS=""
++
++echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5
++echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6
++if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++  ac_check_lib_save_LIBS=$LIBS
++LIBS="-lrt  $LIBS"
++cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h.  */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h.  */
++
++/* Override any gcc2 internal prototype to avoid an error.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++/* We use char because int might match the return type of a gcc2
++   builtin and then its argument prototype would still apply.  */
++char clock_gettime ();
++int
++main ()
++{
++clock_gettime ();
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext conftest$ac_exeext
++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
++  (eval $ac_link) 2>conftest.er1
++  ac_status=$?
++  grep -v '^ *+' conftest.er1 >conftest.err
++  rm -f conftest.er1
++  cat conftest.err >&5
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
++  (exit $ac_status); } &&
++       { ac_try='test -z "$ac_c_werror_flag"
++                       || test ! -s conftest.err'
++  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
++  (exit $ac_status); }; } &&
++       { ac_try='test -s conftest$ac_exeext'
++  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
++  (exit $ac_status); }; }; then
++  ac_cv_lib_rt_clock_gettime=yes
++else
++  echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++ac_cv_lib_rt_clock_gettime=no
++fi
++rm -f conftest.err conftest.$ac_objext \
++      conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5
++echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6
++if test $ac_cv_lib_rt_clock_gettime = yes; then
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_LIBRT 1
++_ACEOF
++
++  LIBS="-lrt $LIBS"
++
++fi
++
++   LIBRT=$LIBS
++   LIBS="$my_save_LIBS"
++
++
++   LIBS="$LIBS $LIBRT"
++
+ for ac_func in clock_gettime
+ do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+@@ -41644,7 +41728,7 @@
+ fi
+-CLIENT_LIBS="$NON_THREADED_LIBS $openssl_libs $ZLIB_LIBS $STATIC_NSS_FLAGS"
++CLIENT_LIBS="$NON_THREADED_LIBS $openssl_libs $ZLIB_LIBS $STATIC_NSS_FLAGS $LIBRT"
+@@ -42984,6 +43068,7 @@
+ s,@MAKE_SHELL@,$MAKE_SHELL,;t t
+ s,@TERMCAP_LIB@,$TERMCAP_LIB,;t t
+ s,@LIBEDIT_LOBJECTS@,$LIBEDIT_LOBJECTS,;t t
++s,@LIBRT@,$LIBRT,;t t
+ s,@tools_dirs@,$tools_dirs,;t t
+ s,@openssl_libs@,$openssl_libs,;t t
+ s,@openssl_includes@,$openssl_includes,;t t
+diff -r d35bd12bba15 configure.in
+--- a/configure.in     Mon Dec 22 22:51:44 2008 -0800
++++ b/configure.in     Mon Dec 22 22:53:26 2008 -0800
+@@ -2098,7 +2098,18 @@
        # We also disable for SCO for the time being, the headers for the
        # thread library we use conflicts with other headers.
      ;;
@@ -179,7 +292,7 @@ diff -r 0bb04c127c7e configure.in
      ;;
  esac
  
-@@ -2705,7 +2716,7 @@
+@@ -2713,7 +2724,7 @@
    AC_DEFINE([THREAD_SAFE_CLIENT], [1], [Should be client be thread safe])
  fi
  
@@ -188,10 +301,10 @@ diff -r 0bb04c127c7e configure.in
  
  AC_SUBST(CLIENT_LIBS)
  AC_SUBST(NON_THREADED_LIBS)
-diff -r 0bb04c127c7e dbug/Makefile.in
---- a/dbug/Makefile.in Fri Sep 12 01:25:08 2008 -0700
-+++ b/dbug/Makefile.in Fri Sep 12 01:26:21 2008 -0700
-@@ -212,6 +212,7 @@
+diff -r d35bd12bba15 dbug/Makefile.in
+--- a/dbug/Makefile.in Mon Dec 22 22:51:44 2008 -0800
++++ b/dbug/Makefile.in Mon Dec 22 22:53:26 2008 -0800
+@@ -214,6 +214,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -199,10 +312,10 @@ diff -r 0bb04c127c7e dbug/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e extra/Makefile.in
---- a/extra/Makefile.in        Fri Sep 12 01:25:08 2008 -0700
-+++ b/extra/Makefile.in        Fri Sep 12 01:26:21 2008 -0700
-@@ -254,6 +254,7 @@
+diff -r d35bd12bba15 extra/Makefile.in
+--- a/extra/Makefile.in        Mon Dec 22 22:51:44 2008 -0800
++++ b/extra/Makefile.in        Mon Dec 22 22:53:26 2008 -0800
+@@ -259,6 +259,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -210,10 +323,10 @@ diff -r 0bb04c127c7e extra/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e extra/yassl/Makefile.in
---- a/extra/yassl/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/extra/yassl/Makefile.in  Fri Sep 12 01:26:21 2008 -0700
-@@ -160,6 +160,7 @@
+diff -r d35bd12bba15 extra/yassl/Makefile.in
+--- a/extra/yassl/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/extra/yassl/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -162,6 +162,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -221,10 +334,10 @@ diff -r 0bb04c127c7e extra/yassl/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e extra/yassl/src/Makefile.in
---- a/extra/yassl/src/Makefile.in      Fri Sep 12 01:25:08 2008 -0700
-+++ b/extra/yassl/src/Makefile.in      Fri Sep 12 01:26:21 2008 -0700
-@@ -171,6 +171,7 @@
+diff -r d35bd12bba15 extra/yassl/src/Makefile.in
+--- a/extra/yassl/src/Makefile.in      Mon Dec 22 22:51:44 2008 -0800
++++ b/extra/yassl/src/Makefile.in      Mon Dec 22 22:53:26 2008 -0800
+@@ -173,6 +173,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -232,10 +345,10 @@ diff -r 0bb04c127c7e extra/yassl/src/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e extra/yassl/taocrypt/Makefile.in
---- a/extra/yassl/taocrypt/Makefile.in Fri Sep 12 01:25:08 2008 -0700
-+++ b/extra/yassl/taocrypt/Makefile.in Fri Sep 12 01:26:21 2008 -0700
-@@ -160,6 +160,7 @@
+diff -r d35bd12bba15 extra/yassl/taocrypt/Makefile.in
+--- a/extra/yassl/taocrypt/Makefile.in Mon Dec 22 22:51:44 2008 -0800
++++ b/extra/yassl/taocrypt/Makefile.in Mon Dec 22 22:53:26 2008 -0800
+@@ -162,6 +162,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -243,10 +356,10 @@ diff -r 0bb04c127c7e extra/yassl/taocrypt/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e extra/yassl/taocrypt/benchmark/Makefile.in
---- a/extra/yassl/taocrypt/benchmark/Makefile.in       Fri Sep 12 01:25:08 2008 -0700
-+++ b/extra/yassl/taocrypt/benchmark/Makefile.in       Fri Sep 12 01:26:21 2008 -0700
-@@ -170,6 +170,7 @@
+diff -r d35bd12bba15 extra/yassl/taocrypt/benchmark/Makefile.in
+--- a/extra/yassl/taocrypt/benchmark/Makefile.in       Mon Dec 22 22:51:44 2008 -0800
++++ b/extra/yassl/taocrypt/benchmark/Makefile.in       Mon Dec 22 22:53:26 2008 -0800
+@@ -172,6 +172,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -254,10 +367,10 @@ diff -r 0bb04c127c7e extra/yassl/taocrypt/benchmark/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e extra/yassl/taocrypt/src/Makefile.in
---- a/extra/yassl/taocrypt/src/Makefile.in     Fri Sep 12 01:25:08 2008 -0700
-+++ b/extra/yassl/taocrypt/src/Makefile.in     Fri Sep 12 01:26:21 2008 -0700
-@@ -180,6 +180,7 @@
+diff -r d35bd12bba15 extra/yassl/taocrypt/src/Makefile.in
+--- a/extra/yassl/taocrypt/src/Makefile.in     Mon Dec 22 22:51:44 2008 -0800
++++ b/extra/yassl/taocrypt/src/Makefile.in     Mon Dec 22 22:53:26 2008 -0800
+@@ -182,6 +182,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -265,10 +378,10 @@ diff -r 0bb04c127c7e extra/yassl/taocrypt/src/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e extra/yassl/taocrypt/test/Makefile.in
---- a/extra/yassl/taocrypt/test/Makefile.in    Fri Sep 12 01:25:08 2008 -0700
-+++ b/extra/yassl/taocrypt/test/Makefile.in    Fri Sep 12 01:26:21 2008 -0700
-@@ -170,6 +170,7 @@
+diff -r d35bd12bba15 extra/yassl/taocrypt/test/Makefile.in
+--- a/extra/yassl/taocrypt/test/Makefile.in    Mon Dec 22 22:51:44 2008 -0800
++++ b/extra/yassl/taocrypt/test/Makefile.in    Mon Dec 22 22:53:26 2008 -0800
+@@ -172,6 +172,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -276,10 +389,10 @@ diff -r 0bb04c127c7e extra/yassl/taocrypt/test/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e extra/yassl/testsuite/Makefile.in
---- a/extra/yassl/testsuite/Makefile.in        Fri Sep 12 01:25:08 2008 -0700
-+++ b/extra/yassl/testsuite/Makefile.in        Fri Sep 12 01:26:21 2008 -0700
-@@ -173,6 +173,7 @@
+diff -r d35bd12bba15 extra/yassl/testsuite/Makefile.in
+--- a/extra/yassl/testsuite/Makefile.in        Mon Dec 22 22:51:44 2008 -0800
++++ b/extra/yassl/testsuite/Makefile.in        Mon Dec 22 22:53:26 2008 -0800
+@@ -175,6 +175,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -287,10 +400,10 @@ diff -r 0bb04c127c7e extra/yassl/testsuite/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e heap/Makefile.in
---- a/heap/Makefile.in Fri Sep 12 01:25:08 2008 -0700
-+++ b/heap/Makefile.in Fri Sep 12 01:26:21 2008 -0700
-@@ -216,6 +216,7 @@
+diff -r d35bd12bba15 heap/Makefile.in
+--- a/heap/Makefile.in Mon Dec 22 22:51:44 2008 -0800
++++ b/heap/Makefile.in Mon Dec 22 22:53:26 2008 -0800
+@@ -218,6 +218,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -298,10 +411,10 @@ diff -r 0bb04c127c7e heap/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e include/Makefile.in
---- a/include/Makefile.in      Fri Sep 12 01:25:08 2008 -0700
-+++ b/include/Makefile.in      Fri Sep 12 01:26:21 2008 -0700
-@@ -181,6 +181,7 @@
+diff -r d35bd12bba15 include/Makefile.in
+--- a/include/Makefile.in      Mon Dec 22 22:51:44 2008 -0800
++++ b/include/Makefile.in      Mon Dec 22 22:53:26 2008 -0800
+@@ -183,6 +183,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -309,9 +422,9 @@ diff -r 0bb04c127c7e include/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e include/mysql_com.h
---- a/include/mysql_com.h      Fri Sep 12 01:25:08 2008 -0700
-+++ b/include/mysql_com.h      Fri Sep 12 01:26:21 2008 -0700
+diff -r d35bd12bba15 include/mysql_com.h
+--- a/include/mysql_com.h      Mon Dec 22 22:51:44 2008 -0800
++++ b/include/mysql_com.h      Mon Dec 22 22:53:26 2008 -0800
 @@ -106,6 +106,11 @@
                                           thread */
  #define REFRESH_MASTER          128     /* Remove all bin logs in the index
@@ -324,10 +437,10 @@ diff -r 0bb04c127c7e include/mysql_com.h
  
  /* The following can't be set with mysql_refresh() */
  #define REFRESH_READ_LOCK     16384   /* Lock tables for read */
-diff -r 0bb04c127c7e libmysql/Makefile.in
---- a/libmysql/Makefile.in     Fri Sep 12 01:25:08 2008 -0700
-+++ b/libmysql/Makefile.in     Fri Sep 12 01:26:21 2008 -0700
-@@ -276,6 +276,7 @@
+diff -r d35bd12bba15 libmysql/Makefile.in
+--- a/libmysql/Makefile.in     Mon Dec 22 22:51:44 2008 -0800
++++ b/libmysql/Makefile.in     Mon Dec 22 22:53:26 2008 -0800
+@@ -278,6 +278,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -335,10 +448,10 @@ diff -r 0bb04c127c7e libmysql/Makefile.in
  LIBS = @CLIENT_LIBS@ 
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e libmysql_r/Makefile.in
---- a/libmysql_r/Makefile.in   Fri Sep 12 01:25:08 2008 -0700
-+++ b/libmysql_r/Makefile.in   Fri Sep 12 01:26:21 2008 -0700
-@@ -273,6 +273,7 @@
+diff -r d35bd12bba15 libmysql_r/Makefile.in
+--- a/libmysql_r/Makefile.in   Mon Dec 22 22:51:44 2008 -0800
++++ b/libmysql_r/Makefile.in   Mon Dec 22 22:53:26 2008 -0800
+@@ -275,6 +275,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -346,10 +459,10 @@ diff -r 0bb04c127c7e libmysql_r/Makefile.in
  LIBS = @LIBS@ @ZLIB_LIBS@ @openssl_libs@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e libmysqld/Makefile.in
---- a/libmysqld/Makefile.in    Fri Sep 12 01:25:08 2008 -0700
-+++ b/libmysqld/Makefile.in    Fri Sep 12 01:26:21 2008 -0700
-@@ -262,6 +262,7 @@
+diff -r d35bd12bba15 libmysqld/Makefile.in
+--- a/libmysqld/Makefile.in    Mon Dec 22 22:51:44 2008 -0800
++++ b/libmysqld/Makefile.in    Mon Dec 22 22:53:26 2008 -0800
+@@ -264,6 +264,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -357,10 +470,10 @@ diff -r 0bb04c127c7e libmysqld/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e libmysqld/examples/Makefile.in
---- a/libmysqld/examples/Makefile.in   Fri Sep 12 01:25:08 2008 -0700
-+++ b/libmysqld/examples/Makefile.in   Fri Sep 12 01:26:21 2008 -0700
-@@ -211,6 +211,7 @@
+diff -r d35bd12bba15 libmysqld/examples/Makefile.in
+--- a/libmysqld/examples/Makefile.in   Mon Dec 22 22:51:44 2008 -0800
++++ b/libmysqld/examples/Makefile.in   Mon Dec 22 22:53:26 2008 -0800
+@@ -213,6 +213,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -368,10 +481,10 @@ diff -r 0bb04c127c7e libmysqld/examples/Makefile.in
  LIBS = @LIBS@ @WRAPLIBS@ @CLIENT_LIBS@ $(yassl_libs)
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e man/Makefile.in
---- a/man/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/man/Makefile.in  Fri Sep 12 01:26:21 2008 -0700
-@@ -172,6 +172,7 @@
+diff -r d35bd12bba15 man/Makefile.in
+--- a/man/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/man/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -174,6 +174,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -379,10 +492,10 @@ diff -r 0bb04c127c7e man/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e myisam/Makefile.in
---- a/myisam/Makefile.in       Fri Sep 12 01:25:08 2008 -0700
-+++ b/myisam/Makefile.in       Fri Sep 12 01:26:21 2008 -0700
-@@ -255,6 +255,7 @@
+diff -r d35bd12bba15 myisam/Makefile.in
+--- a/myisam/Makefile.in       Mon Dec 22 22:51:44 2008 -0800
++++ b/myisam/Makefile.in       Mon Dec 22 22:53:26 2008 -0800
+@@ -257,6 +257,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -390,10 +503,10 @@ diff -r 0bb04c127c7e myisam/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e myisammrg/Makefile.in
---- a/myisammrg/Makefile.in    Fri Sep 12 01:25:08 2008 -0700
-+++ b/myisammrg/Makefile.in    Fri Sep 12 01:26:21 2008 -0700
-@@ -203,6 +203,7 @@
+diff -r d35bd12bba15 myisammrg/Makefile.in
+--- a/myisammrg/Makefile.in    Mon Dec 22 22:51:44 2008 -0800
++++ b/myisammrg/Makefile.in    Mon Dec 22 22:53:26 2008 -0800
+@@ -205,6 +205,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -401,10 +514,10 @@ diff -r 0bb04c127c7e myisammrg/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e mysql-test/Makefile.in
---- a/mysql-test/Makefile.in   Fri Sep 12 01:25:08 2008 -0700
-+++ b/mysql-test/Makefile.in   Fri Sep 12 01:26:21 2008 -0700
-@@ -179,6 +179,7 @@
+diff -r d35bd12bba15 mysql-test/Makefile.in
+--- a/mysql-test/Makefile.in   Mon Dec 22 22:51:44 2008 -0800
++++ b/mysql-test/Makefile.in   Mon Dec 22 22:53:26 2008 -0800
+@@ -181,6 +181,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -412,10 +525,10 @@ diff -r 0bb04c127c7e mysql-test/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e mysql-test/ndb/Makefile.in
---- a/mysql-test/ndb/Makefile.in       Fri Sep 12 01:25:08 2008 -0700
-+++ b/mysql-test/ndb/Makefile.in       Fri Sep 12 01:26:21 2008 -0700
-@@ -168,6 +168,7 @@
+diff -r d35bd12bba15 mysql-test/ndb/Makefile.in
+--- a/mysql-test/ndb/Makefile.in       Mon Dec 22 22:51:44 2008 -0800
++++ b/mysql-test/ndb/Makefile.in       Mon Dec 22 22:53:26 2008 -0800
+@@ -170,6 +170,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -423,9 +536,9 @@ diff -r 0bb04c127c7e mysql-test/ndb/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e mysql-test/r/information_schema.result
---- a/mysql-test/r/information_schema.result   Fri Sep 12 01:25:08 2008 -0700
-+++ b/mysql-test/r/information_schema.result   Fri Sep 12 01:26:21 2008 -0700
+diff -r d35bd12bba15 mysql-test/r/information_schema.result
+--- a/mysql-test/r/information_schema.result   Mon Dec 22 22:51:44 2008 -0800
++++ b/mysql-test/r/information_schema.result   Mon Dec 22 22:53:26 2008 -0800
 @@ -37,10 +37,12 @@
  select * from v1;
  c
@@ -509,7 +622,7 @@ diff -r 0bb04c127c7e mysql-test/r/information_schema.result
  CREATE VIEW a1 (t_CRASHME) AS SELECT f1 FROM t_crashme GROUP BY f1;
  CREATE VIEW a2 AS SELECT t_CRASHME FROM a1;
  count(*)
--101
+-102
 +106
  drop view a2, a1;
  drop table t_crashme;
@@ -531,7 +644,7 @@ diff -r 0bb04c127c7e mysql-test/r/information_schema.result
  flush privileges;
  SELECT table_schema, count(*) FROM information_schema.TABLES GROUP BY TABLE_SCHEMA;
  table_schema  count(*)
--information_schema    16
+-information_schema    17
 +information_schema    21
  mysql 17
  create table t1 (i int, j int);
@@ -608,9 +721,9 @@ diff -r 0bb04c127c7e mysql-test/r/information_schema.result
  VIEWS information_schema.VIEWS        1
  show global status like "Uptime_%";
  Variable_name Value
-diff -r 0bb04c127c7e mysql-test/r/information_schema_db.result
---- a/mysql-test/r/information_schema_db.result        Fri Sep 12 01:25:08 2008 -0700
-+++ b/mysql-test/r/information_schema_db.result        Fri Sep 12 01:26:21 2008 -0700
+diff -r d35bd12bba15 mysql-test/r/information_schema_db.result
+--- a/mysql-test/r/information_schema_db.result        Mon Dec 22 22:51:44 2008 -0800
++++ b/mysql-test/r/information_schema_db.result        Mon Dec 22 22:53:26 2008 -0800
 @@ -6,10 +6,12 @@
  show tables;
  Tables_in_information_schema
@@ -642,9 +755,9 @@ diff -r 0bb04c127c7e mysql-test/r/information_schema_db.result
  TRIGGERS
  create database `inf%`;
  create database mbase;
-diff -r 0bb04c127c7e mysql-test/r/mysqlshow.result
---- a/mysql-test/r/mysqlshow.result    Fri Sep 12 01:25:08 2008 -0700
-+++ b/mysql-test/r/mysqlshow.result    Fri Sep 12 01:26:21 2008 -0700
+diff -r d35bd12bba15 mysql-test/r/mysqlshow.result
+--- a/mysql-test/r/mysqlshow.result    Mon Dec 22 22:51:44 2008 -0800
++++ b/mysql-test/r/mysqlshow.result    Mon Dec 22 22:53:26 2008 -0800
 @@ -80,10 +80,12 @@
  |                Tables                 |
  +---------------------------------------+
@@ -693,10 +806,10 @@ diff -r 0bb04c127c7e mysql-test/r/mysqlshow.result
  | VIEWS                                 |
  +---------------------------------------+
  Wildcard: inf_rmation_schema
-diff -r 0bb04c127c7e mysys/Makefile.in
---- a/mysys/Makefile.in        Fri Sep 12 01:25:08 2008 -0700
-+++ b/mysys/Makefile.in        Fri Sep 12 01:26:21 2008 -0700
-@@ -247,6 +247,7 @@
+diff -r d35bd12bba15 mysys/Makefile.in
+--- a/mysys/Makefile.in        Mon Dec 22 22:51:44 2008 -0800
++++ b/mysys/Makefile.in        Mon Dec 22 22:53:26 2008 -0800
+@@ -249,6 +249,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -704,10 +817,10 @@ diff -r 0bb04c127c7e mysys/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/Makefile.in
---- a/ndb/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/Makefile.in  Fri Sep 12 01:26:21 2008 -0700
-@@ -189,6 +189,7 @@
+diff -r d35bd12bba15 ndb/Makefile.in
+--- a/ndb/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -191,6 +191,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -715,10 +828,10 @@ diff -r 0bb04c127c7e ndb/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/docs/Makefile.in
---- a/ndb/docs/Makefile.in     Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/docs/Makefile.in     Fri Sep 12 01:26:21 2008 -0700
-@@ -170,6 +170,7 @@
+diff -r d35bd12bba15 ndb/docs/Makefile.in
+--- a/ndb/docs/Makefile.in     Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/docs/Makefile.in     Mon Dec 22 22:53:26 2008 -0800
+@@ -172,6 +172,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -726,10 +839,10 @@ diff -r 0bb04c127c7e ndb/docs/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/include/Makefile.in
---- a/ndb/include/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/include/Makefile.in  Fri Sep 12 01:26:21 2008 -0700
-@@ -200,6 +200,7 @@
+diff -r d35bd12bba15 ndb/include/Makefile.in
+--- a/ndb/include/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/include/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -202,6 +202,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -737,10 +850,10 @@ diff -r 0bb04c127c7e ndb/include/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/Makefile.in
---- a/ndb/src/Makefile.in      Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/Makefile.in      Fri Sep 12 01:26:21 2008 -0700
-@@ -218,6 +218,7 @@
+diff -r d35bd12bba15 ndb/src/Makefile.in
+--- a/ndb/src/Makefile.in      Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/Makefile.in      Mon Dec 22 22:53:26 2008 -0800
+@@ -220,6 +220,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -748,10 +861,10 @@ diff -r 0bb04c127c7e ndb/src/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/common/Makefile.in
---- a/ndb/src/common/Makefile.in       Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/common/Makefile.in       Fri Sep 12 01:26:21 2008 -0700
-@@ -191,6 +191,7 @@
+diff -r d35bd12bba15 ndb/src/common/Makefile.in
+--- a/ndb/src/common/Makefile.in       Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/common/Makefile.in       Mon Dec 22 22:53:26 2008 -0800
+@@ -193,6 +193,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -759,10 +872,10 @@ diff -r 0bb04c127c7e ndb/src/common/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/common/debugger/Makefile.in
---- a/ndb/src/common/debugger/Makefile.in      Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/common/debugger/Makefile.in      Fri Sep 12 01:26:21 2008 -0700
-@@ -223,6 +223,7 @@
+diff -r d35bd12bba15 ndb/src/common/debugger/Makefile.in
+--- a/ndb/src/common/debugger/Makefile.in      Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/common/debugger/Makefile.in      Mon Dec 22 22:53:26 2008 -0800
+@@ -225,6 +225,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -770,10 +883,10 @@ diff -r 0bb04c127c7e ndb/src/common/debugger/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/common/debugger/signaldata/Makefile.in
---- a/ndb/src/common/debugger/signaldata/Makefile.in   Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/common/debugger/signaldata/Makefile.in   Fri Sep 12 01:26:21 2008 -0700
-@@ -231,6 +231,7 @@
+diff -r d35bd12bba15 ndb/src/common/debugger/signaldata/Makefile.in
+--- a/ndb/src/common/debugger/signaldata/Makefile.in   Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/common/debugger/signaldata/Makefile.in   Mon Dec 22 22:53:26 2008 -0800
+@@ -233,6 +233,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -781,10 +894,10 @@ diff -r 0bb04c127c7e ndb/src/common/debugger/signaldata/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/common/logger/Makefile.in
---- a/ndb/src/common/logger/Makefile.in        Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/common/logger/Makefile.in        Fri Sep 12 01:26:21 2008 -0700
-@@ -217,6 +217,7 @@
+diff -r d35bd12bba15 ndb/src/common/logger/Makefile.in
+--- a/ndb/src/common/logger/Makefile.in        Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/common/logger/Makefile.in        Mon Dec 22 22:53:26 2008 -0800
+@@ -219,6 +219,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -792,10 +905,10 @@ diff -r 0bb04c127c7e ndb/src/common/logger/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/common/mgmcommon/Makefile.in
---- a/ndb/src/common/mgmcommon/Makefile.in     Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/common/mgmcommon/Makefile.in     Fri Sep 12 01:26:21 2008 -0700
-@@ -231,6 +231,7 @@
+diff -r d35bd12bba15 ndb/src/common/mgmcommon/Makefile.in
+--- a/ndb/src/common/mgmcommon/Makefile.in     Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/common/mgmcommon/Makefile.in     Mon Dec 22 22:53:26 2008 -0800
+@@ -233,6 +233,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -803,10 +916,10 @@ diff -r 0bb04c127c7e ndb/src/common/mgmcommon/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/common/portlib/Makefile.in
---- a/ndb/src/common/portlib/Makefile.in       Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/common/portlib/Makefile.in       Fri Sep 12 01:26:21 2008 -0700
-@@ -241,6 +241,7 @@
+diff -r d35bd12bba15 ndb/src/common/portlib/Makefile.in
+--- a/ndb/src/common/portlib/Makefile.in       Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/common/portlib/Makefile.in       Mon Dec 22 22:53:26 2008 -0800
+@@ -243,6 +243,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -814,10 +927,10 @@ diff -r 0bb04c127c7e ndb/src/common/portlib/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/common/transporter/Makefile.in
---- a/ndb/src/common/transporter/Makefile.in   Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/common/transporter/Makefile.in   Fri Sep 12 01:26:21 2008 -0700
-@@ -217,6 +217,7 @@
+diff -r d35bd12bba15 ndb/src/common/transporter/Makefile.in
+--- a/ndb/src/common/transporter/Makefile.in   Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/common/transporter/Makefile.in   Mon Dec 22 22:53:26 2008 -0800
+@@ -219,6 +219,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -825,10 +938,10 @@ diff -r 0bb04c127c7e ndb/src/common/transporter/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/common/util/Makefile.in
---- a/ndb/src/common/util/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/common/util/Makefile.in  Fri Sep 12 01:26:21 2008 -0700
-@@ -233,6 +233,7 @@
+diff -r d35bd12bba15 ndb/src/common/util/Makefile.in
+--- a/ndb/src/common/util/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/common/util/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -235,6 +235,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -836,10 +949,10 @@ diff -r 0bb04c127c7e ndb/src/common/util/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/cw/Makefile.in
---- a/ndb/src/cw/Makefile.in   Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/cw/Makefile.in   Fri Sep 12 01:26:21 2008 -0700
-@@ -174,6 +174,7 @@
+diff -r d35bd12bba15 ndb/src/cw/Makefile.in
+--- a/ndb/src/cw/Makefile.in   Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/cw/Makefile.in   Mon Dec 22 22:53:26 2008 -0800
+@@ -176,6 +176,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -847,10 +960,10 @@ diff -r 0bb04c127c7e ndb/src/cw/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/cw/cpcd/Makefile.in
---- a/ndb/src/cw/cpcd/Makefile.in      Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/cw/cpcd/Makefile.in      Fri Sep 12 01:26:21 2008 -0700
-@@ -224,6 +224,7 @@
+diff -r d35bd12bba15 ndb/src/cw/cpcd/Makefile.in
+--- a/ndb/src/cw/cpcd/Makefile.in      Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/cw/cpcd/Makefile.in      Mon Dec 22 22:53:26 2008 -0800
+@@ -226,6 +226,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -858,10 +971,10 @@ diff -r 0bb04c127c7e ndb/src/cw/cpcd/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/kernel/Makefile.in
---- a/ndb/src/kernel/Makefile.in       Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/kernel/Makefile.in       Fri Sep 12 01:26:21 2008 -0700
-@@ -244,6 +244,7 @@
+diff -r d35bd12bba15 ndb/src/kernel/Makefile.in
+--- a/ndb/src/kernel/Makefile.in       Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/kernel/Makefile.in       Mon Dec 22 22:53:26 2008 -0800
+@@ -246,6 +246,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -869,10 +982,10 @@ diff -r 0bb04c127c7e ndb/src/kernel/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/kernel/blocks/Makefile.in
---- a/ndb/src/kernel/blocks/Makefile.in        Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/kernel/blocks/Makefile.in        Fri Sep 12 01:26:21 2008 -0700
-@@ -174,6 +174,7 @@
+diff -r d35bd12bba15 ndb/src/kernel/blocks/Makefile.in
+--- a/ndb/src/kernel/blocks/Makefile.in        Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/kernel/blocks/Makefile.in        Mon Dec 22 22:53:26 2008 -0800
+@@ -176,6 +176,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -880,10 +993,10 @@ diff -r 0bb04c127c7e ndb/src/kernel/blocks/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/kernel/blocks/backup/Makefile.in
---- a/ndb/src/kernel/blocks/backup/Makefile.in Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/kernel/blocks/backup/Makefile.in Fri Sep 12 01:26:21 2008 -0700
-@@ -216,6 +216,7 @@
+diff -r d35bd12bba15 ndb/src/kernel/blocks/backup/Makefile.in
+--- a/ndb/src/kernel/blocks/backup/Makefile.in Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/kernel/blocks/backup/Makefile.in Mon Dec 22 22:53:26 2008 -0800
+@@ -218,6 +218,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -891,10 +1004,10 @@ diff -r 0bb04c127c7e ndb/src/kernel/blocks/backup/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/kernel/blocks/cmvmi/Makefile.in
---- a/ndb/src/kernel/blocks/cmvmi/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/kernel/blocks/cmvmi/Makefile.in  Fri Sep 12 01:26:21 2008 -0700
-@@ -216,6 +216,7 @@
+diff -r d35bd12bba15 ndb/src/kernel/blocks/cmvmi/Makefile.in
+--- a/ndb/src/kernel/blocks/cmvmi/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/kernel/blocks/cmvmi/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -218,6 +218,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -902,10 +1015,10 @@ diff -r 0bb04c127c7e ndb/src/kernel/blocks/cmvmi/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/kernel/blocks/dbacc/Makefile.in
---- a/ndb/src/kernel/blocks/dbacc/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/kernel/blocks/dbacc/Makefile.in  Fri Sep 12 01:26:21 2008 -0700
-@@ -216,6 +216,7 @@
+diff -r d35bd12bba15 ndb/src/kernel/blocks/dbacc/Makefile.in
+--- a/ndb/src/kernel/blocks/dbacc/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/kernel/blocks/dbacc/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -218,6 +218,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -913,10 +1026,10 @@ diff -r 0bb04c127c7e ndb/src/kernel/blocks/dbacc/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/kernel/blocks/dbdict/Makefile.in
---- a/ndb/src/kernel/blocks/dbdict/Makefile.in Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/kernel/blocks/dbdict/Makefile.in Fri Sep 12 01:26:21 2008 -0700
-@@ -226,6 +226,7 @@
+diff -r d35bd12bba15 ndb/src/kernel/blocks/dbdict/Makefile.in
+--- a/ndb/src/kernel/blocks/dbdict/Makefile.in Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/kernel/blocks/dbdict/Makefile.in Mon Dec 22 22:53:26 2008 -0800
+@@ -228,6 +228,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -924,10 +1037,10 @@ diff -r 0bb04c127c7e ndb/src/kernel/blocks/dbdict/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/kernel/blocks/dbdih/Makefile.in
---- a/ndb/src/kernel/blocks/dbdih/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/kernel/blocks/dbdih/Makefile.in  Fri Sep 12 01:26:21 2008 -0700
-@@ -223,6 +223,7 @@
+diff -r d35bd12bba15 ndb/src/kernel/blocks/dbdih/Makefile.in
+--- a/ndb/src/kernel/blocks/dbdih/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/kernel/blocks/dbdih/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -225,6 +225,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -935,10 +1048,10 @@ diff -r 0bb04c127c7e ndb/src/kernel/blocks/dbdih/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/kernel/blocks/dblqh/Makefile.in
---- a/ndb/src/kernel/blocks/dblqh/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/kernel/blocks/dblqh/Makefile.in  Fri Sep 12 01:26:21 2008 -0700
-@@ -224,6 +224,7 @@
+diff -r d35bd12bba15 ndb/src/kernel/blocks/dblqh/Makefile.in
+--- a/ndb/src/kernel/blocks/dblqh/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/kernel/blocks/dblqh/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -226,6 +226,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -946,10 +1059,10 @@ diff -r 0bb04c127c7e ndb/src/kernel/blocks/dblqh/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/kernel/blocks/dbtc/Makefile.in
---- a/ndb/src/kernel/blocks/dbtc/Makefile.in   Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/kernel/blocks/dbtc/Makefile.in   Fri Sep 12 01:26:21 2008 -0700
-@@ -216,6 +216,7 @@
+diff -r d35bd12bba15 ndb/src/kernel/blocks/dbtc/Makefile.in
+--- a/ndb/src/kernel/blocks/dbtc/Makefile.in   Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/kernel/blocks/dbtc/Makefile.in   Mon Dec 22 22:53:26 2008 -0800
+@@ -218,6 +218,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -957,10 +1070,10 @@ diff -r 0bb04c127c7e ndb/src/kernel/blocks/dbtc/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/kernel/blocks/dbtup/Makefile.in
---- a/ndb/src/kernel/blocks/dbtup/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/kernel/blocks/dbtup/Makefile.in  Fri Sep 12 01:26:21 2008 -0700
-@@ -224,6 +224,7 @@
+diff -r d35bd12bba15 ndb/src/kernel/blocks/dbtup/Makefile.in
+--- a/ndb/src/kernel/blocks/dbtup/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/kernel/blocks/dbtup/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -226,6 +226,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -968,10 +1081,10 @@ diff -r 0bb04c127c7e ndb/src/kernel/blocks/dbtup/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/kernel/blocks/dbtux/Makefile.in
---- a/ndb/src/kernel/blocks/dbtux/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/kernel/blocks/dbtux/Makefile.in  Fri Sep 12 01:26:21 2008 -0700
-@@ -219,6 +219,7 @@
+diff -r d35bd12bba15 ndb/src/kernel/blocks/dbtux/Makefile.in
+--- a/ndb/src/kernel/blocks/dbtux/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/kernel/blocks/dbtux/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -221,6 +221,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -979,10 +1092,10 @@ diff -r 0bb04c127c7e ndb/src/kernel/blocks/dbtux/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/kernel/blocks/dbutil/Makefile.in
---- a/ndb/src/kernel/blocks/dbutil/Makefile.in Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/kernel/blocks/dbutil/Makefile.in Fri Sep 12 01:26:21 2008 -0700
-@@ -216,6 +216,7 @@
+diff -r d35bd12bba15 ndb/src/kernel/blocks/dbutil/Makefile.in
+--- a/ndb/src/kernel/blocks/dbutil/Makefile.in Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/kernel/blocks/dbutil/Makefile.in Mon Dec 22 22:53:26 2008 -0800
+@@ -218,6 +218,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -990,10 +1103,10 @@ diff -r 0bb04c127c7e ndb/src/kernel/blocks/dbutil/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/kernel/blocks/ndbcntr/Makefile.in
---- a/ndb/src/kernel/blocks/ndbcntr/Makefile.in        Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/kernel/blocks/ndbcntr/Makefile.in        Fri Sep 12 01:26:21 2008 -0700
-@@ -217,6 +217,7 @@
+diff -r d35bd12bba15 ndb/src/kernel/blocks/ndbcntr/Makefile.in
+--- a/ndb/src/kernel/blocks/ndbcntr/Makefile.in        Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/kernel/blocks/ndbcntr/Makefile.in        Mon Dec 22 22:53:26 2008 -0800
+@@ -219,6 +219,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1001,10 +1114,10 @@ diff -r 0bb04c127c7e ndb/src/kernel/blocks/ndbcntr/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/kernel/blocks/ndbfs/Makefile.in
---- a/ndb/src/kernel/blocks/ndbfs/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/kernel/blocks/ndbfs/Makefile.in  Fri Sep 12 01:26:21 2008 -0700
-@@ -217,6 +217,7 @@
+diff -r d35bd12bba15 ndb/src/kernel/blocks/ndbfs/Makefile.in
+--- a/ndb/src/kernel/blocks/ndbfs/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/kernel/blocks/ndbfs/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -219,6 +219,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1012,10 +1125,10 @@ diff -r 0bb04c127c7e ndb/src/kernel/blocks/ndbfs/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/kernel/blocks/qmgr/Makefile.in
---- a/ndb/src/kernel/blocks/qmgr/Makefile.in   Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/kernel/blocks/qmgr/Makefile.in   Fri Sep 12 01:26:21 2008 -0700
-@@ -216,6 +216,7 @@
+diff -r d35bd12bba15 ndb/src/kernel/blocks/qmgr/Makefile.in
+--- a/ndb/src/kernel/blocks/qmgr/Makefile.in   Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/kernel/blocks/qmgr/Makefile.in   Mon Dec 22 22:53:26 2008 -0800
+@@ -218,6 +218,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1023,10 +1136,10 @@ diff -r 0bb04c127c7e ndb/src/kernel/blocks/qmgr/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/kernel/blocks/suma/Makefile.in
---- a/ndb/src/kernel/blocks/suma/Makefile.in   Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/kernel/blocks/suma/Makefile.in   Fri Sep 12 01:26:21 2008 -0700
-@@ -216,6 +216,7 @@
+diff -r d35bd12bba15 ndb/src/kernel/blocks/suma/Makefile.in
+--- a/ndb/src/kernel/blocks/suma/Makefile.in   Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/kernel/blocks/suma/Makefile.in   Mon Dec 22 22:53:26 2008 -0800
+@@ -218,6 +218,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1034,10 +1147,10 @@ diff -r 0bb04c127c7e ndb/src/kernel/blocks/suma/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/kernel/blocks/trix/Makefile.in
---- a/ndb/src/kernel/blocks/trix/Makefile.in   Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/kernel/blocks/trix/Makefile.in   Fri Sep 12 01:26:21 2008 -0700
-@@ -216,6 +216,7 @@
+diff -r d35bd12bba15 ndb/src/kernel/blocks/trix/Makefile.in
+--- a/ndb/src/kernel/blocks/trix/Makefile.in   Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/kernel/blocks/trix/Makefile.in   Mon Dec 22 22:53:26 2008 -0800
+@@ -218,6 +218,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1045,10 +1158,10 @@ diff -r 0bb04c127c7e ndb/src/kernel/blocks/trix/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/kernel/error/Makefile.in
---- a/ndb/src/kernel/error/Makefile.in Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/kernel/error/Makefile.in Fri Sep 12 01:26:21 2008 -0700
-@@ -225,6 +225,7 @@
+diff -r d35bd12bba15 ndb/src/kernel/error/Makefile.in
+--- a/ndb/src/kernel/error/Makefile.in Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/kernel/error/Makefile.in Mon Dec 22 22:53:26 2008 -0800
+@@ -227,6 +227,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1056,10 +1169,10 @@ diff -r 0bb04c127c7e ndb/src/kernel/error/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/kernel/vm/Makefile.in
---- a/ndb/src/kernel/vm/Makefile.in    Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/kernel/vm/Makefile.in    Fri Sep 12 01:26:21 2008 -0700
-@@ -227,6 +227,7 @@
+diff -r d35bd12bba15 ndb/src/kernel/vm/Makefile.in
+--- a/ndb/src/kernel/vm/Makefile.in    Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/kernel/vm/Makefile.in    Mon Dec 22 22:53:26 2008 -0800
+@@ -229,6 +229,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1067,10 +1180,10 @@ diff -r 0bb04c127c7e ndb/src/kernel/vm/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/mgmapi/Makefile.in
---- a/ndb/src/mgmapi/Makefile.in       Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/mgmapi/Makefile.in       Fri Sep 12 01:26:21 2008 -0700
-@@ -224,6 +224,7 @@
+diff -r d35bd12bba15 ndb/src/mgmapi/Makefile.in
+--- a/ndb/src/mgmapi/Makefile.in       Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/mgmapi/Makefile.in       Mon Dec 22 22:53:26 2008 -0800
+@@ -226,6 +226,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1078,10 +1191,10 @@ diff -r 0bb04c127c7e ndb/src/mgmapi/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/mgmclient/Makefile.in
---- a/ndb/src/mgmclient/Makefile.in    Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/mgmclient/Makefile.in    Fri Sep 12 01:26:21 2008 -0700
-@@ -234,6 +234,7 @@
+diff -r d35bd12bba15 ndb/src/mgmclient/Makefile.in
+--- a/ndb/src/mgmclient/Makefile.in    Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/mgmclient/Makefile.in    Mon Dec 22 22:53:26 2008 -0800
+@@ -236,6 +236,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1089,10 +1202,10 @@ diff -r 0bb04c127c7e ndb/src/mgmclient/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/mgmsrv/Makefile.in
---- a/ndb/src/mgmsrv/Makefile.in       Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/mgmsrv/Makefile.in       Fri Sep 12 01:26:21 2008 -0700
-@@ -230,6 +230,7 @@
+diff -r d35bd12bba15 ndb/src/mgmsrv/Makefile.in
+--- a/ndb/src/mgmsrv/Makefile.in       Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/mgmsrv/Makefile.in       Mon Dec 22 22:53:26 2008 -0800
+@@ -232,6 +232,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1100,10 +1213,10 @@ diff -r 0bb04c127c7e ndb/src/mgmsrv/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/src/ndbapi/Makefile.in
---- a/ndb/src/ndbapi/Makefile.in       Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/src/ndbapi/Makefile.in       Fri Sep 12 01:26:21 2008 -0700
-@@ -234,6 +234,7 @@
+diff -r d35bd12bba15 ndb/src/ndbapi/Makefile.in
+--- a/ndb/src/ndbapi/Makefile.in       Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/src/ndbapi/Makefile.in       Mon Dec 22 22:53:26 2008 -0800
+@@ -236,6 +236,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1111,10 +1224,10 @@ diff -r 0bb04c127c7e ndb/src/ndbapi/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/test/Makefile.in
---- a/ndb/test/Makefile.in     Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/test/Makefile.in     Fri Sep 12 01:26:21 2008 -0700
-@@ -174,6 +174,7 @@
+diff -r d35bd12bba15 ndb/test/Makefile.in
+--- a/ndb/test/Makefile.in     Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/test/Makefile.in     Mon Dec 22 22:53:26 2008 -0800
+@@ -176,6 +176,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1122,10 +1235,10 @@ diff -r 0bb04c127c7e ndb/test/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/test/ndbapi/Makefile.in
---- a/ndb/test/ndbapi/Makefile.in      Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/test/ndbapi/Makefile.in      Fri Sep 12 01:26:21 2008 -0700
-@@ -611,6 +611,7 @@
+diff -r d35bd12bba15 ndb/test/ndbapi/Makefile.in
+--- a/ndb/test/ndbapi/Makefile.in      Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/test/ndbapi/Makefile.in      Mon Dec 22 22:53:26 2008 -0800
+@@ -613,6 +613,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1133,10 +1246,10 @@ diff -r 0bb04c127c7e ndb/test/ndbapi/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/test/ndbapi/bank/Makefile.in
---- a/ndb/test/ndbapi/bank/Makefile.in Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/test/ndbapi/bank/Makefile.in Fri Sep 12 01:26:21 2008 -0700
-@@ -303,6 +303,7 @@
+diff -r d35bd12bba15 ndb/test/ndbapi/bank/Makefile.in
+--- a/ndb/test/ndbapi/bank/Makefile.in Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/test/ndbapi/bank/Makefile.in Mon Dec 22 22:53:26 2008 -0800
+@@ -305,6 +305,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1144,10 +1257,10 @@ diff -r 0bb04c127c7e ndb/test/ndbapi/bank/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/test/run-test/Makefile.in
---- a/ndb/test/run-test/Makefile.in    Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/test/run-test/Makefile.in    Fri Sep 12 01:26:21 2008 -0700
-@@ -262,6 +262,7 @@
+diff -r d35bd12bba15 ndb/test/run-test/Makefile.in
+--- a/ndb/test/run-test/Makefile.in    Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/test/run-test/Makefile.in    Mon Dec 22 22:53:26 2008 -0800
+@@ -264,6 +264,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1155,10 +1268,10 @@ diff -r 0bb04c127c7e ndb/test/run-test/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/test/src/Makefile.in
---- a/ndb/test/src/Makefile.in Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/test/src/Makefile.in Fri Sep 12 01:26:22 2008 -0700
-@@ -232,6 +232,7 @@
+diff -r d35bd12bba15 ndb/test/src/Makefile.in
+--- a/ndb/test/src/Makefile.in Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/test/src/Makefile.in Mon Dec 22 22:53:26 2008 -0800
+@@ -234,6 +234,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1166,10 +1279,10 @@ diff -r 0bb04c127c7e ndb/test/src/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/test/tools/Makefile.in
---- a/ndb/test/tools/Makefile.in       Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/test/tools/Makefile.in       Fri Sep 12 01:26:22 2008 -0700
-@@ -345,6 +345,7 @@
+diff -r d35bd12bba15 ndb/test/tools/Makefile.in
+--- a/ndb/test/tools/Makefile.in       Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/test/tools/Makefile.in       Mon Dec 22 22:53:26 2008 -0800
+@@ -347,6 +347,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1177,10 +1290,10 @@ diff -r 0bb04c127c7e ndb/test/tools/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e ndb/tools/Makefile.in
---- a/ndb/tools/Makefile.in    Fri Sep 12 01:25:08 2008 -0700
-+++ b/ndb/tools/Makefile.in    Fri Sep 12 01:26:22 2008 -0700
-@@ -331,6 +331,7 @@
+diff -r d35bd12bba15 ndb/tools/Makefile.in
+--- a/ndb/tools/Makefile.in    Mon Dec 22 22:51:44 2008 -0800
++++ b/ndb/tools/Makefile.in    Mon Dec 22 22:53:26 2008 -0800
+@@ -333,6 +333,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1188,10 +1301,10 @@ diff -r 0bb04c127c7e ndb/tools/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e netware/Makefile.in
---- a/netware/Makefile.in      Fri Sep 12 01:25:08 2008 -0700
-+++ b/netware/Makefile.in      Fri Sep 12 01:26:22 2008 -0700
-@@ -219,6 +219,7 @@
+diff -r d35bd12bba15 netware/Makefile.in
+--- a/netware/Makefile.in      Mon Dec 22 22:51:44 2008 -0800
++++ b/netware/Makefile.in      Mon Dec 22 22:53:26 2008 -0800
+@@ -221,6 +221,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1199,10 +1312,10 @@ diff -r 0bb04c127c7e netware/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e os2/Makefile.in
---- a/os2/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/os2/Makefile.in  Fri Sep 12 01:26:22 2008 -0700
-@@ -174,6 +174,7 @@
+diff -r d35bd12bba15 os2/Makefile.in
+--- a/os2/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/os2/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -176,6 +176,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1210,10 +1323,10 @@ diff -r 0bb04c127c7e os2/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e os2/include/Makefile.in
---- a/os2/include/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/os2/include/Makefile.in  Fri Sep 12 01:26:22 2008 -0700
-@@ -174,6 +174,7 @@
+diff -r d35bd12bba15 os2/include/Makefile.in
+--- a/os2/include/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/os2/include/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -176,6 +176,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1221,10 +1334,10 @@ diff -r 0bb04c127c7e os2/include/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e os2/include/sys/Makefile.in
---- a/os2/include/sys/Makefile.in      Fri Sep 12 01:25:08 2008 -0700
-+++ b/os2/include/sys/Makefile.in      Fri Sep 12 01:26:22 2008 -0700
-@@ -165,6 +165,7 @@
+diff -r d35bd12bba15 os2/include/sys/Makefile.in
+--- a/os2/include/sys/Makefile.in      Mon Dec 22 22:51:44 2008 -0800
++++ b/os2/include/sys/Makefile.in      Mon Dec 22 22:53:26 2008 -0800
+@@ -167,6 +167,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1232,42 +1345,28 @@ diff -r 0bb04c127c7e os2/include/sys/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e patch_info/userstats.info
+diff -r d35bd12bba15 patch_info/userstats.info
 --- /dev/null  Thu Jan 01 00:00:00 1970 +0000
-+++ b/patch_info/userstats.info        Fri Sep 12 01:26:22 2008 -0700
-@@ -0,0 +1,6 @@
++++ b/patch_info/userstats.info        Mon Dec 22 22:53:26 2008 -0800
+@@ -0,0 +1,14 @@
 +File=userstatsv2.patch
 +Name=SHOW USER/TABLE/INDEX statistics
 +Version=V2
 +Author=Google
 +License=GPL
 +Comment=Added INFORMATION_SCHEMA.*_STATISTICS
-diff -r 0bb04c127c7e pstack/Makefile.in
---- a/pstack/Makefile.in       Fri Sep 12 01:25:08 2008 -0700
-+++ b/pstack/Makefile.in       Fri Sep 12 01:26:22 2008 -0700
-@@ -213,6 +213,7 @@
- LIBDL = @LIBDL@
- LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
- LIBOBJS = @LIBOBJS@
-+LIBRT = @LIBRT@
- LIBS = @LIBS@
- LIBTOOL = @LIBTOOL@
- LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e pstack/aout/Makefile.in
---- a/pstack/aout/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/pstack/aout/Makefile.in  Fri Sep 12 01:26:22 2008 -0700
-@@ -155,6 +155,7 @@
- LIBDL = @LIBDL@
- LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
- LIBOBJS = @LIBOBJS@
-+LIBRT = @LIBRT@
- LIBS = @LIBS@
- LIBTOOL = @LIBTOOL@
- LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e regex/Makefile.in
---- a/regex/Makefile.in        Fri Sep 12 01:25:08 2008 -0700
-+++ b/regex/Makefile.in        Fri Sep 12 01:26:22 2008 -0700
-@@ -197,6 +197,7 @@
++2008-12-01
++YK: fix behavior for prepared statements
++
++2008-11-26
++YK: add switch variable "userstat_running" to control INFORMATION_SCHEMA.*_STATISTICS (default:OFF)
++
++2008-12-09
++YK: fixed "Row_sent: 0" problem at microslow_innodb.patch
+diff -r d35bd12bba15 pstack/Makefile.in
+--- a/pstack/Makefile.in       Mon Dec 22 22:51:44 2008 -0800
++++ b/pstack/Makefile.in       Mon Dec 22 22:53:26 2008 -0800
+@@ -215,6 +215,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1275,10 +1374,10 @@ diff -r 0bb04c127c7e regex/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e scripts/Makefile.in
---- a/scripts/Makefile.in      Fri Sep 12 01:25:08 2008 -0700
-+++ b/scripts/Makefile.in      Fri Sep 12 01:26:22 2008 -0700
-@@ -196,6 +196,7 @@
+diff -r d35bd12bba15 pstack/aout/Makefile.in
+--- a/pstack/aout/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/pstack/aout/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -157,6 +157,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1286,10 +1385,10 @@ diff -r 0bb04c127c7e scripts/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e server-tools/Makefile.in
---- a/server-tools/Makefile.in Fri Sep 12 01:25:08 2008 -0700
-+++ b/server-tools/Makefile.in Fri Sep 12 01:26:22 2008 -0700
-@@ -173,6 +173,7 @@
+diff -r d35bd12bba15 regex/Makefile.in
+--- a/regex/Makefile.in        Mon Dec 22 22:51:44 2008 -0800
++++ b/regex/Makefile.in        Mon Dec 22 22:53:26 2008 -0800
+@@ -199,6 +199,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1297,10 +1396,10 @@ diff -r 0bb04c127c7e server-tools/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e server-tools/instance-manager/Makefile.in
---- a/server-tools/instance-manager/Makefile.in        Fri Sep 12 01:25:08 2008 -0700
-+++ b/server-tools/instance-manager/Makefile.in        Fri Sep 12 01:26:22 2008 -0700
-@@ -221,6 +221,7 @@
+diff -r d35bd12bba15 scripts/Makefile.in
+--- a/scripts/Makefile.in      Mon Dec 22 22:51:44 2008 -0800
++++ b/scripts/Makefile.in      Mon Dec 22 22:53:26 2008 -0800
+@@ -198,6 +198,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1308,10 +1407,10 @@ diff -r 0bb04c127c7e server-tools/instance-manager/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e sql-bench/Makefile.in
---- a/sql-bench/Makefile.in    Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql-bench/Makefile.in    Fri Sep 12 01:26:22 2008 -0700
-@@ -172,6 +172,7 @@
+diff -r d35bd12bba15 server-tools/Makefile.in
+--- a/server-tools/Makefile.in Mon Dec 22 22:51:44 2008 -0800
++++ b/server-tools/Makefile.in Mon Dec 22 22:53:26 2008 -0800
+@@ -175,6 +175,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1319,10 +1418,10 @@ diff -r 0bb04c127c7e sql-bench/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e sql-common/Makefile.in
---- a/sql-common/Makefile.in   Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql-common/Makefile.in   Fri Sep 12 01:26:22 2008 -0700
-@@ -165,6 +165,7 @@
+diff -r d35bd12bba15 server-tools/instance-manager/Makefile.in
+--- a/server-tools/instance-manager/Makefile.in        Mon Dec 22 22:51:44 2008 -0800
++++ b/server-tools/instance-manager/Makefile.in        Mon Dec 22 22:53:26 2008 -0800
+@@ -223,6 +223,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1330,10 +1429,10 @@ diff -r 0bb04c127c7e sql-common/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e sql/Makefile.in
---- a/sql/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/Makefile.in  Fri Sep 12 01:26:22 2008 -0700
-@@ -283,6 +283,7 @@
+diff -r d35bd12bba15 sql/Makefile.in
+--- a/sql/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -285,6 +285,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -1341,10 +1440,10 @@ diff -r 0bb04c127c7e sql/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e sql/ha_innodb.cc
---- a/sql/ha_innodb.cc Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/ha_innodb.cc Fri Sep 12 01:26:22 2008 -0700
-@@ -3287,6 +3287,8 @@
+diff -r d35bd12bba15 sql/ha_innodb.cc
+--- a/sql/ha_innodb.cc Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/ha_innodb.cc Mon Dec 22 22:53:26 2008 -0800
+@@ -3316,6 +3316,8 @@
  
        error = row_insert_for_mysql((byte*) record, prebuilt);
  
@@ -1353,7 +1452,7 @@ diff -r 0bb04c127c7e sql/ha_innodb.cc
        if (error == DB_SUCCESS && auto_inc_used) {
  
                /* Fetch the value that was set in the autoincrement field */
-@@ -3559,6 +3561,8 @@
+@@ -3588,6 +3590,8 @@
                }
        }
  
@@ -1362,7 +1461,7 @@ diff -r 0bb04c127c7e sql/ha_innodb.cc
        innodb_srv_conc_exit_innodb(prebuilt->trx);
  
        error = convert_error_code_to_mysql(error, user_thd);
-@@ -3606,6 +3610,8 @@
+@@ -3635,6 +3639,8 @@
        innodb_srv_conc_enter_innodb(prebuilt->trx);
  
        error = row_update_for_mysql((byte*) record, prebuilt);
@@ -1371,7 +1470,7 @@ diff -r 0bb04c127c7e sql/ha_innodb.cc
  
        innodb_srv_conc_exit_innodb(prebuilt->trx);
  
-@@ -4039,6 +4045,9 @@
+@@ -4068,6 +4074,9 @@
        if (ret == DB_SUCCESS) {
                error = 0;
                table->status = 0;
@@ -1381,9 +1480,9 @@ diff -r 0bb04c127c7e sql/ha_innodb.cc
  
        } else if (ret == DB_RECORD_NOT_FOUND) {
                error = HA_ERR_END_OF_FILE;
-diff -r 0bb04c127c7e sql/ha_myisam.cc
---- a/sql/ha_myisam.cc Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/ha_myisam.cc Fri Sep 12 01:26:22 2008 -0700
+diff -r d35bd12bba15 sql/ha_myisam.cc
+--- a/sql/ha_myisam.cc Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/ha_myisam.cc Mon Dec 22 22:53:26 2008 -0800
 @@ -670,7 +670,9 @@
      if ((error= update_auto_increment()))
        return error;
@@ -1543,24 +1642,10 @@ diff -r 0bb04c127c7e sql/ha_myisam.cc
    return error;
  }
  
-diff -r 0bb04c127c7e sql/handler.cc
---- a/sql/handler.cc   Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/handler.cc   Fri Sep 12 01:26:22 2008 -0700
-@@ -19,6 +19,13 @@
- #ifdef USE_PRAGMA_IMPLEMENTATION
- #pragma implementation                                // gcc: Class implementation
- #endif
-+
-+/* 
-+ * Ugh. Something is fishy with the SAFE_MUTEX stuff in include/my_pthread.h.
-+ * This makes things compile with gcc 4.1
-+ */
-+#include <string>
-+
- #include "mysql_priv.h"
- #include "ha_heap.h"
-@@ -725,6 +732,8 @@
+diff -r d35bd12bba15 sql/handler.cc
+--- a/sql/handler.cc   Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/handler.cc   Mon Dec 22 22:53:26 2008 -0800
+@@ -725,6 +725,8 @@
      if (cookie)
        tc_log->unlog(cookie, xid);
      DBUG_EXECUTE_IF("crash_commit_after", abort(););
@@ -1569,7 +1654,7 @@ diff -r 0bb04c127c7e sql/handler.cc
  end:
      if (is_real_trans)
        start_waiting_global_read_lock(thd);
-@@ -824,6 +833,7 @@
+@@ -829,6 +831,7 @@
        thd->transaction.cleanup();
      }
    }
@@ -1577,7 +1662,7 @@ diff -r 0bb04c127c7e sql/handler.cc
  #endif /* USING_TRANSACTIONS */
    if (all)
      thd->transaction_rollback_request= FALSE;
-@@ -1207,6 +1217,7 @@
+@@ -1212,6 +1215,7 @@
      statistic_increment(thd->status_var.ha_rollback_count,&LOCK_status);
      *ht=0; // keep it conveniently zero-filled
    }
@@ -1585,7 +1670,7 @@ diff -r 0bb04c127c7e sql/handler.cc
    DBUG_RETURN(error);
  }
  
-@@ -1437,6 +1448,8 @@
+@@ -1442,6 +1446,8 @@
      else
        dupp_ref=ref+ALIGN_SIZE(ref_length);
    }
@@ -1594,12 +1679,17 @@ diff -r 0bb04c127c7e sql/handler.cc
    DBUG_RETURN(error);
  }
  
-@@ -2222,6 +2235,99 @@
+@@ -2276,6 +2282,111 @@
    return error;
  }
  
 +// Updates the global table stats with the TABLE this handler represents.
 +void handler::update_global_table_stats() {
++  if (!opt_userstat_running) {
++    rows_read = rows_changed = 0;
++    return;
++  }
++
 +  if (!rows_read && !rows_changed) return;  // Nothing to update.
 +  // table_cache_key is db_name + '\0' + table_name + '\0'.
 +  if (!table->s || !table->s->table_cache_key || !table->s->table_name) return;
@@ -1615,7 +1705,7 @@ diff -r 0bb04c127c7e sql/handler.cc
 +                                                (byte*)key,
 +                                                strlen(key)))) {
 +    if (!(table_stats = ((TABLE_STATS*)
-+                         my_malloc(sizeof(TABLE_STATS), MYF(MY_WME))))) {
++                         my_malloc(sizeof(TABLE_STATS), MYF(MY_WME | MY_ZEROFILL))))) {
 +      // Out of memory.
 +      sql_print_error("Allocating table stats failed.");
 +      goto end;
@@ -1649,6 +1739,13 @@ diff -r 0bb04c127c7e sql/handler.cc
 +  // table_cache_key is db_name + '\0' + table_name + '\0'.
 +  if (!table->s || !table->s->table_cache_key || !table->s->table_name) return;
 +
++  if (!opt_userstat_running) {
++    for (int x = 0; x < table->s->keys; x++) {
++      index_rows_read[x] = 0;
++    }
++    return;
++  }
++
 +  for (int x = 0; x < table->s->keys; x++) {
 +    if (index_rows_read[x]) {
 +      // Rows were read using this index.
@@ -1668,7 +1765,7 @@ diff -r 0bb04c127c7e sql/handler.cc
 +                                                    (byte*)key,
 +                                                    strlen(key)))) {
 +        if (!(index_stats = ((INDEX_STATS*)
-+                             my_malloc(sizeof(INDEX_STATS), MYF(MY_WME))))) {
++                             my_malloc(sizeof(INDEX_STATS), MYF(MY_WME | MY_ZEROFILL))))) {
 +          // Out of memory.
 +          sql_print_error("Allocating index stats failed.");
 +          goto end;
@@ -1694,9 +1791,9 @@ diff -r 0bb04c127c7e sql/handler.cc
  
  /****************************************************************************
  ** Some general functions that isn't in the handler class
-diff -r 0bb04c127c7e sql/handler.h
---- a/sql/handler.h    Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/handler.h    Fri Sep 12 01:26:22 2008 -0700
+diff -r d35bd12bba15 sql/handler.h
+--- a/sql/handler.h    Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/handler.h    Mon Dec 22 22:53:26 2008 -0800
 @@ -30,6 +30,10 @@
  #if defined(HAVE_BERKELEY_DB) || defined(HAVE_INNOBASE_DB) || \
      defined(HAVE_NDBCLUSTER_DB)
@@ -1744,7 +1841,7 @@ diff -r 0bb04c127c7e sql/handler.h
    virtual double scan_time()
      { return ulonglong2double(data_file_length) / IO_SIZE + 2; }
    virtual double read_time(uint index, uint ranges, ha_rows rows)
-@@ -885,6 +898,9 @@
+@@ -886,6 +899,9 @@
    virtual bool is_crashed() const  { return 0; }
    virtual bool auto_repair() const { return 0; }
  
@@ -1754,9 +1851,9 @@ diff -r 0bb04c127c7e sql/handler.h
    /*
      default rename_table() and delete_table() rename/delete files with a
      given name and extensions from bas_ext()
-diff -r 0bb04c127c7e sql/lex.h
---- a/sql/lex.h        Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/lex.h        Fri Sep 12 01:26:22 2008 -0700
+diff -r d35bd12bba15 sql/lex.h
+--- a/sql/lex.h        Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/lex.h        Mon Dec 22 22:53:26 2008 -0800
 @@ -109,6 +109,7 @@
    { "CHECKSUM",               SYM(CHECKSUM_SYM)},
    { "CIPHER",         SYM(CIPHER_SYM)},
@@ -1797,10 +1894,10 @@ diff -r 0bb04c127c7e sql/lex.h
    { "USE_FRM",                SYM(USE_FRM)},
    { "USING",          SYM(USING)},
    { "UTC_DATE",         SYM(UTC_DATE_SYM)},
-diff -r 0bb04c127c7e sql/log.cc
---- a/sql/log.cc       Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/log.cc       Fri Sep 12 01:26:22 2008 -0700
-@@ -1847,18 +1847,24 @@
+diff -r d35bd12bba15 sql/log.cc
+--- a/sql/log.cc       Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/log.cc       Mon Dec 22 22:53:26 2008 -0800
+@@ -1899,18 +1899,24 @@
                           thd->current_insert_id);
        if (e.write(file))
          goto err;
@@ -1825,7 +1922,7 @@ diff -r 0bb04c127c7e sql/log.cc
        }
        if (thd->user_var_events.elements)
        {
-@@ -1874,6 +1880,8 @@
+@@ -1926,6 +1932,8 @@
                               user_var_event->charset_number);
          if (e.write(file))
            goto err;
@@ -1834,7 +1931,7 @@ diff -r 0bb04c127c7e sql/log.cc
        }
        }
      }
-@@ -1884,6 +1892,8 @@
+@@ -1936,6 +1944,8 @@
  
      if (event_info->write(file))
        goto err;
@@ -1843,7 +1940,7 @@ diff -r 0bb04c127c7e sql/log.cc
  
      if (file == &log_file) // we are writing to the real log (disk)
      {
-@@ -2005,6 +2015,7 @@
+@@ -2057,6 +2067,7 @@
      */
      if (qinfo.write(&log_file))
        goto err;
@@ -1851,7 +1948,7 @@ diff -r 0bb04c127c7e sql/log.cc
  
      /* Read from the file used to cache the queries .*/
      if (reinit_io_cache(cache, READ_CACHE, 0, 0, 0))
-@@ -2051,6 +2062,7 @@
+@@ -2103,6 +2114,7 @@
          /* write the first half of the split header */
          if (my_b_write(&log_file, header, carry))
            goto err;
@@ -1859,7 +1956,7 @@ diff -r 0bb04c127c7e sql/log.cc
  
          /*
            copy fixed second half of header to cache so the correct
-@@ -2119,6 +2131,8 @@
+@@ -2171,6 +2183,8 @@
        /* Write data to the binary log file */
        if (my_b_write(&log_file, cache->read_pos, length))
          goto err;
@@ -1868,7 +1965,7 @@ diff -r 0bb04c127c7e sql/log.cc
        cache->read_pos=cache->read_end;                // Mark buffer used up
        DBUG_EXECUTE_IF("half_binlogged_transaction", goto DBUG_skip_commit;);
      } while ((length=my_b_fill(cache)));
-@@ -2127,6 +2141,8 @@
+@@ -2179,6 +2193,8 @@
  
      if (commit_event->write(&log_file))
        goto err;
@@ -1877,10 +1974,10 @@ diff -r 0bb04c127c7e sql/log.cc
  #ifndef DBUG_OFF
  DBUG_skip_commit:
  #endif
-diff -r 0bb04c127c7e sql/mysql_priv.h
---- a/sql/mysql_priv.h Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/mysql_priv.h Fri Sep 12 01:26:22 2008 -0700
-@@ -816,7 +816,15 @@
+diff -r d35bd12bba15 sql/mysql_priv.h
+--- a/sql/mysql_priv.h Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/mysql_priv.h Mon Dec 22 22:53:26 2008 -0800
+@@ -818,7 +818,15 @@
  bool multi_delete_set_locks_and_link_aux_tables(LEX *lex);
  void init_max_user_conn(void);
  void init_update_queries(void);
@@ -1896,7 +1993,7 @@ diff -r 0bb04c127c7e sql/mysql_priv.h
  pthread_handler_t handle_one_connection(void *arg);
  pthread_handler_t handle_bootstrap(void *arg);
  void end_thread(THD *thd,bool put_in_cache);
-@@ -1393,6 +1401,7 @@
+@@ -1396,6 +1404,7 @@
  extern ulong max_connections,max_connect_errors, connect_timeout;
  extern ulong slave_net_timeout, slave_trans_retries;
  extern uint max_user_connections;
@@ -1904,7 +2001,15 @@ diff -r 0bb04c127c7e sql/mysql_priv.h
  extern ulong what_to_log,flush_time;
  extern ulong query_buff_size, thread_stack;
  extern ulong max_prepared_stmt_count, prepared_stmt_count;
-@@ -1468,6 +1477,14 @@
+@@ -1426,6 +1435,7 @@
+ extern my_bool opt_safe_show_db, opt_local_infile;
+ extern my_bool opt_slave_compressed_protocol, use_temp_pool;
+ extern my_bool opt_readonly, lower_case_file_system;
++extern my_bool opt_userstat_running;
+ extern my_bool opt_enable_named_pipe, opt_sync_frm, opt_allow_suspicious_udfs;
+ extern my_bool opt_secure_auth;
+ extern char* opt_secure_file_priv;
+@@ -1472,6 +1482,14 @@
  extern struct system_variables max_system_variables;
  extern struct system_status_var global_status_var;
  extern struct rand_struct sql_rand;
@@ -1919,10 +2024,18 @@ diff -r 0bb04c127c7e sql/mysql_priv.h
  
  extern const char *opt_date_time_formats[];
  extern KNOWN_DATE_TIME_FORMAT known_date_time_formats[];
-diff -r 0bb04c127c7e sql/mysqld.cc
---- a/sql/mysqld.cc    Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/mysqld.cc    Fri Sep 12 01:26:22 2008 -0700
-@@ -449,6 +449,7 @@
+diff -r d35bd12bba15 sql/mysqld.cc
+--- a/sql/mysqld.cc    Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/mysqld.cc    Mon Dec 22 22:53:26 2008 -0800
+@@ -414,6 +414,7 @@
+ uint    opt_large_page_size= 0;
+ my_bool opt_old_style_user_limits= 0, trust_function_creators= 0;
+ char* opt_slow_logname= 0;
++my_bool opt_userstat_running= 0;
+ /*
+   True if there is at least one per-hour limit for some user, so we should
+   check them before each query (and possibly reset counters when hour is
+@@ -450,6 +451,7 @@
  ulong binlog_cache_use= 0, binlog_cache_disk_use= 0;
  ulong max_connections, max_connect_errors;
  uint  max_user_connections= 0;
@@ -1930,7 +2043,7 @@ diff -r 0bb04c127c7e sql/mysqld.cc
  /*
    Limit of the total number of prepared statements in the server.
    Is necessary to protect the server against out-of-memory attacks.
-@@ -548,6 +549,10 @@
+@@ -550,6 +552,10 @@
                LOCK_crypt, LOCK_bytes_sent, LOCK_bytes_received,
                LOCK_global_system_variables,
                LOCK_user_conn, LOCK_slave_list, LOCK_active_mi;
@@ -1941,7 +2054,7 @@ diff -r 0bb04c127c7e sql/mysqld.cc
  /*
    The below lock protects access to two global server variables:
    max_prepared_stmt_count and prepared_stmt_count. These variables
-@@ -1189,6 +1194,10 @@
+@@ -1191,6 +1197,10 @@
    x_free(opt_secure_file_priv);
    bitmap_free(&temp_pool);
    free_max_user_conn();
@@ -1952,7 +2065,7 @@ diff -r 0bb04c127c7e sql/mysqld.cc
  #ifdef HAVE_REPLICATION
    end_slave_list();
    free_list(&replicate_do_db);
-@@ -1303,6 +1312,10 @@
+@@ -1305,6 +1315,10 @@
    (void) pthread_cond_destroy(&COND_thread_cache);
    (void) pthread_cond_destroy(&COND_flush_thread_cache);
    (void) pthread_cond_destroy(&COND_manager);
@@ -1963,7 +2076,7 @@ diff -r 0bb04c127c7e sql/mysqld.cc
  }
  
  #endif /*EMBEDDED_LIBRARY*/
-@@ -3148,6 +3161,10 @@
+@@ -3152,6 +3166,10 @@
    (void) pthread_mutex_init(&LOCK_rpl_status, MY_MUTEX_INIT_FAST);
    (void) pthread_cond_init(&COND_rpl_status, NULL);
  #endif
@@ -1974,7 +2087,7 @@ diff -r 0bb04c127c7e sql/mysqld.cc
    sp_cache_init();
    /* Parameter for threads created for connections */
    (void) pthread_attr_init(&connection_attrib);
-@@ -3419,6 +3436,10 @@
+@@ -3423,6 +3441,10 @@
      sql_print_error("Out of memory");
      unireg_abort(1);
    }
@@ -1985,7 +2098,7 @@ diff -r 0bb04c127c7e sql/mysqld.cc
    if (ha_init())
    {
      sql_print_error("Can't init databases");
-@@ -3501,6 +3522,8 @@
+@@ -3505,6 +3527,8 @@
  
    init_max_user_conn();
    init_update_queries();
@@ -1994,7 +2107,7 @@ diff -r 0bb04c127c7e sql/mysqld.cc
    DBUG_RETURN(0);
  }
  
-@@ -4182,6 +4205,7 @@
+@@ -4189,6 +4213,7 @@
    {
      DBUG_PRINT("error",("Too many connections"));
      close_connection(thd, ER_CON_COUNT_ERROR, 1);
@@ -2002,10 +2115,56 @@ diff -r 0bb04c127c7e sql/mysqld.cc
      delete thd;
      DBUG_VOID_RETURN;
    }
-diff -r 0bb04c127c7e sql/share/Makefile.in
---- a/sql/share/Makefile.in    Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/share/Makefile.in    Fri Sep 12 01:26:22 2008 -0700
-@@ -165,6 +165,7 @@
+@@ -5007,6 +5032,7 @@
+   OPT_PROFILING,
+   OPT_SLOW_LOG,
+   OPT_SLOW_QUERY_LOG_FILE,
++  OPT_USERSTAT_RUNNING,
+   OPT_INNODB_ROLLBACK_ON_TIMEOUT,
+   OPT_SECURE_FILE_PRIV,
+   OPT_KEEP_FILES_ON_CREATE,
+@@ -6450,6 +6476,10 @@
+    (gptr*) &max_system_variables.net_wait_timeout, 0, GET_ULONG,
+    REQUIRED_ARG, NET_WAIT_TIMEOUT, 1, IF_WIN(INT_MAX32/1000, LONG_TIMEOUT),
+    0, 1, 0},
++  {"userstat_running", OPT_USERSTAT_RUNNING,
++   "Control USER_STATISTICS, CLIENT_STATISTICS, INDEX_STATISTICS and TABLE_STATISTICS running",
++   (gptr*) &opt_userstat_running, (gptr*) &opt_userstat_running,
++   0, GET_BOOL, NO_ARG, 0, 0, 1, 0, 1, 0},
+   {0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
+ };
+diff -r d35bd12bba15 sql/set_var.cc
+--- a/sql/set_var.cc   Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/set_var.cc   Mon Dec 22 22:53:26 2008 -0800
+@@ -323,6 +323,7 @@
+ sys_var_thd_ulong     sys_read_buff_size("read_buffer_size",
+                                          &SV::read_buff_size);
+ sys_var_bool_ptr      sys_readonly("read_only", &opt_readonly);
++sys_var_bool_ptr      sys_userstat_running("userstat_running", &opt_userstat_running);
+ sys_var_thd_ulong     sys_read_rnd_buff_size("read_rnd_buffer_size",
+                                              &SV::read_rnd_buff_size);
+ sys_var_thd_ulong     sys_div_precincrement("div_precision_increment",
+@@ -825,6 +826,7 @@
+   &sys_trans_alloc_block_size,
+   &sys_trans_prealloc_size,
+   &sys_tx_isolation,
++  &sys_userstat_running,
+   &sys_version,
+ #ifdef HAVE_BERKELEY_DB
+   &sys_version_bdb,
+@@ -1171,6 +1173,7 @@
+   {sys_tx_isolation.name,     (char*) &sys_tx_isolation,          SHOW_SYS},
+   {sys_updatable_views_with_limit.name,
+                               (char*) &sys_updatable_views_with_limit,SHOW_SYS},
++  {sys_userstat_running.name, (char*) &sys_userstat_running,        SHOW_SYS},
+   {sys_version.name,          (char*) &sys_version,                 SHOW_SYS},
+ #ifdef HAVE_BERKELEY_DB
+   {sys_version_bdb.name,      (char*) &sys_version_bdb,             SHOW_SYS},
+diff -r d35bd12bba15 sql/share/Makefile.in
+--- a/sql/share/Makefile.in    Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/share/Makefile.in    Mon Dec 22 22:53:26 2008 -0800
+@@ -167,6 +167,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -2013,16 +2172,16 @@ diff -r 0bb04c127c7e sql/share/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e sql/sql_base.cc
---- a/sql/sql_base.cc  Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/sql_base.cc  Fri Sep 12 01:26:22 2008 -0700
+diff -r d35bd12bba15 sql/sql_base.cc
+--- a/sql/sql_base.cc  Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/sql_base.cc  Mon Dec 22 22:53:26 2008 -0800
 @@ -624,6 +624,12 @@
    DBUG_ENTER("close_thread_table");
    DBUG_ASSERT(table->key_read == 0);
    DBUG_ASSERT(!table->file || table->file->inited == handler::NONE);
 +  
 +  if(table->file)
-+  { 
++  {
 +    table->file->update_global_table_stats();
 +    table->file->update_global_index_stats();
 +  }
@@ -2039,10 +2198,10 @@ diff -r 0bb04c127c7e sql/sql_base.cc
    db_type table_type=table->s->db_type;
    strmov(path,table->s->path);
    free_io_cache(table);
-diff -r 0bb04c127c7e sql/sql_class.cc
---- a/sql/sql_class.cc Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/sql_class.cc Fri Sep 12 01:26:22 2008 -0700
-@@ -235,6 +235,12 @@
+diff -r d35bd12bba15 sql/sql_class.cc
+--- a/sql/sql_class.cc Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/sql_class.cc Mon Dec 22 22:53:26 2008 -0800
+@@ -236,6 +236,13 @@
    bzero(ha_data, sizeof(ha_data));
    mysys_var=0;
    binlog_evt_union.do_union= FALSE;
@@ -2052,10 +2211,11 @@ diff -r 0bb04c127c7e sql/sql_class.cc
 +  bytes_sent = 0;
 +  binlog_bytes_written = 0;
 +  updated_row_count = 0;
++  sent_row_count_2 = 0;
  #ifndef DBUG_OFF
    dbug_sentry=THD_SENTRY_MAGIC;
  #endif
-@@ -368,6 +374,86 @@
+@@ -369,6 +376,88 @@
    total_warn_count= 0;
    update_charset();
    bzero((char *) &status_var, sizeof(status_var));
@@ -2092,12 +2252,13 @@ diff -r 0bb04c127c7e sql/sql_class.cc
 +
 +// Updates 'diff' stats of a THD.
 +void THD::update_stats(bool ran_command) {
++  if (opt_userstat_running) {
 +  diff_total_busy_time += busy_time;
 +  diff_total_cpu_time += cpu_time;
 +  diff_total_bytes_received += bytes_received;
 +  diff_total_bytes_sent += bytes_sent;
 +  diff_total_binlog_bytes_written += binlog_bytes_written;
-+  diff_total_sent_rows += sent_row_count;
++  diff_total_sent_rows += sent_row_count_2;
 +  diff_total_updated_rows += updated_row_count;
 +  // diff_total_read_rows is updated in handler.cc.
 +
@@ -2109,13 +2270,13 @@ diff -r 0bb04c127c7e sql/sql_class.cc
 +      if (lex->sql_command == SQLCOM_SELECT) {
 +        if (lex->orig_sql_command == SQLCOM_END) {
 +          diff_select_commands++;
-+          if (!sent_row_count)
++          if (!sent_row_count_2)
 +            diff_empty_queries++;
 +        } else {
 +          // 'SHOW ' commands become SQLCOM_SELECT.
 +          diff_other_commands++;
 +          // 'SHOW ' commands shouldn't inflate total sent row count.
-+          diff_total_sent_rows -= sent_row_count;
++          diff_total_sent_rows -= sent_row_count_2;
 +        }
 +      } else if (is_update_query(lex->sql_command)) {
 +        diff_update_commands++;
@@ -2132,17 +2293,18 @@ diff -r 0bb04c127c7e sql/sql_class.cc
 +
 +  /* reset counters to zero to avoid double-counting since values
 +     are already store in diff_total_*. */
++  }
 +  busy_time = 0;
 +  cpu_time = 0;
 +  bytes_received = 0;
 +  bytes_sent = 0;
 +  binlog_bytes_written = 0;
-+  sent_row_count = 0;
 +  updated_row_count = 0;
++  sent_row_count_2 = 0;
  }
  
  
-@@ -407,6 +493,9 @@
+@@ -408,6 +497,9 @@
  
  void THD::change_user(void)
  {
@@ -2152,11 +2314,10 @@ diff -r 0bb04c127c7e sql/sql_class.cc
    cleanup();
    cleanup_done= 0;
    init();
-@@ -890,6 +979,33 @@
-   DBUG_VOID_RETURN;
+@@ -892,6 +984,33 @@
  }
  #endif
-+
 +char *THD::get_client_host_port(THD *client)
 +{
 +  Security_context *client_sctx= client->security_ctx;
@@ -2183,10 +2344,27 @@ diff -r 0bb04c127c7e sql/sql_class.cc
 +      client->security_ctx->host_or_ip :
 +      client->security_ctx->host ? client->security_ctx->host : "";
 +}
++
  
  struct Item_change_record: public ilink
-@@ -2078,6 +2194,7 @@
+ {
+@@ -1062,6 +1181,7 @@
+     }
+   }
+   thd->sent_row_count++;
++  thd->sent_row_count_2++;
+   if (!thd->vio_ok())
+     DBUG_RETURN(0);
+   if (!thd->net.report_error)
+@@ -1154,6 +1274,7 @@
+ select_export::~select_export()
+ {
+   thd->sent_row_count=row_count;
++  thd->sent_row_count_2=row_count;
+ }
+@@ -2088,6 +2209,7 @@
    if (likely(thd != 0))
    { /* current_thd==0 when close_connection() calls net_send_error() */
      thd->status_var.bytes_sent+= length;
@@ -2194,7 +2372,7 @@ diff -r 0bb04c127c7e sql/sql_class.cc
    }
  }
  
-@@ -2085,6 +2202,7 @@
+@@ -2095,6 +2217,7 @@
  void thd_increment_bytes_received(ulong length)
  {
    current_thd->status_var.bytes_received+= length;
@@ -2202,10 +2380,10 @@ diff -r 0bb04c127c7e sql/sql_class.cc
  }
  
  
-diff -r 0bb04c127c7e sql/sql_class.h
---- a/sql/sql_class.h  Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/sql_class.h  Fri Sep 12 01:26:22 2008 -0700
-@@ -1289,6 +1289,8 @@
+diff -r d35bd12bba15 sql/sql_class.h
+--- a/sql/sql_class.h  Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/sql_class.h  Mon Dec 22 22:53:26 2008 -0800
+@@ -1292,6 +1292,8 @@
      first byte of the packet in do_command()
    */
    enum enum_server_command command;
@@ -2214,15 +2392,16 @@ diff -r 0bb04c127c7e sql/sql_class.h
    uint32     server_id;
    uint32     file_id;                 // for LOAD DATA INFILE
    /*
-@@ -1478,6 +1480,7 @@
+@@ -1481,6 +1483,8 @@
    /* variables.transaction_isolation is reset to this after each commit */
    enum_tx_isolation session_tx_isolation;
    enum_check_fields count_cuted_fields;
 +  ha_rows    updated_row_count;
++  ha_rows    sent_row_count_2; /* for userstat */
  
    DYNAMIC_ARRAY user_var_events;        /* For user variables replication */
    MEM_ROOT      *user_var_events_alloc; /* Allocate above array elements here */
-@@ -1584,6 +1587,49 @@
+@@ -1587,6 +1591,49 @@
    */
    LOG_INFO*  current_linfo;
    NET*       slave_net;                       // network connection from slave -> m.
@@ -2272,7 +2451,7 @@ diff -r 0bb04c127c7e sql/sql_class.h
    /* Used by the sys_var class to store temporary values */
    union
    {
-@@ -1641,6 +1687,11 @@
+@@ -1642,6 +1689,11 @@
      alloc_root.
    */
    void init_for_queries();
@@ -2284,7 +2463,7 @@ diff -r 0bb04c127c7e sql/sql_class.h
    void change_user(void);
    void cleanup(void);
    void cleanup_after_query();
-@@ -1870,7 +1921,13 @@
+@@ -1871,7 +1923,13 @@
      if (p_db_length)
        *p_db_length= db_length;
      return FALSE;
@@ -2298,7 +2477,7 @@ diff -r 0bb04c127c7e sql/sql_class.h
  
  public:
    /**
-@@ -1914,6 +1971,11 @@
+@@ -1915,6 +1973,11 @@
    MEM_ROOT main_mem_root;
  };
  
@@ -2310,9 +2489,9 @@ diff -r 0bb04c127c7e sql/sql_class.h
  
  #define tmp_disable_binlog(A)       \
    {ulonglong tmp_disable_binlog__save_options= (A)->options; \
-diff -r 0bb04c127c7e sql/sql_delete.cc
---- a/sql/sql_delete.cc        Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/sql_delete.cc        Fri Sep 12 01:26:22 2008 -0700
+diff -r d35bd12bba15 sql/sql_delete.cc
+--- a/sql/sql_delete.cc        Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/sql_delete.cc        Mon Dec 22 22:53:26 2008 -0800
 @@ -358,6 +358,7 @@
      send_ok(thd,deleted);
      DBUG_PRINT("info",("%ld records deleted",(long) deleted));
@@ -2329,9 +2508,9 @@ diff -r 0bb04c127c7e sql/sql_delete.cc
    return 0;
  }
  
-diff -r 0bb04c127c7e sql/sql_insert.cc
---- a/sql/sql_insert.cc        Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/sql_insert.cc        Fri Sep 12 01:26:22 2008 -0700
+diff -r d35bd12bba15 sql/sql_insert.cc
+--- a/sql/sql_insert.cc        Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/sql_insert.cc        Mon Dec 22 22:53:26 2008 -0800
 @@ -989,6 +989,7 @@
      thd->row_count_func= info.copied + info.deleted + updated;
      ::send_ok(thd, (ulong) thd->row_count_func, id, buff);
@@ -2340,7 +2519,7 @@ diff -r 0bb04c127c7e sql/sql_insert.cc
    thd->abort_on_warning= 0;
    DBUG_RETURN(FALSE);
  
-@@ -3027,6 +3028,7 @@
+@@ -3036,6 +3037,7 @@
      autoinc_value_of_first_inserted_row : thd->insert_id_used ?
      thd->last_insert_id : 0;
    ::send_ok(thd, (ulong) thd->row_count_func, id, buff);
@@ -2348,36 +2527,36 @@ diff -r 0bb04c127c7e sql/sql_insert.cc
    DBUG_RETURN(0);
  }
  
-diff -r 0bb04c127c7e sql/sql_lex.h
---- a/sql/sql_lex.h    Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/sql_lex.h    Fri Sep 12 01:26:22 2008 -0700
-@@ -100,6 +100,9 @@
-   SQLCOM_XA_START, SQLCOM_XA_END, SQLCOM_XA_PREPARE,
-   SQLCOM_XA_COMMIT, SQLCOM_XA_ROLLBACK, SQLCOM_XA_RECOVER,
-   SQLCOM_SHOW_PROC_CODE, SQLCOM_SHOW_FUNC_CODE,
+diff -r d35bd12bba15 sql/sql_lex.h
+--- a/sql/sql_lex.h    Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/sql_lex.h    Mon Dec 22 22:53:26 2008 -0800
+@@ -101,6 +101,9 @@
+     When a command is added here, be sure it's also added in mysqld.cc
+     in "struct show_var_st status_vars[]= {" ...
+   */
 +  // TODO(mcallaghan): update status_vars in mysqld to export these
 +  SQLCOM_SHOW_USER_STATS, SQLCOM_SHOW_TABLE_STATS, SQLCOM_SHOW_INDEX_STATS,
 +  SQLCOM_SHOW_CLIENT_STATS,
    /* This should be the last !!! */
-
    SQLCOM_END
-diff -r 0bb04c127c7e sql/sql_parse.cc
---- a/sql/sql_parse.cc Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/sql_parse.cc Fri Sep 12 01:26:22 2008 -0700
-@@ -79,6 +79,12 @@
+ };
+diff -r d35bd12bba15 sql/sql_parse.cc
+--- a/sql/sql_parse.cc Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/sql_parse.cc Mon Dec 22 22:53:26 2008 -0800
+@@ -78,6 +78,12 @@
+                              const char *table_name);
  static bool check_show_create_table_access(THD *thd, TABLE_LIST *table);
- static bool test_if_data_home_dir(const char *dir);
  
 +// Increments connection count for user.
 +static int increment_connection_count(THD* thd, bool use_lock);
 +
 +// Uses the THD to update the global stats by user name and client IP
-+static void update_global_user_stats(THD* thd, bool create_user, time_t now);
++void update_global_user_stats(THD* thd, bool create_user, time_t now);
 +
  const char *any_db="*any*";   // Special symbol for check_access
  
  const char *command_name[]={
-@@ -98,6 +104,17 @@
+@@ -145,6 +151,17 @@
  #ifndef EMBEDDED_LIBRARY
  static bool do_command(THD *thd);
  #endif // EMBEDDED_LIBRARY
@@ -2395,7 +2574,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
  
  #ifdef __WIN__
  extern void win_install_sigabrt_handler(void);
-@@ -457,6 +474,7 @@
+@@ -504,6 +521,7 @@
      mysql_log.write(thd,COM_CONNECT,ER(ER_NOT_SUPPORTED_AUTH_MODE));
      DBUG_RETURN(-1);
    }
@@ -2403,7 +2582,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
    net_printf_error(thd, ER_ACCESS_DENIED_ERROR,
                     thd->main_security_ctx.user,
                     thd->main_security_ctx.host_or_ip,
-@@ -489,12 +507,190 @@
+@@ -536,12 +554,190 @@
  void init_max_user_conn(void)
  {
  #ifndef NO_EMBEDDED_ACCESS_CHECKS
@@ -2600,7 +2779,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
  
  
  /*
-@@ -552,7 +748,10 @@
+@@ -599,7 +795,10 @@
  
    end:
    if (error)
@@ -2611,7 +2790,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
    (void) pthread_mutex_unlock(&LOCK_user_conn);
    DBUG_RETURN(error);
  }
-@@ -599,6 +798,25 @@
+@@ -646,6 +845,25 @@
  #endif /* NO_EMBEDDED_ACCESS_CHECKS */
  }
  
@@ -2637,7 +2816,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
  
  
  /*
-@@ -651,6 +869,207 @@
+@@ -698,6 +916,214 @@
    return uc_update_queries[command] != 0;
  }
  
@@ -2662,7 +2841,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
 +  {
 +    // First connection for this user or client
 +    if (!(user_stats = ((USER_STATS*)
-+                        my_malloc(sizeof(USER_STATS), MYF(MY_WME)))))
++                        my_malloc(sizeof(USER_STATS), MYF(MY_WME | MY_ZEROFILL)))))
 +    {
 +      return 1; // Out of memory
 +    }
@@ -2698,6 +2877,9 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
 +  const char* client_string = get_client_host(thd);
 +  int return_value = 0;
 +
++  if (!opt_userstat_running)
++    return return_value;
++
 +  if (use_lock) pthread_mutex_lock(&LOCK_global_user_client_stats);
 +
 +  if (increment_count_by_name(user_string, user_string,
@@ -2746,8 +2928,9 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
 +}
 +
 +// Updates the global stats of a user or client
-+static void update_global_user_stats(THD* thd, bool create_user, time_t now)
++void update_global_user_stats(THD* thd, bool create_user, time_t now)
 +{
++  if (opt_userstat_running) {
 +  char* user_string = get_valid_user_string(thd->main_security_ctx.user);
 +  const char* client_string = get_client_host(thd);
 +
@@ -2785,6 +2968,9 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
 +  thd->reset_diff_stats();
 +
 +  pthread_mutex_unlock(&LOCK_global_user_client_stats);
++  } else {
++  thd->reset_diff_stats();
++  }
 +}
 +
 +// Determines the concurrent number of connections of current threads.
@@ -2845,7 +3031,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
  /*
    Reset per-hour user resource limits when it has been more than
    an hour since they were last checked
-@@ -1137,6 +1556,8 @@
+@@ -1184,6 +1610,8 @@
      my_net_set_read_timeout(net, connect_timeout);
      my_net_set_write_timeout(net, connect_timeout);
  
@@ -2854,7 +3040,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
      if ((error=check_connection(thd)))
      {                                         // Wrong permissions
        if (error > 0)
-@@ -1146,8 +1567,22 @@
+@@ -1193,8 +1621,22 @@
        my_sleep(1000);                         /* must wait after eof() */
  #endif
        statistic_increment(aborted_connects,&LOCK_status);
@@ -2877,7 +3063,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
  #ifdef __NETWARE__
      netware_reg_user(sctx->ip, sctx->user, "MySQL");
  #endif
-@@ -1204,6 +1639,7 @@
+@@ -1251,6 +1693,7 @@
          net->vio && net->error && net->report_error)
      {
        statistic_increment(aborted_threads, &LOCK_status);
@@ -2885,7 +3071,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
      }
  
      if (net->error && net->vio != 0 && net->report_error)
-@@ -1223,6 +1659,8 @@
+@@ -1270,6 +1713,8 @@
  
  end_thread:
      close_connection(thd, 0, 1);
@@ -2894,7 +3080,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
      end_thread(thd,1);
      /*
        If end_thread returns, we are either running with --one-thread
-@@ -1554,6 +1992,13 @@
+@@ -1601,6 +2046,13 @@
  
    thd->clear_error();                         // Clear error message
  
@@ -2908,7 +3094,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
    net_new_transaction(net);
  
    packet_length= my_net_read(net);
-@@ -1712,6 +2157,9 @@
+@@ -1759,6 +2211,9 @@
    }
  
    thd->command=command;
@@ -2918,7 +3104,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
    /*
      Commands which always take a long time are logged into
      the slow log only if opt_log_slow_admin_statements is set.
-@@ -4356,6 +4804,15 @@
+@@ -4424,6 +4879,15 @@
      if (check_global_access(thd,RELOAD_ACL))
        goto error;
  
@@ -2934,7 +3120,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
      /*
        reload_acl_and_cache() will tell us if we are allowed to write to the
        binlog or not.
-@@ -4663,6 +5120,7 @@
+@@ -4731,6 +5195,7 @@
      {
        if (check_global_access(thd, SUPER_ACL))
        {
@@ -2942,7 +3128,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
          my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), "SUPER");
          goto create_sp_error;
        }
-@@ -5487,6 +5945,7 @@
+@@ -5567,6 +6032,7 @@
        if (!no_errors)
        {
          const char *db_name= db ? db : thd->db;
@@ -2950,7 +3136,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
          my_error(ER_DBACCESS_DENIED_ERROR, MYF(0),
                   sctx->priv_user, sctx->priv_host, db_name);
        }
-@@ -5522,6 +5981,7 @@
+@@ -5602,6 +6068,7 @@
    {                                           // We can never grant this
      DBUG_PRINT("error",("No possible access"));
      if (!no_errors)
@@ -2958,7 +3144,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
        my_error(ER_ACCESS_DENIED_ERROR, MYF(0),
                 sctx->priv_user,
                 sctx->priv_host,
-@@ -5554,11 +6014,15 @@
+@@ -5634,11 +6101,15 @@
  
    DBUG_PRINT("error",("Access denied"));
    if (!no_errors)
@@ -2974,7 +3160,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
    DBUG_RETURN(TRUE);                          /* purecov: tested */
  #endif /* NO_EMBEDDED_ACCESS_CHECKS */
  }
-@@ -5592,6 +6056,7 @@
+@@ -5672,6 +6143,7 @@
    if ((thd->security_ctx->master_access & want_access))
      return 0;
    get_privilege_desc(command, sizeof(command), want_access);
@@ -2982,7 +3168,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
    my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), command);
    return 1;
  #endif /* NO_EMBEDDED_ACCESS_CHECKS */
-@@ -5624,6 +6089,7 @@
+@@ -5704,6 +6176,7 @@
  
        if (!thd->col_access && check_grant_db(thd, dst_db_name))
        {
@@ -2990,7 +3176,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
          my_error(ER_DBACCESS_DENIED_ERROR, MYF(0),
                   thd->security_ctx->priv_user,
                   thd->security_ctx->priv_host,
-@@ -5655,6 +6121,12 @@
+@@ -5735,6 +6208,12 @@
               check_grant(thd, SELECT_ACL, dst_table, 2, UINT_MAX, FALSE);
      }
  
@@ -3003,7 +3189,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
    case SCH_OPEN_TABLES:
    case SCH_VARIABLES:
    case SCH_STATUS:
-@@ -5708,8 +6180,8 @@
+@@ -5788,8 +6267,8 @@
  #ifndef NO_EMBEDDED_ACCESS_CHECKS
    TABLE_LIST *org_tables= tables;
  #endif
@@ -3013,7 +3199,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
    /*
      The check that first_not_own_table is not reached is for the case when
      the given table list refers to the list for prelocking (contains tables
-@@ -5726,9 +6198,12 @@
+@@ -5806,9 +6285,12 @@
          (want_access & ~(SELECT_ACL | EXTRA_ACL | FILE_ACL)))
      {
        if (!no_errors)
@@ -3026,7 +3212,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
        return TRUE;
      }
      /*
-@@ -6231,6 +6706,29 @@
+@@ -6317,6 +6799,30 @@
    */
    lex_start(thd);
    mysql_reset_thd_for_next_command(thd);
@@ -3042,53 +3228,54 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
 +  double start_cpu_nsecs = 0;
 +  double end_cpu_nsecs = 0;
 +
++  if (opt_userstat_running) {
 +#ifdef HAVE_CLOCK_GETTIME
-+  /* get start cputime */ 
-+  if (!(cputime_error = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp)))
-+    start_cpu_nsecs = tp.tv_sec*1000000000.0+tp.tv_nsec;
++    /* get start cputime */ 
++    if (!(cputime_error = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp)))
++      start_cpu_nsecs = tp.tv_sec*1000000000.0+tp.tv_nsec;
 +#endif
 +
-+  // Gets the start time, in order to measure how long this command takes.
-+  if (!(start_time_error = gettimeofday(&start_time, NULL))) {
-+    start_usecs = start_time.tv_sec * 1000000.0 + start_time.tv_usec;
++    // Gets the start time, in order to measure how long this command takes.
++    if (!(start_time_error = gettimeofday(&start_time, NULL))) {
++      start_usecs = start_time.tv_sec * 1000000.0 + start_time.tv_usec;
++    }
 +  }
-+
  
    if (query_cache_send_result_to_client(thd, (char*) inBuf, length) <= 0)
    {
-@@ -6308,6 +6806,39 @@
+@@ -6396,6 +6902,39 @@
      *found_semicolon= NULL;
    }
  
++  if (opt_userstat_running) {
++    // Gets the end time.
++    if (!(end_time_error = gettimeofday(&end_time, NULL))) {
++      end_usecs = end_time.tv_sec * 1000000.0 + end_time.tv_usec;
++    }
 +
-+  // Gets the end time.
-+  if (!(end_time_error = gettimeofday(&end_time, NULL))) {
-+    end_usecs = end_time.tv_sec * 1000000.0 + end_time.tv_usec;
-+  }
-+
-+  // Calculates the difference between the end and start times.
-+  if (end_usecs >= start_usecs && !start_time_error && !end_time_error) {
-+    thd->busy_time = (end_usecs - start_usecs) / 1000000;
-+    // In case there are bad values, 2629743 is the #seconds in a month.
-+    if (thd->busy_time > 2629743) {
++    // Calculates the difference between the end and start times.
++    if (start_usecs && end_usecs >= start_usecs && !start_time_error && !end_time_error) {
++      thd->busy_time = (end_usecs - start_usecs) / 1000000;
++      // In case there are bad values, 2629743 is the #seconds in a month.
++      if (thd->busy_time > 2629743) {
++        thd->busy_time = 0;
++      }
++    } else {
++      // end time went back in time, or gettimeofday() failed.
 +      thd->busy_time = 0;
 +    }
-+  } else {
-+    // end time went back in time, or gettimeofday() failed.
-+    thd->busy_time = 0;
-+  }
 +
 +#ifdef HAVE_CLOCK_GETTIME
-+  /* get end cputime */
-+  if (!cputime_error &&
-+      !(cputime_error = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp)))
-+    end_cpu_nsecs = tp.tv_sec*1000000000.0+tp.tv_nsec;
++    /* get end cputime */
++    if (!cputime_error &&
++        !(cputime_error = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp)))
++      end_cpu_nsecs = tp.tv_sec*1000000000.0+tp.tv_nsec;
 +#endif
-+  if (!cputime_error)
-+    thd->cpu_time = (end_cpu_nsecs - start_cpu_nsecs) / 1000000000;
-+  else
-+    thd->cpu_time = 0;
-+
++    if (start_cpu_nsecs && !cputime_error)
++      thd->cpu_time = (end_cpu_nsecs - start_cpu_nsecs) / 1000000000;
++    else
++      thd->cpu_time = 0;
++  }
 +  // Updates THD stats and the global user stats.
 +  thd->update_stats(true);
 +  update_global_user_stats(thd, true, time(NULL));
@@ -3096,7 +3283,7 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
    DBUG_VOID_RETURN;
  }
  
-@@ -7300,8 +7831,35 @@
+@@ -7407,8 +7946,35 @@
     pthread_mutex_unlock(&LOCK_active_mi);
   }
  #endif
@@ -3134,9 +3321,331 @@ diff -r 0bb04c127c7e sql/sql_parse.cc
   *write_to_binlog= tmp_write_to_binlog;
   return result;
  }
-diff -r 0bb04c127c7e sql/sql_show.cc
---- a/sql/sql_show.cc  Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/sql_show.cc  Fri Sep 12 01:26:22 2008 -0700
+diff -r d35bd12bba15 sql/sql_prepare.cc
+--- a/sql/sql_prepare.cc       Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/sql_prepare.cc       Mon Dec 22 22:53:26 2008 -0800
+@@ -80,6 +80,9 @@
+ #else
+ #include <mysql_com.h>
+ #endif
++
++// Uses the THD to update the global stats by user name and client IP
++void update_global_user_stats(THD* thd, bool create_user, time_t now);
+ /* A result class used to send cursor rows using the binary protocol. */
+@@ -1910,8 +1913,32 @@
+   /* First of all clear possible warnings from the previous command */
+   mysql_reset_thd_for_next_command(thd);
++  int start_time_error = 0;
++  int end_time_error = 0;
++  struct timeval start_time, end_time;
++  double start_usecs = 0;
++  double end_usecs = 0;
++  /* cpu time */
++  int cputime_error = 0;
++  struct timespec tp;
++  double start_cpu_nsecs = 0;
++  double end_cpu_nsecs = 0;
++
++  if (opt_userstat_running) {
++#ifdef HAVE_CLOCK_GETTIME
++    /* get start cputime */
++    if (!(cputime_error = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp)))
++      start_cpu_nsecs = tp.tv_sec*1000000000.0+tp.tv_nsec;
++#endif
++
++    // Gets the start time, in order to measure how long this command takes.
++    if (!(start_time_error = gettimeofday(&start_time, NULL))) {
++      start_usecs = start_time.tv_sec * 1000000.0 + start_time.tv_usec;
++    }
++  }
++
+   if (! (stmt= new Prepared_statement(thd, &thd->protocol_prep)))
+-    DBUG_VOID_RETURN; /* out of memory: error is set in Sql_alloc */
++    goto end; /* out of memory: error is set in Sql_alloc */
+   if (thd->stmt_map.insert(thd, stmt))
+   {
+@@ -1919,7 +1946,7 @@
+       The error is set in the insert. The statement itself
+       will be also deleted there (this is how the hash works).
+     */
+-    DBUG_VOID_RETURN;
++    goto end;
+   }
+   /* Reset warnings from previous command */
+@@ -1941,6 +1968,40 @@
+     thd->stmt_map.erase(stmt);
+   }
+   /* check_prepared_statemnt sends the metadata packet in case of success */
++end:
++  if (opt_userstat_running) {
++    // Gets the end time.
++    if (!(end_time_error = gettimeofday(&end_time, NULL))) {
++      end_usecs = end_time.tv_sec * 1000000.0 + end_time.tv_usec;
++    }
++
++    // Calculates the difference between the end and start times.
++    if (start_usecs && end_usecs >= start_usecs && !start_time_error && !end_time_error) {
++      thd->busy_time = (end_usecs - start_usecs) / 1000000;
++      // In case there are bad values, 2629743 is the #seconds in a month.
++      if (thd->busy_time > 2629743) {
++        thd->busy_time = 0;
++      }
++    } else {
++      // end time went back in time, or gettimeofday() failed.
++      thd->busy_time = 0;
++    }
++
++#ifdef HAVE_CLOCK_GETTIME
++    /* get end cputime */
++    if (!cputime_error &&
++        !(cputime_error = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp)))
++      end_cpu_nsecs = tp.tv_sec*1000000000.0+tp.tv_nsec;
++#endif
++    if (start_cpu_nsecs && !cputime_error)
++      thd->cpu_time = (end_cpu_nsecs - start_cpu_nsecs) / 1000000000;
++    else
++      thd->cpu_time = 0;
++  }
++  // Updates THD stats and the global user stats.
++  thd->update_stats(true);
++  update_global_user_stats(thd, true, time(NULL));
++
+   DBUG_VOID_RETURN;
+ }
+@@ -2281,8 +2342,32 @@
+   /* First of all clear possible warnings from the previous command */
+   mysql_reset_thd_for_next_command(thd);
++  int start_time_error = 0;
++  int end_time_error = 0;
++  struct timeval start_time, end_time;
++  double start_usecs = 0;
++  double end_usecs = 0;
++  /* cpu time */
++  int cputime_error = 0;
++  struct timespec tp;
++  double start_cpu_nsecs = 0;
++  double end_cpu_nsecs = 0;
++
++  if (opt_userstat_running) {
++#ifdef HAVE_CLOCK_GETTIME
++    /* get start cputime */
++    if (!(cputime_error = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp)))
++      start_cpu_nsecs = tp.tv_sec*1000000000.0+tp.tv_nsec;
++#endif
++
++    // Gets the start time, in order to measure how long this command takes.
++    if (!(start_time_error = gettimeofday(&start_time, NULL))) {
++      start_usecs = start_time.tv_sec * 1000000.0 + start_time.tv_usec;
++    }
++  }
++
+   if (!(stmt= find_prepared_statement(thd, stmt_id, "mysql_stmt_execute")))
+-    DBUG_VOID_RETURN;
++    goto end;
+ #ifdef ENABLED_PROFILING
+   thd->profiling.set_query_source(stmt->query, stmt->query_length);
+@@ -2325,11 +2410,46 @@
+                        test(flags & (ulong) CURSOR_TYPE_READ_ONLY));
+   if (!(specialflag & SPECIAL_NO_PRIOR))
+     my_pthread_setprio(pthread_self(), WAIT_PRIOR);
+-  DBUG_VOID_RETURN;
++  goto end;
+ set_params_data_err:
+   my_error(ER_WRONG_ARGUMENTS, MYF(0), "mysql_stmt_execute");
+   reset_stmt_params(stmt);
++
++end:
++  if (opt_userstat_running) {
++    // Gets the end time.
++    if (!(end_time_error = gettimeofday(&end_time, NULL))) {
++      end_usecs = end_time.tv_sec * 1000000.0 + end_time.tv_usec;
++    }
++
++    // Calculates the difference between the end and start times.
++    if (start_usecs && end_usecs >= start_usecs && !start_time_error && !end_time_error) {
++      thd->busy_time = (end_usecs - start_usecs) / 1000000;
++      // In case there are bad values, 2629743 is the #seconds in a month.
++      if (thd->busy_time > 2629743) {
++        thd->busy_time = 0;
++      }
++    } else {
++      // end time went back in time, or gettimeofday() failed.
++      thd->busy_time = 0;
++    }
++
++#ifdef HAVE_CLOCK_GETTIME
++    /* get end cputime */
++    if (!cputime_error &&
++        !(cputime_error = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp)))
++      end_cpu_nsecs = tp.tv_sec*1000000000.0+tp.tv_nsec;
++#endif
++    if (start_cpu_nsecs && !cputime_error)
++      thd->cpu_time = (end_cpu_nsecs - start_cpu_nsecs) / 1000000000;
++    else
++      thd->cpu_time = 0;
++  }
++  // Updates THD stats and the global user stats.
++  thd->update_stats(true);
++  update_global_user_stats(thd, true, time(NULL));
++
+   DBUG_VOID_RETURN;
+ }
+@@ -2423,6 +2543,31 @@
+   /* First of all clear possible warnings from the previous command */
+   mysql_reset_thd_for_next_command(thd);
++
++  int start_time_error = 0;
++  int end_time_error = 0;
++  struct timeval start_time, end_time;
++  double start_usecs = 0;
++  double end_usecs = 0;
++  /* cpu time */
++  int cputime_error = 0;
++  struct timespec tp;
++  double start_cpu_nsecs = 0;
++  double end_cpu_nsecs = 0;
++
++  if (opt_userstat_running) {
++#ifdef HAVE_CLOCK_GETTIME
++    /* get start cputime */
++    if (!(cputime_error = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp)))
++      start_cpu_nsecs = tp.tv_sec*1000000000.0+tp.tv_nsec;
++#endif
++
++    // Gets the start time, in order to measure how long this command takes.
++    if (!(start_time_error = gettimeofday(&start_time, NULL))) {
++      start_usecs = start_time.tv_sec * 1000000.0 + start_time.tv_usec;
++    }
++  }
++
+   statistic_increment(thd->status_var.com_stmt_fetch, &LOCK_status);
+   if (!(stmt= find_prepared_statement(thd, stmt_id, "mysql_stmt_fetch")))
+     DBUG_VOID_RETURN;
+@@ -2455,6 +2600,39 @@
+   thd->restore_backup_statement(stmt, &stmt_backup);
+   thd->stmt_arena= thd;
++  if (opt_userstat_running) {
++    // Gets the end time.
++    if (!(end_time_error = gettimeofday(&end_time, NULL))) {
++      end_usecs = end_time.tv_sec * 1000000.0 + end_time.tv_usec;
++    }
++
++    // Calculates the difference between the end and start times.
++    if (start_usecs && end_usecs >= start_usecs && !start_time_error && !end_time_error) {
++      thd->busy_time = (end_usecs - start_usecs) / 1000000;
++      // In case there are bad values, 2629743 is the #seconds in a month.
++      if (thd->busy_time > 2629743) {
++        thd->busy_time = 0;
++      }
++    } else {
++      // end time went back in time, or gettimeofday() failed.
++      thd->busy_time = 0;
++    }
++
++#ifdef HAVE_CLOCK_GETTIME
++    /* get end cputime */
++    if (!cputime_error &&
++        !(cputime_error = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp)))
++      end_cpu_nsecs = tp.tv_sec*1000000000.0+tp.tv_nsec;
++#endif
++    if (start_cpu_nsecs && !cputime_error)
++      thd->cpu_time = (end_cpu_nsecs - start_cpu_nsecs) / 1000000000;
++    else
++      thd->cpu_time = 0;
++  }
++  // Updates THD stats and the global user stats.
++  thd->update_stats(true);
++  update_global_user_stats(thd, true, time(NULL));
++
+   DBUG_VOID_RETURN;
+ }
+@@ -2487,6 +2665,30 @@
+   /* First of all clear possible warnings from the previous command */
+   mysql_reset_thd_for_next_command(thd);
++  int start_time_error = 0;
++  int end_time_error = 0;
++  struct timeval start_time, end_time;
++  double start_usecs = 0;
++  double end_usecs = 0;
++  /* cpu time */
++  int cputime_error = 0;
++  struct timespec tp;
++  double start_cpu_nsecs = 0;
++  double end_cpu_nsecs = 0;
++
++  if (opt_userstat_running) {
++#ifdef HAVE_CLOCK_GETTIME
++    /* get start cputime */
++    if (!(cputime_error = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp)))
++      start_cpu_nsecs = tp.tv_sec*1000000000.0+tp.tv_nsec;
++#endif
++
++    // Gets the start time, in order to measure how long this command takes.
++    if (!(start_time_error = gettimeofday(&start_time, NULL))) {
++      start_usecs = start_time.tv_sec * 1000000.0 + start_time.tv_usec;
++    }
++  }
++
+   statistic_increment(thd->status_var.com_stmt_reset, &LOCK_status);
+   if (!(stmt= find_prepared_statement(thd, stmt_id, "mysql_stmt_reset")))
+     DBUG_VOID_RETURN;
+@@ -2502,6 +2704,39 @@
+   stmt->state= Query_arena::PREPARED;
+   send_ok(thd);
++
++  if (opt_userstat_running) {
++    // Gets the end time.
++    if (!(end_time_error = gettimeofday(&end_time, NULL))) {
++      end_usecs = end_time.tv_sec * 1000000.0 + end_time.tv_usec;
++    }
++
++    // Calculates the difference between the end and start times.
++    if (start_usecs && end_usecs >= start_usecs && !start_time_error && !end_time_error) {
++      thd->busy_time = (end_usecs - start_usecs) / 1000000;
++      // In case there are bad values, 2629743 is the #seconds in a month.
++      if (thd->busy_time > 2629743) {
++        thd->busy_time = 0;
++      }
++    } else {
++      // end time went back in time, or gettimeofday() failed.
++      thd->busy_time = 0;
++    }
++
++#ifdef HAVE_CLOCK_GETTIME
++    /* get end cputime */
++    if (!cputime_error &&
++        !(cputime_error = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp)))
++      end_cpu_nsecs = tp.tv_sec*1000000000.0+tp.tv_nsec;
++#endif
++    if (start_cpu_nsecs && !cputime_error)
++      thd->cpu_time = (end_cpu_nsecs - start_cpu_nsecs) / 1000000000;
++    else
++      thd->cpu_time = 0;
++  }
++  // Updates THD stats and the global user stats.
++  thd->update_stats(true);
++  update_global_user_stats(thd, true, time(NULL));
+   DBUG_VOID_RETURN;
+ }
+diff -r d35bd12bba15 sql/sql_show.cc
+--- a/sql/sql_show.cc  Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/sql_show.cc  Mon Dec 22 22:53:26 2008 -0800
 @@ -530,6 +530,7 @@
                sctx->master_access);
    if (!(db_access & DB_ACLS) && (!grant_option || check_grant_db(thd,dbname)))
@@ -3145,7 +3654,7 @@ diff -r 0bb04c127c7e sql/sql_show.cc
      my_error(ER_DBACCESS_DENIED_ERROR, MYF(0),
               sctx->priv_user, sctx->host_or_ip, dbname);
      mysql_log.write(thd,COM_INIT_DB,ER(ER_DBACCESS_DENIED_ERROR),
-@@ -1856,6 +1857,300 @@
+@@ -1858,6 +1859,300 @@
    DBUG_RETURN(FALSE);
  }
  
@@ -3183,7 +3692,7 @@ diff -r 0bb04c127c7e sql/sql_show.cc
 +    {
 +      // First entry for this role.
 +      if (!(agg_user =
-+            (USER_STATS*) my_malloc(sizeof(USER_STATS), MYF(MY_WME))))
++            (USER_STATS*) my_malloc(sizeof(USER_STATS), MYF(MY_WME | MY_ZEROFILL))))
 +      {
 +        sql_print_error("Malloc in aggregate_user_stats failed");
 +        DBUG_RETURN(1);
@@ -3446,7 +3955,7 @@ diff -r 0bb04c127c7e sql/sql_show.cc
  
  /* collect status for all running threads */
  
-@@ -4451,6 +4746,77 @@
+@@ -4468,6 +4763,77 @@
    {0, 0, MYSQL_TYPE_STRING, 0, 0, 0}
  };
  
@@ -3524,7 +4033,7 @@ diff -r 0bb04c127c7e sql/sql_show.cc
  
  /*
    Description of ST_FIELD_INFO in table.h
-@@ -4460,6 +4826,8 @@
+@@ -4477,6 +4843,8 @@
  {
    {"CHARACTER_SETS", charsets_fields_info, create_schema_table, 
     fill_schema_charsets, make_character_sets_old_format, 0, -1, -1, 0},
@@ -3533,7 +4042,7 @@ diff -r 0bb04c127c7e sql/sql_show.cc
    {"COLLATIONS", collation_fields_info, create_schema_table, 
     fill_schema_collation, make_old_format, 0, -1, -1, 0},
    {"COLLATION_CHARACTER_SET_APPLICABILITY", coll_charset_app_fields_info,
-@@ -4468,6 +4836,8 @@
+@@ -4485,6 +4853,8 @@
     get_all_tables, make_columns_old_format, get_schema_column_record, 1, 2, 0},
    {"COLUMN_PRIVILEGES", column_privileges_fields_info, create_schema_table,
      fill_schema_column_privileges, 0, 0, -1, -1, 0},
@@ -3542,7 +4051,7 @@ diff -r 0bb04c127c7e sql/sql_show.cc
    {"KEY_COLUMN_USAGE", key_column_usage_fields_info, create_schema_table,
      get_all_tables, 0, get_schema_key_column_usage_record, 4, 5, 0},
    {"OPEN_TABLES", open_tables_fields_info, create_schema_table,
-@@ -4493,10 +4863,14 @@
+@@ -4510,10 +4880,14 @@
     get_all_tables, make_table_names_old_format, 0, 1, 2, 1},
    {"TABLE_PRIVILEGES", table_privileges_fields_info, create_schema_table,
      fill_schema_table_privileges, 0, 0, -1, -1, 0},
@@ -3557,9 +4066,9 @@ diff -r 0bb04c127c7e sql/sql_show.cc
    {"VARIABLES", variables_fields_info, create_schema_table, fill_variables,
     make_old_format, 0, -1, -1, 1},
    {"VIEWS", view_fields_info, create_schema_table, 
-diff -r 0bb04c127c7e sql/sql_update.cc
---- a/sql/sql_update.cc        Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/sql_update.cc        Fri Sep 12 01:26:22 2008 -0700
+diff -r d35bd12bba15 sql/sql_update.cc
+--- a/sql/sql_update.cc        Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/sql_update.cc        Mon Dec 22 22:53:26 2008 -0800
 @@ -601,7 +601,8 @@
        (thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated;
      send_ok(thd, (ulong) thd->row_count_func,
@@ -3570,17 +4079,17 @@ diff -r 0bb04c127c7e sql/sql_update.cc
    }
    thd->count_cuted_fields= CHECK_FIELD_IGNORE;                /* calc cuted fields */
    thd->abort_on_warning= 0;
-@@ -1775,5 +1776,6 @@
+@@ -1832,5 +1833,6 @@
      (thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated;
    ::send_ok(thd, (ulong) thd->row_count_func,
            thd->insert_id_used ? thd->last_insert_id : 0L,buff);
 +  thd->updated_row_count += thd->row_count_func;
    return FALSE;
  }
-diff -r 0bb04c127c7e sql/sql_yacc.yy
---- a/sql/sql_yacc.yy  Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/sql_yacc.yy  Fri Sep 12 01:26:22 2008 -0700
-@@ -522,6 +522,7 @@
+diff -r d35bd12bba15 sql/sql_yacc.yy
+--- a/sql/sql_yacc.yy  Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/sql_yacc.yy  Mon Dec 22 22:53:26 2008 -0800
+@@ -523,6 +523,7 @@
  %token  CHECK_SYM
  %token  CIPHER_SYM
  %token  CLIENT_SYM
@@ -3588,7 +4097,7 @@ diff -r 0bb04c127c7e sql/sql_yacc.yy
  %token  CLOSE_SYM
  %token  COALESCE
  %token  CODE_SYM
-@@ -679,6 +680,7 @@
+@@ -680,6 +681,7 @@
  %token  IMPORT
  %token  INDEXES
  %token  INDEX_SYM
@@ -3596,7 +4105,7 @@ diff -r 0bb04c127c7e sql/sql_yacc.yy
  %token  INFILE
  %token  INNER_SYM
  %token  INNOBASE_SYM
-@@ -908,6 +910,7 @@
+@@ -909,6 +911,7 @@
  %token  SIGNED_SYM
  %token  SIMPLE_SYM
  %token  SLAVE
@@ -3604,7 +4113,7 @@ diff -r 0bb04c127c7e sql/sql_yacc.yy
  %token  SMALLINT
  %token  SNAPSHOT_SYM
  %token  SOUNDS_SYM
-@@ -948,6 +951,7 @@
+@@ -949,6 +952,7 @@
  %token  TABLES
  %token  TABLESPACE
  %token  TABLE_SYM
@@ -3612,7 +4121,7 @@ diff -r 0bb04c127c7e sql/sql_yacc.yy
  %token  TEMPORARY
  %token  TEMPTABLE_SYM
  %token  TERMINATED
-@@ -990,6 +994,7 @@
+@@ -991,6 +995,7 @@
  %token  UPGRADE_SYM
  %token  USAGE
  %token  USER
@@ -3620,7 +4129,7 @@ diff -r 0bb04c127c7e sql/sql_yacc.yy
  %token  USE_FRM
  %token  USE_SYM
  %token  USING
-@@ -7332,6 +7337,38 @@
+@@ -8244,6 +8249,38 @@
            {
            Lex->sql_command = SQLCOM_SHOW_SLAVE_STAT;
            }
@@ -3659,7 +4168,7 @@ diff -r 0bb04c127c7e sql/sql_yacc.yy
        | CREATE PROCEDURE sp_name
          {
            LEX *lex= Lex;
-@@ -7525,9 +7562,14 @@
+@@ -8448,9 +8485,14 @@
        | LOGS_SYM      { Lex->type|= REFRESH_LOG; }
        | STATUS_SYM    { Lex->type|= REFRESH_STATUS; }
          | SLAVE         { Lex->type|= REFRESH_SLAVE; }
@@ -3675,9 +4184,49 @@ diff -r 0bb04c127c7e sql/sql_yacc.yy
  
  opt_table_list:
        /* empty */  {;}
-diff -r 0bb04c127c7e sql/structs.h
---- a/sql/structs.h    Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/structs.h    Fri Sep 12 01:26:22 2008 -0700
+@@ -9439,6 +9481,7 @@
+       | CHAIN_SYM             {}
+       | CHANGED               {}
+       | CIPHER_SYM            {}
++      | CLIENT_STATS_SYM      {}
+       | CLIENT_SYM            {}
+         | CODE_SYM              {}
+       | COLLATION_SYM         {}
+@@ -9491,6 +9534,7 @@
+       | HOSTS_SYM             {}
+       | HOUR_SYM              {}
+       | IDENTIFIED_SYM        {}
++      | INDEX_STATS_SYM       {}
+       | INVOKER_SYM           {}
+       | IMPORT                {}
+       | INDEXES               {}
+@@ -9600,6 +9644,7 @@
+       | SIMPLE_SYM            {}
+       | SHARE_SYM             {}
+       | SHUTDOWN              {}
++      | SLOW_SYM              {}
+       | SNAPSHOT_SYM          {}
+       | SOUNDS_SYM            {}
+       | SOURCE_SYM            {}
+@@ -9616,6 +9661,7 @@
+         | SUSPEND_SYM           {}
+         | SWAPS_SYM             {}
+       | SWITCHES_SYM          {}
++      | TABLE_STATS_SYM       {}
+         | TABLES                {}
+       | TABLESPACE            {}
+       | TEMPORARY             {}
+@@ -9636,6 +9682,7 @@
+       | UNKNOWN_SYM           {}
+       | UNTIL_SYM             {}
+       | USER                  {}
++      | USER_STATS_SYM        {}
+       | USE_FRM               {}
+       | VARIABLES             {}
+       | VIEW_SYM              {}
+diff -r d35bd12bba15 sql/structs.h
+--- a/sql/structs.h    Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/structs.h    Mon Dec 22 22:53:26 2008 -0800
 @@ -273,6 +273,98 @@
    time_t intime;
  } USER_CONN;
@@ -3777,10 +4326,10 @@ diff -r 0bb04c127c7e sql/structs.h
        /* Bits in form->update */
  #define REG_MAKE_DUPP         1       /* Make a copy of record when read */
  #define REG_NEW_RECORD                2       /* Write a new record if not found */
-diff -r 0bb04c127c7e sql/table.h
---- a/sql/table.h      Fri Sep 12 01:25:08 2008 -0700
-+++ b/sql/table.h      Fri Sep 12 01:26:22 2008 -0700
-@@ -370,10 +370,12 @@
+diff -r d35bd12bba15 sql/table.h
+--- a/sql/table.h      Mon Dec 22 22:51:44 2008 -0800
++++ b/sql/table.h      Mon Dec 22 22:53:26 2008 -0800
+@@ -371,10 +371,12 @@
  enum enum_schema_tables
  {
    SCH_CHARSETS= 0,
@@ -3793,7 +4342,7 @@ diff -r 0bb04c127c7e sql/table.h
    SCH_KEY_COLUMN_USAGE,
    SCH_OPEN_TABLES,
    SCH_PROFILES,
-@@ -386,8 +388,10 @@
+@@ -387,8 +389,10 @@
    SCH_TABLE_CONSTRAINTS,
    SCH_TABLE_NAMES,
    SCH_TABLE_PRIVILEGES,
@@ -3804,10 +4353,10 @@ diff -r 0bb04c127c7e sql/table.h
    SCH_VARIABLES,
    SCH_VIEWS
  };
-diff -r 0bb04c127c7e strings/Makefile.in
---- a/strings/Makefile.in      Fri Sep 12 01:25:08 2008 -0700
-+++ b/strings/Makefile.in      Fri Sep 12 01:26:22 2008 -0700
-@@ -359,6 +359,7 @@
+diff -r d35bd12bba15 strings/Makefile.in
+--- a/strings/Makefile.in      Mon Dec 22 22:51:44 2008 -0800
++++ b/strings/Makefile.in      Mon Dec 22 22:53:26 2008 -0800
+@@ -361,6 +361,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -3815,10 +4364,10 @@ diff -r 0bb04c127c7e strings/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e support-files/MacOSX/Makefile.in
---- a/support-files/MacOSX/Makefile.in Fri Sep 12 01:25:08 2008 -0700
-+++ b/support-files/MacOSX/Makefile.in Fri Sep 12 01:26:22 2008 -0700
-@@ -169,6 +169,7 @@
+diff -r d35bd12bba15 support-files/MacOSX/Makefile.in
+--- a/support-files/MacOSX/Makefile.in Mon Dec 22 22:51:44 2008 -0800
++++ b/support-files/MacOSX/Makefile.in Mon Dec 22 22:53:26 2008 -0800
+@@ -171,6 +171,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -3826,10 +4375,10 @@ diff -r 0bb04c127c7e support-files/MacOSX/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e support-files/Makefile.in
---- a/support-files/Makefile.in        Fri Sep 12 01:25:08 2008 -0700
-+++ b/support-files/Makefile.in        Fri Sep 12 01:26:22 2008 -0700
-@@ -189,6 +189,7 @@
+diff -r d35bd12bba15 support-files/Makefile.in
+--- a/support-files/Makefile.in        Mon Dec 22 22:51:44 2008 -0800
++++ b/support-files/Makefile.in        Mon Dec 22 22:53:26 2008 -0800
+@@ -191,6 +191,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -3837,10 +4386,10 @@ diff -r 0bb04c127c7e support-files/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e support-files/RHEL4-SElinux/Makefile.in
---- a/support-files/RHEL4-SElinux/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/support-files/RHEL4-SElinux/Makefile.in  Fri Sep 12 01:26:22 2008 -0700
-@@ -167,6 +167,7 @@
+diff -r d35bd12bba15 support-files/RHEL4-SElinux/Makefile.in
+--- a/support-files/RHEL4-SElinux/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/support-files/RHEL4-SElinux/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -169,6 +169,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -3848,10 +4397,10 @@ diff -r 0bb04c127c7e support-files/RHEL4-SElinux/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e tests/Makefile.in
---- a/tests/Makefile.in        Fri Sep 12 01:25:08 2008 -0700
-+++ b/tests/Makefile.in        Fri Sep 12 01:26:22 2008 -0700
-@@ -213,6 +213,7 @@
+diff -r d35bd12bba15 tests/Makefile.in
+--- a/tests/Makefile.in        Mon Dec 22 22:51:44 2008 -0800
++++ b/tests/Makefile.in        Mon Dec 22 22:53:26 2008 -0800
+@@ -215,6 +215,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -3859,10 +4408,10 @@ diff -r 0bb04c127c7e tests/Makefile.in
  LIBS = @CLIENT_LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e tools/Makefile.in
---- a/tools/Makefile.in        Fri Sep 12 01:25:08 2008 -0700
-+++ b/tools/Makefile.in        Fri Sep 12 01:26:22 2008 -0700
-@@ -187,6 +187,7 @@
+diff -r d35bd12bba15 tools/Makefile.in
+--- a/tools/Makefile.in        Mon Dec 22 22:51:44 2008 -0800
++++ b/tools/Makefile.in        Mon Dec 22 22:53:26 2008 -0800
+@@ -189,6 +189,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -3870,10 +4419,10 @@ diff -r 0bb04c127c7e tools/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e vio/Makefile.in
---- a/vio/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/vio/Makefile.in  Fri Sep 12 01:26:22 2008 -0700
-@@ -196,6 +196,7 @@
+diff -r d35bd12bba15 vio/Makefile.in
+--- a/vio/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/vio/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -198,6 +198,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -3881,10 +4430,10 @@ diff -r 0bb04c127c7e vio/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e win/Makefile.in
---- a/win/Makefile.in  Fri Sep 12 01:25:08 2008 -0700
-+++ b/win/Makefile.in  Fri Sep 12 01:26:22 2008 -0700
-@@ -165,6 +165,7 @@
+diff -r d35bd12bba15 win/Makefile.in
+--- a/win/Makefile.in  Mon Dec 22 22:51:44 2008 -0800
++++ b/win/Makefile.in  Mon Dec 22 22:53:26 2008 -0800
+@@ -167,6 +167,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
@@ -3892,10 +4441,10 @@ diff -r 0bb04c127c7e win/Makefile.in
  LIBS = @LIBS@
  LIBTOOL = @LIBTOOL@
  LIB_EXTRA_CCFLAGS = @LIB_EXTRA_CCFLAGS@
-diff -r 0bb04c127c7e zlib/Makefile.in
---- a/zlib/Makefile.in Fri Sep 12 01:25:08 2008 -0700
-+++ b/zlib/Makefile.in Fri Sep 12 01:26:22 2008 -0700
-@@ -204,6 +204,7 @@
+diff -r d35bd12bba15 zlib/Makefile.in
+--- a/zlib/Makefile.in Mon Dec 22 22:51:44 2008 -0800
++++ b/zlib/Makefile.in Mon Dec 22 22:53:26 2008 -0800
+@@ -206,6 +206,7 @@
  LIBDL = @LIBDL@
  LIBEDIT_LOBJECTS = @LIBEDIT_LOBJECTS@
  LIBOBJS = @LIBOBJS@
This page took 0.356017 seconds and 4 git commands to generate.