List:Maria Storage Engine« Previous MessageNext Message »
From:jani Date:April 29 2008 6:26am
Subject:bk commit into maria tree (jani:1.2642)
View as plain text  
Below is the list of changes that have just been committed into a local
maria repository of jani.  When jani 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, 2008-04-29 09:26:37+03:00, jani@stripped +5 -0
  After merge fixes.

  BitKeeper/deleted/.del-my_bit.h@stripped, 2008-04-28 16:43:56+03:00, monty@stripped +0 -0
    Delete: include/my_bit.h

  include/my_sys.h@stripped, 2008-04-29 09:26:30+03:00, jani@stripped +1 -1
    After merge fixes.

  mysys/my_handler_errors.h@stripped, 2008-04-29 09:26:30+03:00, jani@stripped +5 -5
    After merge fixes.

  sql/handler.cc@stripped, 2008-04-29 09:26:30+03:00, jani@stripped +1 -1
    After merge fixes.

  storage/myisam/mi_check.c@stripped, 2008-04-29 09:26:30+03:00, jani@stripped +0 -6
    After merge fixes.

diff -Nrup a/include/my_bit.h b/include/my_bit.h
--- a/include/my_bit.h	2008-01-10 14:19:47 +02:00
+++ /dev/null	Wed Dec 31 16:00:00 196900
@@ -1,109 +0,0 @@
-/*
-  Some useful bit functions
-*/
-
-C_MODE_START
-#ifdef HAVE_INLINE
-
-extern const char _my_bits_nbits[256];
-extern const uchar _my_bits_reverse_table[256];
-
-/*
-  Find smallest X in 2^X >= value
-  This can be used to divide a number with value by doing a shift instead
-*/
-
-STATIC_INLINE uint my_bit_log2(ulong value)
-{
-  uint bit;
-  for (bit=0 ; value > 1 ; value>>=1, bit++) ;
-  return bit;
-}
-
-STATIC_INLINE uint my_count_bits(ulonglong v)
-{
-#if SIZEOF_LONG_LONG > 4
-  /* The following code is a bit faster on 16 bit machines than if we would
-     only shift v */
-  ulong v2=(ulong) (v >> 32);
-  return (uint) (uchar) (_my_bits_nbits[(uchar)  v] +
-                         _my_bits_nbits[(uchar) (v >> 8)] +
-                         _my_bits_nbits[(uchar) (v >> 16)] +
-                         _my_bits_nbits[(uchar) (v >> 24)] +
-                         _my_bits_nbits[(uchar) (v2)] +
-                         _my_bits_nbits[(uchar) (v2 >> 8)] +
-                         _my_bits_nbits[(uchar) (v2 >> 16)] +
-                         _my_bits_nbits[(uchar) (v2 >> 24)]);
-#else
-  return (uint) (uchar) (_my_bits_nbits[(uchar)  v] +
-                         _my_bits_nbits[(uchar) (v >> 8)] +
-                         _my_bits_nbits[(uchar) (v >> 16)] +
-                         _my_bits_nbits[(uchar) (v >> 24)]);
-#endif
-}
-
-STATIC_INLINE uint my_count_bits_ushort(ushort v)
-{
-  return _my_bits_nbits[v];
-}
-
-
-/*
-  Next highest power of two
-
-  SYNOPSIS
-    my_round_up_to_next_power()
-    v		Value to check
-
-  RETURN
-    Next or equal power of 2
-    Note: 0 will return 0
-
-  NOTES
-    Algorithm by Sean Anderson, according to:
-    http://graphics.stanford.edu/~seander/bithacks.html
-    (Orignal code public domain)
-
-    Comments shows how this works with 01100000000000000000000000001011
-*/
-
-STATIC_INLINE uint32 my_round_up_to_next_power(uint32 v)
-{
-  v--;			/* 01100000000000000000000000001010 */
-  v|= v >> 1;		/* 01110000000000000000000000001111 */
-  v|= v >> 2;		/* 01111100000000000000000000001111 */
-  v|= v >> 4;		/* 01111111110000000000000000001111 */
-  v|= v >> 8;		/* 01111111111111111100000000001111 */
-  v|= v >> 16;		/* 01111111111111111111111111111111 */
-  return v+1;		/* 10000000000000000000000000000000 */
-}
-
-STATIC_INLINE uint32 my_clear_highest_bit(uint32 v)
-{
-  uint32 w=v >> 1;
-  w|= w >> 1;
-  w|= w >> 2;
-  w|= w >> 4;
-  w|= w >> 8;
-  w|= w >> 16;
-  return v & w;
-}
-
-STATIC_INLINE uint32 my_reverse_bits(uint32 key)
-{
-  return
-    (_my_bits_reverse_table[ key      & 255] << 24) |
-    (_my_bits_reverse_table[(key>> 8) & 255] << 16) |
-    (_my_bits_reverse_table[(key>>16) & 255] <<  8) |
-     _my_bits_reverse_table[(key>>24)      ];
-}
-
-#else
-extern uint my_bit_log2(ulong value);
-extern uint32 my_round_up_to_next_power(uint32 v);
-uint32 my_clear_highest_bit(uint32 v);
-uint32 my_reverse_bits(uint32 key);
-extern uint my_count_bits(ulonglong v);
-extern uint my_count_bits_ushort(ushort v);
-#endif
-C_MODE_END
diff -Nrup a/include/my_sys.h b/include/my_sys.h
--- a/include/my_sys.h	2008-04-28 19:24:00 +03:00
+++ b/include/my_sys.h	2008-04-29 09:26:30 +03:00
@@ -290,7 +290,7 @@ enum flush_type
     As my_disable_flush_pagecache_blocks is always 0, the following option
     is strictly equivalent to FLUSH_KEEP
   */
