List:Commits« Previous MessageNext Message »
From:konstantin Date:March 27 2007 7:10pm
Subject:bk commit into 5.1 tree (kostja:1.2519)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of kostja. When kostja 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, 2007-03-27 21:09:56+04:00, kostja@stripped +19 -0
  Remove unnecessary casts to uchar. The casts are stemming from
  the lexer API which internally uses  unsigned char variables to
  address its state map. The implementation of the lexer should be
  internal to the lexer, and not influence the rest of the code.

  sql/event_data_objects.cc@stripped, 2007-03-27 21:09:51+04:00, kostja@stripped +2 -2
    Clean up unnecessary type casts.

  sql/event_data_objects.h@stripped, 2007-03-27 21:09:51+04:00, kostja@stripped +1 -1
    Clean up unnecessary type casts.

  sql/ha_ndbcluster.cc@stripped, 2007-03-27 21:09:51+04:00, kostja@stripped +1 -1
    Clean up unnecessary type casts.

  sql/mysql_priv.h@stripped, 2007-03-27 21:09:51+04:00, kostja@stripped +1 -1
    Clean up unnecessary type casts.

  sql/partition_info.h@stripped, 2007-03-27 21:09:51+04:00, kostja@stripped +1 -1
    Clean up unnecessary type casts.

  sql/sp.cc@stripped, 2007-03-27 21:09:51+04:00, kostja@stripped +1 -1
    Clean up unnecessary type casts.

  sql/sp_head.cc@stripped, 2007-03-27 21:09:51+04:00, kostja@stripped +4 -5
    Clean up unnecessary type casts.

  sql/sp_head.h@stripped, 2007-03-27 21:09:51+04:00, kostja@stripped +2 -2
    Clean up unnecessary type casts.

  sql/sql_lex.cc@stripped, 2007-03-27 21:09:51+04:00, kostja@stripped +23 -33
    Clean up unnecessary type casts.

  sql/sql_lex.h@stripped, 2007-03-27 21:09:51+04:00, kostja@stripped +9 -9
    Clean up unnecessary type casts.

  sql/sql_parse.cc@stripped, 2007-03-27 21:09:51+04:00, kostja@stripped +4 -4
    Clean up unnecessary type casts.

  sql/sql_partition.cc@stripped, 2007-03-27 21:09:52+04:00, kostja@stripped +3 -3
    Clean up unnecessary type casts.

  sql/sql_partition.h@stripped, 2007-03-27 21:09:52+04:00, kostja@stripped +2 -2
    Clean up unnecessary type casts.

  sql/sql_prepare.cc@stripped, 2007-03-27 21:09:52+04:00, kostja@stripped +1 -1
    Clean up unnecessary type casts.

  sql/sql_trigger.cc@stripped, 2007-03-27 21:09:52+04:00, kostja@stripped +1 -1
    Clean up unnecessary type casts.

  sql/sql_view.cc@stripped, 2007-03-27 21:09:52+04:00, kostja@stripped +5 -5
    Clean up unnecessary type casts.

  sql/sql_yacc.yy@stripped, 2007-03-27 21:09:52+04:00, kostja@stripped +7 -9
    Clean up unnecessary type casts.

  sql/table.cc@stripped, 2007-03-27 21:09:52+04:00, kostja@stripped +3 -3
    Clean up unnecessary type casts.

  sql/table.h@stripped, 2007-03-27 21:09:52+04:00, kostja@stripped +2 -2
    Clean up unnecessary type casts.

# 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:	kostja
# Host:	bodhi.local
# Root:	/opt/local/work/mysql-5.1-c1

--- 1.491/sql/mysql_priv.h	2007-03-27 20:27:36 +04:00
+++ 1.492/sql/mysql_priv.h	2007-03-27 21:09:51 +04:00
@@ -841,7 +841,7 @@
 bool alloc_query(THD *thd, const char *packet, uint packet_length);
 void mysql_init_select(LEX *lex);
 void mysql_reset_thd_for_next_command(THD *thd);
