~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_access.c

  • Committer: Jay Pipes
  • Date: 2008-07-21 17:52:33 UTC
  • mto: (201.2.1 drizzle)
  • mto: This revision was merged to the branch mainline in revision 204.
  • Revision ID: jay@mysql.com-20080721175233-mtyz298j8xl3v63y
cleanup of FAQ file

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
#include "mysys_priv.h"
17
 
#include <mystrings/m_string.h>
 
17
#include <m_string.h>
18
18
 
19
19
/*
20
20
  List of file names that causes problem on windows
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
 
  NULL
 
33
  NullS
34
34
};
35
35
 
36
36
#define MAX_RESERVED_NAME_LENGTH 6
54
54
  const char **name;
55
55
  for (name= list; *name; name++)
56
56
  {
57
 
    if (!my_strcasecmp(&my_charset_utf8_general_ci, *name, str))
 
57
    if (!my_strcasecmp(&my_charset_latin1, *name, str))
58
58
      return 1;
59
59
  }
60
60
  return 0;
109
109
 
110
110
int check_if_legal_tablename(const char *name)
111
111
{
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) &&
 
112
  return((reserved_map[(uchar) name[0]] & 1) &&
 
113
              (reserved_map[(uchar) name[1]] & 2) &&
 
114
              (reserved_map[(uchar) name[2]] & 4) &&
115
115
              str_list_find(&reserved_names[1], name));
116
116
}
117
117