~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_access.c

Merged in changes from Andrey.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
  "CON", "PRN", "AUX", "NUL",
31
31
  "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9",
32
32
  "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9",
33
 
  NullS
 
33
  NULL
34
34
};
35
35
 
36
36
#define MAX_RESERVED_NAME_LENGTH 6
109
109
 
110
110
int check_if_legal_tablename(const char *name)
111
111
{
112
 
  return((reserved_map[(uchar) name[0]] & 1) &&
113
 
              (reserved_map[(uchar) name[1]] & 2) &&
114
 
              (reserved_map[(uchar) name[2]] & 4) &&
 
112
  return((reserved_map[(unsigned char) name[0]] & 1) &&
 
113
              (reserved_map[(unsigned char) name[1]] & 2) &&
 
114
              (reserved_map[(unsigned char) name[2]] & 4) &&
115
115
              str_list_find(&reserved_names[1], name));
116
116
}
117
117