List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:July 20 2010 2:23am
Subject:bzr commit into mysql-trunk-bugfixing branch (davi:3131) WL#5498
View as plain text  
# At a local mysql-trunk-bugfixing repository of davi

 3131 Davi Arnaut	2010-07-19
      WL#5498: Remove dead and unused source code
      
      Remove code that has been disabled for a long time.

    modified:
      include/my_bitmap.h
      mysys/checksum.c
      mysys/my_bitmap.c
      mysys/rijndael.c
      mysys/test_charset.c
      mysys/thr_alarm.c
      regex/regcomp.c
      regex/regcomp.ih
      sql/field.cc
      sql/ha_partition.cc
      sql/ha_partition.h
      sql/handler.cc
      sql/nt_servc.cc
      sql/sql_class.cc
      sql/sql_plugin.cc
      sql/sql_show.cc
      strings/ctype-simple.c
      strings/ctype-ucs2.c
      tests/mysql_client_test.c
=== modified file 'include/my_bitmap.h'
--- a/include/my_bitmap.h	2010-07-02 19:38:04 +0000
+++ b/include/my_bitmap.h	2010-07-20 02:23:50 +0000
@@ -69,28 +69,6 @@ extern void bitmap_copy(MY_BITMAP *map,
 
 extern uint bitmap_lock_set_next(MY_BITMAP *map);
 extern void bitmap_lock_clear_bit(MY_BITMAP *map, uint bitmap_bit);
-#ifdef NOT_USED
-extern uint bitmap_lock_bits_set(const MY_BITMAP *map);
-extern my_bool bitmap_lock_is_set_all(const MY_BITMAP *map);
-extern uint bitmap_lock_get_first(const MY_BITMAP *map);
-extern uint bitmap_lock_get_first_set(const MY_BITMAP *map);
-extern my_bool bitmap_lock_is_subset(const MY_BITMAP *map1,
-                                     const MY_BITMAP *map2);
-extern my_bool bitmap_lock_is_prefix(const MY_BITMAP *map, uint prefix_size);
-extern my_bool bitmap_lock_is_set(const MY_BITMAP *map, uint bitmap_bit);
-extern my_bool bitmap_lock_is_clear_all(const MY_BITMAP *map);
-extern my_bool bitmap_lock_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2);
-extern void bitmap_lock_set_all(MY_BITMAP *map);
-extern void bitmap_lock_clear_all(MY_BITMAP *map);
-extern void bitmap_lock_set_bit(MY_BITMAP *map, uint bitmap_bit);
-extern void bitmap_lock_flip_bit(MY_BITMAP *map, uint bitmap_bit);
-extern void bitmap_lock_set_prefix(MY_BITMAP *map, uint prefix_size);
-extern void bitmap_lock_intersect(MY_BITMAP *map, const MY_BITMAP *map2);
-extern void bitmap_lock_subtract(MY_BITMAP *map, const MY_BITMAP *map2);
-extern void bitmap_lock_union(MY_BITMAP *map, const MY_BITMAP *map2);
-extern void bitmap_lock_xor(MY_BITMAP *map, const MY_BITMAP *map2);
-extern void bitmap_lock_invert(MY_BITMAP *map);
-#endif
 /* Fast, not thread safe, bitmap functions */
 #define bitmap_buffer_size(bits) (((bits)+31)/32)*4
 #define no_bytes_in_map(map) (((map)->n_bits + 7)/8)

=== modified file 'mysys/checksum.c'
--- a/mysys/checksum.c	2009-02-13 16:41:47 +0000
+++ b/mysys/checksum.c	2010-07-20 02:23:50 +0000
@@ -30,13 +30,6 @@
 
 ha_checksum my_checksum(ha_checksum crc, const uchar *pos, size_t length)
 {
-#ifdef NOT_USED
-  const uchar *end=pos+length;
-  for ( ; pos != end ; pos++)
-    crc=((crc << 8) + *((uchar*) pos)) + (crc >> (8*sizeof(ha_checksum)-8));
-  return crc;
-#else
   return (ha_checksum)crc32((uint)crc, pos, (uint)length);
-#endif
 }
 

=== modified file 'mysys/my_bitmap.c'
--- a/mysys/my_bitmap.c	2010-07-15 13:47:50 +0000
+++ b/mysys/my_bitmap.c	2010-07-20 02:23:50 +0000
@@ -566,192 +566,6 @@ void bitmap_lock_clear_bit(MY_BITMAP *ma
   bitmap_unlock(map);
 }
 
