List:Commits« Previous MessageNext Message »
From:Sergei Golubchik Date:January 16 2006 2:18pm
Subject:bk commit into 5.1 tree (serg:1.2056)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of serg. When serg 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.2056 06/01/16 15:17:45 serg@stripped +3 -0
  only use "public" types in plugin API

  storage/myisam/ft_boolean_search.c
    1.98 06/01/16 15:17:32 serg@stripped +10 -10
    only use "public" types in plugin API

  plugin/fulltext/plugin_example.c
    1.4 06/01/16 15:17:31 serg@stripped +3 -4
    only use "public" types in plugin API

  include/plugin.h
    1.9 06/01/16 15:17:31 serg@stripped +10 -10
    only use "public" types in plugin API:
    s/uint/unsigned int/ or s/uint/int/
    s/bool/char/
    s/byte/char/
    s/CHARSET_INFO */struct charset_info_st */

# 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:	serg
# Host:	serg.mylan
# Root:	/usr/home/serg/Abk/mysql-5.1

--- 1.8/include/plugin.h	Tue Jan 10 12:04:36 2006
+++ 1.9/include/plugin.h	Mon Jan 16 15:17:31 2006
@@ -75,7 +75,7 @@ struct st_mysql_plugin
   const char *descr;    /* general descriptive text (for SHOW PLUGINS ) */
   int (*init)(void);    /* the function to invoke when plugin is loaded */
   int (*deinit)(void);  /* the function to invoke when plugin is unloaded */
-  uint version;         /* plugin version (for SHOW PLUGINS)            */
+  unsigned int version; /* plugin version (for SHOW PLUGINS)            */
   struct st_mysql_show_var *status_vars;
 };
 
@@ -176,11 +176,11 @@ typedef struct st_mysql_ftparser_boolean
   enum enum_ft_token_type type;
   int yesno;
   int weight_adjust;
-  bool wasign;
-  bool trunc;
+  char wasign;
+  char trunc;
   /* These are parser state and must be removed. */
-  byte prev;
-  byte *quot;
+  char prev;
+  char *quot;
 } MYSQL_FTPARSER_BOOLEAN_INFO;
 
 
@@ -224,14 +224,14 @@ typedef struct st_mysql_ftparser_boolean
 
 typedef struct st_mysql_ftparser_param
 {
-  int (*mysql_parse)(void *param, byte *doc, uint doc_len);
-  int (*mysql_add_word)(void *param, byte *word, uint word_len,
+  int (*mysql_parse)(void *param, char *doc, int doc_len);
+  int (*mysql_add_word)(void *param, char *word, int word_len,
                         MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info);
   void *ftparser_state;
   void *mysql_ftparam;
-  CHARSET_INFO *cs;
-  byte *doc;
-  uint length;
+  struct charset_info_st *cs;
+  char *doc;
+  int length;
   int mode;
 } MYSQL_FTPARSER_PARAM;
 

--- 1.97/storage/myisam/ft_boolean_search.c	Wed Dec 28 13:05:20 2005
+++ 1.98/storage/myisam/ft_boolean_search.c	Mon Jan 16 15:17:32 2006
@@ -165,7 +165,7 @@ typedef struct st_my_ftb_param
 } MY_FTB_PARAM;
 
 
-static int ftb_query_add_word(void *param, byte *word, uint word_len,
+static int ftb_query_add_word(void *param, char *word, int word_len,
                               MYSQL_FTPARSER_BOOLEAN_INFO *info)
 {
   MY_FTB_PARAM *ftb_param= (MY_FTB_PARAM *)param;
@@ -264,13 +264,13 @@ static int ftb_query_add_word(void *para
 }
 
 
-static int ftb_parse_query_internal(void *param, byte *query, uint len)
+static int ftb_parse_query_internal(void *param, char *query, int len)
 {
   MY_FTB_PARAM *ftb_param= (MY_FTB_PARAM *)param;
   MYSQL_FTPARSER_BOOLEAN_INFO info;
   CHARSET_INFO *cs= ftb_param->ftb->charset;
-  byte **start= &query;
-  byte *end= query + len;
+  char **start= &query;
+  char *end= query + len;
   FT_WORD w;
 
   info.prev= ' ';
@@ -571,7 +571,7 @@ typedef struct st_my_ftb_phrase_param
 } MY_FTB_PHRASE_PARAM;
 
 
-static int ftb_phrase_add_word(void *param, byte *word, uint word_len,
+static int ftb_phrase_add_word(void *param, char *word, int word_len,
     MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused)))
 {
   MY_FTB_PHRASE_PARAM *phrase_param= (MY_FTB_PHRASE_PARAM *)param;
@@ -601,11 +601,11 @@ static int ftb_phrase_add_word(void *par
 }
 
 
-static int ftb_check_phrase_internal(void *param, byte *document, uint len)
+static int ftb_check_phrase_internal(void *param, char *document, int len)
 {
   FT_WORD word;
   MY_FTB_PHRASE_PARAM *phrase_param= (MY_FTB_PHRASE_PARAM *)param;
-  const byte *docend= document + len;
+  const char *docend= document + len;
   while (ft_simple_get_word(phrase_param->cs, &document, docend, &word, FALSE))
   {
     ftb_phrase_add_word(param, word.pos, word.len, 0);
@@ -812,7 +812,7 @@ typedef struct st_my_ftb_find_param
 } MY_FTB_FIND_PARAM;
 
 
-static int ftb_find_relevance_add_word(void *param, byte *word, uint len,
+static int ftb_find_relevance_add_word(void *param, char *word, int len,
              MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused)))
 {
   MY_FTB_FIND_PARAM *ftb_param= (MY_FTB_FIND_PARAM *)param;
@@ -845,10 +845,10 @@ static int ftb_find_relevance_add_word(v
 }
 
 
-static int ftb_find_relevance_parse(void *param, byte *doc, uint len)
+static int ftb_find_relevance_parse(void *param, char *doc, int len)
 {
   FT_INFO *ftb= ((MY_FTB_FIND_PARAM *)param)->ftb;
-  byte *end= doc + len;
+  char *end= doc + len;
   FT_WORD w;
   while (ft_simple_get_word(ftb->charset, &doc, end, &w, TRUE))
     ftb_find_relevance_add_word(param, w.pos, w.len, 0);

--- 1.3/plugin/fulltext/plugin_example.c	Tue Jan 10 12:04:36 2006
+++ 1.4/plugin/fulltext/plugin_example.c	Mon Jan 16 15:17:31 2006
@@ -13,9 +13,8 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
-#include <my_global.h>
-#include <m_string.h>
-#include <m_ctype.h>
+#include <stdlib.h>
+#include <ctype.h>
 #include <plugin.h>
 
 long number_of_calls= 0; /* for SHOW STATUS, see below */
@@ -181,7 +180,7 @@ int simple_parser_parse(MYSQL_FTPARSER_P
         add_word(param, start, end - start);
       break;
     }
-    else if (my_isspace(param->cs, *end))
+    else if (isspace(*end))
     {
       if (end > start)
         add_word(param, start, end - start);
Thread
bk commit into 5.1 tree (serg:1.2056)Sergei Golubchik16 Jan