MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
strfunc.h
1 /* Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
2 
3  This program is free software; you can redistribute it and/or modify
4  it under the terms of the GNU General Public License as published by
5  the Free Software Foundation; version 2 of the License.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  GNU General Public License for more details.
11 
12  You should have received a copy of the GNU General Public License
13  along with this program; if not, write to the Free Software
14  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
15 
16 #ifndef STRFUNC_INCLUDED
17 #define STRFUNC_INCLUDED
18 
19 #include "my_global.h" /* ulonglong, uint */
20 
21 typedef struct charset_info_st CHARSET_INFO;
22 typedef struct st_mysql_lex_string LEX_STRING;
23 typedef struct st_typelib TYPELIB;
24 
25 ulonglong find_set(TYPELIB *lib, const char *x, uint length,
26  const CHARSET_INFO *cs,
27  char **err_pos, uint *err_len, bool *set_warning);
28 ulonglong find_set_from_flags(TYPELIB *lib, uint default_name,
29  ulonglong cur_set, ulonglong default_set,
30  const char *str, uint length,
31  const CHARSET_INFO *cs,
32  char **err_pos, uint *err_len, bool *set_warning);
33 uint find_type(const TYPELIB *lib, const char *find, uint length,
34  bool part_match);
35 uint find_type2(const TYPELIB *lib, const char *find, uint length,
36  const CHARSET_INFO *cs);
37 void unhex_type2(TYPELIB *lib);
38 uint check_word(TYPELIB *lib, const char *val, const char *end,
39  const char **end_of_word);
40 int find_string_in_array(LEX_STRING * const haystack, LEX_STRING * const needle,
41  CHARSET_INFO * const cs);
42 char *flagset_to_string(THD *thd, LEX_STRING *result, ulonglong set,
43  const char *lib[]);
44 char *set_to_string(THD *thd, LEX_STRING *result, ulonglong set,
45  const char *lib[]);
46 
47 /*
48  These functions were protected by INNODB_COMPATIBILITY_HOOKS
49  */
50 uint strconvert(CHARSET_INFO *from_cs, const char *from,
51  CHARSET_INFO *to_cs, char *to, uint to_length, uint *errors);
52 
53 #endif /* STRFUNC_INCLUDED */