-
-#ifdef NOT_USED
-my_bool bitmap_lock_is_prefix(const MY_BITMAP *map, uint prefix_size)
-{
-  my_bool res;
-  bitmap_lock((MY_BITMAP *)map);
-  res= bitmap_is_prefix(map, prefix_size);
-  bitmap_unlock((MY_BITMAP *)map);
-  return res;
-}
-
-
-void bitmap_lock_set_all(MY_BITMAP *map)
-{
-  bitmap_lock(map);
-  bitmap_set_all(map);
-  bitmap_unlock(map);
-}
-
-
-void bitmap_lock_clear_all(MY_BITMAP *map)
-{
-  bitmap_lock(map);
-  bitmap_clear_all(map);
-  bitmap_unlock(map);
-}
-
-
-void bitmap_lock_set_prefix(MY_BITMAP *map, uint prefix_size)
-{
-  bitmap_lock(map);
-  bitmap_set_prefix(map, prefix_size);
-  bitmap_unlock(map);
-}
-
-
-my_bool bitmap_lock_is_clear_all(const MY_BITMAP *map)
-{
-  uint res;
-  bitmap_lock((MY_BITMAP *)map);
-  res= bitmap_is_clear_all(map);
-  bitmap_unlock((MY_BITMAP *)map);
-  return res;
-}
-
-
-my_bool bitmap_lock_is_set_all(const MY_BITMAP *map)
-{
-  uint res;
-  bitmap_lock((MY_BITMAP *)map);
-  res= bitmap_is_set_all(map);
-  bitmap_unlock((MY_BITMAP *)map);
-  return res;
-}
-
-
-my_bool bitmap_lock_is_set(const MY_BITMAP *map, uint bitmap_bit)
-{
-  my_bool res;
-  DBUG_ASSERT(map->bitmap && bitmap_bit < map->n_bits);
-  bitmap_lock((MY_BITMAP *)map);
-  res= bitmap_is_set(map, bitmap_bit);
-  bitmap_unlock((MY_BITMAP *)map);
-  return res;
-}
-
-
-my_bool bitmap_lock_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2)
-{
-  uint res;
-  bitmap_lock((MY_BITMAP *)map1);
-  bitmap_lock((MY_BITMAP *)map2);
-  res= bitmap_is_subset(map1, map2);
-  bitmap_unlock((MY_BITMAP *)map2);
-  bitmap_unlock((MY_BITMAP *)map1);
-  return res;
-}
-
-
-my_bool bitmap_lock_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2)
-{
-  uint res;
-
-  DBUG_ASSERT(map1->bitmap && map2->bitmap &&
-              map1->n_bits==map2->n_bits);
-  bitmap_lock((MY_BITMAP *)map1);
-  bitmap_lock((MY_BITMAP *)map2);
-  res= bitmap_cmp(map1, map2);
-  bitmap_unlock((MY_BITMAP *)map2);
-  bitmap_unlock((MY_BITMAP *)map1);
-  return res;
-}
-
-
-void bitmap_lock_intersect(MY_BITMAP *map, const MY_BITMAP *map2)
-{
-  bitmap_lock(map);
-  bitmap_lock((MY_BITMAP *)map2);
-  bitmap_intersect(map, map2);
-  bitmap_unlock((MY_BITMAP *)map2);
-  bitmap_unlock(map);
-}
-
-
-void bitmap_lock_subtract(MY_BITMAP *map, const MY_BITMAP *map2)
-{
-  bitmap_lock(map);
-  bitmap_lock((MY_BITMAP *)map2);
-  bitmap_subtract(map, map2);
-  bitmap_unlock((MY_BITMAP *)map2);
-  bitmap_unlock(map);
-}
-
-
-void bitmap_lock_union(MY_BITMAP *map, const MY_BITMAP *map2)
-{
-  bitmap_lock(map);
-  bitmap_lock((MY_BITMAP *)map2);
-  bitmap_union(map, map2);
-  bitmap_unlock((MY_BITMAP *)map2);
-  bitmap_unlock(map);
-}
-
-
-/*
-  SYNOPSIS
-    bitmap_bits_set()
-      map
-  RETURN
-    Number of set bits in the bitmap.
-*/
-uint bitmap_lock_bits_set(const MY_BITMAP *map)
-{
-  uint res;
-  bitmap_lock((MY_BITMAP *)map);
-  DBUG_ASSERT(map->bitmap);
-  res= bitmap_bits_set(map);
-  bitmap_unlock((MY_BITMAP *)map);
-  return res;
-}
-
-
-/* 
-  SYNOPSIS
-    bitmap_get_first()
-      map
-  RETURN 
-    Number of first unset bit in the bitmap or MY_BIT_NONE if all bits are set.
-*/
-uint bitmap_lock_get_first(const MY_BITMAP *map)
-{
-  uint res;
-  bitmap_lock((MY_BITMAP*)map);
-  res= bitmap_get_first(map);
-  bitmap_unlock((MY_BITMAP*)map);
-  return res;
-}
-
-
-uint bitmap_lock_get_first_set(const MY_BITMAP *map)
-{
-  uint res;
-  bitmap_lock((MY_BITMAP*)map);
-  res= bitmap_get_first_set(map);
-  bitmap_unlock((MY_BITMAP*)map);
-  return res;
-}
-
-
-void bitmap_lock_set_bit(MY_BITMAP *map, uint bitmap_bit)
-{
-  DBUG_ASSERT(map->bitmap && bitmap_bit < map->n_bits);
-  bitmap_lock(map);
-  bitmap_set_bit(map, bitmap_bit);
-  bitmap_unlock(map);
-}
-
-
-void bitmap_lock_flip_bit(MY_BITMAP *map, uint bitmap_bit)
-{
-  DBUG_ASSERT(map->bitmap && bitmap_bit < map->n_bits);
-  bitmap_lock(map);
-  bitmap_flip_bit(map, bitmap_bit);
-  bitmap_unlock(map);
-}
-#endif
 #ifdef MAIN
 
 uint get_rand_bit(uint bitsize)

=== modified file 'mysys/rijndael.c'
--- a/mysys/rijndael.c	2006-12-31 00:02:27 +0000
+++ b/mysys/rijndael.c	2010-07-20 02:23:50 +0000
@@ -32,22 +32,6 @@
   #define FULL_UNROLL
 */
 
