List:Commits« Previous MessageNext Message »
From:monty Date:January 8 2006 5:07pm
Subject:bk commit into 4.1 tree (monty:1.2472)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of monty. When monty 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.2472 06/01/08 19:07:49 monty@stripped +5 -0
  Merge mysql.com:/home/my/mysql-4.0
  into  mysql.com:/home/my/mysql-4.1

  sql/sql_handler.cc
    1.64 06/01/08 19:07:47 monty@stripped +0 -8
    manual merge

  sql/item_cmpfunc.cc
    1.204 06/01/08 19:07:47 monty@stripped +0 -1
    merge (keep old code)

  sql/sql_select.cc
    1.445 06/01/08 19:01:20 monty@stripped +0 -0
    Auto merged

  myisam/myisam_ftdump.c
    1.37 06/01/08 19:01:20 monty@stripped +0 -1
    Auto merged

  client/mysqlimport.c
    1.54 06/01/08 19:01:20 monty@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:	monty
# Host:	narttu.mysql.fi
# Root:	/home/my/mysql-4.1/RESYNC

--- 1.444/sql/sql_select.cc	2005-11-15 17:07:02 +02:00
+++ 1.445/sql/sql_select.cc	2006-01-08 19:01:20 +02:00
@@ -5292,7 +5292,14 @@
       *(reg_field++) =new_field;
     }
     if (!--hidden_field_count)
+    {
       hidden_null_count=null_count;
+      /*
+        We need to update hidden_field_count as we may have stored group
+        functions with constant arguments
+      */
+      param->hidden_field_count= (uint) (reg_field - table->field);
+    }
   }
   DBUG_ASSERT(field_count >= (uint) (reg_field - table->field));
   field_count= (uint) (reg_field - table->field);
@@ -5488,7 +5495,7 @@
     }
   }
 
-  if (distinct)
+  if (distinct && field_count != param->hidden_field_count)
   {
     /*
       Create an unique key or an unique constraint over all columns

--- 1.63/sql/sql_handler.cc	2005-11-15 19:09:36 +02:00
+++ 1.64/sql/sql_handler.cc	2006-01-08 19:07:47 +02:00
@@ -384,27 +384,6 @@
     DBUG_PRINT("info-in-hash",("'%s'.'%s' as '%s' tab %p",
                                hash_tables->db, hash_tables->real_name,
                                hash_tables->alias, table));
-    /* Table might have been flushed. */
-    if (table && (table->version != refresh_version))
-    {
-      /*
-        We must follow the thd->handler_tables chain, as we need the
-        address of the 'next' pointer referencing this table
-        for close_thread_table().
-      */
-      for (table_ptr= &(thd->handler_tables);
-           *table_ptr && (*table_ptr != table);
-           table_ptr= &(*table_ptr)->next)
-      {}
-      VOID(pthread_mutex_lock(&LOCK_open));
-      if (close_thread_table(thd, table_ptr))
-      {
-        /* Tell threads waiting for refresh that something has happened */
-        VOID(pthread_cond_broadcast(&COND_refresh));
-      }
-      VOID(pthread_mutex_unlock(&LOCK_open));
-      table= hash_tables->table= NULL;
-    }
     if (!table)
     {
       /*
@@ -451,6 +430,13 @@
   }
   tables->table=table;
 
+  HANDLER_TABLES_HACK(thd);
+  lock= mysql_lock_tables(thd, &tables->table, 1, 0);
+  HANDLER_TABLES_HACK(thd);
+
+  if (!lock)
+    goto err0; // mysql_lock_tables() printed error message already
+
   if (cond && ((!cond->fixed &&
               cond->fix_fields(thd, tables, &cond)) || cond->check_cols(1)))
     goto err0;
@@ -467,16 +453,6 @@
 
   if (insert_fields(thd,tables,tables->db,tables->alias,&it))
     goto err0;
-
-  select_limit+=offset_limit;
-  protocol->send_fields(&list,1);
-
-  HANDLER_TABLES_HACK(thd);
-  lock= mysql_lock_tables(thd, &tables->table, 1, 0);
-  HANDLER_TABLES_HACK(thd);
-
-  if (!lock)
-     goto err0; // mysql_lock_tables() printed error message already
 
   /*
     In ::external_lock InnoDB resets the fields which tell it that
Thread
bk commit into 4.1 tree (monty:1.2472)monty8 Jan