List:Commits« Previous MessageNext Message »
From:Marc Alff Date:July 14 2011 8:12am
Subject:bzr push into mysql-trunk-wl5342 branch (marc.alff:3378 to 3379)
View as plain text  
 3379 Marc Alff	2011-07-14 [merge]
      Merge mysql-trunk --> mysql-trunk-wl5342

    modified:
      client/mysqlbinlog.cc
      include/welcome_copyright_notice.h
      mysql-test/include/mix1.inc
      mysql-test/suite/innodb/r/innodb-index.result
      mysql-test/suite/innodb/r/innodb_mysql.result
      mysql-test/suite/innodb/t/innodb-index.test
      mysys/psi_noop.cc
      plugin/audit_null/audit_null.c
      sql/handler.cc
      sql/item_geofunc.cc
      sql/partition_info.cc
      sql/rpl_info_file.cc
      sql/sql_load.cc
      sql/sql_select.cc
      storage/innobase/lock/lock0lock.c
      storage/innobase/row/row0row.c
      storage/innobase/trx/trx0purge.c
      storage/innobase/trx/trx0rec.c
      storage/perfschema/pfs_instr.cc
      storage/perfschema/unittest/pfs_instr_class-t.cc
      support-files/mysql-log-rotate.sh
 3378 Marc Alff	2011-07-07 [merge]
      Merge mysql-trunk --> mysql-trunk-wl5342

    modified:
      storage/perfschema/unittest/pfs-t.cc
