My Project
|
00001 /* Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved. 00002 00003 This program is free software; you can redistribute it and/or modify 00004 it under the terms of the GNU General Public License as published by 00005 the Free Software Foundation; version 2 of the License. 00006 00007 This program is distributed in the hope that it will be useful, 00008 but WITHOUT ANY WARRANTY; without even the implied warranty of 00009 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00010 GNU General Public License for more details. 00011 00012 You should have received a copy of the GNU General Public License 00013 along with this program; if not, write to the Free Software 00014 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ 00015 00016 #ifndef STRFUNC_INCLUDED 00017 #define STRFUNC_INCLUDED 00018 00019 #include "my_global.h" /* ulonglong, uint */ 00020 00021 typedef struct charset_info_st CHARSET_INFO; 00022 typedef struct st_mysql_lex_string LEX_STRING; 00023 typedef struct st_typelib TYPELIB; 00024 00025 ulonglong find_set(TYPELIB *lib, const char *x, uint length, 00026 const CHARSET_INFO *cs, 00027 char **err_pos, uint *err_len, bool *set_warning); 00028 ulonglong find_set_from_flags(TYPELIB *lib, uint default_name, 00029 ulonglong cur_set, ulonglong default_set, 00030 const char *str, uint length, 00031 const CHARSET_INFO *cs, 00032 char **err_pos, uint *err_len, bool *set_warning); 00033 uint find_type(const TYPELIB *lib, const char *find, uint length, 00034 bool part_match); 00035 uint find_type2(const TYPELIB *lib, const char *find, uint length, 00036 const CHARSET_INFO *cs); 00037 void unhex_type2(TYPELIB *lib); 00038 uint check_word(TYPELIB *lib, const char *val, const char *end, 00039 const char **end_of_word); 00040 int find_string_in_array(LEX_STRING * const haystack, LEX_STRING * const needle, 00041 CHARSET_INFO * const cs); 00042 char *flagset_to_string(THD *thd, LEX_STRING *result, ulonglong set, 00043 const char *lib[]); 00044 char *set_to_string(THD *thd, LEX_STRING *result, ulonglong set, 00045 const char *lib[]); 00046 00047 /* 00048 These functions were protected by INNODB_COMPATIBILITY_HOOKS 00049 */ 00050 uint strconvert(CHARSET_INFO *from_cs, const char *from, 00051 CHARSET_INFO *to_cs, char *to, uint to_length, uint *errors); 00052 00053 #endif /* STRFUNC_INCLUDED */