The world's most popular open source database
#include "mysql_priv.h"#include <errno.h>#include <m_ctype.h>#include <my_sys.h>#include <my_dir.h>Include dependency graph for parse_file.cc:

Go to the source code of this file.
Functions | |
| static my_bool | write_escaped_string (IO_CACHE *file, LEX_STRING *val_s) |
| static my_bool | write_parameter (IO_CACHE *file, gptr base, File_option *parameter, ulonglong *old_version) |
| my_bool | sql_create_definition_file (const LEX_STRING *dir, const LEX_STRING *file_name, const LEX_STRING *type, gptr base, File_option *parameters, uint max_versions) |
| my_bool | rename_in_schema_file (const char *schema, const char *old_name, const char *new_name, ulonglong revision, uint num_view_backups) |
| File_parser * | sql_parse_prepare (const LEX_STRING *file_name, MEM_ROOT *mem_root, bool bad_format_errors) |
| static char * | parse_string (char *ptr, char *end, MEM_ROOT *mem_root, LEX_STRING *str) |
| my_bool | read_escaped_string (char *ptr, char *eol, LEX_STRING *str) |
| char * | parse_escaped_string (char *ptr, char *end, MEM_ROOT *mem_root, LEX_STRING *str) |
| static char * | parse_quoted_escaped_string (char *ptr, char *end, MEM_ROOT *mem_root, LEX_STRING *str) |
| bool | get_file_options_ulllist (char *&ptr, char *end, char *line, gptr base, File_option *parameter, MEM_ROOT *mem_root) |
| bool get_file_options_ulllist | ( | char *& | ptr, | |
| char * | end, | |||
| char * | line, | |||
| gptr | base, | |||
| File_option * | parameter, | |||
| MEM_ROOT * | mem_root | |||
| ) |
Definition at line 693 of file parse_file.cc.
References alloc_root(), base_list::empty(), ER_FPARSER_ERROR_IN_PARAMETER, FALSE, my_error(), my_strtoll10(), MYF, File_option::name, File_option::offset, List< T >::push_back(), LEX_STRING::str, and TRUE.
Referenced by File_parser::parse(), and Handle_old_incorrect_sql_modes_hook::process_unknown_string().
00696 { 00697 List<ulonglong> *nlist= (List<ulonglong>*)(base + parameter->offset); 00698 ulonglong *num; 00699 nlist->empty(); 00700 // list parsing 00701 while (ptr < end) 00702 { 00703 int not_used; 00704 char *num_end= end; 00705 if (!(num= (ulonglong*)alloc_root(mem_root, sizeof(ulonglong))) || 00706 nlist->push_back(num, mem_root)) 00707 goto nlist_err; 00708 *num= my_strtoll10(ptr, &num_end, ¬_used); 00709 ptr= num_end; 00710 switch (*ptr) { 00711 case '\n': 00712 goto end_of_nlist; 00713 case ' ': 00714 // we cant go over buffer bounds, because we have \0 at the end 00715 ptr++; 00716 break; 00717 default: 00718 goto nlist_err_w_message; 00719 } 00720 } 00721 00722 end_of_nlist: 00723 if (*(ptr++) != '\n') 00724 goto nlist_err; 00725 return FALSE; 00726 00727 nlist_err_w_message: 00728 my_error(ER_FPARSER_ERROR_IN_PARAMETER, MYF(0), parameter->name.str, line); 00729 nlist_err: 00730 return TRUE; 00731 }
Here is the call graph for this function:

Here is the caller graph for this function:

| char* parse_escaped_string | ( | char * | ptr, | |
| char * | end, | |||
| MEM_ROOT * | mem_root, | |||
| LEX_STRING * | str | |||
| ) |
Definition at line 621 of file parse_file.cc.
References alloc_root(), read_escaped_string(), LEX_STRING::str, and strchr().
Referenced by File_parser::parse(), and Handle_old_incorrect_trigger_table_hook::process_unknown_string().
00622 { 00623 char *eol= strchr(ptr, '\n'); 00624 00625 if (eol == 0 || eol >= end || 00626 !(str->str= alloc_root(mem_root, (eol - ptr) + 1)) || 00627 read_escaped_string(ptr, eol, str)) 00628 return 0; 00629 00630 return eol+1; 00631 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static char* parse_quoted_escaped_string | ( | char * | ptr, | |
| char * | end, | |||
| MEM_ROOT * | mem_root, | |||
| LEX_STRING * | str | |||
| ) | [static] |
Definition at line 651 of file parse_file.cc.
References alloc_root(), escaped, read_escaped_string(), and LEX_STRING::str.
Referenced by File_parser::parse().
00653 { 00654 char *eol; 00655 uint result_len= 0; 00656 bool escaped= 0; 00657 00658 // starting ' 00659 if (*(ptr++) != '\'') 00660 return 0; 00661 00662 // find ending ' 00663 for (eol= ptr; (*eol != '\'' || escaped) && eol < end; eol++) 00664 { 00665 if (!(escaped= (*eol == '\\' && !escaped))) 00666 result_len++; 00667 } 00668 00669 // process string 00670 if (eol >= end || 00671 !(str->str= alloc_root(mem_root, result_len + 1)) || 00672 read_escaped_string(ptr, eol, str)) 00673 return 0; 00674 00675 return eol+1; 00676 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static char* parse_string | ( | char * | ptr, | |
| char * | end, | |||
| MEM_ROOT * | mem_root, | |||
| LEX_STRING * | str | |||
| ) | [static] |
Definition at line 526 of file parse_file.cc.
References alloc_root(), LEX_STRING::length, memcpy, LEX_STRING::str, and strchr().
Referenced by File_parser::parse().
00527 { 00528 // get string length 00529 char *eol= strchr(ptr, '\n'); 00530 00531 if (eol >= end) 00532 return 0; 00533 00534 str->length= eol - ptr; 00535 00536 if (!(str->str= alloc_root(mem_root, str->length+1))) 00537 return 0; 00538 00539 memcpy(str->str, ptr, str->length); 00540 str->str[str->length]= '\0'; // just for safety 00541 return eol+1; 00542 }
Here is the call graph for this function:

Here is the caller graph for this function:

| my_bool read_escaped_string | ( | char * | ptr, | |
| char * | eol, | |||
| LEX_STRING * | str | |||
| ) |
Definition at line 560 of file parse_file.cc.
References FALSE, LEX_STRING::length, LEX_STRING::str, and TRUE.
Referenced by parse_escaped_string(), and parse_quoted_escaped_string().
00561 { 00562 char *write_pos= str->str; 00563 00564 for (; ptr < eol; ptr++, write_pos++) 00565 { 00566 char c= *ptr; 00567 if (c == '\\') 00568 { 00569 ptr++; 00570 if (ptr >= eol) 00571 return TRUE; 00572 /* 00573 Should be in sync with write_escaped_string() and 00574 parse_quoted_escaped_string() 00575 */ 00576 switch(*ptr) { 00577 case '\\': 00578 *write_pos= '\\'; 00579 break; 00580 case 'n': 00581 *write_pos= '\n'; 00582 break; 00583 case '0': 00584 *write_pos= '\0'; 00585 break; 00586 case 'z': 00587 *write_pos= 26; 00588 break; 00589 case '\'': 00590 *write_pos= '\''; 00591 break; 00592 default: 00593 return TRUE; 00594 } 00595 } 00596 else 00597 *write_pos= c; 00598 } 00599 str->str[str->length= write_pos-str->str]= '\0'; // just for safety 00600 return FALSE; 00601 }
Here is the caller graph for this function:

| my_bool rename_in_schema_file | ( | const char * | schema, | |
| const char * | old_name, | |||
| const char * | new_name, | |||
| ulonglong | revision, | |||
| uint | num_view_backups | |||
| ) |
Definition at line 365 of file parse_file.cc.
References access, F_OK, FN_REFLEN, my_rename(), my_snprintf(), MY_WME, MYF, mysql_data_home, NullS, reg_ext, strxnmov(), and unpack_filename().
Referenced by mysql_rename_view().
00368 { 00369 char old_path[FN_REFLEN], new_path[FN_REFLEN], arc_path[FN_REFLEN]; 00370 00371 strxnmov(old_path, FN_REFLEN-1, mysql_data_home, "/", schema, "/", 00372 old_name, reg_ext, NullS); 00373 (void) unpack_filename(old_path, old_path); 00374 00375 strxnmov(new_path, FN_REFLEN-1, mysql_data_home, "/", schema, "/", 00376 new_name, reg_ext, NullS); 00377 (void) unpack_filename(new_path, new_path); 00378 00379 if (my_rename(old_path, new_path, MYF(MY_WME))) 00380 return 1; 00381 00382 /* check if arc_dir exists */ 00383 strxnmov(arc_path, FN_REFLEN-1, mysql_data_home, "/", schema, "/arc", NullS); 00384 (void) unpack_filename(arc_path, arc_path); 00385 00386 if (revision > 0 && !access(arc_path, F_OK)) 00387 { 00388 ulonglong limit= ((revision > num_view_backups) ? 00389 revision - num_view_backups : 0); 00390 for (; revision > limit ; revision--) 00391 { 00392 my_snprintf(old_path, FN_REFLEN, "%s/%s%s-%04lu", 00393 arc_path, old_name, reg_ext, (ulong)revision); 00394 (void) unpack_filename(old_path, old_path); 00395 my_snprintf(new_path, FN_REFLEN, "%s/%s%s-%04lu", 00396 arc_path, new_name, reg_ext, (ulong)revision); 00397 (void) unpack_filename(new_path, new_path); 00398 my_rename(old_path, new_path, MYF(0)); 00399 } 00400 } 00401 return 0; 00402 }
Here is the call graph for this function:

Here is the caller graph for this function:

| my_bool sql_create_definition_file | ( | const LEX_STRING * | dir, | |
| const LEX_STRING * | file_name, | |||
| const LEX_STRING * | type, | |||
| gptr | base, | |||
| File_option * | parameters, | |||
| uint | max_versions | |||
| ) |
Definition at line 214 of file parse_file.cc.
References access, CREATE_MODE, DBUG_ENTER, DBUG_PRINT, DBUG_RETURN, end_io_cache(), F_OK, FALSE, fn_format(), FN_REFLEN, init_io_cache(), LEX_STRING::length, memcpy, my_b_append(), my_close(), my_create(), my_delete(), my_mkdir(), my_rename(), my_snprintf(), MY_UNPACK_FILENAME, MY_WME, MYF, File_option::name, NullS, path, SEQ_READ_APPEND, LEX_STRING::str, STRING_WITH_LEN, strlen(), strxnmov(), TRUE, ULONGLONG_MAX, and write_parameter().
Referenced by Table_triggers_list::change_table_name_in_trignames(), Table_triggers_list::create_trigger(), mysql_rename_view(), and save_trigger_file().
00218 { 00219 File handler; 00220 IO_CACHE file; 00221 char path[FN_REFLEN+1]; // +1 to put temporary file name for sure 00222 ulonglong old_version= ULONGLONG_MAX; 00223 int path_end; 00224 File_option *param; 00225 DBUG_ENTER("sql_create_definition_file"); 00226 DBUG_PRINT("enter", ("Dir: %s, file: %s, base 0x%lx", 00227 dir ? dir->str : "(null)", 00228 file_name->str, (ulong) base)); 00229 00230 if (dir) 00231 { 00232 fn_format(path, file_name->str, dir->str, 0, MY_UNPACK_FILENAME); 00233 path_end= strlen(path); 00234 } 00235 else 00236 { 00237 /* 00238 if not dir is passed, it means file_name is a full path, 00239 including dir name, file name itself, and an extension, 00240 and with unpack_filename() executed over it. 00241 */ 00242 path_end= strxnmov(path, FN_REFLEN, file_name->str, NullS) - path; 00243 } 00244 00245 // temporary file name 00246 path[path_end]='~'; 00247 path[path_end+1]= '\0'; 00248 if ((handler= my_create(path, CREATE_MODE, O_RDWR | O_TRUNC, 00249 MYF(MY_WME))) <= 0) 00250 { 00251 DBUG_RETURN(TRUE); 00252 } 00253 00254 if (init_io_cache(&file, handler, 0, SEQ_READ_APPEND, 0L, 0, MYF(MY_WME))) 00255 goto err_w_file; 00256 00257 // write header (file signature) 00258 if (my_b_append(&file, (const byte *)STRING_WITH_LEN("TYPE=")) || 00259 my_b_append(&file, (const byte *)type->str, type->length) || 00260 my_b_append(&file, (const byte *)STRING_WITH_LEN("\n"))) 00261 goto err_w_file; 00262 00263 // write parameters to temporary file 00264 for (param= parameters; param->name.str; param++) 00265 { 00266 if (my_b_append(&file, (const byte *)param->name.str, 00267 param->name.length) || 00268 my_b_append(&file, (const byte *)STRING_WITH_LEN("=")) || 00269 write_parameter(&file, base, param, &old_version) || 00270 my_b_append(&file, (const byte *)STRING_WITH_LEN("\n"))) 00271 goto err_w_cache; 00272 } 00273 00274 if (end_io_cache(&file)) 00275 goto err_w_file; 00276 00277 if (my_close(handler, MYF(MY_WME))) 00278 { 00279 DBUG_RETURN(TRUE); 00280 } 00281 00282 // archive copies management 00283 path[path_end]='\0'; 00284 if (!access(path, F_OK)) 00285 { 00286 if (old_version != ULONGLONG_MAX && max_versions != 0) 00287 { 00288 // save backup 00289 char path_arc[FN_REFLEN]; 00290 // backup old version 00291 char path_to[FN_REFLEN]; 00292 00293 // check archive directory existence 00294 fn_format(path_arc, "arc", dir->str, "", MY_UNPACK_FILENAME); 00295 if (access(path_arc, F_OK)) 00296 { 00297 if (my_mkdir(path_arc, 0777, MYF(MY_WME))) 00298 { 00299 DBUG_RETURN(TRUE); 00300 } 00301 } 00302 00303 my_snprintf(path_to, FN_REFLEN, "%s/%s-%04lu", 00304 path_arc, file_name->str, (ulong) old_version); 00305 if (my_rename(path, path_to, MYF(MY_WME))) 00306 { 00307 DBUG_RETURN(TRUE); 00308 } 00309 00310 // remove very old version 00311 if (old_version > max_versions) 00312 { 00313 my_snprintf(path_to, FN_REFLEN, "%s/%s-%04lu", 00314 path_arc, file_name->str, 00315 (ulong)(old_version - max_versions)); 00316 if (!access(path_arc, F_OK) && my_delete(path_to, MYF(MY_WME))) 00317 { 00318 DBUG_RETURN(TRUE); 00319 } 00320 } 00321 } 00322 else 00323 { 00324 if (my_delete(path, MYF(MY_WME))) // no backups 00325 { 00326 DBUG_RETURN(TRUE); 00327 } 00328 } 00329 } 00330 00331 { 00332 // rename temporary file 00333 char path_to[FN_REFLEN]; 00334 memcpy(path_to, path, path_end+1); 00335 path[path_end]='~'; 00336 if (my_rename(path, path_to, MYF(MY_WME))) 00337 { 00338 DBUG_RETURN(TRUE); 00339 } 00340 } 00341 DBUG_RETURN(FALSE); 00342 err_w_cache: 00343 end_io_cache(&file); 00344 err_w_file: 00345 my_close(handler, MYF(MY_WME)); 00346 DBUG_RETURN(TRUE); 00347 }
Here is the call graph for this function:

Here is the caller graph for this function:

| File_parser* sql_parse_prepare | ( | const LEX_STRING * | file_name, | |
| MEM_ROOT * | mem_root, | |||
| bool | bad_format_errors | |||
| ) |
Definition at line 422 of file parse_file.cc.
References alloc_root(), DBUG_ENTER, DBUG_RETURN, ER_FPARSER_BAD_HEADER, ER_FPARSER_TOO_BIG_FILE, my_close(), my_error(), MY_FILE_ERROR, my_open(), my_read, MY_STAT, my_stat(), MY_WME, MYF, O_SHARE, parser, and LEX_STRING::str.
Referenced by add_table_for_trigger(), Table_triggers_list::check_n_load(), mysql_register_view(), mysql_rename_view(), and open_new_frm().
00424 { 00425 MY_STAT stat_info; 00426 uint len; 00427 char *end, *sign; 00428 File_parser *parser; 00429 File file; 00430 DBUG_ENTER("sql_parse_prepare"); 00431 00432 if (!my_stat(file_name->str, &stat_info, MYF(MY_WME))) 00433 { 00434 DBUG_RETURN(0); 00435 } 00436 00437 if (stat_info.st_size > INT_MAX-1) 00438 { 00439 my_error(ER_FPARSER_TOO_BIG_FILE, MYF(0), file_name->str); 00440 DBUG_RETURN(0); 00441 } 00442 00443 if (!(parser= new(mem_root) File_parser)) 00444 { 00445 DBUG_RETURN(0); 00446 } 00447 00448 if (!(parser->buff= alloc_root(mem_root, stat_info.st_size+1))) 00449 { 00450 DBUG_RETURN(0); 00451 } 00452 00453 if ((file= my_open(file_name->str, O_RDONLY | O_SHARE, MYF(MY_WME))) < 0) 00454 { 00455 DBUG_RETURN(0); 00456 } 00457 00458 if ((len= my_read(file, (byte *)parser->buff, 00459 stat_info.st_size, MYF(MY_WME))) == 00460 MY_FILE_ERROR) 00461 { 00462 my_close(file, MYF(MY_WME)); 00463 DBUG_RETURN(0); 00464 } 00465 00466 if (my_close(file, MYF(MY_WME))) 00467 { 00468 DBUG_RETURN(0); 00469 } 00470 00471 end= parser->end= parser->buff + len; 00472 *end= '\0'; // barrier for more simple parsing 00473 00474 // 7 = 5 (TYPE=) + 1 (letter at least of type name) + 1 ('\n') 00475 if (len < 7 || 00476 parser->buff[0] != 'T' || 00477 parser->buff[1] != 'Y' || 00478 parser->buff[2] != 'P' || 00479 parser->buff[3] != 'E' || 00480 parser->buff[4] != '=') 00481 goto frm_error; 00482 00483 // skip signature; 00484 parser->file_type.str= sign= parser->buff + 5; 00485 while (*sign >= 'A' && *sign <= 'Z' && sign < end) 00486 sign++; 00487 if (*sign != '\n') 00488 goto frm_error; 00489 parser->file_type.length= sign - parser->file_type.str; 00490 // EOS for file signature just for safety 00491 *sign= '\0'; 00492 00493 parser->start= sign + 1; 00494 parser->content_ok= 1; 00495 00496 DBUG_RETURN(parser); 00497 00498 frm_error: 00499 if (bad_format_errors) 00500 { 00501 my_error(ER_FPARSER_BAD_HEADER, MYF(0), file_name->str); 00502 DBUG_RETURN(0); 00503 } 00504 else 00505 DBUG_RETURN(parser); // upper level have to check parser->ok() 00506 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static my_bool write_escaped_string | ( | IO_CACHE * | file, | |
| LEX_STRING * | val_s | |||
| ) | [static] |
Definition at line 40 of file parse_file.cc.
References FALSE, LEX_STRING::length, my_b_append(), LEX_STRING::str, STRING_WITH_LEN, and TRUE.
Referenced by write_parameter().
00041 { 00042 char *eos= val_s->str + val_s->length; 00043 char *ptr= val_s->str; 00044 00045 for (; ptr < eos; ptr++) 00046 { 00047 /* 00048 Should be in sync with read_escaped_string() and 00049 parse_quoted_escaped_string() 00050 */ 00051 switch(*ptr) { 00052 case '\\': // escape character 00053 if (my_b_append(file, (const byte *)STRING_WITH_LEN("\\\\"))) 00054 return TRUE; 00055 break; 00056 case '\n': // parameter value delimiter 00057 if (my_b_append(file, (const byte *)STRING_WITH_LEN("\\n"))) 00058 return TRUE; 00059 break; 00060 case '\0': // problem for some string processing utilities 00061 if (my_b_append(file, (const byte *)STRING_WITH_LEN("\\0"))) 00062 return TRUE; 00063 break; 00064 case 26: // problem for windows utilities (Ctrl-Z) 00065 if (my_b_append(file, (const byte *)STRING_WITH_LEN("\\z"))) 00066 return TRUE; 00067 break; 00068 case '\'': // list of string delimiter 00069 if (my_b_append(file, (const byte *)STRING_WITH_LEN("\\\'"))) 00070 return TRUE; 00071 break; 00072 default: 00073 if (my_b_append(file, (const byte *)ptr, 1)) 00074 return TRUE; 00075 } 00076 } 00077 return FALSE; 00078 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static my_bool write_parameter | ( | IO_CACHE * | file, | |
| gptr | base, | |||
| File_option * | parameter, | |||
| ulonglong * | old_version | |||
| ) | [static] |
Definition at line 97 of file parse_file.cc.
References DBUG_ASSERT, DBUG_ENTER, DBUG_RETURN, FALSE, FILE_OPTIONS_ESTRING, FILE_OPTIONS_REV, FILE_OPTIONS_STRING, FILE_OPTIONS_STRLIST, FILE_OPTIONS_TIMESTAMP, FILE_OPTIONS_ULLLIST, FILE_OPTIONS_ULONGLONG, get_date(), GETDATE_DATE_TIME, GETDATE_FIXEDLENGTH, GETDATE_GMT, String::length(), LEX_STRING::length, my_b_append(), my_charset_bin, NULL, File_option::offset, PARSE_FILE_TIMESTAMPLENGTH, String::ptr(), String::set(), LEX_STRING::str, STRING_WITH_LEN, TRUE, File_option::type, and write_escaped_string().
Referenced by sql_create_definition_file().
00099 { 00100 char num_buf[20]; // buffer for numeric operations 00101 // string for numeric operations 00102 String num(num_buf, sizeof(num_buf), &my_charset_bin); 00103 DBUG_ENTER("write_parameter"); 00104 00105 switch (parameter->type) { 00106 case FILE_OPTIONS_STRING: 00107 { 00108 LEX_STRING *val_s= (LEX_STRING *)(base + parameter->offset); 00109 if (my_b_append(file, (const byte *)val_s->str, val_s->length)) 00110 DBUG_RETURN(TRUE); 00111 break; 00112 } 00113 case FILE_OPTIONS_ESTRING: 00114 { 00115 if (write_escaped_string(file, (LEX_STRING *)(base + parameter->offset))) 00116 DBUG_RETURN(TRUE); 00117 break; 00118 } 00119 case FILE_OPTIONS_ULONGLONG: 00120 { 00121 num.set(*((ulonglong *)(base + parameter->offset)), &my_charset_bin); 00122 if (my_b_append(file, (const byte *)num.ptr(), num.length())) 00123 DBUG_RETURN(TRUE); 00124 break; 00125 } 00126 case FILE_OPTIONS_REV: 00127 { 00128 ulonglong *val_i= (ulonglong *)(base + parameter->offset); 00129 *old_version= (*val_i)++; 00130 num.set(*val_i, &my_charset_bin); 00131 if (my_b_append(file, (const byte *)num.ptr(), num.length())) 00132 DBUG_RETURN(TRUE); 00133 break; 00134 } 00135 case FILE_OPTIONS_TIMESTAMP: 00136 { 00137 /* string have to be allocated already */ 00138 LEX_STRING *val_s= (LEX_STRING *)(base + parameter->offset); 00139 time_t tm= time(NULL); 00140 00141 get_date(val_s->str, GETDATE_DATE_TIME|GETDATE_GMT|GETDATE_FIXEDLENGTH, 00142 tm); 00143 val_s->length= PARSE_FILE_TIMESTAMPLENGTH; 00144 if (my_b_append(file, (const byte *)val_s->str, 00145 PARSE_FILE_TIMESTAMPLENGTH)) 00146 DBUG_RETURN(TRUE); 00147 break; 00148 } 00149 case FILE_OPTIONS_STRLIST: 00150 { 00151 List_iterator_fast<LEX_STRING> it(*((List<LEX_STRING>*) 00152 (base + parameter->offset))); 00153 bool first= 1; 00154 LEX_STRING *str; 00155 while ((str= it++)) 00156 { 00157 // We need ' ' after string to detect list continuation 00158 if ((!first && my_b_append(file, (const byte *)STRING_WITH_LEN(" "))) || 00159 my_b_append(file, (const byte *)STRING_WITH_LEN("\'")) || 00160 write_escaped_string(file, str) || 00161 my_b_append(file, (const byte *)STRING_WITH_LEN("\'"))) 00162 { 00163 DBUG_RETURN(TRUE); 00164 } 00165 first= 0; 00166 } 00167 break; 00168 } 00169 case FILE_OPTIONS_ULLLIST: 00170 { 00171 List_iterator_fast<ulonglong> it(*((List<ulonglong>*) 00172 (base + parameter->offset))); 00173 bool first= 1; 00174 ulonglong *val; 00175 while ((val= it++)) 00176 { 00177 num.set(*val, &my_charset_bin); 00178 // We need ' ' after string to detect list continuation 00179 if ((!first && my_b_append(file, (const byte *)STRING_WITH_LEN(" "))) || 00180 my_b_append(file, (const byte *)num.ptr(), num.length())) 00181 { 00182 DBUG_RETURN(TRUE); 00183 } 00184 first= 0; 00185 } 00186 break; 00187 } 00188 default: 00189 DBUG_ASSERT(0); // never should happened 00190 } 00191 DBUG_RETURN(FALSE); 00192 }
Here is the call graph for this function:

Here is the caller graph for this function:

1.4.7