=== modified file 'client/mysqlbinlog.cc'
--- a/client/mysqlbinlog.cc	2011-07-04 00:25:46 +0000
+++ b/client/mysqlbinlog.cc	2011-07-11 16:21:46 +0000
@@ -1275,7 +1275,7 @@ static void print_version()
 static void usage()
 {
   print_version();
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2001, 2010"));
+  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000, 2011"));
   printf("\
 Dumps a MySQL binary log in a format usable for viewing or for piping to\n\
 the mysql command line client.\n\n");

=== modified file 'include/welcome_copyright_notice.h'
--- a/include/welcome_copyright_notice.h	2011-06-30 15:50:45 +0000
+++ b/include/welcome_copyright_notice.h	2011-07-11 16:21:46 +0000
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by

=== modified file 'mysql-test/include/mix1.inc'
--- a/mysql-test/include/mix1.inc	2011-03-30 13:33:29 +0000
+++ b/mysql-test/include/mix1.inc	2011-07-08 12:30:52 +0000
@@ -26,6 +26,7 @@
 #
 
 eval SET SESSION DEFAULT_STORAGE_ENGINE = $engine_type;
+eval SET SESSION DEFAULT_TEMP_STORAGE_ENGINE = $engine_type;
 
 --disable_warnings
 drop table if exists t1,t2,t3,t1m,t1i,t2m,t2i,t4;

=== modified file 'mysql-test/suite/innodb/r/innodb-index.result'
--- a/mysql-test/suite/innodb/r/innodb-index.result	2011-07-07 10:53:38 +0000
+++ b/mysql-test/suite/innodb/r/innodb-index.result	2011-07-08 13:40:10 +0000
@@ -976,6 +976,7 @@ v16 VARCHAR(500), v17 VARCHAR(500), v18 
 CREATE INDEX idx1 ON t1(a,v1);
 INSERT INTO t1 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
 UPDATE t1 SET a=1000;
+DELETE FROM t1;
 DROP TABLE t1;
 set global innodb_file_per_table=0;
 set global innodb_file_format=Antelope;

=== modified file 'mysql-test/suite/innodb/r/innodb_mysql.result'
--- a/mysql-test/suite/innodb/r/innodb_mysql.result	2011-07-05 05:01:29 +0000
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result	2011-07-08 12:30:52 +0000
@@ -1,6 +1,7 @@
 set global innodb_support_xa=default;
 set session innodb_support_xa=default;
 SET SESSION DEFAULT_STORAGE_ENGINE = InnoDB;
+SET SESSION DEFAULT_TEMP_STORAGE_ENGINE = InnoDB;
 drop table if exists t1,t2,t3,t1m,t1i,t2m,t2i,t4;
 drop procedure if exists p1;
 create table t1 (

=== modified file 'mysql-test/suite/innodb/t/innodb-index.test'
--- a/mysql-test/suite/innodb/t/innodb-index.test	2011-07-07 10:53:38 +0000
+++ b/mysql-test/suite/innodb/t/innodb-index.test	2011-07-08 13:40:10 +0000
@@ -473,6 +473,9 @@ CREATE TABLE t1(a INT,
 CREATE INDEX idx1 ON t1(a,v1);
 INSERT INTO t1 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
 UPDATE t1 SET a=1000;
+DELETE FROM t1;
+# Let the purge thread clean up this file.
+-- sleep 10
 DROP TABLE t1;
 
 eval set global innodb_file_per_table=$per_table;

=== modified file 'mysys/psi_noop.cc'
--- a/mysys/psi_noop.cc	2011-07-05 16:45:26 +0000
+++ b/mysys/psi_noop.cc	2011-07-14 08:11:07 +0000
@@ -25,6 +25,8 @@
 #include "my_sys.h"
 #include "mysql/psi/psi.h"
 
+C_MODE_START
+
 static void register_mutex_noop(const char *category,
                                 PSI_mutex_info *info,
                                 int count)
@@ -632,8 +634,6 @@ static PSI PSI_noop=
   end_statement_noop
 };
 
-C_MODE_START
-
 /**
   Hook for the instrumentation interface.
   Code implementing the instrumentation interface should register here.

=== modified file 'plugin/audit_null/audit_null.c'
--- a/plugin/audit_null/audit_null.c	2011-07-07 09:45:10 +0000
+++ b/plugin/audit_null/audit_null.c	2011-07-12 06:50:18 +0000
@@ -1,9 +1,9 @@
-/* Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 
    This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License
-   as published by the Free Software Foundation; version 2 of
-   the License.
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; version 2 of the
+   License.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -12,7 +12,7 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
 
 #include <stdio.h>
 #include <mysql/plugin.h>
@@ -23,9 +23,15 @@
 #endif
 
 static volatile int number_of_calls; /* for SHOW STATUS, see below */
+/* Count MYSQL_AUDIT_GENERAL_CLASS event instances */
 static volatile int number_of_calls_general_log;
 static volatile int number_of_calls_general_error;
 static volatile int number_of_calls_general_result;
+static volatile int number_of_calls_general_status;
+/* Count MYSQL_AUDIT_CONNECTION_CLASS event instances */
+static volatile int number_of_calls_connection_connect;
+static volatile int number_of_calls_connection_disconnect;
+static volatile int number_of_calls_connection_change_user;
 
 
 /*
@@ -48,6 +54,10 @@ static int audit_null_plugin_init(void *
   number_of_calls_general_log= 0;
   number_of_calls_general_error= 0;
   number_of_calls_general_result= 0;
+  number_of_calls_general_status= 0;
+  number_of_calls_connection_connect= 0;
+  number_of_calls_connection_disconnect= 0;
+  number_of_calls_connection_change_user= 0;
   return(0);
 }
 
@@ -102,6 +112,28 @@ static void audit_null_notify(MYSQL_THD 
     case MYSQL_AUDIT_GENERAL_RESULT:
       number_of_calls_general_result++;
       break;
+    case MYSQL_AUDIT_GENERAL_STATUS:
+      number_of_calls_general_status++;
+      break;
+    default:
+      break;
+    }
+  }
+  else if (event_class == MYSQL_AUDIT_CONNECTION_CLASS)
+  {
+    const struct mysql_event_connection *event_connection=
+      (const struct mysql_event_connection *) event;
+    switch (event_connection->event_subclass)
+    {
+    case MYSQL_AUDIT_CONNECTION_CONNECT:
+      number_of_calls_connection_connect++;
+      break;
+    case MYSQL_AUDIT_CONNECTION_DISCONNECT:
+      number_of_calls_connection_disconnect++;
+      break;
+    case MYSQL_AUDIT_CONNECTION_CHANGE_USER:
+      number_of_calls_connection_change_user++;
+      break;
     default:
       break;
     }
@@ -118,7 +150,8 @@ static struct st_mysql_audit audit_null_
   MYSQL_AUDIT_INTERFACE_VERSION,                    /* interface version    */
   NULL,                                             /* release_thd function */
   audit_null_notify,                                /* notify function      */
-  { (unsigned long) MYSQL_AUDIT_GENERAL_CLASSMASK } /* class mask           */
+  { (unsigned long) MYSQL_AUDIT_GENERAL_CLASSMASK |
+                    MYSQL_AUDIT_CONNECTION_CLASSMASK } /* class mask           */
 };
 
 /*
@@ -127,11 +160,29 @@ static struct st_mysql_audit audit_null_
 
 static struct st_mysql_show_var simple_status[]=
 {
-  { "Audit_null_called", (char *) &number_of_calls, SHOW_INT },
-  { "Audit_null_general_log", (char *) &number_of_calls_general_log, SHOW_INT },
-  { "Audit_null_general_error", (char *) &number_of_calls_general_error,
+  { "Audit_null_called",
+    (char *) &number_of_calls,
+    SHOW_INT },
+  { "Audit_null_general_log",
+    (char *) &number_of_calls_general_log,
+    SHOW_INT },
+  { "Audit_null_general_error",
+    (char *) &number_of_calls_general_error,
+    SHOW_INT },
+  { "Audit_null_general_result",
+    (char *) &number_of_calls_general_result,
+    SHOW_INT },
+  { "Audit_null_general_status",
+    (char *) &number_of_calls_general_status,
+    SHOW_INT },
+  { "Audit_null_connection_connect",
+    (char *) &number_of_calls_connection_connect,
+    SHOW_INT },
+  { "Audit_null_connection_disconnect",
+    (char *) &number_of_calls_connection_disconnect,
     SHOW_INT },
-  { "Audit_null_general_result", (char *) &number_of_calls_general_result,
+  { "Audit_null_connection_change_user",
+    (char *) &number_of_calls_connection_change_user,
     SHOW_INT },
   { 0, 0, 0}
 };
@@ -151,7 +202,7 @@ mysql_declare_plugin(audit_null)
   PLUGIN_LICENSE_GPL,
   audit_null_plugin_init,     /* init function (when loaded)     */
   audit_null_plugin_deinit,   /* deinit function (when unloaded) */
-  0x0002,                     /* version                         */
+  0x0003,                     /* version                         */
   simple_status,              /* status variables                */
   NULL,                       /* system variables                */
   NULL

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2011-07-07 19:13:19 +0000
+++ b/sql/handler.cc	2011-07-14 08:11:07 +0000
@@ -5302,7 +5302,7 @@ bool DsMrr_impl::get_disk_sweep_mrr_cost
                                          uint *buffer_size, COST_VECT *cost)
 {
   ulong max_buff_entries, elem_size;
-  ha_rows rows_in_full_step, rows_in_last_step;
+  ha_rows rows_in_last_step;
   uint n_full_steps;
   double index_read_cost;
 
@@ -5314,15 +5314,13 @@ bool DsMrr_impl::get_disk_sweep_mrr_cost
 
   /* Number of iterations we'll make with full buffer */
   n_full_steps= (uint)floor(rows2double(rows) / max_buff_entries);
-  
-  /* 
-    Get numbers of rows we'll be processing in 
-     - non-last sweep, with full buffer 
-     - last iteration, with non-full buffer
+
+  /*
+    Get numbers of rows we'll be processing in last iteration, with
+    non-full buffer
   */
-  rows_in_full_step= max_buff_entries;
   rows_in_last_step= rows % max_buff_entries;
-  
+
   /* Adjust buffer size if we expect to use only part of the buffer */
   if (n_full_steps)
   {
@@ -5336,11 +5334,11 @@ bool DsMrr_impl::get_disk_sweep_mrr_cost
                       (size_t)(1.2*rows_in_last_step) * elem_size + 
                       h->ref_length + table->key_info[keynr].key_length);
   }
