List:Commits« Previous MessageNext Message »
From:Sergey Vojtovich Date:May 18 2006 3:49pm
Subject:bk commit into 5.1 tree (svoj:1.2391)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of svoj. When svoj 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.2391 06/05/18 18:49:52 svoj@april.(none) +2 -0
  Merge april.(none):/home/svoj/devel/mysql/BUG18233/mysql-5.0
  into  april.(none):/home/svoj/devel/mysql/BUG18233/mysql-5.1

  storage/heap/hp_create.c
    1.25 06/05/18 18:49:47 svoj@april.(none) +0 -0
    Auto merged

  storage/heap/hp_create.c
    1.20.3.2 06/05/18 18:49:47 svoj@april.(none) +0 -0
    Merge rename: heap/hp_create.c -> storage/heap/hp_create.c

  mysql-test/r/heap.result
    1.50 06/05/18 18:49:47 svoj@april.(none) +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:	svoj
# Host:	april.(none)
# Root:	/home/svoj/devel/mysql/BUG18233/mysql-5.1/RESYNC

--- 1.20.3.1/heap/hp_create.c	2006-05-10 21:50:00 +05:00
+++ 1.25/storage/heap/hp_create.c	2006-05-18 18:49:47 +05:00
@@ -237,6 +237,16 @@
        HP_PTRS_IN_NOD * block->level_info[i - 1].records_under_level);
 }
 
+
+static inline void heap_try_free(HP_SHARE *share)
+{
+  if (share->open_count == 0)
+    hp_free(share);
+  else
+    share->delete_on_close= 1;
+}
+
+
 int heap_delete_table(const char *name)
 {
   int result;
@@ -246,10 +256,7 @@
   pthread_mutex_lock(&THR_LOCK_heap);
   if ((share= hp_find_named_heap(name)))
   {
-    if (share->open_count == 0)
-      hp_free(share);
-    else
-     share->delete_on_close= 1;
+    heap_try_free(share);
     result= 0;
   }
   else
@@ -259,6 +266,17 @@
   pthread_mutex_unlock(&THR_LOCK_heap);
   DBUG_RETURN(result);
 }
+
+
+void heap_drop_table(HP_INFO *info)
+{
+  DBUG_ENTER("heap_drop_table");
+  pthread_mutex_lock(&THR_LOCK_heap);
+  heap_try_free(info->s);
+  pthread_mutex_unlock(&THR_LOCK_heap);
+  DBUG_VOID_RETURN;
+}
+
 
 void hp_free(HP_SHARE *share)
 {

--- 1.49/mysql-test/r/heap.result	2006-05-09 20:13:31 +05:00
+++ 1.50/mysql-test/r/heap.result	2006-05-18 18:49:47 +05:00
@@ -718,3 +718,16 @@
 t1	MEMORY	10	Fixed	0	11	0	#	0	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL		
 t2	MEMORY	10	Fixed	0	12	0	#	0	0	NULL	NULL	NULL	NULL	latin1_swedish_ci	NULL		
 drop table t1, t2;
+CREATE TABLE t1(a VARCHAR(1), b VARCHAR(2), c VARCHAR(256),
+KEY(a), KEY(b), KEY(c)) ENGINE=MEMORY;
+INSERT INTO t1 VALUES('a','aa',REPEAT('a', 256)),('a','aa',REPEAT('a',256));
+SELECT COUNT(*) FROM t1 WHERE a='a';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE b='aa';
+COUNT(*)
+2
+SELECT COUNT(*) FROM t1 WHERE c=REPEAT('a',256);
+COUNT(*)
+2
+DROP TABLE t1;
Thread
bk commit into 5.1 tree (svoj:1.2391)Sergey Vojtovich18 May