-void mysql_init_query(THD *thd, uchar *buf, uint length);
+void mysql_init_query(THD *thd, const char *buf, uint length);
 bool mysql_new_select(LEX *lex, bool move_down);
 void create_select_for_variable(const char *var_name);
 void mysql_init_multi_delete(LEX *lex);

--- 1.234/sql/sql_lex.cc	2007-03-20 00:37:33 +03:00
+++ 1.235/sql/sql_lex.cc	2007-03-27 21:09:51 +04:00
@@ -33,10 +33,10 @@
 
 /* Macros to look like lex */
 
-#define yyGet()		*(lex->ptr++)
-#define yyGetLast()	lex->ptr[-1]
-#define yyPeek()	lex->ptr[0]
-#define yyPeek2()	lex->ptr[1]
+#define yyGet()         ((uchar) *(lex->ptr++))
+#define yyGetLast()     ((uchar) lex->ptr[-1])
+#define yyPeek()        ((uchar) lex->ptr[0])
+#define yyPeek2()       ((uchar) lex->ptr[1])
 #define yyUnget()	lex->ptr--
 #define yySkip()	lex->ptr++
 #define yyLength()	((uint) (lex->ptr - lex->tok_start)-1)
@@ -127,7 +127,7 @@
   (We already do too much here)
 */
 