-
-#ifdef NOT_USED
-Te0[x] = S [x].[02, 01, 01, 03];
-Te1[x] = S [x].[03, 02, 01, 01];
-Te2[x] = S [x].[01, 03, 02, 01];
-Te3[x] = S [x].[01, 01, 03, 02];
-Te4[x] = S [x].[01, 01, 01, 01];
-
-Td0[x] = Si[x].[0e, 09, 0d, 0b];
-Td1[x] = Si[x].[0b, 0e, 09, 0d];
-Td2[x] = Si[x].[0d, 0b, 0e, 09];
-Td3[x] = Si[x].[09, 0d, 0b, 0e];
-Td4[x] = Si[x].[01, 01, 01, 01];
-#endif
-
-
 static const uint32 Te0[256]=
 {
   0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU,

=== modified file 'mysys/test_charset.c'
--- a/mysys/test_charset.c	2010-07-08 21:20:08 +0000
+++ b/mysys/test_charset.c	2010-07-20 02:23:50 +0000
@@ -77,15 +77,5 @@ int main(int argc, char **argv) {
   _print_csinfo(cs);
   fflush(stdout);
 
-#ifdef NOT_USED_ANYMORE
-  cs_list = list_charsets(MYF(MY_CS_COMPILED | MY_CS_CONFIG));
-  printf("LIST OF CHARSETS (compiled + *.conf):\n%s\n", cs_list);
-  my_free(cs_list);
-
-  cs_list = list_charsets(MYF(MY_CS_INDEX | MY_CS_LOADED));
-  printf("LIST OF CHARSETS (index + loaded):\n%s\n", cs_list);
-  my_free(cs_list);
-#endif
-
   return 0;
 }

=== modified file 'mysys/thr_alarm.c'
--- a/mysys/thr_alarm.c	2010-07-15 13:47:50 +0000
+++ b/mysys/thr_alarm.c	2010-07-20 02:23:50 +0000
@@ -903,11 +903,6 @@ int main(int argc __attribute__((unused)
   sigaddset(&set,THR_SERVER_ALARM);
   sigdelset(&set, thr_client_alarm);
   (void) pthread_sigmask(SIG_SETMASK,&set,NULL);
-#ifdef NOT_USED
-  sigemptyset(&set);
-  sigaddset(&set, thr_client_alarm);
-  pthread_sigmask(SIG_UNBLOCK, &set, (sigset_t*) 0);
-#endif
 
   pthread_attr_init(&thr_attr);
   pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_PROCESS);

=== modified file 'regex/regcomp.c'
--- a/regex/regcomp.c	2010-07-09 19:37:52 +0000
+++ b/regex/regcomp.c	2010-07-20 02:23:50 +0000
@@ -1228,66 +1228,6 @@ register char *cp;
 }
 #endif
 
-#ifdef NOT_USED
-/*
- - mcsub - subtract a collating element from a cset
- == static void mcsub(register cset *cs, register char *cp);
- */
-static void
-mcsub(cs, cp)
-register cset *cs;
-register char *cp;
-{
-	register char *fp = mcfind(cs, cp);
-	register size_t len = strlen(fp);
-
-	assert(fp != NULL);
-	(void) memmove(fp, fp + len + 1,
-				cs->smultis - (fp + len + 1 - cs->multis));
-	cs->smultis -= len;
-
-	if (cs->smultis == 0) {
-		free(cs->multis);
-		cs->multis = NULL;
-		return;
-	}
-
-	cs->multis = realloc(cs->multis, cs->smultis);
-	assert(cs->multis != NULL);
-}
-
-/*
- - mcin - is a collating element in a cset?
- == static int mcin(register cset *cs, register char *cp);
- */
-static int
-mcin(cs, cp)
-register cset *cs;
-register char *cp;
-{
-	return(mcfind(cs, cp) != NULL);
-}
-
-/*
- - mcfind - find a collating element in a cset
- == static char *mcfind(register cset *cs, register char *cp);
- */
-static char *
-mcfind(cs, cp)
-register cset *cs;
-register char *cp;
-{
-	register char *p;
-
-	if (cs->multis == NULL)
-		return(NULL);
-	for (p = cs->multis; *p != '\0'; p += strlen(p) + 1)
-		if (strcmp(cp, p) == 0)
-			return(p);
-	return(NULL);
-}
-#endif
-
 /*
  - mcinvert - invert the list of collating elements in a cset
  == static void mcinvert(register struct parse *p, register cset *cs);

=== modified file 'regex/regcomp.ih'
--- a/regex/regcomp.ih	2004-10-19 22:28:42 +0000
+++ b/regex/regcomp.ih	2010-07-20 02:23:50 +0000
@@ -30,11 +30,6 @@ static int nch(register struct parse *p,
 #ifdef USE_ORIG_REGEX_CODE
 static void mcadd(register struct parse *p, register cset *cs, register char *cp);
 #endif
-#ifdef NOT_USED
-static void mcsub(register cset *cs, register char *cp);
-static int mcin(register cset *cs, register char *cp);
-static char *mcfind(register cset *cs, register char *cp);
-#endif
 static void mcinvert(register struct parse *p, register cset *cs);
 static void mccase(register struct parse *p, register cset *cs);
 static int isinsets(register struct re_guts *g, int c);

=== modified file 'sql/field.cc'
--- a/sql/field.cc	2010-07-09 12:28:51 +0000
+++ b/sql/field.cc	2010-07-20 02:23:50 +0000
@@ -1277,61 +1277,6 @@ int Field::warn_if_overflow(int op_resul
 }
 
 
-#ifdef NOT_USED
-static bool test_if_real(const char *str,int length, CHARSET_INFO *cs)
-{
-  cs= system_charset_info; // QQ move test_if_real into CHARSET_INFO struct
-
-  while (length && my_isspace(cs,*str))
-  {						// Allow start space
-    length--; str++;
-  }
-  if (!length)
-    return 0;
-  if (*str == '+' || *str == '-')
-  {
-    length--; str++;
-    if (!length || !(my_isdigit(cs,*str) || *str == '.'))
-      return 0;
-  }
-  while (length && my_isdigit(cs,*str))
-  {
-    length--; str++;
-  }
-  if (!length)
-    return 1;
-  if (*str == '.')
-  {
-    length--; str++;
-    while (length && my_isdigit(cs,*str))
-    {
-      length--; str++;
-    }
-  }
-  if (!length)
-    return 1;
-  if (*str == 'E' || *str == 'e')
-  {
-    if (length < 3 || (str[1] != '+' && str[1] != '-') || 
-        !my_isdigit(cs,str[2]))
-      return 0;
-    length-=3;
-    str+=3;
-    while (length && my_isdigit(cs,*str))
-    {
-      length--; str++;
-    }
-  }
-  for (; length ; length--, str++)
-  {						// Allow end space
-    if (!my_isspace(cs,*str))
-      return 0;
-  }
-  return 1;
-}
-#endif
-
-
 /**
   Interpret field value as an integer but return the result as a string.
 

=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc	2010-07-15 13:47:50 +0000
+++ b/sql/ha_partition.cc	2010-07-20 02:23:50 +0000
@@ -64,10 +64,6 @@
 #include "debug_sync.h"
 
 static const char *ha_par_ext= ".par";
-#ifdef NOT_USED
-static int free_share(PARTITION_SHARE * share);
-static PARTITION_SHARE *get_share(const char *table_name, TABLE * table);
-#endif
 
 /****************************************************************************
                 MODULE create/delete handler object
@@ -1129,13 +1125,6 @@ int ha_partition::handle_opt_partitions(
           part= i * num_subparts + j;
           DBUG_PRINT("info", ("Optimize subpartition %u (%s)",
                      part, sub_elem->partition_name));
-#ifdef NOT_USED
-          if (print_admin_msg(thd, "note", table_share->db.str, table->alias,
-                          opt_op_name[flag],
-                          "Start to operate on subpartition %s", 
-                          sub_elem->partition_name))
-            DBUG_RETURN(HA_ADMIN_INTERNAL_ERROR);
-#endif
           if ((error= handle_opt_part(thd, check_opt, m_file[part], flag)))
           {
             /* print a line which partition the error belongs to */
@@ -1162,13 +1151,6 @@ int ha_partition::handle_opt_partitions(
       {
         DBUG_PRINT("info", ("Optimize partition %u (%s)", i,
                             part_elem->partition_name));
-#ifdef NOT_USED
-        if (print_admin_msg(thd, "note", table_share->db.str, table->alias,
-                        opt_op_name[flag],
-                        "Start to operate on partition %s", 
-                        part_elem->partition_name))
-          DBUG_RETURN(HA_ADMIN_INTERNAL_ERROR);
-#endif
         if ((error= handle_opt_part(thd, check_opt, m_file[i], flag)))
         {
           /* print a line which partition the error belongs to */

=== modified file 'sql/ha_partition.h'
--- a/sql/ha_partition.h	2010-07-09 13:02:27 +0000
+++ b/sql/ha_partition.h	2010-07-20 02:23:50 +0000
@@ -143,9 +143,6 @@ private:
     Variables for lock structures.
   */
   THR_LOCK_DATA lock;                   /* MySQL lock */
-#ifdef NOT_USED
-  PARTITION_SHARE *share;               /* Shared lock info */
-#endif
 
   /* 
     TRUE <=> this object was created with ha_partition::clone and doesn't

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2010-07-08 21:20:08 +0000
+++ b/sql/handler.cc	2010-07-20 02:23:50 +0000
@@ -190,15 +190,6 @@ plugin_ref ha_lock_engine(THD *thd, cons
 }
 
 
-#ifdef NOT_USED
-static handler *create_default(TABLE_SHARE *table, MEM_ROOT *mem_root)
-{
-  handlerton *hton= ha_default_handlerton(current_thd);
-  return (hton && hton->create) ? hton->create(hton, table, mem_root) : NULL;
-}
-#endif
-
-
 handlerton *ha_resolve_by_legacy_type(THD *thd, enum legacy_db_type db_type)
 {
   plugin_ref plugin;

=== modified file 'sql/nt_servc.cc'
--- a/sql/nt_servc.cc	2009-11-09 11:32:48 +0000
+++ b/sql/nt_servc.cc	2010-07-20 02:23:50 +0000
@@ -375,29 +375,6 @@ void NTService::ServiceCtrlHandler(DWORD
   dwState=pService->dwState;  // get current state
 
   switch(ctrlCode) {
-
-#ifdef NOT_USED	 /* do we need this ? */
-  case SERVICE_CONTROL_PAUSE:
-    if (pService->bRunning && ! pService->bPause)
-    {
-      dwState = SERVICE_PAUSED;
-      pService->SetStatus(SERVICE_PAUSE_PENDING,NO_ERROR, 0, 1,
-			  pService->nPauseTimeOut);
-      pService->PauseService();
-    }
-    break;
-
-  case SERVICE_CONTROL_CONTINUE:
-    if (pService->bRunning && pService->bPause)
-    {
-      dwState = SERVICE_RUNNING;
-      pService->SetStatus(SERVICE_CONTINUE_PENDING,NO_ERROR, 0, 1,
-			  pService->nResumeTimeOut);
-      pService->ResumeService();
-    }
-    break;
-#endif
-
   case SERVICE_CONTROL_SHUTDOWN:
   case SERVICE_CONTROL_STOP:
     dwState = SERVICE_STOP_PENDING;

=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc	2010-07-15 13:47:50 +0000
+++ b/sql/sql_class.cc	2010-07-20 02:23:50 +0000
@@ -4171,71 +4171,6 @@ THD::binlog_prepare_pending_rows_event(T
 				       Update_rows_log_event *);
 #endif
 
-#ifdef NOT_USED
-static char const* 
-field_type_name(enum_field_types type) 
-{
-  switch (type) {
-  case MYSQL_TYPE_DECIMAL:
-    return "MYSQL_TYPE_DECIMAL";
-  case MYSQL_TYPE_TINY:
-    return "MYSQL_TYPE_TINY";
-  case MYSQL_TYPE_SHORT:
-    return "MYSQL_TYPE_SHORT";
-  case MYSQL_TYPE_LONG:
-    return "MYSQL_TYPE_LONG";
-  case MYSQL_TYPE_FLOAT:
-    return "MYSQL_TYPE_FLOAT";
-  case MYSQL_TYPE_DOUBLE:
-    return "MYSQL_TYPE_DOUBLE";
-  case MYSQL_TYPE_NULL:
-    return "MYSQL_TYPE_NULL";
-  case MYSQL_TYPE_TIMESTAMP:
-    return "MYSQL_TYPE_TIMESTAMP";
-  case MYSQL_TYPE_LONGLONG:
-    return "MYSQL_TYPE_LONGLONG";
-  case MYSQL_TYPE_INT24:
-    return "MYSQL_TYPE_INT24";
-  case MYSQL_TYPE_DATE:
-    return "MYSQL_TYPE_DATE";
-  case MYSQL_TYPE_TIME:
-    return "MYSQL_TYPE_TIME";
-  case MYSQL_TYPE_DATETIME:
-    return "MYSQL_TYPE_DATETIME";
-  case MYSQL_TYPE_YEAR:
-    return "MYSQL_TYPE_YEAR";
-  case MYSQL_TYPE_NEWDATE:
-    return "MYSQL_TYPE_NEWDATE";
-  case MYSQL_TYPE_VARCHAR:
-    return "MYSQL_TYPE_VARCHAR";
-  case MYSQL_TYPE_BIT:
-    return "MYSQL_TYPE_BIT";
-  case MYSQL_TYPE_NEWDECIMAL:
-    return "MYSQL_TYPE_NEWDECIMAL";
-  case MYSQL_TYPE_ENUM:
-    return "MYSQL_TYPE_ENUM";
-  case MYSQL_TYPE_SET:
-    return "MYSQL_TYPE_SET";
-  case MYSQL_TYPE_TINY_BLOB:
-    return "MYSQL_TYPE_TINY_BLOB";
-  case MYSQL_TYPE_MEDIUM_BLOB:
-    return "MYSQL_TYPE_MEDIUM_BLOB";
-  case MYSQL_TYPE_LONG_BLOB:
-    return "MYSQL_TYPE_LONG_BLOB";
-  case MYSQL_TYPE_BLOB:
-    return "MYSQL_TYPE_BLOB";
-  case MYSQL_TYPE_VAR_STRING:
-    return "MYSQL_TYPE_VAR_STRING";
-  case MYSQL_TYPE_STRING:
-    return "MYSQL_TYPE_STRING";
-  case MYSQL_TYPE_GEOMETRY:
-    return "MYSQL_TYPE_GEOMETRY";
-  }
-  return "Unknown";
-}
-#endif
-
-
 /* Declare in unnamed namespace. */
 CPP_UNNAMED_NS_START
 

=== modified file 'sql/sql_plugin.cc'
--- a/sql/sql_plugin.cc	2010-07-08 21:20:08 +0000
+++ b/sql/sql_plugin.cc	2010-07-20 02:23:50 +0000
@@ -901,19 +901,6 @@ static void plugin_del(struct st_plugin_
   DBUG_VOID_RETURN;
 }
 
-#ifdef NOT_USED
-
-static void plugin_del(const LEX_STRING *name)
-{
-  struct st_plugin_int *plugin;
-  DBUG_ENTER("plugin_del(name)");
-  if ((plugin= plugin_find_internal(name, MYSQL_ANY_PLUGIN)))
-    plugin_del(plugin);
-  DBUG_VOID_RETURN;
-}
-
-#endif
-
 static void reap_plugins(void)
 {
   uint count, idx;

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2010-07-15 15:46:41 +0000
+++ b/sql/sql_show.cc	2010-07-20 02:23:50 +0000
@@ -5700,52 +5700,6 @@ static int get_schema_partitions_record(
 }
 
 
-#ifdef NOT_USED
-static interval_type get_real_interval_type(interval_type i_type)
-{
-  switch (i_type) {
-  case INTERVAL_YEAR:
-    return INTERVAL_YEAR;
-
-  case INTERVAL_QUARTER:
-  case INTERVAL_YEAR_MONTH:
-  case INTERVAL_MONTH:
-    return INTERVAL_MONTH;
-
-  case INTERVAL_WEEK:
-  case INTERVAL_DAY:
-    return INTERVAL_DAY;
-
-  case INTERVAL_DAY_HOUR:
-  case INTERVAL_HOUR:
-    return INTERVAL_HOUR;
-
-  case INTERVAL_DAY_MINUTE:
-  case INTERVAL_HOUR_MINUTE:
-  case INTERVAL_MINUTE:
-    return INTERVAL_MINUTE;
-
-  case INTERVAL_DAY_SECOND:
-  case INTERVAL_HOUR_SECOND:
-  case INTERVAL_MINUTE_SECOND:
-  case INTERVAL_SECOND:
-    return INTERVAL_SECOND;
-
-  case INTERVAL_DAY_MICROSECOND:
-  case INTERVAL_HOUR_MICROSECOND:
-  case INTERVAL_MINUTE_MICROSECOND:
-  case INTERVAL_SECOND_MICROSECOND:
-  case INTERVAL_MICROSECOND:
-    return INTERVAL_MICROSECOND;
-  case INTERVAL_LAST:
-    DBUG_ASSERT(0);
-  }
-  DBUG_ASSERT(0);
-  return INTERVAL_SECOND;
-}
-
-#endif
-
 #ifdef HAVE_EVENT_SCHEDULER
 /*
   Loads an event from mysql.event and copies it's data to a row of

=== modified file 'strings/ctype-simple.c'
--- a/strings/ctype-simple.c	2010-07-15 11:13:30 +0000
+++ b/strings/ctype-simple.c	2010-07-20 02:23:50 +0000
@@ -335,10 +335,6 @@ long my_strntol_8bit(CHARSET_INFO *cs,
   int overflow;
 
   *err= 0;				/* Initialize error indicator */
-#ifdef NOT_USED
-  if (base < 0 || base == 1 || base > 36)
-    base = 10;
-#endif
 
   s = nptr;
   e = nptr+l;
@@ -364,29 +360,6 @@ long my_strntol_8bit(CHARSET_INFO *cs,
   else
     negative = 0;
 
-#ifdef NOT_USED
-  if (base == 16 && s[0] == '0' && (s[1]=='X' || s[1]=='x'))
-    s += 2;
-#endif
-
-#ifdef NOT_USED
-  if (base == 0)
-  {
-    if (*s == '0')
-    {
-      if (s[1]=='X' || s[1]=='x')
-      {
-	s += 2;
-	base = 16;
-      }
-      else
-	base = 8;
-    }
-    else
-      base = 10;
-  }
-#endif
-
   save = s;
   cutoff = ((uint32)~0L) / (uint32) base;
   cutlim = (uint) (((uint32)~0L) % (uint32) base);
@@ -458,10 +431,6 @@ ulong my_strntoul_8bit(CHARSET_INFO *cs,
   int overflow;
 
   *err= 0;				/* Initialize error indicator */
-#ifdef NOT_USED
-  if (base < 0 || base == 1 || base > 36)
-    base = 10;
-#endif
 
   s = nptr;
   e = nptr+l;
@@ -486,29 +455,6 @@ ulong my_strntoul_8bit(CHARSET_INFO *cs,
   else
     negative = 0;
 
-#ifdef NOT_USED
-  if (base == 16 && s[0] == '0' && (s[1]=='X' || s[1]=='x'))
-    s += 2;
-#endif
-
-#ifdef NOT_USED
-  if (base == 0)
-  {
-    if (*s == '0')
-    {
-      if (s[1]=='X' || s[1]=='x')
-      {
-	s += 2;
-	base = 16;
-      }
-      else
-	base = 8;
-    }
-    else
-      base = 10;
-  }
-#endif
-
   save = s;
   cutoff = ((uint32)~0L) / (uint32) base;
   cutlim = (uint) (((uint32)~0L) % (uint32) base);
@@ -571,10 +517,6 @@ longlong my_strntoll_8bit(CHARSET_INFO *
   int overflow;
 
   *err= 0;				/* Initialize error indicator */
-#ifdef NOT_USED
-  if (base < 0 || base == 1 || base > 36)
-    base = 10;
-#endif
 
   s = nptr;
   e = nptr+l;
@@ -599,29 +541,6 @@ longlong my_strntoll_8bit(CHARSET_INFO *
   else
     negative = 0;
 
-#ifdef NOT_USED
-  if (base == 16 && s[0] == '0' && (s[1]=='X'|| s[1]=='x'))
-    s += 2;
-#endif
-
-#ifdef NOT_USED
-  if (base == 0)
-  {
-    if (*s == '0')
-    {
-      if (s[1]=='X' || s[1]=='x')
-      {
-	s += 2;
-	base = 16;
-      }
-      else
-	base = 8;
-    }
-    else
-      base = 10;
-  }
-#endif
-
   save = s;
 
   cutoff = (~(ulonglong) 0) / (unsigned long int) base;
@@ -694,10 +613,6 @@ ulonglong my_strntoull_8bit(CHARSET_INFO
   int overflow;
 
   *err= 0;				/* Initialize error indicator */
-#ifdef NOT_USED
-  if (base < 0 || base == 1 || base > 36)
-    base = 10;
-#endif
 
   s = nptr;
   e = nptr+l;
@@ -722,29 +637,6 @@ ulonglong my_strntoull_8bit(CHARSET_INFO
   else
     negative = 0;
 
-#ifdef NOT_USED
-  if (base == 16 && s[0] == '0' && (s[1]=='X' || s[1]=='x'))
-    s += 2;
-#endif
-
-#ifdef NOT_USED
-  if (base == 0)
-  {
-    if (*s == '0')
-    {
-      if (s[1]=='X' || s[1]=='x')
-      {
-	s += 2;
-	base = 16;
-      }
-      else
-	base = 8;
-    }
-    else
-      base = 10;
-  }
-#endif
-
   save = s;
 
   cutoff = (~(ulonglong) 0) / (unsigned long int) base;

=== modified file 'strings/ctype-ucs2.c'
--- a/strings/ctype-ucs2.c	2010-07-02 19:38:04 +0000
+++ b/strings/ctype-ucs2.c	2010-07-20 02:23:50 +0000
@@ -134,11 +134,6 @@ my_strntol_mb2_or_mb4(CHARSET_INFO *cs,
   
 bs:
 
-#ifdef NOT_USED  
-  if (base <= 0 || base == 1 || base > 36)
-    base = 10;
-#endif
-  
   overflow= 0;
   res= 0;
   save= s;
@@ -250,11 +245,6 @@ my_strntoul_mb2_or_mb4(CHARSET_INFO *cs,
   
 bs:
 
-#ifdef NOT_USED
-  if (base <= 0 || base == 1 || base > 36)
-    base = 10;
-#endif
-
   overflow= 0;
   res= 0;
   save= s;
@@ -359,11 +349,6 @@ my_strntoll_mb2_or_mb4(CHARSET_INFO *cs,
   
 bs:
 
-#ifdef NOT_USED  
-  if (base <= 0 || base == 1 || base > 36)
-    base = 10;
-#endif
-
   overflow = 0;
   res = 0;
   save = s;
@@ -474,11 +459,6 @@ my_strntoull_mb2_or_mb4(CHARSET_INFO *cs
   } while (1);
   
 bs:
-  
-#ifdef NOT_USED
-  if (base <= 0 || base == 1 || base > 36)
-    base = 10;
-#endif
 
   overflow = 0;
   res = 0;

=== modified file 'tests/mysql_client_test.c'
--- a/tests/mysql_client_test.c	2010-07-15 13:47:50 +0000
+++ b/tests/mysql_client_test.c	2010-07-20 02:23:50 +0000
@@ -5775,215 +5775,6 @@ static void test_set_variable()
   mysql_stmt_close(stmt1);
 }
 
-#if NOT_USED
-
-/* Insert meta info .. */
-
-static void test_insert_meta()
-{
-  MYSQL_STMT *stmt;
-  int        rc;
-  MYSQL_RES  *result;
-  MYSQL_FIELD *field;
-
-  myheader("test_insert_meta");
-
-  rc= mysql_autocommit(mysql, TRUE);
-  myquery(rc);
-
-  rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_prep_insert");
-  myquery(rc);
-
-  rc= mysql_query(mysql, "CREATE TABLE test_prep_insert(col1 tinyint, \
-                                col2 varchar(50), col3 varchar(30))");
-  myquery(rc);
-
-  strmov(query, "INSERT INTO test_prep_insert VALUES(10, 'venu1', 'test')");
-  stmt= mysql_simple_prepare(mysql, query);
-  check_stmt(stmt);
-
-  verify_param_count(stmt, 0);
-
-  result= mysql_param_result(stmt);
-  mytest_r(result);
-
-  mysql_stmt_close(stmt);
-
-  strmov(query, "INSERT INTO test_prep_insert VALUES(?, 'venu', ?)");
-  stmt= mysql_simple_prepare(mysql, query);
-  check_stmt(stmt);
-
-  verify_param_count(stmt, 2);
-
-  result= mysql_param_result(stmt);
-  mytest(result);
-
-  my_print_result_metadata(result);
-
-  mysql_field_seek(result, 0);
-  field= mysql_fetch_field(result);
-  mytest(field);
-  if (!opt_silent)
-    fprintf(stdout, "\n obtained: `%s` (expected: `%s`)", field->name, "col1");
-  DIE_UNLESS(strcmp(field->name, "col1") == 0);
-
-  field= mysql_fetch_field(result);
-  mytest(field);
-  if (!opt_silent)
-    fprintf(stdout, "\n obtained: `%s` (expected: `%s`)", field->name, "col3");
-  DIE_UNLESS(strcmp(field->name, "col3") == 0);
-
-  field= mysql_fetch_field(result);
-  mytest_r(field);
-
-  mysql_free_result(result);
-  mysql_stmt_close(stmt);
-}
-
-
-/* Update meta info .. */
-
-static void test_update_meta()
-{
-  MYSQL_STMT *stmt;
-  int        rc;
-  MYSQL_RES  *result;
-  MYSQL_FIELD *field;
-
-  myheader("test_update_meta");
-
-  rc= mysql_autocommit(mysql, TRUE);
-  myquery(rc);
-
-  rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_prep_update");
-  myquery(rc);
-
-  rc= mysql_query(mysql, "CREATE TABLE test_prep_update(col1 tinyint, \
-                                col2 varchar(50), col3 varchar(30))");
-  myquery(rc);
-
-  strmov(query, "UPDATE test_prep_update SET col1=10, col2='venu1' WHERE col3='test'");
-  stmt= mysql_simple_prepare(mysql, query);
-  check_stmt(stmt);
-
-  verify_param_count(stmt, 0);
-
-  result= mysql_param_result(stmt);
-  mytest_r(result);
-
-  mysql_stmt_close(stmt);
-
-  strmov(query, "UPDATE test_prep_update SET col1=?, col2='venu' WHERE col3=?");
-  stmt= mysql_simple_prepare(mysql, query);
-  check_stmt(stmt);
-
-  verify_param_count(stmt, 2);
-
-  result= mysql_param_result(stmt);
-  mytest(result);
-
-  my_print_result_metadata(result);
-
-  mysql_field_seek(result, 0);
-  field= mysql_fetch_field(result);
-  mytest(field);
-  if (!opt_silent)
-  {
-    fprintf(stdout, "\n col obtained: `%s` (expected: `%s`)", field->name, "col1");
-    fprintf(stdout, "\n tab obtained: `%s` (expected: `%s`)", field->table, "test_prep_update");
-  }
-  DIE_UNLESS(strcmp(field->name, "col1") == 0);
-  DIE_UNLESS(strcmp(field->table, "test_prep_update") == 0);
-
-  field= mysql_fetch_field(result);
-  mytest(field);
-  if (!opt_silent)
-  {
-    fprintf(stdout, "\n col obtained: `%s` (expected: `%s`)", field->name, "col3");
-    fprintf(stdout, "\n tab obtained: `%s` (expected: `%s`)", field->table, "test_prep_update");
-  }
-  DIE_UNLESS(strcmp(field->name, "col3") == 0);
-  DIE_UNLESS(strcmp(field->table, "test_prep_update") == 0);
-
-  field= mysql_fetch_field(result);
-  mytest_r(field);
-
-  mysql_free_result(result);
-  mysql_stmt_close(stmt);
-}
-
-
-/* Select meta info .. */
-
-static void test_select_meta()
-{
-  MYSQL_STMT *stmt;
-  int        rc;
-  MYSQL_RES  *result;
-  MYSQL_FIELD *field;
-
-  myheader("test_select_meta");
-
-  rc= mysql_autocommit(mysql, TRUE);
-  myquery(rc);
-
-  rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_prep_select");
-  myquery(rc);
-
-  rc= mysql_query(mysql, "CREATE TABLE test_prep_select(col1 tinyint, \
-                                col2 varchar(50), col3 varchar(30))");
-  myquery(rc);
-
-  strmov(query, "SELECT * FROM test_prep_select WHERE col1=10");
-  stmt= mysql_simple_prepare(mysql, query);
-  check_stmt(stmt);
-
-  verify_param_count(stmt, 0);
-
-  result= mysql_param_result(stmt);
-  mytest_r(result);
-
-  strmov(query, "SELECT col1, col3 from test_prep_select WHERE col1=? AND col3='test' AND col2= ?");
-  stmt= mysql_simple_prepare(mysql, query);
-  check_stmt(stmt);
-
-  verify_param_count(stmt, 2);
-
-  result= mysql_param_result(stmt);
-  mytest(result);
-
-  my_print_result_metadata(result);
-
-  mysql_field_seek(result, 0);
-  field= mysql_fetch_field(result);
-  mytest(field);
-  if (!opt_silent)
-  {
-    fprintf(stdout, "\n col obtained: `%s` (expected: `%s`)", field->name, "col1");
-    fprintf(stdout, "\n tab obtained: `%s` (expected: `%s`)", field->table, "test_prep_select");
-  }
-  DIE_UNLESS(strcmp(field->name, "col1") == 0);
-  DIE_UNLESS(strcmp(field->table, "test_prep_select") == 0);
-
-  field= mysql_fetch_field(result);
-  mytest(field);
-  if (!opt_silent)
-  {
-    fprintf(stdout, "\n col obtained: `%s` (expected: `%s`)", field->name, "col2");
-    fprintf(stdout, "\n tab obtained: `%s` (expected: `%s`)", field->table, "test_prep_select");
-  }
-  DIE_UNLESS(strcmp(field->name, "col2") == 0);
-  DIE_UNLESS(strcmp(field->table, "test_prep_select") == 0);
-
-  field= mysql_fetch_field(result);
-  mytest_r(field);
-
-  mysql_free_result(result);
-  mysql_stmt_close(stmt);
-}
-#endif
-
-
 /* Test FUNCTION field info / DATE_FORMAT() table_name . */
 
 static void test_func_fields()


Attachment: [text/bzr-bundle] bzr/davi.arnaut@oracle.com-20100720022350-ewdmqsg3qvzqzb7d.bundle
Thread
bzr commit into mysql-trunk-bugfixing branch (davi:3131) WL#5498Davi Arnaut20 Jul
Re: bzr commit into mysql-trunk-bugfixing branch (davi:3131) WL#5498Jon Olav Hauglid20 Jul