-  
+
   COST_VECT last_step_cost;
   get_sort_and_sweep_cost(table, rows_in_last_step, &last_step_cost);
   cost->add(&last_step_cost);
- 
+
   if (n_full_steps != 0)
     cost->mem_cost= *buffer_size;
   else

=== modified file 'sql/item_geofunc.cc'
--- a/sql/item_geofunc.cc	2011-06-30 15:50:45 +0000
+++ b/sql/item_geofunc.cc	2011-07-07 14:26:36 +0000
@@ -661,7 +661,7 @@ static double distance_points(const Gcal
 static int calc_distance(double *result, Gcalc_heap *collector, uint obj2_si,
                          Gcalc_function *func, Gcalc_scan_iterator *scan_it)
 {
-  bool above_cur_point, cur_point_edge;
+  bool cur_point_edge;
   const Gcalc_scan_iterator::point *evpos;
   const Gcalc_heap::Info *cur_point, *dist_point;
   Gcalc_scan_events ev;
@@ -670,7 +670,6 @@ static int calc_distance(double *result,
 
   DBUG_ENTER("calc_distance");
 
-  above_cur_point= false;
   distance= DBL_MAX;
 
   while (scan_it->more_points())
@@ -781,7 +780,6 @@ mem_error:
 
 int Item_func_spatial_rel::func_touches()
 {
-  bool above_cur_point;
   double x1, x2, y1, y2, ex, ey;
   double distance, area;
   int result= 0;
@@ -836,7 +834,6 @@ int Item_func_spatial_rel::func_touches(
   scan_it.reset();
   scan_it.init(&collector);
 
-  above_cur_point= false;
   distance= DBL_MAX;
 
   while (scan_it.more_trapezoids())
@@ -1677,7 +1674,7 @@ longlong Item_func_srid::val_int()
 
 double Item_func_distance::val_real()
 {
-  bool above_cur_point, cur_point_edge;
+  bool cur_point_edge;
   const Gcalc_scan_iterator::point *evpos;
   const Gcalc_heap::Info *cur_point, *dist_point;
   Gcalc_scan_events ev;
@@ -1724,7 +1721,6 @@ double Item_func_distance::val_real()
   collector.prepare_operation();
   scan_it.init(&collector);
 
-  above_cur_point= false;
   distance= DBL_MAX;
   while (scan_it.more_points())
   {

=== modified file 'sql/partition_info.cc'
--- a/sql/partition_info.cc	2011-07-03 23:56:47 +0000
+++ b/sql/partition_info.cc	2011-07-07 14:26:36 +0000
@@ -636,12 +636,11 @@ char *partition_info::find_duplicate_nam
   HASH partition_names;
   uint max_names;
   const uchar *curr_name= NULL;
-  size_t length;
   List_iterator<partition_element> parts_it(partitions);
-  partition_element *p_elem;  
+  partition_element *p_elem;
 
   DBUG_ENTER("partition_info::find_duplicate_name");
-  
+
   /*
     TODO: If table->s->ha_part_data->partition_name_hash.elements is > 0,
     then we could just return NULL, but that has not been verified.
@@ -661,7 +660,6 @@ char *partition_info::find_duplicate_nam
   while ((p_elem= (parts_it++)))
   {
     curr_name= (const uchar*) p_elem->partition_name;
-    length= strlen(p_elem->partition_name);
     if (my_hash_insert(&partition_names, curr_name))
       goto error;
 
@@ -676,7 +674,7 @@ char *partition_info::find_duplicate_nam
           goto error;
       }
     }
-  } 
+  }
   my_hash_free(&partition_names);
   DBUG_RETURN(NULL);
 error:

=== modified file 'sql/rpl_info_file.cc'
--- a/sql/rpl_info_file.cc	2011-06-30 15:50:45 +0000
+++ b/sql/rpl_info_file.cc	2011-07-07 14:26:36 +0000
@@ -482,8 +482,9 @@ bool init_dynarray_intvar_from_file(char
           (decimal size + space) - 1 + `\n' + '\0'
     */
     size_t max_size= (1 + num_items) * (sizeof(long) * 3 + 1) + 1;
-    buf_act= (char*) my_malloc(max_size, MYF(MY_WME));
-    buffer_act= &buf_act;
+    if (! (buf_act= (char*) my_malloc(max_size, MYF(MY_WME))))
+      DBUG_RETURN(TRUE);
+    *buffer_act= buf_act;
     memcpy(buf_act, buf, read_size);
     snd_size= my_b_gets(f, buf_act + read_size, max_size - read_size);
     if (snd_size == 0 ||

=== modified file 'sql/sql_load.cc'
--- a/sql/sql_load.cc	2011-07-07 11:24:33 +0000
+++ b/sql/sql_load.cc	2011-07-07 14:26:36 +0000
@@ -1122,12 +1122,9 @@ read_xml_field(THD *thd, COPY_INFO &info
   List_iterator_fast<Item> it(fields_vars);
   Item *item;
   TABLE *table= table_list->table;
-  bool no_trans_update_stmt;
   const CHARSET_INFO *cs= read_info.read_charset;
   DBUG_ENTER("read_xml_field");
-  
-  no_trans_update_stmt= !table->file->has_transactions();
-  
+
   for ( ; ; it.rewind())
   {
     if (thd->killed)

=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2011-07-07 13:22:43 +0000
+++ b/sql/sql_select.cc	2011-07-07 14:26:36 +0000
@@ -3955,7 +3955,7 @@ bool convert_subquery_to_semijoin(JOIN *
   st_select_lex *subq_lex= subq_pred->unit->first_select();
   nested_join->join_list.empty();
   List_iterator_fast<TABLE_LIST> li(subq_lex->top_join_list);
-  TABLE_LIST *tl, *last_leaf;
+  TABLE_LIST *tl;
   while ((tl= li++))
   {
     tl->embedding= sj_nest;
@@ -3973,7 +3973,6 @@ bool convert_subquery_to_semijoin(JOIN *
   for (tl= parent_lex->leaf_tables; tl->next_leaf; tl= tl->next_leaf)
   {}
   tl->next_leaf= subq_lex->leaf_tables;
-  last_leaf= tl;
 
   /*
     Same as above for next_local chain
@@ -4258,7 +4257,6 @@ bool JOIN::flatten_subqueries()
       DBUG_RETURN(TRUE);
   }
 skip_conversion:
-  bool converted= FALSE;
   /* 
     3. Finalize the subqueries that we did not convert,
        ie. perform IN->EXISTS rewrite.
@@ -4272,7 +4270,6 @@ skip_conversion:
 
     SELECT_LEX *save_select_lex= thd->lex->current_select;
     thd->lex->current_select= (*subq)->unit->first_select();
-    converted= TRUE;
 
     res= (*subq)->select_transformer(child_join);
 
@@ -11822,8 +11819,6 @@ static bool
 make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after)
 {
   const bool statistics= test(!(join->select_options & SELECT_DESCRIBE));
-  uint first_sjm_table= MAX_TABLES;
-  uint last_sjm_table= MAX_TABLES;
 
   /* First table sorted if ORDER or GROUP BY was specified */
   bool sorted= (join->order || join->group_list);
@@ -11857,8 +11852,6 @@ make_join_readinfo(JOIN *join, ulonglong
     if (sj_is_materialize_strategy(join->best_positions[i].sj_strategy))
     {
       /* This is a start of semi-join nest */
-      first_sjm_table= i;
-      last_sjm_table= i + join->best_positions[i].n_sj_tables;
       if (i == join->const_tables)
         join->first_select= sub_select_sjm;
       else
@@ -16841,7 +16834,7 @@ TABLE *create_duplicate_weedout_tmp_tabl
   bool using_unique_constraint=FALSE;
   bool use_packed_rows= FALSE;
   Field *field, *key_field;
-  uint blob_count, null_pack_length, null_count;
+  uint null_pack_length, null_count;
   uchar *null_flags;
   uchar *pos;
   DBUG_ENTER("create_duplicate_weedout_tmp_table");
@@ -16922,8 +16915,6 @@ TABLE *create_duplicate_weedout_tmp_tabl
   share->keys_for_keyread.init();
   share->keys_in_use.init();
 
-  blob_count= 0;
-
   /* Create the field */
   {
     /*

=== modified file 'storage/innobase/lock/lock0lock.c'
--- a/storage/innobase/lock/lock0lock.c	2011-07-01 07:08:41 +0000
+++ b/storage/innobase/lock/lock0lock.c	2011-07-13 05:08:21 +0000
@@ -3699,13 +3699,13 @@ lock_deadlock_check(
 Pop the deadlock search state from the stack.
 @return stack slot instance that was on top of the stack. */
 static
-const lock_stack_t const*
+const lock_stack_t*
 lock_deadlock_pop(
 /*==============*/
 	lock_deadlock_ctx_t*	ctx)		/*!< in/out: context */
 {
-	const lock_stack_t const*	stack;
-	const trx_lock_t const*		trx_lock;
+	const lock_stack_t*	stack;
+	const trx_lock_t*	trx_lock;
 
 	ut_ad(lock_mutex_own());
 
@@ -3831,7 +3831,7 @@ lock_deadlock_search(
 		}
 
 		if (lock == NULL && ctx->depth > 0) {
-			const lock_stack_t const*	stack;
+			const lock_stack_t*	stack;
 
 			/* Restore previous search state. */
 

=== modified file 'storage/innobase/row/row0row.c'
--- a/storage/innobase/row/row0row.c	2011-07-07 09:45:10 +0000
+++ b/storage/innobase/row/row0row.c	2011-07-08 13:40:10 +0000
@@ -148,22 +148,27 @@ row_build_index_entry(
 				continue;
 			}
 		} else if (dfield_is_ext(dfield)) {
-			/* This table should be in Antelope format
-			(ROW_FORMAT=REDUNDANT or ROW_FORMAT=COMPACT).
-			In that format, the maximum column prefix
+			/* This table is either in Antelope format
+			(ROW_FORMAT=REDUNDANT or ROW_FORMAT=COMPACT)
+			or a purge record where the ordered part of
+			the field is not external.
+			In Antelope, the maximum column prefix
 			index length is 767 bytes, and the clustered
 			index record contains a 768-byte prefix of
 			each off-page column. */
 			ut_a(len >= BTR_EXTERN_FIELD_REF_SIZE);
 			len -= BTR_EXTERN_FIELD_REF_SIZE;
+			dfield_set_len(dfield, len);
 		}
 
 		/* If a column prefix index, take only the prefix. */
-		ut_ad(ind_field->prefix_len);
-		len = dtype_get_at_most_n_mbchars(
-			col->prtype, col->mbminmaxlen,
-			ind_field->prefix_len, len, dfield_get_data(dfield));
-		dfield_set_len(dfield, len);
+		if (ind_field->prefix_len) {
+			len = dtype_get_at_most_n_mbchars(
+				col->prtype, col->mbminmaxlen,
+				ind_field->prefix_len, len,
+				dfield_get_data(dfield));
+			dfield_set_len(dfield, len);
+		}
 	}
 
 	ut_ad(dtuple_check_typed(entry));

=== modified file 'storage/innobase/trx/trx0purge.c'
--- a/storage/innobase/trx/trx0purge.c	2011-06-02 07:05:42 +0000
+++ b/storage/innobase/trx/trx0purge.c	2011-07-07 14:26:36 +0000
@@ -216,7 +216,6 @@ trx_purge_add_update_undo_to_history(
 	trx_rseg_t*	rseg;
 	trx_rsegf_t*	rseg_header;
 	trx_ulogf_t*	undo_header;
-	trx_upagef_t*	page_header;
 
 	undo = trx->update_undo;
 	rseg = undo->rseg;
@@ -226,7 +225,6 @@ trx_purge_add_update_undo_to_history(
 		mtr);
 
 	undo_header = undo_page + undo->hdr_offset;
-	page_header = undo_page + TRX_UNDO_PAGE_HDR;
 
 	if (undo->state != TRX_UNDO_CACHED) {
 		ulint		hist_size;
@@ -559,7 +557,6 @@ trx_purge_rseg_get_next_history_log(
 	const void*	ptr;
 	page_t*		undo_page;
 	trx_ulogf_t*	log_hdr;
-	trx_usegf_t*	seg_hdr;
 	fil_addr_t	prev_log_addr;
 	trx_id_t	trx_no;
 	ibool		del_marks;
@@ -580,7 +577,6 @@ trx_purge_rseg_get_next_history_log(
 		rseg->space, rseg->zip_size, rseg->last_page_no, &mtr);
 
 	log_hdr = undo_page + rseg->last_offset;
-	seg_hdr = undo_page + TRX_UNDO_SEG_HDR;
 
 	/* Increase the purge page count by one for every handled log */
 

=== modified file 'storage/innobase/trx/trx0rec.c'
--- a/storage/innobase/trx/trx0rec.c	2011-06-16 09:26:09 +0000
+++ b/storage/innobase/trx/trx0rec.c	2011-07-07 14:26:36 +0000
@@ -1468,7 +1468,6 @@ trx_undo_prev_version_build(
 	table_id_t	table_id;
 	trx_id_t	trx_id;
 	roll_ptr_t	roll_ptr;
-	roll_ptr_t	old_roll_ptr;
 	upd_t*		update;
 	byte*		ptr;
 	ulint		info_bits;
@@ -1486,7 +1485,6 @@ trx_undo_prev_version_build(
 	ut_a(dict_index_is_clust(index));
 
 	roll_ptr = row_get_rec_roll_ptr(rec, index, offsets);
-	old_roll_ptr = roll_ptr;
 
 	*old_vers = NULL;
 

=== modified file 'storage/perfschema/pfs_instr.cc'
--- a/storage/perfschema/pfs_instr.cc	2011-07-07 19:13:19 +0000
+++ b/storage/perfschema/pfs_instr.cc	2011-07-14 08:11:07 +0000
@@ -1411,12 +1411,10 @@ void aggregate_all_event_names(PFS_singl
   PFS_single_stat *from;
   PFS_single_stat *from_last;
   PFS_single_stat *to;
-  PFS_single_stat *to_last;
 
   from= from_array;
   from_last= from_array + wait_class_max;
   to= to_array;
-  to_last= to_array + wait_class_max;
 
   for ( ; from < from_last ; from++, to++)
   {
@@ -1435,16 +1433,12 @@ void aggregate_all_event_names(PFS_singl
   PFS_single_stat *from;
   PFS_single_stat *from_last;
   PFS_single_stat *to_1;
-  PFS_single_stat *to_1_last;
   PFS_single_stat *to_2;
-  PFS_single_stat *to_2_last;
 
   from= from_array;
   from_last= from_array + wait_class_max;
   to_1= to_array_1;
-  to_1_last= to_array_1 + wait_class_max;
   to_2= to_array_2;
-  to_2_last= to_array_2 + wait_class_max;
 
   for ( ; from < from_last ; from++, to_1++, to_2++)
   {
@@ -1463,12 +1457,10 @@ void aggregate_all_stages(PFS_stage_stat
   PFS_stage_stat *from;
   PFS_stage_stat *from_last;
   PFS_stage_stat *to;
-  PFS_stage_stat *to_last;
 
   from= from_array;
   from_last= from_array + stage_class_max;
   to= to_array;
-  to_last= to_array + stage_class_max;
 
   for ( ; from < from_last ; from++, to++)
   {
@@ -1486,12 +1478,10 @@ void aggregate_all_statements(PFS_statem
   PFS_statement_stat *from;
   PFS_statement_stat *from_last;
   PFS_statement_stat *to;
-  PFS_statement_stat *to_last;
 
   from= from_array;
   from_last= from_array + statement_class_max;
   to= to_array;
-  to_last= to_array + statement_class_max;
 
   for ( ; from < from_last ; from++, to++)
   {

=== modified file 'storage/perfschema/unittest/pfs_instr_class-t.cc'
--- a/storage/perfschema/unittest/pfs_instr_class-t.cc	2011-06-30 15:50:45 +0000
+++ b/storage/perfschema/unittest/pfs_instr_class-t.cc	2011-07-07 14:26:36 +0000
@@ -80,10 +80,10 @@ void test_no_registration()
   file_key= register_file_class("FOO", 3, 0);
   ok(file_key == 0, "no file registered");
 
+#ifdef LATER
   PFS_thread fake_thread;
   fake_thread.m_table_share_hash_pins= NULL;
 
-#ifdef LATER
   table= find_or_create_table_share(& fake_thread, false, "foo_db", 6, "foo_table", 9);
   ok(table == NULL, "not created");
   table= find_or_create_table_share(& fake_thread, false, "bar_db", 6, "bar_table", 9);

=== modified file 'support-files/mysql-log-rotate.sh'
--- a/support-files/mysql-log-rotate.sh	2005-01-18 16:35:32 +0000
+++ b/support-files/mysql-log-rotate.sh	2011-07-08 13:07:03 +0000
@@ -1,13 +1,14 @@
-# This logname can be set in /etc/my.cnf
-# by setting the variable "err-log"
-# in the [safe_mysqld] section as follows:
+# The log file name and location can be set in
+# /etc/my.cnf by setting the "log-error" option
+# in either [mysqld] or [mysqld_safe] section as
+# follows:
 #
-# [safe_mysqld]
-# err-log=@localstatedir@/mysqld.log
+# [mysqld]
+# log-error=@localstatedir@/mysqld.log
 #
-# If the root user has a password you have to create a
-# /root/.my.cnf configuration file with the following
-# content:
+# In case the root user has a password, then you
+# have to create a /root/.my.cnf configuration file
+# with the following content:
 #
 # [mysqladmin]
 # password = <secret> 
@@ -15,14 +16,14 @@
 #
 # where "<secret>" is the password. 
 #
-# ATTENTION: This /root/.my.cnf should be readable ONLY
-# for root !
+# ATTENTION: The /root/.my.cnf file should be readable
+# _ONLY_ by root !
 
 @localstatedir@/mysqld.log {
         # create 600 mysql mysql
         notifempty
-	daily
-        rotate 3
+        daily
+        rotate 5
         missingok
         compress
     postrotate

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl5342 branch (marc.alff:3378 to 3379) Marc Alff17 Jul