Remove most 'register' use in C++

Modern compilers (such as GCC 8) emit warnings that the
'register' keyword is deprecated and not valid C++17.

Let us remove most use of the 'register' keyword.
Code in 'extra/' is not touched.
This commit is contained in:
Marko Mäkelä 2018-04-24 12:14:35 +03:00
parent 2a00bdeb4a
commit 39a4985520
33 changed files with 107 additions and 113 deletions

View File

@ -217,7 +217,7 @@ extern int heap_write(HP_INFO *info,const uchar *buff);
extern int heap_update(HP_INFO *info,const uchar *old,const uchar *newdata); extern int heap_update(HP_INFO *info,const uchar *old,const uchar *newdata);
extern int heap_rrnd(HP_INFO *info,uchar *buf,uchar *pos); extern int heap_rrnd(HP_INFO *info,uchar *buf,uchar *pos);
extern int heap_scan_init(HP_INFO *info); extern int heap_scan_init(HP_INFO *info);
extern int heap_scan(register HP_INFO *info, uchar *record); extern int heap_scan(HP_INFO *info, uchar *record);
extern int heap_delete(HP_INFO *info,const uchar *buff); extern int heap_delete(HP_INFO *info,const uchar *buff);
extern int heap_info(HP_INFO *info,HEAPINFO *x,int flag); extern int heap_info(HP_INFO *info,HEAPINFO *x,int flag);
extern int heap_create(const char *name, extern int heap_create(const char *name,

View File

@ -366,7 +366,7 @@ int maria_sort_index(HA_CHECK *param, MARIA_HA *info, char * name);
int maria_zerofill(HA_CHECK *param, MARIA_HA *info, const char *name); int maria_zerofill(HA_CHECK *param, MARIA_HA *info, const char *name);
int maria_repair_by_sort(HA_CHECK *param, MARIA_HA *info, int maria_repair_by_sort(HA_CHECK *param, MARIA_HA *info,
const char *name, my_bool rep_quick); const char *name, my_bool rep_quick);
int maria_repair_parallel(HA_CHECK *param, register MARIA_HA *info, int maria_repair_parallel(HA_CHECK *param, MARIA_HA *info,
const char *name, my_bool rep_quick); const char *name, my_bool rep_quick);
int maria_change_to_newfile(const char *filename, const char *old_ext, int maria_change_to_newfile(const char *filename, const char *old_ext,
const char *new_ext, time_t backup_time, const char *new_ext, time_t backup_time,

View File

@ -373,7 +373,7 @@ typedef struct st_mi_sort_param
int (*key_read)(struct st_mi_sort_param *,void *); int (*key_read)(struct st_mi_sort_param *,void *);
int (*key_write)(struct st_mi_sort_param *, const void *); int (*key_write)(struct st_mi_sort_param *, const void *);
void (*lock_in_memory)(HA_CHECK *); void (*lock_in_memory)(HA_CHECK *);
int (*write_keys)(struct st_mi_sort_param *, register uchar **, int (*write_keys)(struct st_mi_sort_param *, uchar **,
ulonglong , struct st_buffpek *, IO_CACHE *); ulonglong , struct st_buffpek *, IO_CACHE *);
my_off_t (*read_to_buffer)(IO_CACHE *,struct st_buffpek *, uint); my_off_t (*read_to_buffer)(IO_CACHE *,struct st_buffpek *, uint);
int (*write_key)(struct st_mi_sort_param *, IO_CACHE *,uchar *, int (*write_key)(struct st_mi_sort_param *, IO_CACHE *,uchar *,
@ -383,16 +383,15 @@ typedef struct st_mi_sort_param
/* functions in mi_check */ /* functions in mi_check */
void myisamchk_init(HA_CHECK *param); void myisamchk_init(HA_CHECK *param);
int chk_status(HA_CHECK *param, MI_INFO *info); int chk_status(HA_CHECK *param, MI_INFO *info);
int chk_del(HA_CHECK *param, register MI_INFO *info, ulonglong test_flag); int chk_del(HA_CHECK *param, MI_INFO *info, ulonglong test_flag);
int chk_size(HA_CHECK *param, MI_INFO *info); int chk_size(HA_CHECK *param, MI_INFO *info);
int chk_key(HA_CHECK *param, MI_INFO *info); int chk_key(HA_CHECK *param, MI_INFO *info);
int chk_data_link(HA_CHECK *param, MI_INFO *info, my_bool extend); int chk_data_link(HA_CHECK *param, MI_INFO *info, my_bool extend);
int mi_repair(HA_CHECK *param, register MI_INFO *info, int mi_repair(HA_CHECK *param, MI_INFO *info, char * name, int rep_quick);
char * name, int rep_quick); int mi_sort_index(HA_CHECK *param, MI_INFO *info, char * name);
int mi_sort_index(HA_CHECK *param, register MI_INFO *info, char * name); int mi_repair_by_sort(HA_CHECK *param, MI_INFO *info,
int mi_repair_by_sort(HA_CHECK *param, register MI_INFO *info,
const char * name, int rep_quick); const char * name, int rep_quick);
int mi_repair_parallel(HA_CHECK *param, register MI_INFO *info, int mi_repair_parallel(HA_CHECK *param, MI_INFO *info,
const char * name, int rep_quick); const char * name, int rep_quick);
int change_to_newfile(const char * filename, const char * old_ext, int change_to_newfile(const char * filename, const char * old_ext,
const char * new_ext, time_t backup_time, myf myflags); const char * new_ext, time_t backup_time, myf myflags);

View File

@ -1504,7 +1504,7 @@ public:
/* Mark field in read map. Updates also virtual fields */ /* Mark field in read map. Updates also virtual fields */
void register_field_in_read_map(); void register_field_in_read_map();
friend int cre_myisam(char * name, register TABLE *form, uint options, friend int cre_myisam(char * name, TABLE *form, uint options,
ulonglong auto_increment_value); ulonglong auto_increment_value);
friend class Copy_field; friend class Copy_field;
friend class Item_avg_field; friend class Item_avg_field;

View File

@ -1165,8 +1165,7 @@ Type_handler_real_result::make_sort_key(uchar *to, Item *item,
/** Make a sort-key from record. */ /** Make a sort-key from record. */
static void make_sortkey(register Sort_param *param, static void make_sortkey(Sort_param *param, uchar *to, uchar *ref_pos)
register uchar *to, uchar *ref_pos)
{ {
reg3 Field *field; reg3 Field *field;
reg1 SORT_FIELD *sort_field; reg1 SORT_FIELD *sort_field;
@ -1458,7 +1457,7 @@ bool check_if_pq_applicable(Sort_param *param,
int merge_many_buff(Sort_param *param, uchar *sort_buffer, int merge_many_buff(Sort_param *param, uchar *sort_buffer,
BUFFPEK *buffpek, uint *maxbuffer, IO_CACHE *t_file) BUFFPEK *buffpek, uint *maxbuffer, IO_CACHE *t_file)
{ {
register uint i; uint i;
IO_CACHE t_file2,*from_file,*to_file,*temp; IO_CACHE t_file2,*from_file,*to_file,*temp;
BUFFPEK *lastbuff; BUFFPEK *lastbuff;
DBUG_ENTER("merge_many_buff"); DBUG_ENTER("merge_many_buff");
@ -1513,7 +1512,7 @@ cleanup:
uint read_to_buffer(IO_CACHE *fromfile, BUFFPEK *buffpek, uint read_to_buffer(IO_CACHE *fromfile, BUFFPEK *buffpek,
uint rec_length) uint rec_length)
{ {
register uint count; uint count;
uint length; uint length;
if ((count=(uint) MY_MIN((ha_rows) buffpek->max_keys,buffpek->count))) if ((count=(uint) MY_MIN((ha_rows) buffpek->max_keys,buffpek->count)))
@ -1817,7 +1816,7 @@ int merge_buffers(Sort_param *param, IO_CACHE *from_file,
} }
else else
{ {
register uchar *end; uchar *end;
src= buffpek->key+offset; src= buffpek->key+offset;
for (end= src+buffpek->mem_count*rec_length ; for (end= src+buffpek->mem_count*rec_length ;
src != end ; src != end ;

View File

@ -403,8 +403,8 @@ int main(int argc,char **argv)
static SYMBOL *get_hash_symbol(const char *s,\n\ static SYMBOL *get_hash_symbol(const char *s,\n\
unsigned int len,bool function)\n\ unsigned int len,bool function)\n\
{\n\ {\n\
register uchar *hash_map;\n\ uchar *hash_map;\n\
register const char *cur_str= s;\n\ const char *cur_str= s;\n\
\n\ \n\
if (len == 0) {\n\ if (len == 0) {\n\
DBUG_PRINT(\"warning\", (\"get_hash_symbol() received a request for a zero-length symbol, which is probably a mistake.\"));\ DBUG_PRINT(\"warning\", (\"get_hash_symbol() received a request for a zero-length symbol, which is probably a mistake.\"));\
@ -416,25 +416,25 @@ static SYMBOL *get_hash_symbol(const char *s,\n\
if (function){\n\ if (function){\n\
if (len>sql_functions_max_len) return 0;\n\ if (len>sql_functions_max_len) return 0;\n\
hash_map= sql_functions_map;\n\ hash_map= sql_functions_map;\n\
register uint32 cur_struct= uint4korr(hash_map+((len-1)*4));\n\ uint32 cur_struct= uint4korr(hash_map+((len-1)*4));\n\
\n\ \n\
for (;;){\n\ for (;;){\n\
register uchar first_char= (uchar)cur_struct;\n\ uchar first_char= (uchar)cur_struct;\n\
\n\ \n\
if (first_char == 0)\n\ if (first_char == 0)\n\
{\n\ {\n\
register int16 ires= (int16)(cur_struct>>16);\n\ int16 ires= (int16)(cur_struct>>16);\n\
if (ires==array_elements(symbols)) return 0;\n\ if (ires==array_elements(symbols)) return 0;\n\
register SYMBOL *res;\n\ SYMBOL *res;\n\
if (ires>=0) \n\ if (ires>=0) \n\
res= symbols+ires;\n\ res= symbols+ires;\n\
else\n\ else\n\
res= sql_functions-ires-1;\n\ res= sql_functions-ires-1;\n\
register uint count= (uint) (cur_str - s);\n\ uint count= (uint) (cur_str - s);\n\
return lex_casecmp(cur_str,res->name+count,len-count) ? 0 : res;\n\ return lex_casecmp(cur_str,res->name+count,len-count) ? 0 : res;\n\
}\n\ }\n\
\n\ \n\
register uchar cur_char= (uchar)to_upper_lex[(uchar)*cur_str];\n\ uchar cur_char= (uchar)to_upper_lex[(uchar)*cur_str];\n\
if (cur_char<first_char) return 0;\n\ if (cur_char<first_char) return 0;\n\
cur_struct>>=8;\n\ cur_struct>>=8;\n\
if (cur_char>(uchar)cur_struct) return 0;\n\ if (cur_char>(uchar)cur_struct) return 0;\n\
@ -450,20 +450,20 @@ static SYMBOL *get_hash_symbol(const char *s,\n\
}else{\n\ }else{\n\
if (len>symbols_max_len) return 0;\n\ if (len>symbols_max_len) return 0;\n\
hash_map= symbols_map;\n\ hash_map= symbols_map;\n\
register uint32 cur_struct= uint4korr(hash_map+((len-1)*4));\n\ uint32 cur_struct= uint4korr(hash_map+((len-1)*4));\n\
\n\ \n\
for (;;){\n\ for (;;){\n\
register uchar first_char= (uchar)cur_struct;\n\ uchar first_char= (uchar)cur_struct;\n\
\n\ \n\
if (first_char==0){\n\ if (first_char==0) {\n\
register int16 ires= (int16)(cur_struct>>16);\n\ int16 ires= (int16)(cur_struct>>16);\n\
if (ires==array_elements(symbols)) return 0;\n\ if (ires==array_elements(symbols)) return 0;\n\
register SYMBOL *res= symbols+ires;\n\ SYMBOL *res= symbols+ires;\n\
register uint count= (uint) (cur_str - s);\n\ uint count= (uint) (cur_str - s);\n\
return lex_casecmp(cur_str,res->name+count,len-count)!=0 ? 0 : res;\n\ return lex_casecmp(cur_str,res->name+count,len-count)!=0 ? 0 : res;\n\
}\n\ }\n\
\n\ \n\
register uchar cur_char= (uchar)to_upper_lex[(uchar)*cur_str];\n\ uchar cur_char= (uchar)to_upper_lex[(uchar)*cur_str];\n\
if (cur_char<first_char) return 0;\n\ if (cur_char<first_char) return 0;\n\
cur_struct>>=8;\n\ cur_struct>>=8;\n\
if (cur_char>(uchar)cur_struct) return 0;\n\ if (cur_char>(uchar)cur_struct) return 0;\n\

View File

@ -2798,7 +2798,7 @@ int handler::ha_rnd_init_with_error(bool scan)
*/ */
int handler::read_first_row(uchar * buf, uint primary_key) int handler::read_first_row(uchar * buf, uint primary_key)
{ {
register int error; int error;
DBUG_ENTER("handler::read_first_row"); DBUG_ENTER("handler::read_first_row");
/* /*

View File

@ -5810,8 +5810,8 @@ void Item_func_like::turboBM_compute_bad_character_shifts()
bool Item_func_like::turboBM_matches(const char* text, int text_len) const bool Item_func_like::turboBM_matches(const char* text, int text_len) const
{ {
register int bcShift; int bcShift;
register int turboShift; int turboShift;
int shift = pattern_len; int shift = pattern_len;
int j = 0; int j = 0;
int u = 0; int u = 0;
@ -5825,7 +5825,7 @@ bool Item_func_like::turboBM_matches(const char* text, int text_len) const
{ {
while (j <= tlmpl) while (j <= tlmpl)
{ {
register int i= plm1; int i= plm1;
while (i >= 0 && pattern[i] == text[i + j]) while (i >= 0 && pattern[i] == text[i + j])
{ {
i--; i--;
@ -5835,7 +5835,7 @@ bool Item_func_like::turboBM_matches(const char* text, int text_len) const
if (i < 0) if (i < 0)
return 1; return 1;
register const int v = plm1 - i; const int v= plm1 - i;
turboShift = u - v; turboShift = u - v;
bcShift = bmBc[(uint) (uchar) text[i + j]] - plm1 + i; bcShift = bmBc[(uint) (uchar) text[i + j]] - plm1 + i;
shift = MY_MAX(turboShift, bcShift); shift = MY_MAX(turboShift, bcShift);
@ -5856,7 +5856,7 @@ bool Item_func_like::turboBM_matches(const char* text, int text_len) const
{ {
while (j <= tlmpl) while (j <= tlmpl)
{ {
register int i = plm1; int i= plm1;
while (i >= 0 && likeconv(cs,pattern[i]) == likeconv(cs,text[i + j])) while (i >= 0 && likeconv(cs,pattern[i]) == likeconv(cs,text[i + j]))
{ {
i--; i--;
@ -5866,7 +5866,7 @@ bool Item_func_like::turboBM_matches(const char* text, int text_len) const
if (i < 0) if (i < 0)
return 1; return 1;
register const int v = plm1 - i; const int v= plm1 - i;
turboShift = u - v; turboShift = u - v;
bcShift = bmBc[(uint) likeconv(cs, text[i + j])] - plm1 + i; bcShift = bmBc[(uint) likeconv(cs, text[i + j])] - plm1 + i;
shift = MY_MAX(turboShift, bcShift); shift = MY_MAX(turboShift, bcShift);

View File

@ -3244,8 +3244,8 @@ longlong Item_func_ord::val_int()
#ifdef USE_MB #ifdef USE_MB
if (use_mb(res->charset())) if (use_mb(res->charset()))
{ {
register const char *str=res->ptr(); const char *str=res->ptr();
register uint32 n=0, l=my_ismbchar(res->charset(),str,str+res->length()); uint32 n=0, l=my_ismbchar(res->charset(),str,str+res->length());
if (!l) if (!l)
return (longlong)((uchar) *str); return (longlong)((uchar) *str);
while (l--) while (l--)

View File

@ -1038,7 +1038,7 @@ String *Item_func_reverse::val_str(String *str)
#ifdef USE_MB #ifdef USE_MB
if (use_mb(res->charset())) if (use_mb(res->charset()))
{ {
register uint32 l; uint32 l;
while (ptr < end) while (ptr < end)
{ {
if ((l= my_ismbchar(res->charset(),ptr,end))) if ((l= my_ismbchar(res->charset(),ptr,end)))
@ -1087,7 +1087,7 @@ String *Item_func_replace::val_str(String *str)
bool alloced=0; bool alloced=0;
#ifdef USE_MB #ifdef USE_MB
const char *ptr,*end,*strend,*search,*search_end; const char *ptr,*end,*strend,*search,*search_end;
register uint32 l; uint32 l;
bool binary_cmp; bool binary_cmp;
#endif #endif
THD *thd= 0; THD *thd= 0;
@ -1140,7 +1140,7 @@ redo:
{ {
if (*ptr == *search) if (*ptr == *search)
{ {
register char *i,*j; char *i,*j;
i=(char*) ptr+1; j=(char*) search+1; i=(char*) ptr+1; j=(char*) search+1;
while (j != search_end) while (j != search_end)
if (*i++ != *j++) goto skip; if (*i++ != *j++) goto skip;
@ -1748,14 +1748,14 @@ String *Item_func_substr_index::val_str(String *str)
const char *search= delimiter->ptr(); const char *search= delimiter->ptr();
const char *search_end= search+delimiter_length; const char *search_end= search+delimiter_length;
int32 n=0,c=count,pass; int32 n=0,c=count,pass;
register uint32 l; uint32 l;
for (pass=(count>0);pass<2;++pass) for (pass=(count>0);pass<2;++pass)
{ {
while (ptr < end) while (ptr < end)
{ {
if (*ptr == *search) if (*ptr == *search)
{ {
register char *i,*j; char *i,*j;
i=(char*) ptr+1; j=(char*) search+1; i=(char*) ptr+1; j=(char*) search+1;
while (j != search_end) while (j != search_end)
if (*i++ != *j++) goto skip; if (*i++ != *j++) goto skip;
@ -1923,7 +1923,7 @@ String *Item_func_rtrim::val_str(String *str)
end= ptr+res->length(); end= ptr+res->length();
#ifdef USE_MB #ifdef USE_MB
char *p=ptr; char *p=ptr;
register uint32 l; uint32 l;
#endif #endif
if (remove_length == 1) if (remove_length == 1)
{ {
@ -2008,7 +2008,7 @@ String *Item_func_trim::val_str(String *str)
if (use_mb(collation.collation)) if (use_mb(collation.collation))
{ {
char *p=ptr; char *p=ptr;
register uint32 l; uint32 l;
loop: loop:
while (ptr + remove_length < end) while (ptr + remove_length < end)
{ {

View File

@ -497,7 +497,7 @@ int key_cmp(KEY_PART_INFO *key_part, const uchar *key, uint key_length)
if (key_part->null_bit) if (key_part->null_bit)
{ {
/* This key part allows null values; NULL is lower than everything */ /* This key part allows null values; NULL is lower than everything */
register bool field_is_null= key_part->field->is_null(); bool field_is_null= key_part->field->is_null();
if (*key) // If range key is null if (*key) // If range key is null
{ {
/* the range is expecting a null value */ /* the range is expecting a null value */

View File

@ -8480,8 +8480,7 @@ void MYSQL_BIN_LOG::set_max_size(ulong max_size_arg)
0 String is not a number 0 String is not a number
*/ */
static bool test_if_number(register const char *str, static bool test_if_number(const char *str, ulong *res, bool allow_wildcards)
ulong *res, bool allow_wildcards)
{ {
reg2 int flag; reg2 int flag;
const char *start; const char *start;

View File

@ -49,8 +49,7 @@ extern "C" {
*/ */
int _my_b_net_read(register IO_CACHE *info, uchar *Buffer, int _my_b_net_read(IO_CACHE *info, uchar *Buffer, size_t)
size_t Count __attribute__((unused)))
{ {
ulong read_length; ulong read_length;
NET *net= &(current_thd)->net; NET *net= &(current_thd)->net;

View File

@ -90,7 +90,7 @@
void hash_password(ulong *result, const char *password, uint password_len) void hash_password(ulong *result, const char *password, uint password_len)
{ {
register ulong nr=1345345333L, add=7, nr2=0x12345671L; ulong nr=1345345333L, add=7, nr2=0x12345671L;
ulong tmp; ulong tmp;
const char *password_end= password + password_len; const char *password_end= password + password_len;
for (; password < password_end; password++) for (; password < password_end; password++)
@ -325,7 +325,7 @@ hex2octet(uint8 *to, const char *str, uint len)
const char *str_end= str + len; const char *str_end= str + len;
while (str < str_end) while (str < str_end)
{ {
register char tmp= char_val(*str++); char tmp= char_val(*str++);
*to++= (tmp << 4) | char_val(*str++); *to++= (tmp << 4) | char_val(*str++);
} }
} }

View File

@ -91,7 +91,7 @@ recursion_point:
} }
{ {
register struct LS_STRUCT_NAME *sp0= sp++; struct LS_STRUCT_NAME *sp0= sp++;
sp->list_len= sp0->list_len >> 1; sp->list_len= sp0->list_len >> 1;
sp0->list_len-= sp->list_len; sp0->list_len-= sp->list_len;
sp->return_point= 0; sp->return_point= 0;
@ -100,7 +100,7 @@ recursion_point:
return_point0: return_point0:
sp->list1= sorted_list; sp->list1= sorted_list;
{ {
register struct LS_STRUCT_NAME *sp0= sp++; struct LS_STRUCT_NAME *sp0= sp++;
list= list_end; list= list_end;
sp->list_len= sp0->list_len; sp->list_len= sp0->list_len;
sp->return_point= 1; sp->return_point= 1;
@ -108,9 +108,9 @@ return_point0:
goto recursion_point; goto recursion_point;
return_point1: return_point1:
{ {
register LS_LIST_ITEM **hook= &sorted_list; LS_LIST_ITEM **hook= &sorted_list;
register LS_LIST_ITEM *list1= sp->list1; LS_LIST_ITEM *list1= sp->list1;
register LS_LIST_ITEM *list2= sorted_list; LS_LIST_ITEM *list2= sorted_list;
if (LS_COMPARE_FUNC_CALL(list1, list2)) if (LS_COMPARE_FUNC_CALL(list1, list2))
{ {

View File

@ -218,7 +218,7 @@ static void set_slave_max_allowed_packet(THD *thd, MYSQL *mysql)
void init_thread_mask(int* mask,Master_info* mi,bool inverse) void init_thread_mask(int* mask,Master_info* mi,bool inverse)
{ {
bool set_io = mi->slave_running, set_sql = mi->rli.slave_running; bool set_io = mi->slave_running, set_sql = mi->rli.slave_running;
register int tmp_mask=0; int tmp_mask=0;
DBUG_ENTER("init_thread_mask"); DBUG_ENTER("init_thread_mask");
if (set_io) if (set_io)

View File

@ -338,7 +338,7 @@ static void del_dbopt(const char *path)
static bool write_db_opt(THD *thd, const char *path, static bool write_db_opt(THD *thd, const char *path,
Schema_specification_st *create) Schema_specification_st *create)
{ {
register File file; File file;
char buf[256]; // Should be enough for one option char buf[256]; // Should be enough for one option
bool error=1; bool error=1;

View File

@ -89,7 +89,7 @@ static int write_delayed(THD *thd, TABLE *table, enum_duplicates duplic,
LEX_STRING query, bool ignore, bool log_on); LEX_STRING query, bool ignore, bool log_on);
static void end_delayed_insert(THD *thd); static void end_delayed_insert(THD *thd);
pthread_handler_t handle_delayed_insert(void *arg); pthread_handler_t handle_delayed_insert(void *arg);
static void unlink_blobs(register TABLE *table); static void unlink_blobs(TABLE *table);
#endif #endif
static bool check_view_insertability(THD *thd, TABLE_LIST *view); static bool check_view_insertability(THD *thd, TABLE_LIST *view);
@ -3103,7 +3103,7 @@ pthread_handler_t handle_delayed_insert(void *arg)
/* Remove all pointers to data for blob fields so that original table doesn't try to free them */ /* Remove all pointers to data for blob fields so that original table doesn't try to free them */
static void unlink_blobs(register TABLE *table) static void unlink_blobs(TABLE *table)
{ {
for (Field **ptr=table->field ; *ptr ; ptr++) for (Field **ptr=table->field ; *ptr ; ptr++)
{ {
@ -3114,7 +3114,7 @@ static void unlink_blobs(register TABLE *table)
/* Free blobs stored in current row */ /* Free blobs stored in current row */
static void free_delayed_insert_blobs(register TABLE *table) static void free_delayed_insert_blobs(TABLE *table)
{ {
for (Field **ptr=table->field ; *ptr ; ptr++) for (Field **ptr=table->field ; *ptr ; ptr++)
{ {
@ -3126,7 +3126,7 @@ static void free_delayed_insert_blobs(register TABLE *table)
/* set value field for blobs to point to data in record */ /* set value field for blobs to point to data in record */
static void set_delayed_insert_blobs(register TABLE *table) static void set_delayed_insert_blobs(TABLE *table)
{ {
for (Field **ptr=table->field ; *ptr ; ptr++) for (Field **ptr=table->field ; *ptr ; ptr++)
{ {

View File

@ -8066,7 +8066,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
List<String> *partition_names, List<String> *partition_names,
LEX_STRING *option) LEX_STRING *option)
{ {
register TABLE_LIST *ptr; TABLE_LIST *ptr;
TABLE_LIST *UNINIT_VAR(previous_table_ref); /* The table preceding the current one. */ TABLE_LIST *UNINIT_VAR(previous_table_ref); /* The table preceding the current one. */
char *alias_str; char *alias_str;
LEX *lex= thd->lex; LEX *lex= thd->lex;

View File

@ -345,7 +345,7 @@ bool handle_select(THD *thd, LEX *lex, select_result *result,
ulong setup_tables_done_option) ulong setup_tables_done_option)
{ {
bool res; bool res;
register SELECT_LEX *select_lex = &lex->select_lex; SELECT_LEX *select_lex = &lex->select_lex;
DBUG_ENTER("handle_select"); DBUG_ENTER("handle_select");
MYSQL_SELECT_START(thd->query()); MYSQL_SELECT_START(thd->query());

View File

@ -613,8 +613,8 @@ int String::strstr(const String &s,uint32 offset)
if (!s.length()) if (!s.length())
return ((int) offset); // Empty string is always found return ((int) offset); // Empty string is always found
register const char *str = Ptr+offset; const char *str = Ptr+offset;
register const char *search=s.ptr(); const char *search=s.ptr();
const char *end=Ptr+str_length-s.length()+1; const char *end=Ptr+str_length-s.length()+1;
const char *search_end=s.ptr()+s.length(); const char *search_end=s.ptr()+s.length();
skip: skip:
@ -622,7 +622,7 @@ skip:
{ {
if (*str++ == *search) if (*str++ == *search)
{ {
register char *i,*j; char *i,*j;
i=(char*) str; j=(char*) search+1; i=(char*) str; j=(char*) search+1;
while (j != search_end) while (j != search_end)
if (*i++ != *j++) goto skip; if (*i++ != *j++) goto skip;
@ -643,8 +643,8 @@ int String::strrstr(const String &s,uint32 offset)
{ {
if (!s.length()) if (!s.length())
return offset; // Empty string is always found return offset; // Empty string is always found
register const char *str = Ptr+offset-1; const char *str = Ptr+offset-1;
register const char *search=s.ptr()+s.length()-1; const char *search=s.ptr()+s.length()-1;
const char *end=Ptr+s.length()-2; const char *end=Ptr+s.length()-2;
const char *search_end=s.ptr()-1; const char *search_end=s.ptr()-1;
@ -653,7 +653,7 @@ skip:
{ {
if (*str-- == *search) if (*str-- == *search)
{ {
register char *i,*j; char *i,*j;
i=(char*) str; j=(char*) search-1; i=(char*) str; j=(char*) search-1;
while (j != search_end) while (j != search_end)
if (*i-- != *j--) goto skip; if (*i-- != *j--) goto skip;

View File

@ -3409,7 +3409,7 @@ partititon_err:
table TABLE object to free table TABLE object to free
*/ */
int closefrm(register TABLE *table) int closefrm(TABLE *table)
{ {
int error=0; int error=0;
DBUG_ENTER("closefrm"); DBUG_ENTER("closefrm");
@ -3446,7 +3446,7 @@ int closefrm(register TABLE *table)
/* Deallocate temporary blob storage */ /* Deallocate temporary blob storage */
void free_blobs(register TABLE *table) void free_blobs(TABLE *table)
{ {
uint *ptr, *end; uint *ptr, *end;
for (ptr= table->s->blob_field, end=ptr + table->s->blob_fields ; for (ptr= table->s->blob_field, end=ptr + table->s->blob_fields ;

View File

@ -209,7 +209,7 @@ static double get_merge_many_buffs_cost(uint *buffer,
uint last_n_elems, int elem_size, uint last_n_elems, int elem_size,
uint compare_factor) uint compare_factor)
{ {
register int i; int i;
double total_cost= 0.0; double total_cost= 0.0;
uint *buff_elems= buffer; /* #s of elements in each of merged sequences */ uint *buff_elems= buffer; /* #s of elements in each of merged sequences */

View File

@ -77,7 +77,7 @@ public:
inline static int get_cost_calc_buff_size(size_t nkeys, uint key_size, inline static int get_cost_calc_buff_size(size_t nkeys, uint key_size,
size_t max_in_memory_size) size_t max_in_memory_size)
{ {
register size_t max_elems_in_tree= size_t max_elems_in_tree=
max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size); max_in_memory_size / ALIGN_SIZE(sizeof(TREE_ELEMENT)+key_size);
return (int) (sizeof(uint)*(1 + nkeys/max_elems_in_tree)); return (int) (sizeof(uint)*(1 + nkeys/max_elems_in_tree));
} }

View File

@ -96,7 +96,7 @@ extern uint hp_rb_key_length(HP_KEYDEF *keydef, const uchar *key);
extern uint hp_rb_null_key_length(HP_KEYDEF *keydef, const uchar *key); extern uint hp_rb_null_key_length(HP_KEYDEF *keydef, const uchar *key);
extern uint hp_rb_var_key_length(HP_KEYDEF *keydef, const uchar *key); extern uint hp_rb_var_key_length(HP_KEYDEF *keydef, const uchar *key);
extern my_bool hp_if_null_in_key(HP_KEYDEF *keyinfo, const uchar *record); extern my_bool hp_if_null_in_key(HP_KEYDEF *keyinfo, const uchar *record);
extern int hp_close(register HP_INFO *info); extern int hp_close(HP_INFO *info);
extern void hp_clear(HP_SHARE *info); extern void hp_clear(HP_SHARE *info);
extern void hp_clear_keys(HP_SHARE *info); extern void hp_clear_keys(HP_SHARE *info);
extern uint hp_rb_pack_key(HP_KEYDEF *keydef, uchar *key, const uchar *old, extern uint hp_rb_pack_key(HP_KEYDEF *keydef, uchar *key, const uchar *old,

View File

@ -3077,7 +3077,7 @@ static enum data_file_type maria_row_type(HA_CREATE_INFO *info)
} }
int ha_maria::create(const char *name, register TABLE *table_arg, int ha_maria::create(const char *name, TABLE *table_arg,
HA_CREATE_INFO *ha_create_info) HA_CREATE_INFO *ha_create_info)
{ {
int error; int error;

View File

@ -190,8 +190,7 @@ MARIA_RECORD_POS _ma_write_init_block_record(MARIA_HA *info,
const uchar *record); const uchar *record);
my_bool _ma_write_block_record(MARIA_HA *info, const uchar *record); my_bool _ma_write_block_record(MARIA_HA *info, const uchar *record);
my_bool _ma_write_abort_block_record(MARIA_HA *info); my_bool _ma_write_abort_block_record(MARIA_HA *info);
my_bool _ma_compare_block_record(register MARIA_HA *info, my_bool _ma_compare_block_record(MARIA_HA *info, const uchar *record);
register const uchar *record);
void _ma_compact_block_page(MARIA_SHARE *share, uchar *buff, uint rownr, void _ma_compact_block_page(MARIA_SHARE *share, uchar *buff, uint rownr,
my_bool extend_block, TrID min_read_from, my_bool extend_block, TrID min_read_from,
uint min_row_length); uint min_row_length);

View File

@ -109,7 +109,7 @@ typedef struct st_maria_sort_param
int (*key_read)(struct st_maria_sort_param *, uchar *); int (*key_read)(struct st_maria_sort_param *, uchar *);
int (*key_write)(struct st_maria_sort_param *, const uchar *); int (*key_write)(struct st_maria_sort_param *, const uchar *);
void (*lock_in_memory)(HA_CHECK *); void (*lock_in_memory)(HA_CHECK *);
int (*write_keys)(struct st_maria_sort_param *, register uchar **, int (*write_keys)(struct st_maria_sort_param *, uchar **,
ulonglong , struct st_buffpek *, IO_CACHE *); ulonglong , struct st_buffpek *, IO_CACHE *);
my_off_t (*read_to_buffer)(IO_CACHE *,struct st_buffpek *, uint); my_off_t (*read_to_buffer)(IO_CACHE *,struct st_buffpek *, uint);
int (*write_key)(struct st_maria_sort_param *, IO_CACHE *,uchar *, int (*write_key)(struct st_maria_sort_param *, IO_CACHE *,uchar *,
@ -1051,7 +1051,7 @@ my_off_t _ma_no_keypos_to_recpos(MARIA_SHARE *share, my_off_t pos);
extern my_bool _ma_ck_write(MARIA_HA *info, MARIA_KEY *key); extern my_bool _ma_ck_write(MARIA_HA *info, MARIA_KEY *key);
extern my_bool _ma_enlarge_root(MARIA_HA *info, MARIA_KEY *key, extern my_bool _ma_enlarge_root(MARIA_HA *info, MARIA_KEY *key,
MARIA_RECORD_POS *root); MARIA_RECORD_POS *root);
int _ma_insert(register MARIA_HA *info, MARIA_KEY *key, int _ma_insert(MARIA_HA *info, MARIA_KEY *key,
MARIA_PAGE *anc_page, uchar *key_pos, uchar *key_buff, MARIA_PAGE *anc_page, uchar *key_pos, uchar *key_buff,
MARIA_PAGE *father_page, uchar *father_key_pos, MARIA_PAGE *father_page, uchar *father_key_pos,
my_bool insert_last); my_bool insert_last);
@ -1093,7 +1093,7 @@ extern void _ma_store_bin_pack_key(MARIA_KEYDEF *keyinfo, uchar *key_pos,
MARIA_KEY_PARAM *s_temp); MARIA_KEY_PARAM *s_temp);
extern my_bool _ma_ck_delete(MARIA_HA *info, MARIA_KEY *key); extern my_bool _ma_ck_delete(MARIA_HA *info, MARIA_KEY *key);
extern my_bool _ma_ck_real_delete(register MARIA_HA *info, MARIA_KEY *key, extern my_bool _ma_ck_real_delete(MARIA_HA *info, MARIA_KEY *key,
my_off_t *root); my_off_t *root);
extern int _ma_readinfo(MARIA_HA *info, int lock_flag, int check_keybuffer); extern int _ma_readinfo(MARIA_HA *info, int lock_flag, int check_keybuffer);
extern int _ma_writeinfo(MARIA_HA *info, uint options); extern int _ma_writeinfo(MARIA_HA *info, uint options);
@ -1165,7 +1165,7 @@ extern my_bool _ma_fetch_keypage(MARIA_PAGE *page, MARIA_HA *info,
extern my_bool _ma_write_keypage(MARIA_PAGE *page, extern my_bool _ma_write_keypage(MARIA_PAGE *page,
enum pagecache_page_lock lock, int level); enum pagecache_page_lock lock, int level);
extern int _ma_dispose(MARIA_HA *info, my_off_t pos, my_bool page_not_read); extern int _ma_dispose(MARIA_HA *info, my_off_t pos, my_bool page_not_read);
extern my_off_t _ma_new(register MARIA_HA *info, int level, extern my_off_t _ma_new(MARIA_HA *info, int level,
MARIA_PINNED_PAGE **page_link); MARIA_PINNED_PAGE **page_link);
extern my_bool _ma_compact_keypage(MARIA_PAGE *page, TrID min_read_from); extern my_bool _ma_compact_keypage(MARIA_PAGE *page, TrID min_read_from);
extern uint transid_store_packed(MARIA_HA *info, uchar *to, ulonglong trid); extern uint transid_store_packed(MARIA_HA *info, uchar *to, ulonglong trid);
@ -1353,7 +1353,7 @@ extern MARIA_HA *_ma_test_if_reopen(const char *filename);
my_bool _ma_check_table_is_closed(const char *name, const char *where); my_bool _ma_check_table_is_closed(const char *name, const char *where);
int _ma_open_datafile(MARIA_HA *info, MARIA_SHARE *share); int _ma_open_datafile(MARIA_HA *info, MARIA_SHARE *share);
int _ma_open_keyfile(MARIA_SHARE *share); int _ma_open_keyfile(MARIA_SHARE *share);
void _ma_setup_functions(register MARIA_SHARE *share); void _ma_setup_functions(MARIA_SHARE *share);
my_bool _ma_dynmap_file(MARIA_HA *info, my_off_t size); my_bool _ma_dynmap_file(MARIA_HA *info, my_off_t size);
void _ma_remap_file(MARIA_HA *info, my_off_t size); void _ma_remap_file(MARIA_HA *info, my_off_t size);
@ -1435,7 +1435,7 @@ extern my_bool maria_flush_log_for_page_none(PAGECACHE_IO_HOOK_ARGS *args);
extern PAGECACHE *maria_log_pagecache; extern PAGECACHE *maria_log_pagecache;
extern void ma_set_index_cond_func(MARIA_HA *info, index_cond_func_t func, extern void ma_set_index_cond_func(MARIA_HA *info, index_cond_func_t func,
void *func_arg); void *func_arg);
ICP_RESULT ma_check_index_cond(register MARIA_HA *info, uint keynr, uchar *record); ICP_RESULT ma_check_index_cond(MARIA_HA *info, uint keynr, uchar *record);
extern my_bool ma_yield_and_check_if_killed(MARIA_HA *info, int inx); extern my_bool ma_yield_and_check_if_killed(MARIA_HA *info, int inx);
extern my_bool ma_killed_standalone(MARIA_HA *); extern my_bool ma_killed_standalone(MARIA_HA *);

View File

@ -2104,7 +2104,7 @@ void ha_myisam::update_create_info(HA_CREATE_INFO *create_info)
} }
int ha_myisam::create(const char *name, register TABLE *table_arg, int ha_myisam::create(const char *name, TABLE *table_arg,
HA_CREATE_INFO *ha_create_info) HA_CREATE_INFO *ha_create_info)
{ {
int error; int error;

View File

@ -538,8 +538,7 @@ extern uchar *_mi_get_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page,
uchar *key, uchar *keypos, uchar *key, uchar *keypos,
uint *return_key_length); uint *return_key_length);
extern uint _mi_keylength(MI_KEYDEF *keyinfo, uchar *key); extern uint _mi_keylength(MI_KEYDEF *keyinfo, uchar *key);
extern uint _mi_keylength_part(MI_KEYDEF *keyinfo, register uchar *key, extern uint _mi_keylength_part(MI_KEYDEF *keyinfo, uchar *key, HA_KEYSEG *end);
HA_KEYSEG *end);
extern uchar *_mi_move_key(MI_KEYDEF *keyinfo, uchar *to, uchar *from); extern uchar *_mi_move_key(MI_KEYDEF *keyinfo, uchar *to, uchar *from);
extern int _mi_search_next(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, extern int _mi_search_next(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key,
uint key_length, uint nextflag, my_off_t pos); uint key_length, uint nextflag, my_off_t pos);
@ -718,12 +717,12 @@ my_bool check_table_is_closed(const char *name, const char *where);
int mi_open_datafile(MI_INFO *info, MYISAM_SHARE *share); int mi_open_datafile(MI_INFO *info, MYISAM_SHARE *share);
int mi_open_keyfile(MYISAM_SHARE *share); int mi_open_keyfile(MYISAM_SHARE *share);
void mi_setup_functions(register MYISAM_SHARE *share); void mi_setup_functions(MYISAM_SHARE *share);
my_bool mi_dynmap_file(MI_INFO *info, my_off_t size); my_bool mi_dynmap_file(MI_INFO *info, my_off_t size);
int mi_munmap_file(MI_INFO *info); int mi_munmap_file(MI_INFO *info);
void mi_remap_file(MI_INFO *info, my_off_t size); void mi_remap_file(MI_INFO *info, my_off_t size);
ICP_RESULT mi_check_index_cond(register MI_INFO *info, uint keynr, uchar *record); ICP_RESULT mi_check_index_cond(MI_INFO *info, uint keynr, uchar *record);
/* Functions needed by mi_check */ /* Functions needed by mi_check */
int killed_ptr(HA_CHECK *param); int killed_ptr(HA_CHECK *param);
void mi_check_print_error(HA_CHECK *param, const char *fmt, ...); void mi_check_print_error(HA_CHECK *param, const char *fmt, ...);

View File

@ -1572,7 +1572,7 @@ int ha_myisammrg::create_mrg(const char *name, HA_CREATE_INFO *create_info)
} }
int ha_myisammrg::create(const char *name, register TABLE *form, int ha_myisammrg::create(const char *name, TABLE *form,
HA_CREATE_INFO *create_info) HA_CREATE_INFO *create_info)
{ {
char buff[FN_REFLEN]; char buff[FN_REFLEN];

View File

@ -2215,7 +2215,7 @@ start_mutex_wait_v1(PSI_mutex_locker_state *state,
if (! pfs_mutex->m_enabled) if (! pfs_mutex->m_enabled)
return NULL; return NULL;
register uint flags; uint flags;
ulonglong timer_start= 0; ulonglong timer_start= 0;
if (flag_thread_instrumentation) if (flag_thread_instrumentation)
@ -2313,7 +2313,7 @@ start_rwlock_wait_v1(PSI_rwlock_locker_state *state,
if (! pfs_rwlock->m_enabled) if (! pfs_rwlock->m_enabled)
return NULL; return NULL;
register uint flags; uint flags;
ulonglong timer_start= 0; ulonglong timer_start= 0;
if (flag_thread_instrumentation) if (flag_thread_instrumentation)
@ -2421,7 +2421,7 @@ start_cond_wait_v1(PSI_cond_locker_state *state,
if (! pfs_cond->m_enabled) if (! pfs_cond->m_enabled)
return NULL; return NULL;
register uint flags; uint flags;
ulonglong timer_start= 0; ulonglong timer_start= 0;
if (flag_thread_instrumentation) if (flag_thread_instrumentation)
@ -2565,7 +2565,7 @@ start_table_io_wait_v1(PSI_table_locker_state *state,
PFS_thread *pfs_thread= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS); PFS_thread *pfs_thread= my_pthread_getspecific_ptr(PFS_thread*, THR_PFS);
register uint flags; uint flags;
ulonglong timer_start= 0; ulonglong timer_start= 0;
if (flag_thread_instrumentation) if (flag_thread_instrumentation)
@ -2691,7 +2691,7 @@ start_table_lock_wait_v1(PSI_table_locker_state *state,
DBUG_ASSERT((uint) lock_type < array_elements(table_lock_operation_map)); DBUG_ASSERT((uint) lock_type < array_elements(table_lock_operation_map));
register uint flags; uint flags;
ulonglong timer_start= 0; ulonglong timer_start= 0;
if (flag_thread_instrumentation) if (flag_thread_instrumentation)
@ -2799,7 +2799,7 @@ get_thread_file_name_locker_v1(PSI_file_locker_state *state,
if (flag_thread_instrumentation && ! pfs_thread->m_enabled) if (flag_thread_instrumentation && ! pfs_thread->m_enabled)
return NULL; return NULL;
register uint flags; uint flags;
state->m_thread= reinterpret_cast<PSI_thread *> (pfs_thread); state->m_thread= reinterpret_cast<PSI_thread *> (pfs_thread);
flags= STATE_FLAG_THREAD; flags= STATE_FLAG_THREAD;
@ -2868,7 +2868,7 @@ get_thread_file_stream_locker_v1(PSI_file_locker_state *state,
if (! pfs_file->m_enabled) if (! pfs_file->m_enabled)
return NULL; return NULL;
register uint flags; uint flags;
if (flag_thread_instrumentation) if (flag_thread_instrumentation)
{ {
@ -2974,7 +2974,7 @@ get_thread_file_descriptor_locker_v1(PSI_file_locker_state *state,
DBUG_ASSERT(pfs_file->m_class != NULL); DBUG_ASSERT(pfs_file->m_class != NULL);
PFS_file_class *klass= pfs_file->m_class; PFS_file_class *klass= pfs_file->m_class;
register uint flags; uint flags;
if (flag_thread_instrumentation) if (flag_thread_instrumentation)
{ {
@ -3063,7 +3063,7 @@ start_socket_wait_v1(PSI_socket_locker_state *state,
if (!pfs_socket->m_enabled || pfs_socket->m_idle) if (!pfs_socket->m_enabled || pfs_socket->m_idle)
return NULL; return NULL;
register uint flags= 0; uint flags= 0;
ulonglong timer_start= 0; ulonglong timer_start= 0;
if (flag_thread_instrumentation) if (flag_thread_instrumentation)
@ -3322,7 +3322,7 @@ start_idle_wait_v1(PSI_idle_locker_state* state, const char *src_file, uint src_
if (!global_idle_class.m_enabled) if (!global_idle_class.m_enabled)
return NULL; return NULL;
register uint flags= 0; uint flags= 0;
ulonglong timer_start= 0; ulonglong timer_start= 0;
if (flag_thread_instrumentation) if (flag_thread_instrumentation)
@ -3404,7 +3404,7 @@ static void end_idle_wait_v1(PSI_idle_locker* locker)
ulonglong timer_end= 0; ulonglong timer_end= 0;
ulonglong wait_time= 0; ulonglong wait_time= 0;
register uint flags= state->m_flags; uint flags= state->m_flags;
if (flags & STATE_FLAG_TIMED) if (flags & STATE_FLAG_TIMED)
{ {
@ -3474,7 +3474,7 @@ static void end_mutex_wait_v1(PSI_mutex_locker* locker, int rc)
DBUG_ASSERT(mutex != NULL); DBUG_ASSERT(mutex != NULL);
PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread); PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread);
register uint flags= state->m_flags; uint flags= state->m_flags;
if (flags & STATE_FLAG_TIMED) if (flags & STATE_FLAG_TIMED)
{ {
@ -3795,7 +3795,7 @@ static void end_table_io_wait_v1(PSI_table_locker* locker)
break; break;
} }
register uint flags= state->m_flags; uint flags= state->m_flags;
if (flags & STATE_FLAG_TIMED) if (flags & STATE_FLAG_TIMED)
{ {
@ -3866,7 +3866,7 @@ static void end_table_lock_wait_v1(PSI_table_locker* locker)
PFS_single_stat *stat= & table->m_table_stat.m_lock_stat.m_stat[state->m_index]; PFS_single_stat *stat= & table->m_table_stat.m_lock_stat.m_stat[state->m_index];
register uint flags= state->m_flags; uint flags= state->m_flags;
if (flags & STATE_FLAG_TIMED) if (flags & STATE_FLAG_TIMED)
{ {
@ -4029,7 +4029,7 @@ static void start_file_wait_v1(PSI_file_locker *locker,
PSI_file_locker_state *state= reinterpret_cast<PSI_file_locker_state*> (locker); PSI_file_locker_state *state= reinterpret_cast<PSI_file_locker_state*> (locker);
DBUG_ASSERT(state != NULL); DBUG_ASSERT(state != NULL);
register uint flags= state->m_flags; uint flags= state->m_flags;
if (flags & STATE_FLAG_TIMED) if (flags & STATE_FLAG_TIMED)
{ {
@ -4065,7 +4065,7 @@ static void end_file_wait_v1(PSI_file_locker *locker,
ulonglong timer_end= 0; ulonglong timer_end= 0;
ulonglong wait_time= 0; ulonglong wait_time= 0;
PFS_byte_stat *byte_stat; PFS_byte_stat *byte_stat;
register uint flags= state->m_flags; uint flags= state->m_flags;
size_t bytes= ((int)byte_count > -1 ? byte_count : 0); size_t bytes= ((int)byte_count > -1 ? byte_count : 0);
PFS_file_stat *file_stat; PFS_file_stat *file_stat;
@ -4420,7 +4420,7 @@ get_thread_statement_locker_v1(PSI_statement_locker_state *state,
if (! klass->m_enabled) if (! klass->m_enabled)
return NULL; return NULL;
register uint flags; uint flags;
if (flag_thread_instrumentation) if (flag_thread_instrumentation)
{ {
@ -4597,7 +4597,7 @@ static void start_statement_v1(PSI_statement_locker *locker,
PSI_statement_locker_state *state= reinterpret_cast<PSI_statement_locker_state*> (locker); PSI_statement_locker_state *state= reinterpret_cast<PSI_statement_locker_state*> (locker);
DBUG_ASSERT(state != NULL); DBUG_ASSERT(state != NULL);
register uint flags= state->m_flags; uint flags= state->m_flags;
ulonglong timer_start= 0; ulonglong timer_start= 0;
if (flags & STATE_FLAG_TIMED) if (flags & STATE_FLAG_TIMED)
@ -4799,7 +4799,7 @@ static void end_statement_v1(PSI_statement_locker *locker, void *stmt_da)
ulonglong timer_end= 0; ulonglong timer_end= 0;
ulonglong wait_time= 0; ulonglong wait_time= 0;
register uint flags= state->m_flags; uint flags= state->m_flags;
if (flags & STATE_FLAG_TIMED) if (flags & STATE_FLAG_TIMED)
{ {
@ -5027,7 +5027,7 @@ static void end_socket_wait_v1(PSI_socket_locker *locker, size_t byte_count)
ulonglong timer_end= 0; ulonglong timer_end= 0;
ulonglong wait_time= 0; ulonglong wait_time= 0;
PFS_byte_stat *byte_stat; PFS_byte_stat *byte_stat;
register uint flags= state->m_flags; uint flags= state->m_flags;
size_t bytes= ((int)byte_count > -1 ? byte_count : 0); size_t bytes= ((int)byte_count > -1 ? byte_count : 0);
switch (state->m_operation) switch (state->m_operation)

View File

@ -80,7 +80,7 @@ inline uint randomized_index(const void *ptr, uint max_size)
static uint seed1= 0; static uint seed1= 0;
static uint seed2= 0; static uint seed2= 0;
uint result; uint result;
register intptr value; intptr value;
if (unlikely(max_size == 0)) if (unlikely(max_size == 0))
return 0; return 0;