-void lex_start(THD *thd, const uchar *buf, uint length)
+void lex_start(THD *thd, const char *buf, uint length)
 {
   LEX *lex= thd->lex;
   DBUG_ENTER("lex_start");
@@ -238,9 +238,9 @@
 
 static int find_keyword(LEX *lex, uint len, bool function)
 {
-  const uchar *tok=lex->tok_start;
+  const char *tok= lex->tok_start;
 
-  SYMBOL *symbol= get_hash_symbol((const char *)tok,len,function);
+  SYMBOL *symbol= get_hash_symbol(tok, len, function);
   if (symbol)
   {
     lex->yylval->symbol.symbol=symbol;
@@ -305,16 +305,16 @@
 static LEX_STRING get_quoted_token(LEX *lex,uint length, char quote)
 {
   LEX_STRING tmp;
-  const uchar *from, *end;
-  uchar *to;
+  const char *from, *end;
+  char *to;
   yyUnget();			// ptr points now after last token char
   tmp.length=lex->yytoklen=length;
   tmp.str=(char*) lex->thd->alloc(tmp.length+1);
-  for (from= lex->tok_start, to= (uchar*) tmp.str, end= to+length ;
+  for (from= lex->tok_start, to= tmp.str, end= to+length ;
        to != end ;
        )
   {
-    if ((*to++= *from++) == (uchar) quote)
+    if ((*to++= *from++) == quote)
       from++;					// Skip double quotes
   }
   *to= 0;					// End null for safety
@@ -341,9 +341,7 @@
     {
       int l;
       if (use_mb(cs) &&
-          (l = my_ismbchar(cs,
-                           (const char *)lex->ptr-1,
-                           (const char *)lex->end_of_query))) {
+          (l = my_ismbchar(cs, lex->ptr-1, lex->end_of_query))) {
 	lex->ptr += l-1;
 	continue;
       }
@@ -368,12 +366,12 @@
 	yyUnget();
 
       /* Found end. Unescape and return string */
-      const uchar *str, *end;
-      uchar *start;
+      const char *str, *end;
+      char *start;
 
       str=lex->tok_start+1;
       end=lex->ptr-1;
-      if (!(start=(uchar*) lex->thd->alloc((uint) (end-str)+1)))
+      if (!(start= (char*) lex->thd->alloc((uint) (end-str)+1)))
 	return (char*) "";		// Sql_alloc has set error flag
       if (!found_escape)
       {
@@ -383,15 +381,14 @@
       }
       else
       {
-	uchar *to;
+        char *to;
 
 	for (to=start ; str != end ; str++)
 	{
 #ifdef USE_MB
 	  int l;
 	  if (use_mb(cs) &&
-              (l = my_ismbchar(cs,
-                               (const char *)str, (const char *)end))) {
+              (l = my_ismbchar(cs, str, end))) {
 	      while (l--)
 		  *to++ = *str++;
 	      str--;
@@ -437,7 +434,7 @@
 	*to=0;
 	lex->yytoklen=(uint) (to-start);
       }
-      return (char*) start;
+      return start;
     }
   }
   return 0;					// unexpected end of query
@@ -556,7 +553,6 @@
 
   lex->yylval=yylval;			// The global state
 
-  lex->tok_end_prev= lex->tok_end;
   lex->tok_start_prev= lex->tok_start;
 
   lex->tok_start=lex->tok_end=lex->ptr;
@@ -640,16 +636,14 @@
         break;
       }
     case MY_LEX_IDENT:
-      const uchar *start;
+      const char *start;
 #if defined(USE_MB) && defined(USE_MB_IDENT)
       if (use_mb(cs))
       {
 	result_state= IDENT_QUOTED;
         if (my_mbcharlen(cs, yyGetLast()) > 1)
         {
-          int l = my_ismbchar(cs,
-                              (const char *)lex->ptr-1,
-                              (const char *)lex->end_of_query);
+          int l = my_ismbchar(cs, lex->ptr-1, lex->end_of_query);
           if (l == 0) {
             state = MY_LEX_CHAR;
             continue;
@@ -661,9 +655,7 @@
           if (my_mbcharlen(cs, c) > 1)
           {
             int l;
-            if ((l = my_ismbchar(cs,
-                              (const char *)lex->ptr-1,
-                              (const char *)lex->end_of_query)) == 0)
+            if ((l = my_ismbchar(cs, lex->ptr-1, lex->end_of_query)) == 0)
               break;
             lex->ptr += l-1;
           }
@@ -786,9 +778,7 @@
           if (my_mbcharlen(cs, c) > 1)
           {
             int l;
-            if ((l = my_ismbchar(cs,
-                                 (const char *)lex->ptr-1,
-                                 (const char *)lex->end_of_query)) == 0)
+            if ((l = my_ismbchar(cs, lex->ptr-1, lex->end_of_query)) == 0)
               break;
             lex->ptr += l-1;
           }
@@ -1122,7 +1112,7 @@
     Pointer to the last non-comment symbol of the statement.
 */
 
-const uchar *skip_rear_comments(const uchar *begin, const uchar *end)
+const char *skip_rear_comments(const char *begin, const char *end)
 {
   while (begin < end && (end[-1] <= ' ' || end[-1] == '*' ||
                          end[-1] == '/' || end[-1] == ';'))

--- 1.269/sql/sql_lex.h	2007-03-20 00:37:33 +03:00
+++ 1.270/sql/sql_lex.h	2007-03-27 21:09:51 +04:00
@@ -542,7 +542,7 @@
   void set_limit(st_select_lex *values);
   void set_thd(THD *thd_arg) { thd= thd_arg; }
 
-  friend void lex_start(THD *thd, const uchar *buf, uint length);
+  friend void lex_start(THD *thd, const char *buf, uint length);
   friend int subselect_union_engine::exec();
 
   List<Item> *get_unit_column_types();
@@ -743,7 +743,7 @@
   void cut_subtree() { slave= 0; }
   bool test_limit();
 
-  friend void lex_start(THD *thd, const uchar *buf, uint length);
+  friend void lex_start(THD *thd, const char *buf, uint length);
   st_select_lex() : n_sum_items(0), n_child_sum_items(0) {}
   void make_empty_select()
   {
@@ -996,11 +996,11 @@
   SELECT_LEX *current_select;
   /* list of all SELECT_LEX */
   SELECT_LEX *all_selects_list;
-  const uchar *buf;		/* The beginning of string, used by SPs */
-  const uchar *ptr,*tok_start,*tok_end,*end_of_query;
+  const char *buf;		/* The beginning of string, used by SPs */
+  const char *ptr,*tok_start,*tok_end,*end_of_query;
   
-  /* The values of tok_start/tok_end as they were one call of MYSQLlex before */
-  const uchar *tok_start_prev, *tok_end_prev;
+  /* The value of tok_start as they were one call of MYSQLlex before */
+  const char *tok_start_prev;
 
   char *length,*dec,*change;
   LEX_STRING name;
@@ -1202,7 +1202,7 @@
     Pointers to part of LOAD DATA statement that should be rewritten
     during replication ("LOCAL 'filename' REPLACE INTO" part).
   */
-  const uchar *fname_start, *fname_end;
+  const char *fname_start, *fname_end;
 
   /*
     Reference to a struct that contains information in various commands
@@ -1319,10 +1319,10 @@
 
 extern void lex_init(void);
 extern void lex_free(void);
-extern void lex_start(THD *thd, const uchar *buf, uint length);
+extern void lex_start(THD *thd, const char *buf, uint length);
 extern void lex_end(LEX *lex);
 extern int MYSQLlex(void *arg, void *yythd);
-extern const uchar *skip_rear_comments(const uchar *ubegin, const uchar *uend);
+extern const char *skip_rear_comments(const char *ubegin, const char *uend);
 
 extern bool is_lex_native_function(const LEX_STRING *name);
 

--- 1.648/sql/sql_parse.cc	2007-03-20 00:37:33 +03:00
+++ 1.649/sql/sql_parse.cc	2007-03-27 21:09:51 +04:00
@@ -983,7 +983,7 @@
       break;
     /* init structures for VIEW processing */
     table_list.select_lex= &(thd->lex->select_lex);
-    mysql_init_query(thd, (uchar*)"", 0);
+    mysql_init_query(thd, "", 0);
     thd->lex->
       select_lex.table_list.link_in_list((byte*) &table_list,
                                          (byte**) &table_list.next_local);
@@ -4970,7 +4970,7 @@
 ****************************************************************************/
 
 void
-mysql_init_query(THD *thd, uchar *buf, uint length)
+mysql_init_query(THD *thd, const char *buf, uint length)
 {
   DBUG_ENTER("mysql_init_query");
   lex_start(thd, buf, length);
@@ -5193,7 +5193,7 @@
 
   DBUG_EXECUTE_IF("parser_debug", turn_parser_debug_on(););
 
-  mysql_init_query(thd, (uchar*) inBuf, length);
+  mysql_init_query(thd, inBuf, length);
   if (query_cache_send_result_to_client(thd, inBuf, length) <= 0)
   {
     LEX *lex= thd->lex;
@@ -5272,7 +5272,7 @@
   bool error= 0;
   DBUG_ENTER("mysql_test_parse_for_slave");
 
-  mysql_init_query(thd, (uchar*) inBuf, length);
+  mysql_init_query(thd, inBuf, length);
   if (!MYSQLparse((void*) thd) && ! thd->is_fatal_error &&
       all_tables_not_ok(thd,(TABLE_LIST*) lex->select_lex.table_list.first))
     error= 1;                  /* Ignore question */

--- 1.554/sql/sql_yacc.yy	2007-03-20 00:44:16 +03:00
+++ 1.555/sql/sql_yacc.yy	2007-03-27 21:09:52 +04:00
@@ -2695,7 +2695,7 @@
               else
                 i->m_query.length= lex->tok_end - sp->m_tmp_query;
               i->m_query.str= strmake_root(YYTHD->mem_root,
-                                           (char *)sp->m_tmp_query,
+                                           sp->m_tmp_query,
                                            i->m_query.length);
               sp->add_instr(i);
             }
@@ -9299,7 +9299,7 @@
             my_error(ER_VIEW_SELECT_VARIABLE, MYF(0));
             MYSQL_YYABORT;
           }
-          item= new Item_param((uint) (lex->tok_start - (uchar *) thd->query));
+          item= new Item_param((uint) (lex->tok_start - thd->query));
           if (!($$= item) || lex->param_list.push_back(item))
           {
             my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0));
@@ -10135,7 +10135,7 @@
               if (!(qbuff.str= alloc_root(YYTHD->mem_root, qbuff.length + 5)))
                 MYSQL_YYABORT;
 
-              strmake(strmake(qbuff.str, "SET ", 4), (char *)sp->m_tmp_query,
+              strmake(strmake(qbuff.str, "SET ", 4), sp->m_tmp_query,
                       qbuff.length);
               qbuff.length+= 4;
               i->m_query= qbuff;
@@ -11354,18 +11354,16 @@
 	{
           THD *thd= YYTHD;
           LEX *lex= thd->lex;
-          char *stmt_beg= (lex->sphead ?
-                           (char *)lex->sphead->m_tmp_query :
-                           thd->query);
+          const char *stmt_beg= (lex->sphead ?
+                                 lex->sphead->m_tmp_query : thd->query);
 	  lex->create_view_select_start= $2 - stmt_beg;
 	}
 	| '(' remember_name select_paren ')' union_opt
 	{
           THD *thd= YYTHD;
           LEX *lex= thd->lex;
-          char *stmt_beg= (lex->sphead ?
-                           (char *)lex->sphead->m_tmp_query :
-                           thd->query);
+          const char *stmt_beg= (lex->sphead ?
+                                 lex->sphead->m_tmp_query : thd->query);
 	  lex->create_view_select_start= $2 - stmt_beg;
 	}
 	;

--- 1.281/sql/table.cc	2007-03-20 00:37:36 +03:00
+++ 1.282/sql/table.cc	2007-03-27 21:09:52 +04:00
@@ -682,8 +682,8 @@
       if ((share->partition_info_len= partition_info_len))
       {
         if (!(share->partition_info=
-              (uchar*) memdup_root(&share->mem_root, next_chunk + 4,
-                                   partition_info_len + 1)))
+              memdup_root(&share->mem_root, next_chunk + 4,
+                          partition_info_len + 1)))
         {
           my_free(buff, MYF(0));
           goto err;
@@ -1528,7 +1528,7 @@
 
     tmp= mysql_unpack_partition(thd, share->partition_info,
                                 share->partition_info_len,
-                                (uchar*)share->part_state,
+                                share->part_state,
                                 share->part_state_len,
                                 outparam, is_create_table,
                                 share->default_part_db_type);

--- 1.163/sql/table.h	2007-03-17 02:13:19 +03:00
+++ 1.164/sql/table.h	2007-03-27 21:09:52 +04:00
@@ -236,9 +236,9 @@
   bool log_table;
 #ifdef WITH_PARTITION_STORAGE_ENGINE
   bool auto_partitioned;
-  const uchar *partition_info;
+  const char *partition_info;
   uint  partition_info_len;
-  const uchar *part_state;
+  const char *part_state;
   uint part_state_len;
   handlerton *default_part_db_type;
 #endif

--- 1.91/sql/event_data_objects.cc	2007-03-23 19:14:06 +03:00
+++ 1.92/sql/event_data_objects.cc	2007-03-27 21:09:51 +04:00
@@ -168,7 +168,7 @@
                       (long) body_begin, (long) thd->lex->ptr));
 
   body.length= thd->lex->ptr - body_begin;
-  const uchar *body_end= body_begin + body.length - 1;
+  const char *body_end= body_begin + body.length - 1;
 
   /* Trim nuls or close-comments ('*'+'/') or spaces at the end */
   while (body_begin < body_end)
@@ -1919,7 +1919,7 @@
   event_change_security_context(thd, definer_user, definer_host, dbname,
                                 &save_ctx);
   thd->lex= &lex;
-  mysql_init_query(thd, (uchar*) thd->query, thd->query_length);
+  mysql_init_query(thd, thd->query, thd->query_length);
   if (MYSQLparse((void *)thd) || thd->is_fatal_error)
   {
     DBUG_PRINT("error", ("error during compile or thd->is_fatal_error: %d",

--- 1.18/sql/event_data_objects.h	2007-03-23 18:14:01 +03:00
+++ 1.19/sql/event_data_objects.h	2007-03-27 21:09:51 +04:00
@@ -217,7 +217,7 @@
   */
   bool do_not_create;
 
-  const uchar *body_begin;
+  const char *body_begin;
 
   LEX_STRING dbname;
   LEX_STRING name;

--- 1.124/sql/sql_view.cc	2007-03-09 13:15:46 +03:00
+++ 1.125/sql/sql_view.cc	2007-03-27 21:09:52 +04:00
@@ -675,7 +675,7 @@
   char md5[MD5_BUFF_LENGTH];
   bool can_be_merged;
   char dir_buff[FN_REFLEN], path_buff[FN_REFLEN];
-  const uchar *endp;
+  const char *endp;
   LEX_STRING dir, file, path;
   DBUG_ENTER("mysql_register_view");
 
@@ -759,9 +759,9 @@
   view->query.str= (char*)str.ptr();
   view->query.length= str.length()-1; // we do not need last \0
   view->source.str= thd->query + thd->lex->create_view_select_start;
-  endp= (uchar*) view->source.str;
-  endp= skip_rear_comments(endp, (uchar*) (thd->query + thd->query_length));
-  view->source.length= endp - (uchar*) view->source.str;
+  endp= view->source.str;
+  endp= skip_rear_comments(endp, thd->query + thd->query_length);
+  view->source.length= endp - view->source.str;
   view->file_version= 1;
   view->calc_md5(md5);
   view->md5.str= md5;
@@ -970,7 +970,7 @@
     now Lex placed in statement memory
   */
   table->view= lex= thd->lex= (LEX*) new(thd->mem_root) st_lex_local;
-  lex_start(thd, (uchar*)table->query.str, table->query.length);
+  lex_start(thd, table->query.str, table->query.length);
   view_select= &lex->select_lex;
   view_select->select_number= ++thd->select_number;
   {

--- 1.86/sql/sql_trigger.cc	2007-03-08 02:02:33 +03:00
+++ 1.87/sql/sql_trigger.cc	2007-03-27 21:09:52 +04:00
@@ -976,7 +976,7 @@
         LEX_STRING *trg_definer= it_definer++;
 
         thd->variables.sql_mode= (ulong)*trg_sql_mode;
-        lex_start(thd, (uchar*)trg_create_str->str, trg_create_str->length);
+        lex_start(thd, trg_create_str->str, trg_create_str->length);
 
 	thd->spcont= 0;
         if (MYSQLparse((void *)thd) || thd->is_fatal_error)

--- 1.415/sql/ha_ndbcluster.cc	2007-03-16 16:01:09 +03:00
+++ 1.416/sql/ha_ndbcluster.cc	2007-03-27 21:09:51 +04:00
@@ -6339,7 +6339,7 @@
   LEX *old_lex= thd->lex, newlex;
   thd->lex= &newlex;
   newlex.current_select= NULL;
-  lex_start(thd, (const uchar*) "", 0);
+  lex_start(thd, "", 0);
   int res= ha_create_table_from_engine(thd, db, table_name);
   thd->lex= old_lex;
   return res;

--- 1.100/sql/sql_partition.cc	2007-02-23 14:13:49 +03:00
+++ 1.101/sql/sql_partition.cc	2007-03-27 21:09:52 +04:00
@@ -3700,9 +3700,9 @@
      possible to retrace this given an item tree.
 */
 
-bool mysql_unpack_partition(THD *thd, const uchar *part_buf,
-                            uint part_info_len,
-                            uchar *part_state, uint part_state_len,
+bool mysql_unpack_partition(THD *thd,
+                            const char *part_buf, uint part_info_len,
+                            const char *part_state, uint part_state_len,
                             TABLE* table, bool is_create_table_ind,
                             handlerton *default_db_type)
 {

--- 1.142/sql/sp.cc	2007-03-20 00:37:31 +03:00
+++ 1.143/sql/sp.cc	2007-03-27 21:09:51 +04:00
@@ -384,7 +384,7 @@
   if ((ret= sp_use_new_db(thd, name->m_db, &old_db, 1, &dbchanged)))
     goto end;
 
-  lex_start(thd, (uchar*)defstr.c_ptr(), defstr.length());
+  lex_start(thd, defstr.c_ptr(), defstr.length());
 
   thd->spcont= 0;
   if (MYSQLparse(thd) || thd->is_fatal_error || newlex.sphead == NULL)

--- 1.261/sql/sp_head.cc	2007-03-20 00:44:13 +03:00
+++ 1.262/sql/sp_head.cc	2007-03-27 21:09:51 +04:00
@@ -541,15 +541,14 @@
 sp_head::init_strings(THD *thd, LEX *lex)
 {
   DBUG_ENTER("sp_head::init_strings");
-  const uchar *endp;                            /* Used to trim the end */
+  const char *endp;                            /* Used to trim the end */
   /* During parsing, we must use thd->mem_root */
   MEM_ROOT *root= thd->mem_root;
 
   if (m_param_begin && m_param_end)
   {
     m_params.length= m_param_end - m_param_begin;
-    m_params.str= strmake_root(root,
-                               (char *)m_param_begin, m_params.length);
+    m_params.str= strmake_root(root, m_param_begin, m_params.length);
   }
 
   /* If ptr has overrun end_of_query then end_of_query is the end */
@@ -561,9 +560,9 @@
   endp= skip_rear_comments(m_body_begin, endp);
 
   m_body.length= endp - m_body_begin;
-  m_body.str= strmake_root(root, (char *)m_body_begin, m_body.length);
+  m_body.str= strmake_root(root, m_body_begin, m_body.length);
   m_defstr.length= endp - lex->buf;
-  m_defstr.str= strmake_root(root, (char *)lex->buf, m_defstr.length);
+  m_defstr.str= strmake_root(root, lex->buf, m_defstr.length);
   DBUG_VOID_RETURN;
 }
 

--- 1.100/sql/sp_head.h	2007-03-20 00:37:32 +03:00
+++ 1.101/sql/sp_head.h	2007-03-27 21:09:51 +04:00
@@ -126,7 +126,7 @@
 
   create_field m_return_field_def; /* This is used for FUNCTIONs only. */
 
-  const uchar *m_tmp_query;	// Temporary pointer to sub query string
+  const char *m_tmp_query;	// Temporary pointer to sub query string
   st_sp_chistics *m_chistics;
   ulong m_sql_mode;		// For SHOW CREATE and execution
   LEX_STRING m_qname;		// db.name
@@ -174,7 +174,7 @@
   */
   HASH m_sroutines;
   // Pointers set during parsing
-  const uchar *m_param_begin, *m_param_end, *m_body_begin;
+  const char *m_param_begin, *m_param_end, *m_body_begin;
 
   /*
     Security context for stored routine which should be run under

--- 1.21/sql/partition_info.h	2006-12-31 04:24:03 +03:00
+++ 1.22/sql/partition_info.h	2007-03-27 21:09:51 +04:00
@@ -156,7 +156,7 @@
   char *part_func_string;
   char *subpart_func_string;
 
-  uchar *part_state;
+  const char *part_state;
 
   partition_element *curr_part_elem;
   partition_element *current_partition;

--- 1.13/sql/sql_partition.h	2006-12-23 22:33:29 +03:00
+++ 1.14/sql/sql_partition.h	2007-03-27 21:09:52 +04:00
@@ -77,9 +77,9 @@
                                KEY *key_info,
                                const key_range *key_spec,
                                part_id_range *part_spec);
-bool mysql_unpack_partition(THD *thd, const uchar *part_buf,
+bool mysql_unpack_partition(THD *thd, const char *part_buf,
                             uint part_info_len,
-                            uchar *part_state, uint part_state_len,
+                            const char *part_state, uint part_state_len,
                             TABLE *table, bool is_create_table_ind,
                             handlerton *default_db_type);
 void make_used_partitions_str(partition_info *part_info, String *parts_str);

--- 1.208/sql/sql_prepare.cc	2007-03-20 00:37:34 +03:00
+++ 1.209/sql/sql_prepare.cc	2007-03-27 21:09:52 +04:00
@@ -2850,7 +2850,7 @@
 
   old_stmt_arena= thd->stmt_arena;
   thd->stmt_arena= this;
-  lex_start(thd, (uchar*) thd->query, thd->query_length);
+  lex_start(thd, thd->query, thd->query_length);
   lex->stmt_prepare_mode= TRUE;
 
   error= MYSQLparse((void *)thd) || thd->is_fatal_error ||
Thread
bk commit into 5.1 tree (kostja:1.2519)konstantin27 Mar