From f5940fe904186aa196ffc0084d9c81db7492d222 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Mar 2007 21:09:56 +0400 Subject: 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: Clean up unnecessary type casts. sql/event_data_objects.h: Clean up unnecessary type casts. sql/ha_ndbcluster.cc: Clean up unnecessary type casts. sql/mysql_priv.h: Clean up unnecessary type casts. sql/partition_info.h: Clean up unnecessary type casts. sql/sp.cc: Clean up unnecessary type casts. sql/sp_head.cc: Clean up unnecessary type casts. sql/sp_head.h: Clean up unnecessary type casts. sql/sql_lex.cc: Clean up unnecessary type casts. sql/sql_lex.h: Clean up unnecessary type casts. sql/sql_parse.cc: Clean up unnecessary type casts. sql/sql_partition.cc: Clean up unnecessary type casts. sql/sql_partition.h: Clean up unnecessary type casts. sql/sql_prepare.cc: Clean up unnecessary type casts. sql/sql_trigger.cc: Clean up unnecessary type casts. sql/sql_view.cc: Clean up unnecessary type casts. sql/sql_yacc.yy: Clean up unnecessary type casts. sql/table.cc: Clean up unnecessary type casts. sql/table.h: Clean up unnecessary type casts. --- sql/sql_lex.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'sql/sql_lex.h') diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 13786606412..d8a5a0b04f0 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -542,7 +542,7 @@ public: 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 *get_unit_column_types(); @@ -743,7 +743,7 @@ public: 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 @@ typedef struct st_lex : public Query_tables_list 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 @@ typedef struct st_lex : public Query_tables_list 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 @@ struct st_lex_local: public st_lex 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); -- cgit v1.2.1