List:Commits« Previous MessageNext Message »
From:kroki Date:January 9 2007 9:39am
Subject:bk commit into 4.1 tree (kroki:1.2551)
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of tomash. When tomash 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@stripped, 2007-01-09 12:39:05+03:00, kroki@stripped +3 -0
  Merge moonlight.home:/home/tomash/src/mysql_ab/mysql-4.0-bug23443
  into  moonlight.home:/home/tomash/src/mysql_ab/mysql-4.1-bug23443
  MERGE: 1.1346.884.5

  heap/hp_block.c@stripped, 2007-01-09 12:35:18+03:00, kroki@stripped +0 -0
    Auto merged
    MERGE: 1.4.1.1

  heap/hp_write.c@stripped, 2007-01-09 12:39:04+03:00, kroki@stripped +7 -13
    Manual merge.
    MERGE: 1.9.1.2

  sql/item_func.cc@stripped, 2007-01-09 12:35:18+03:00, kroki@stripped +0 -0
    Auto merged
    MERGE: 1.60.1.54

# 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:	kroki
# Host:	moonlight.home
# Root:	/home/tomash/src/mysql_ab/mysql-4.1-bug23443/RESYNC

--- 1.6/heap/hp_block.c	2007-01-09 12:39:11 +03:00
+++ 1.7/heap/hp_block.c	2007-01-09 12:39:11 +03:00
@@ -76,7 +76,7 @@ int hp_get_new_block(HP_BLOCK *block, ul
     and my_default_record_cache_size we get about 1/128 unused memory.
    */
   *alloc_length=sizeof(HP_PTRS)*i+block->records_in_block* block->recbuffer;
-  if (!(root=(HP_PTRS*) my_malloc(*alloc_length,MYF(0))))
+  if (!(root=(HP_PTRS*) my_malloc(*alloc_length,MYF(MY_WME))))
     return 1;
 
   if (i == 0)

--- 1.20/heap/hp_write.c	2007-01-09 12:39:11 +03:00
+++ 1.21/heap/hp_write.c	2007-01-09 12:39:11 +03:00
@@ -68,11 +68,17 @@ int heap_write(HP_INFO *info, const byte
   DBUG_RETURN(0);
 
 err:
-  DBUG_PRINT("info",("Duplicate key: %d", keydef - share->keydef));
+  if (my_errno == HA_ERR_FOUND_DUPP_KEY)
+    DBUG_PRINT("info",("Duplicate key: %d", keydef - share->keydef));
   info->errkey= keydef - share->keydef;
-  if (keydef->algorithm == HA_KEY_ALG_BTREE)
+  /*
+    We don't need to delete non-inserted key from rb-tree.  Also, if
+    we got ENOMEM, the key wasn't inserted, so don't try to delete it
+    either.  Otherwise for HASH index on HA_ERR_FOUND_DUPP_KEY the key
+    was inserted and we have to delete it.
+  */
+  if (keydef->algorithm == HA_KEY_ALG_BTREE || my_errno == ENOMEM)
   {
-    /* we don't need to delete non-inserted key from rb-tree */
     keydef--;
   }
   while (keydef >= share->keydef)

--- 1.267/sql/item_func.cc	2007-01-09 12:39:11 +03:00
+++ 1.268/sql/item_func.cc	2007-01-09 12:39:11 +03:00
@@ -2468,8 +2468,9 @@ bool Item_func_set_user_var::update_hash
 	char *pos= (char*) entry+ ALIGN_SIZE(sizeof(user_var_entry));
 	if (entry->value == pos)
 	  entry->value=0;
-	if (!(entry->value=(char*) my_realloc(entry->value, length,
-					      MYF(MY_ALLOW_ZERO_PTR))))
+        entry->value= (char*) my_realloc(entry->value, length,
+                                         MYF(MY_ALLOW_ZERO_PTR | MY_WME));
+        if (!entry->value)
 	  goto err;
       }
     }
Thread
bk commit into 4.1 tree (kroki:1.2551)kroki9 Jan