The world's most popular open source database
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Classes | |
| struct | st_typelib |
Typedefs | |
| typedef st_typelib | TYPELIB |
Functions | |
| int | find_type (char *x, TYPELIB *typelib, unsigned int full_name) |
| void | make_type (char *to, unsigned int nr, TYPELIB *typelib) |
| const char * | get_type (TYPELIB *typelib, unsigned int nr) |
Variables | |
| TYPELIB | sql_protocol_typelib |
| typedef struct st_typelib TYPELIB |
| int find_type | ( | char * | x, | |
| TYPELIB * | typelib, | |||
| unsigned int | full_name | |||
| ) |
Definition at line 46 of file typelib.c.
Referenced by sys_var::check_enum(), check_word(), execute_commands(), find_set(), Item_func_find_in_set::fix_length_and_dec(), get_key_map_from_key_list(), get_one_option(), get_query_type(), get_topics_for_keyword(), handle_default_option(), main(), myrg_open(), mysql_ha_read(), mysql_read_default_options(), and mysql_rm_known_files().
00047 { 00048 int find,pos,findpos; 00049 reg1 my_string i; 00050 reg2 const char *j; 00051 DBUG_ENTER("find_type"); 00052 DBUG_PRINT("enter",("x: '%s' lib: 0x%lx",x,typelib)); 00053 00054 if (!typelib->count) 00055 { 00056 DBUG_PRINT("exit",("no count")); 00057 DBUG_RETURN(0); 00058 } 00059 LINT_INIT(findpos); 00060 find=0; 00061 for (pos=0 ; (j=typelib->type_names[pos]) ; pos++) 00062 { 00063 for (i=x ; 00064 *i && my_toupper(&my_charset_latin1,*i) == 00065 my_toupper(&my_charset_latin1,*j) ; i++, j++) ; 00066 if (! *j) 00067 { 00068 while (*i == ' ') 00069 i++; /* skip_end_space */ 00070 if (! *i) 00071 DBUG_RETURN(pos+1); 00072 } 00073 if (! *i && (!*j || !(full_name & 1))) 00074 { 00075 find++; 00076 findpos=pos; 00077 } 00078 } 00079 if (find == 0 && (full_name & 4) && x[0] == '#' && strend(x)[-1] == '#' && 00080 (findpos=atoi(x+1)-1) >= 0 && (uint) findpos < typelib->count) 00081 find=1; 00082 else if (find == 0 || ! x[0]) 00083 { 00084 DBUG_PRINT("exit",("Couldn't find type")); 00085 DBUG_RETURN(0); 00086 } 00087 else if (find != 1 || (full_name & 1)) 00088 { 00089 DBUG_PRINT("exit",("Too many possybilities")); 00090 DBUG_RETURN(-1); 00091 } 00092 if (!(full_name & 2)) 00093 (void) strmov(x,typelib->type_names[findpos]); 00094 DBUG_RETURN(findpos+1); 00095 } /* find_type */
Here is the caller graph for this function:

| const char* get_type | ( | TYPELIB * | typelib, | |
| unsigned int | nr | |||
| ) |
Definition at line 116 of file typelib.c.
References st_typelib::count, st_typelib::type_names, and typelib().
Referenced by ha_myisammrg::append_create_info(), make_type(), and myrg_create().
00117 { 00118 if (nr < (uint) typelib->count && typelib->type_names) 00119 return(typelib->type_names[nr]); 00120 return "?"; 00121 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void make_type | ( | char * | to, | |
| unsigned int | nr, | |||
| TYPELIB * | typelib | |||
| ) |
Definition at line 917 of file client.c.
Referenced by get_one_option(), and mysql_read_default_options().
1.4.7

