List:Commits« Previous MessageNext Message »
From:reggie Date:January 8 2006 8:40pm
Subject:bk commit into 5.1 tree (rburnett:1.2025)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of rburnett. When rburnett does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2025 06/01/08 21:40:40 rburnett@stripped +5 -0
  Merge rburnett@stripped:/home/bk/mysql-5.1-new
  into  bk-internal.mysql.com:/users/rburnett/mysql-5.1-wl2682

  sql/sql_parse.cc
    1.506 06/01/08 21:40:32 rburnett@stripped +0 -0
    Auto merged

  sql/sql_base.cc
    1.293 06/01/08 21:40:32 rburnett@stripped +0 -0
    Auto merged

  sql/opt_range.cc
    1.193 06/01/08 21:40:31 rburnett@stripped +0 -0
    Auto merged

  sql/handler.h
    1.176 06/01/08 21:40:31 rburnett@stripped +0 -0
    Auto merged

  include/my_sys.h
    1.184 06/01/08 21:40:30 rburnett@stripped +0 -0
    Auto merged

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	rburnett
# Host:	bk-internal.mysql.com
# Root:	/users/rburnett/mysql-5.1-wl2682/RESYNC

--- 1.183/include/my_sys.h	2005-12-31 17:45:00 +01:00
+++ 1.184/include/my_sys.h	2006-01-08 21:40:30 +01:00
@@ -755,8 +755,9 @@
 extern void freeze_size(DYNAMIC_ARRAY *array);
 #define dynamic_array_ptr(array,array_index) ((array)->buffer+(array_index)*(array)->size_of_element)
 #define dynamic_element(array,array_index,type) ((type)((array)->buffer) +(array_index))
-#define push_dynamic(A,B) insert_dynamic(A,B)
+#define push_dynamic(A,B) insert_dynamic((A),(B))
 #define reset_dynamic(array) ((array)->elements= 0)
+#define sort_dynamic(A,cmp) qsort((A)->buffer, (A)->elements, (A)->size_of_element, (cmp))
 
 extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str,
 				   uint init_alloc,uint alloc_increment);

--- 1.175/sql/handler.h	2005-12-29 00:32:24 +01:00
+++ 1.176/sql/handler.h	2006-01-08 21:40:31 +01:00
@@ -1544,7 +1544,7 @@
 
 inline bool ha_storage_engine_is_enabled(const handlerton *db_type)
 {
-  return (db_type && db_type->create) ? 
+  return (db_type && db_type->create) ?
          (db_type->state == SHOW_OPTION_YES) : FALSE;
 }
 
@@ -1555,7 +1555,6 @@
 
 TYPELIB *ha_known_exts(void);
 int ha_panic(enum ha_panic_function flag);
-int ha_update_statistics();
 void ha_close_connection(THD* thd);
 bool ha_flush_logs(handlerton *db_type);
 void ha_drop_database(char* path);

--- 1.192/sql/opt_range.cc	2006-01-01 00:28:06 +01:00
+++ 1.193/sql/opt_range.cc	2006-01-08 21:40:31 +01:00
@@ -6959,6 +6959,7 @@
 
 /*
   Create quick select from ref/ref_or_null scan.
+
   SYNOPSIS
     get_quick_select_for_ref()
       thd      Thread handle
@@ -6978,15 +6979,18 @@
 QUICK_RANGE_SELECT *get_quick_select_for_ref(THD *thd, TABLE *table,
                                              TABLE_REF *ref, ha_rows records)
 {
-  MEM_ROOT *old_root= thd->mem_root;
-  /* The following call may change thd->mem_root */
-  QUICK_RANGE_SELECT *quick= new QUICK_RANGE_SELECT(thd, table, ref->key, 0);
-  /* save mem_root set by QUICK_RANGE_SELECT constructor */
-  MEM_ROOT *alloc= thd->mem_root;
+  MEM_ROOT *old_root, *alloc;
+  QUICK_RANGE_SELECT *quick;
   KEY *key_info = &table->key_info[ref->key];
   KEY_PART *key_part;
   QUICK_RANGE *range;
   uint part;
+
+  old_root= thd->mem_root;
+  /* The following call may change thd->mem_root */
+  quick= new QUICK_RANGE_SELECT(thd, table, ref->key, 0);
+  /* save mem_root set by QUICK_RANGE_SELECT constructor */
+  alloc= thd->mem_root;
   /*
     return back default mem_root (thd->mem_root) changed by
     QUICK_RANGE_SELECT constructor

--- 1.505/sql/sql_parse.cc	2005-12-31 18:01:08 +01:00
+++ 1.506/sql/sql_parse.cc	2006-01-08 21:40:32 +01:00
@@ -4856,7 +4856,6 @@
   if (thd->one_shot_set && lex->sql_command != SQLCOM_SET_OPTION)
     reset_one_shot_variables(thd);
 
-
   /*
     The return value for ROW_COUNT() is "implementation dependent" if the
     statement is not DELETE, INSERT or UPDATE, but -1 is what JDBC and ODBC
@@ -4868,13 +4867,10 @@
   if (lex->sql_command != SQLCOM_CALL && lex->sql_command != SQLCOM_EXECUTE &&
       uc_update_queries[lex->sql_command]<2)
     thd->row_count_func= -1;
-  goto cleanup;
+  DBUG_RETURN(res || thd->net.report_error);
 
 error:
-  res= 1;
-
-cleanup:
-  DBUG_RETURN(res || thd->net.report_error);
+  DBUG_RETURN(1);
 }
 
 
@@ -5097,7 +5093,7 @@
     the given table list refers to the list for prelocking (contains tables
     of other queries). For simple queries first_not_own_table is 0.
   */
-  for (; tables && tables != first_not_own_table; tables= tables->next_global)
+  for (; tables != first_not_own_table; tables= tables->next_global)
   {
     if (tables->schema_table && 
         (want_access & ~(SELECT_ACL | EXTRA_ACL | FILE_ACL)))
@@ -6643,18 +6639,15 @@
 static void refresh_status(void)
 {
   pthread_mutex_lock(&LOCK_status);
-  for (struct show_var_st *ptr=status_vars; ptr->name; ptr++)
-  {
-    if (ptr->type == SHOW_LONG)
+  for (SHOW_VAR *ptr= status_vars; ptr->name; ptr++)
+    if (ptr->type == SHOW_LONG) // note that SHOW_LONG_NOFLUSH variables are not reset
       *(ulong*) ptr->value= 0;
-    else if (ptr->type == SHOW_LONG_STATUS)
-    {
-      THD *thd= current_thd;
-      /* We must update the global status before cleaning up the thread */
-      add_to_status(&global_status_var, &thd->status_var);
-      bzero((char*) &thd->status_var, sizeof(thd->status_var));
-    }
-  }
+
+  /* We must update the global status before cleaning up the thread */
+  THD *thd= current_thd;
+  add_to_status(&global_status_var, &thd->status_var);
+  bzero((char*) &thd->status_var, sizeof(thd->status_var));
+
   /* Reset the counters of all key caches (default and named). */
   process_key_caches(reset_key_cache_counters);
   pthread_mutex_unlock(&LOCK_status);
@@ -7265,7 +7258,7 @@
 
   /* Create and initialize. */
 
-  if (! (definer= (LEX_USER*) thd->alloc(sizeof (LEX_USER))))
+  if (! (definer= (LEX_USER*) thd->alloc(sizeof(LEX_USER))))
     return 0;
 
   definer->user= *user_name;
Thread
bk commit into 5.1 tree (rburnett:1.2025)reggie8 Jan