List:Internals« Previous MessageNext Message »
From:sasha Date:December 14 2001 12:21am
Subject:bk commit into 3.23 tree
View as plain text  
Below is the list of changes that have just been commited into a local
3.23. repository of sasha. When sasha does a push, they will be
propogaged to the main repository and within 24 hours after the push into
the public repository. For information on how to access
the public repository see
http://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet@stripped, 2001-12-13 17:21:04-07:00, sasha@stripped
  misc cleanup 

  include/my_bitmap.h
    1.5 01/12/13 17:21:04 sasha@stripped +3 -2
    fixed comment format

  mysql-test/r/rpl_get_lock.result
    1.3 01/12/13 17:21:04 sasha@stripped +3 -1
    make the test results predicable

  mysql-test/t/rpl_get_lock.test
    1.3 01/12/13 17:21:04 sasha@stripped +1 -0
    predicatable test results

  mysys/my_bitmap.c
    1.8 01/12/13 17:21:04 sasha@stripped +4 -3
    do not init/destroy mutex if bitmap is not declared thread safe

  sql/slave.cc
    1.120 01/12/13 17:21:04 sasha@stripped +10 -25
    clean-up suggested by Monty to make init_slave_skip_errors() more compact

  Docs/manual.texi
    1.749 01/12/13 17:21:03 sasha@stripped +2 -0
    fixed bad merge

# 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:	sasha
# Host:	mysql.sashanet.com
# Root:	/reiser-data/mysql

--- 1.748/Docs/manual.texi	Thu Dec 13 13:17:18 2001
+++ 1.749/Docs/manual.texi	Thu Dec 13 17:21:03 2001
@@ -46872,6 +46872,8 @@
 Added statistics variables for all MySQL commands. (@code{SHOW STATUS} is
 now much longer).
 @item
+Fixed default values for InnoDB tables.
+@item
 Fixed that @code{GROUP BY expr DESC} works.
 @item
 Fixed bug when using @code{t1 LEFT JOIN t2 ON t2.key=constant}.

--- 1.119/sql/slave.cc	Wed Dec 12 18:55:33 2001
+++ 1.120/sql/slave.cc	Thu Dec 13 17:21:04 2001
@@ -78,8 +78,7 @@
 /* called from get_options() in mysqld.cc on start-up */
 void init_slave_skip_errors(char* arg)
 {
-  char* p,*end;
-  int err_code = 0;
+  char* p;
   my_bool last_was_digit = 0;
   if (bitmap_init(&slave_error_mask,MAX_SLAVE_ERROR,0))
   {
@@ -89,34 +88,20 @@
   use_slave_mask = 1;
   for (;isspace(*arg);++arg)
     /* empty */;
-  /* force first three chars to lower case */
-  for (p = arg, end = arg + 3; *p && p < end; ++p)
-    *p = tolower(*p);
-  if (!memcmp(arg,"all",3))
+  if (!my_casecmp(arg,"all",3))
   {
     bitmap_set_all(&slave_error_mask);
     return;
   }
-  for (p = arg, end = strend(arg); p < end; ++p)
+  for (p= arg ; *p; )
   {
-    int digit = *p - '0';
-    if (digit >= 0 && digit < 10) /* found real digit */
-    {
-      err_code = err_code * 10 + digit;
-      last_was_digit = 1;
-    }
-    else /* delimiter */
-    {
-      if (last_was_digit)
-      {
-	if (err_code < MAX_SLAVE_ERROR)
-	{
-	  bitmap_set_bit(&slave_error_mask,err_code);
-	}
-	err_code = 0;
-	last_was_digit = 0;
-      }
-    }
+    long err_code;
+    if (!(p= str2int(p, 10, 0, LONG_MAX, &err_code)))
+      break;
+    if (err_code < MAX_SLAVE_ERROR)
+       bitmap_set_bit(&slave_error_mask,(uint)err_code);
+    while (!isdigit(*p) && *p)
+      p++;
   }
 }
 

--- 1.4/include/my_bitmap.h	Wed Dec 12 18:55:32 2001
+++ 1.5/include/my_bitmap.h	Thu Dec 13 17:21:04 2001
@@ -27,10 +27,11 @@
   uchar *bitmap;
   uint bitmap_size;
   my_bool thread_safe; /* set if several threads access the bitmap */
-  /* mutex will be acquired for the duration of each bitmap operation if
+  /*
+     mutex will be acquired for the duration of each bitmap operation if
      thread_safe flag is set. Otherwise, we optimize by not acquiring the
      mutex
-  */
+   */
 #ifdef THREAD
   pthread_mutex_t mutex;
 #endif

--- 1.7/mysys/my_bitmap.c	Wed Dec 12 18:55:32 2001
+++ 1.8/mysys/my_bitmap.c	Thu Dec 13 17:21:04 2001
@@ -51,8 +51,8 @@
     return 1;
   dbug_assert(bitmap_size != ~(uint) 0);
 #ifdef THREAD
-  map->thread_safe = thread_safe;
-  pthread_mutex_init(&map->mutex, MY_MUTEX_INIT_FAST);
+  if ((map->thread_safe = thread_safe))
+    pthread_mutex_init(&map->mutex, MY_MUTEX_INIT_FAST);
 #endif
   map->bitmap_size=bitmap_size;
   return 0;
@@ -65,7 +65,8 @@
     my_free((char*) map->bitmap, MYF(0));
     map->bitmap=0;
 #ifdef THREAD
-    pthread_mutex_destroy(&map->mutex);
+    if (map->thread_safe)
+      pthread_mutex_destroy(&map->mutex);
 #endif
   }
 }

--- 1.2/mysql-test/r/rpl_get_lock.result	Wed Dec 12 18:55:32 2001
+++ 1.3/mysql-test/r/rpl_get_lock.result	Thu Dec 13 17:21:04 2001
@@ -1,5 +1,7 @@
+get_lock("lock",2)
+1
 release_lock("lock")
-0
+1
 get_lock("lock",3)
 1
 n

--- 1.2/mysql-test/t/rpl_get_lock.test	Wed Dec 12 18:55:32 2001
+++ 1.3/mysql-test/t/rpl_get_lock.test	Thu Dec 13 17:21:04 2001
@@ -4,6 +4,7 @@
 insert into t1 values(get_lock("lock",2));
 dirty_close master;
 connection master1;
+select get_lock("lock",2);
 select release_lock("lock");
 save_master_pos;
 connection slave;
Thread
bk commit into 3.23 treesasha14 Dec