-  FLUSH_FORCE_WRITE
+  FLUSH_FORCE_WRITE,
   /**
      @brief like FLUSH_KEEP but return immediately if file is already being
      flushed (even partially) by another thread; only for page cache,
diff -Nrup a/mysys/my_handler_errors.h b/mysys/my_handler_errors.h
--- a/mysys/my_handler_errors.h	2008-03-28 18:45:02 +02:00
+++ b/mysys/my_handler_errors.h	2008-04-29 09:26:30 +03:00
@@ -32,7 +32,7 @@ static const char *handler_error_message
   "Table is crashed and last repair failed",
   "Table was marked as crashed and should be repaired",
   "Lock timed out; Retry transaction",
-  "Lock table is full;  Restart program with a larger locktable",
+  "Lock table is full;  Restart program with a larger lock table",
   "Updates are not allowed under a read only transactions",
   "Lock deadlock; Retry transaction",
   "Foreign key constraint is incorrectly formed",
@@ -46,7 +46,7 @@ static const char *handler_error_message
   "Unexpected null pointer found when using spatial index",
   "The table changed in storage engine",
   "There's no partition in table for the given value",
-  "Row-based binlogging of row failed",
+  "Row-based binary logging of row failed",
   "Index needed in foreign key constraint",
   "Upholding foreign key constraints would lead to a duplicate key error in "
   "some other table",
@@ -59,9 +59,9 @@ static const char *handler_error_message
   "It is not possible to log this statement",
   "The event was corrupt, leading to illegal data being read",
   "The table is of a new format not supported by this version",
-  "The event could not be processed no other hanlder error happened",
-  "Got a fatal error during initialzaction of handler",
-  "File to short; Expected more data in file",
+  "The event could not be processed no other handler error happened",
+  "Got a fatal error during initialization of handler",
+  "File too short; Expected more data in file",
   "Read page with wrong checksum"
 };
 
diff -Nrup a/sql/handler.cc b/sql/handler.cc
--- a/sql/handler.cc	2008-04-28 19:24:00 +03:00
+++ b/sql/handler.cc	2008-04-29 09:26:30 +03:00
@@ -937,7 +937,7 @@ int ha_prepare(THD *thd)
       {
         push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
                             ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA),
-                            hton_name(*ht)->str);
+                            ha_resolve_storage_engine_name(ht));
       }
     }
   }
diff -Nrup a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c
--- a/storage/myisam/mi_check.c	2008-04-28 16:46:41 +03:00
+++ b/storage/myisam/mi_check.c	2008-04-29 09:26:30 +03:00
@@ -1211,8 +1211,6 @@ int chk_data_link(HA_CHECK *param, MI_IN
       param->glob_crc+= (*info->s->calc_check_checksum)(info,record);
       link_used+= (block_info.filepos - start_recpos);
       used+= (pos-start_recpos);
-    case BLOCK_RECORD:
-      assert(0);                                /* Impossible */
     } /* switch */
     if (! got_error)
     {
@@ -3646,8 +3644,6 @@ static int sort_get_next_record(MI_SORT_
                                                            record));
       DBUG_RETURN(0);
     }
-  case BLOCK_RECORD:
-    assert(0);                                  /* Impossible */
   }
   DBUG_RETURN(1);                               /* Impossible */
 }
@@ -3760,8 +3756,6 @@ int sort_write_record(MI_SORT_PARAM *sor
       sort_param->filepos+=reclength+length;
       info->s->state.split++;
       break;
-    case BLOCK_RECORD:
-      assert(0);                                  /* Impossible */
     }
   }
   if (sort_param->master)
Thread
bk commit into maria tree (jani:1.2642)jani29 Apr