#include "client_priv.h"#include "mysql_version.h"#include <sslopt-vars.h>#include <sslopt-longopts.h>#include <help_start.h>#include <help_end.h>#include <sslopt-case.h>Include dependency graph for mysqlimport.c:

Go to the source code of this file.
Defines | |
| #define | IMPORT_VERSION "3.5" |
Functions | |
| static void | db_error_with_table (MYSQL *mysql, char *table) |
| static void | db_error (MYSQL *mysql) |
| static char * | field_escape (char *to, const char *from, uint length) |
| static char * | add_load_option (char *ptr, const char *object, const char *statement) |
| static void | print_version (void) |
| static void | usage (void) |
| static my_bool | get_one_option (int optid, const struct my_option *opt __attribute__((unused)), char *argument) |
| static int | get_options (int *argc, char ***argv) |
| static int | write_to_table (char *filename, MYSQL *mysql) |
| static void | lock_table (MYSQL *mysql, int tablecount, char **raw_tablename) |
| static MYSQL * | db_connect (char *host, char *database, char *user, char *passwd) |
| static void | db_disconnect (char *host, MYSQL *mysql) |
| static void | safe_exit (int error, MYSQL *mysql) |
| int | main (int argc, char **argv) |
Variables | |
| int | counter |
| static my_bool | verbose = 0 |
| static my_bool | lock_tables = 0 |
| static my_bool | ignore_errors = 0 |
| static my_bool | opt_delete = 0 |
| static my_bool | replace = 0 |
| static my_bool | silent = 0 |
| static my_bool | ignore = 0 |
| static my_bool | opt_compress = 0 |
| static my_bool | opt_low_priority = 0 |
| static my_bool | tty_password = 0 |
| static my_bool | opt_use_threads = 0 |
| static uint | opt_local_file = 0 |
| static char * | opt_password = 0 |
| static char * | current_user = 0 |
| static char * | current_host = 0 |
| static char * | current_db = 0 |
| static char * | fields_terminated = 0 |
| static char * | lines_terminated = 0 |
| static char * | enclosed = 0 |
| static char * | opt_enclosed = 0 |
| static char * | escaped = 0 |
| static char * | opt_columns = 0 |
| static char * | default_charset = (char*) MYSQL_DEFAULT_CHARSET_NAME |
| static uint | opt_mysql_port = 0 |
| static uint | opt_protocol = 0 |
| static my_string | opt_mysql_unix_port = 0 |
| static longlong | opt_ignore_lines = -1 |
| static CHARSET_INFO * | charset_info = &my_charset_latin1 |
| static struct my_option | my_long_options [] |
| static const char * | load_default_groups [] = { "mysqlimport","client",0 } |
| int | exitcode = 0 |
| #define IMPORT_VERSION "3.5" |
| static char * add_load_option | ( | char * | ptr, | |
| const char * | object, | |||
| const char * | statement | |||
| ) | [static] |
Definition at line 475 of file mysqlimport.c.
References field_escape(), NullS, strlen(), and strxmov().
00477 { 00478 if (object) 00479 { 00480 /* Don't escape hex constants */ 00481 if (object[0] == '0' && (object[1] == 'x' || object[1] == 'X')) 00482 ptr= strxmov(ptr," ",statement," ",object,NullS); 00483 else 00484 { 00485 /* char constant; escape */ 00486 ptr= strxmov(ptr," ",statement," '",NullS); 00487 ptr= field_escape(ptr,object,(uint) strlen(object)); 00488 *ptr++= '\''; 00489 } 00490 } 00491 return ptr; 00492 }
Here is the call graph for this function:

| static MYSQL* db_connect | ( | char * | host, | |
| char * | database, | |||
| char * | user, | |||
| char * | passwd | |||
| ) | [static] |
Definition at line 393 of file mysqlimport.c.
References db_error(), ignore_errors, mysql, mysql_init(), MYSQL_OPT_COMPRESS, MYSQL_OPT_LOCAL_INFILE, MYSQL_OPT_PROTOCOL, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, mysql_options(), mysql_real_connect(), mysql_select_db(), MYSQL_SHARED_MEMORY_BASE_NAME, mysql_ssl_set(), NULL, NullS, opt_compress, opt_local_file, opt_mysql_port, opt_mysql_unix_port, opt_protocol, and verbose.
Referenced by main().
00395 { 00396 MYSQL *mysql; 00397 if (verbose) 00398 fprintf(stdout, "Connecting to %s\n", host ? host : "localhost"); 00399 if (!(mysql= mysql_init(NULL))) 00400 return 0; 00401 if (opt_compress) 00402 mysql_options(mysql,MYSQL_OPT_COMPRESS,NullS); 00403 if (opt_local_file) 00404 mysql_options(mysql,MYSQL_OPT_LOCAL_INFILE, 00405 (char*) &opt_local_file); 00406 #ifdef HAVE_OPENSSL 00407 if (opt_use_ssl) 00408 mysql_ssl_set(mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca, 00409 opt_ssl_capath, opt_ssl_cipher); 00410 mysql_options(mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT, 00411 (char*)&opt_ssl_verify_server_cert); 00412 #endif 00413 if (opt_protocol) 00414 mysql_options(mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol); 00415 #ifdef HAVE_SMEM 00416 if (shared_memory_base_name) 00417 mysql_options(mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name); 00418 #endif 00419 if (!(mysql_real_connect(mysql,host,user,passwd, 00420 database,opt_mysql_port,opt_mysql_unix_port, 00421 0))) 00422 { 00423 ignore_errors=0; /* NO RETURN FROM db_error */ 00424 db_error(mysql); 00425 } 00426 mysql->reconnect= 0; 00427 if (verbose) 00428 fprintf(stdout, "Selecting database %s\n", database); 00429 if (mysql_select_db(mysql, database)) 00430 { 00431 ignore_errors=0; 00432 db_error(mysql); 00433 } 00434 return mysql; 00435 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static void db_disconnect | ( | char * | host, | |
| MYSQL * | mysql | |||
| ) | [static] |
Definition at line 439 of file mysqlimport.c.
References mysql, mysql_close(), and verbose.
Referenced by main().
00440 { 00441 if (verbose) 00442 fprintf(stdout, "Disconnecting from %s\n", host ? host : "localhost"); 00443 mysql_close(mysql); 00444 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static void db_error | ( | MYSQL * | mysql | ) | [static] |
Definition at line 468 of file mysqlimport.c.
References my_printf_error(), MYF, mysql, mysql_errno(), mysql_error(), and safe_exit().
Referenced by db_connect(), lock_table(), and main().
00469 { 00470 my_printf_error(0,"Error: %d %s", MYF(0), mysql_errno(mysql), mysql_error(mysql)); 00471 safe_exit(1, mysql); 00472 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static void db_error_with_table | ( | MYSQL * | mysql, | |
| char * | table | |||
| ) | [static] |
Definition at line 459 of file mysqlimport.c.
References my_printf_error(), MYF, mysql, mysql_errno(), mysql_error(), and safe_exit().
Referenced by write_to_table().
00460 { 00461 my_printf_error(0,"Error: %d, %s, when using table: %s", 00462 MYF(0), mysql_errno(mysql), mysql_error(mysql), table); 00463 safe_exit(1, mysql); 00464 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static char * field_escape | ( | char * | to, | |
| const char * | from, | |||
| uint | length | |||
| ) | [static] |
Definition at line 501 of file mysqlimport.c.
00502 { 00503 const char *end; 00504 uint end_backslashes=0; 00505 00506 for (end= from+length; from != end; from++) 00507 { 00508 *to++= *from; 00509 if (*from == '\\') 00510 end_backslashes^=1; /* find odd number of backslashes */ 00511 else 00512 { 00513 if (*from == '\'' && !end_backslashes) 00514 *to++= *from; /* We want a dublicate of "'" for MySQL */ 00515 end_backslashes=0; 00516 } 00517 } 00518 /* Add missing backslashes if user has specified odd number of backs.*/ 00519 if (end_backslashes) 00520 *to++= '\\'; 00521 return to; 00522 }
| static my_bool get_one_option | ( | int | optid, | |
| const struct my_option *opt | __attribute__((unused)), | |||
| char * | argument | |||
| ) | [static] |
Definition at line 203 of file mysqlimport.c.
References DBUG_PUSH, exit, find_type(), MY_ALLOW_ZERO_PTR, MY_FAE, my_free, my_strdup(), MYF, MYSQL_PROTOCOL_PIPE, OPT_AUTO_CLOSE, opt_local_file, OPT_MYSQL_PROTOCOL, opt_password, opt_protocol, print_version(), sql_protocol_typelib, start(), tty_password, and usage().
00205 { 00206 switch(optid) { 00207 #ifdef __NETWARE__ 00208 case OPT_AUTO_CLOSE: 00209 setscreenmode(SCR_AUTOCLOSE_ON_EXIT); 00210 break; 00211 #endif 00212 case 'p': 00213 if (argument) 00214 { 00215 char *start=argument; 00216 my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR)); 00217 opt_password=my_strdup(argument,MYF(MY_FAE)); 00218 while (*argument) *argument++= 'x'; /* Destroy argument */ 00219 if (*start) 00220 start[1]=0; /* Cut length of argument */ 00221 tty_password= 0; 00222 } 00223 else 00224 tty_password= 1; 00225 break; 00226 #ifdef __WIN__ 00227 case 'W': 00228 opt_protocol = MYSQL_PROTOCOL_PIPE; 00229 opt_local_file=1; 00230 break; 00231 #endif 00232 case OPT_MYSQL_PROTOCOL: 00233 { 00234 if ((opt_protocol= find_type(argument, &sql_protocol_typelib,0)) <= 0) 00235 { 00236 fprintf(stderr, "Unknown option to protocol: %s\n", argument); 00237 exit(1); 00238 } 00239 break; 00240 } 00241 case '#': 00242 DBUG_PUSH(argument ? argument : "d:t:o"); 00243 break; 00244 #include <sslopt-case.h> 00245 case 'V': print_version(); exit(0); 00246 case 'I': 00247 case '?': 00248 usage(); 00249 exit(0); 00250 } 00251 return 0; 00252 }
Here is the call graph for this function:

| static int get_options | ( | int * | argc, | |
| char *** | argv | |||
| ) | [static] |
Definition at line 255 of file mysqlimport.c.
References charset_info, charset_info_st::csname, current_db, default_charset, enclosed, exit, get_charset_by_csname(), get_one_option(), get_tty_password(), handle_options(), ignore, MY_CS_PRIMARY, my_long_options, MY_WME, MYF, NullS, opt_enclosed, opt_password, replace, strcmp(), tty_password, and usage().
00256 { 00257 int ho_error; 00258 00259 if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option))) 00260 exit(ho_error); 00261 00262 if (enclosed && opt_enclosed) 00263 { 00264 fprintf(stderr, "You can't use ..enclosed.. and ..optionally-enclosed.. at the same time.\n"); 00265 return(1); 00266 } 00267 if (replace && ignore) 00268 { 00269 fprintf(stderr, "You can't use --ignore (-i) and --replace (-r) at the same time.\n"); 00270 return(1); 00271 } 00272 if (strcmp(default_charset, charset_info->csname) && 00273 !(charset_info= get_charset_by_csname(default_charset, 00274 MY_CS_PRIMARY, MYF(MY_WME)))) 00275 exit(1); 00276 if (*argc < 2) 00277 { 00278 usage(); 00279 return 1; 00280 } 00281 current_db= *((*argv)++); 00282 (*argc)--; 00283 if (tty_password) 00284 opt_password=get_tty_password(NullS); 00285 return(0); 00286 }
Here is the call graph for this function:

| static void lock_table | ( | MYSQL * | mysql, | |
| int | tablecount, | |||
| char ** | raw_tablename | |||
| ) | [static] |
Definition at line 371 of file mysqlimport.c.
References db_error(), dynstr_append(), fn_format(), FN_REFLEN, init_dynamic_string(), mysql, mysql_real_query(), query, and verbose.
Referenced by lock_table_names(), main(), row_ins_foreign_check_on_constraint(), row_ins_step(), row_lock_table_autoinc_for_mysql(), row_lock_table_for_mysql(), row_search_for_mysql(), row_sel_step(), and row_upd_step().
00372 { 00373 DYNAMIC_STRING query; 00374 int i; 00375 char tablename[FN_REFLEN]; 00376 00377 if (verbose) 00378 fprintf(stdout, "Locking tables for write\n"); 00379 init_dynamic_string(&query, "LOCK TABLES ", 256, 1024); 00380 for (i=0 ; i < tablecount ; i++) 00381 { 00382 fn_format(tablename, raw_tablename[i], "", "", 1 | 2); 00383 dynstr_append(&query, tablename); 00384 dynstr_append(&query, " WRITE,"); 00385 } 00386 if (mysql_real_query(mysql, query.str, query.length-1)) 00387 db_error(mysql); /* We shall countinue here, if --force was given */ 00388 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
Definition at line 569 of file mysqlimport.c.
References counter, current_db, current_host, current_user, db_connect(), db_disconnect(), db_error(), error, free_defaults(), get_options(), load_default_groups, load_defaults(), lock_table(), lock_tables, MY_ALLOW_ZERO_PTR, my_end(), my_free, MY_INIT, my_progname, MYF, mysql, mysql_query(), NULL, opt_password, opt_use_threads, pthread_mutex_destroy, pthread_mutex_init, pthread_mutex_lock, pthread_mutex_unlock, set_timespec, VOID, and write_to_table().
00570 { 00571 int error=0; 00572 char **argv_to_free; 00573 MY_INIT(argv[0]); 00574 00575 load_defaults("my",load_default_groups,&argc,&argv); 00576 /* argv is changed in the program */ 00577 argv_to_free= argv; 00578 if (get_options(&argc, &argv)) 00579 { 00580 free_defaults(argv_to_free); 00581 return(1); 00582 } 00583 00584 #ifdef HAVE_LIBPTHREAD 00585 if (opt_use_threads && !lock_tables) 00586 { 00587 pthread_t mainthread; /* Thread descriptor */ 00588 pthread_attr_t attr; /* Thread attributes */ 00589 pthread_attr_init(&attr); 00590 pthread_attr_setdetachstate(&attr, 00591 PTHREAD_CREATE_DETACHED); 00592 00593 VOID(pthread_mutex_init(&counter_mutex, NULL)); 00594 VOID(pthread_cond_init(&count_threshhold, NULL)); 00595 00596 for (counter= 0; *argv != NULL; argv++) /* Loop through tables */ 00597 { 00598 pthread_mutex_lock(&counter_mutex); 00599 while (counter == opt_use_threads) 00600 { 00601 struct timespec abstime; 00602 00603 set_timespec(abstime, 3); 00604 pthread_cond_timedwait(&count_threshhold, &counter_mutex, &abstime); 00605 } 00606 /* Before exiting the lock we set ourselves up for the next thread */ 00607 counter++; 00608 pthread_mutex_unlock(&counter_mutex); 00609 /* now create the thread */ 00610 if (pthread_create(&mainthread, &attr, worker_thread, 00611 (void *)*argv) != 0) 00612 { 00613 pthread_mutex_lock(&counter_mutex); 00614 counter--; 00615 pthread_mutex_unlock(&counter_mutex); 00616 fprintf(stderr,"%s: Could not create thread\n", 00617 my_progname); 00618 } 00619 } 00620 00621 /* 00622 We loop until we know that all children have cleaned up. 00623 */ 00624 pthread_mutex_lock(&counter_mutex); 00625 while (counter) 00626 { 00627 struct timespec abstime; 00628 00629 set_timespec(abstime, 3); 00630 pthread_cond_timedwait(&count_threshhold, &counter_mutex, &abstime); 00631 } 00632 pthread_mutex_unlock(&counter_mutex); 00633 VOID(pthread_mutex_destroy(&counter_mutex)); 00634 VOID(pthread_cond_destroy(&count_threshhold)); 00635 pthread_attr_destroy(&attr); 00636 } 00637 else 00638 #endif 00639 { 00640 MYSQL *mysql= 0; 00641 if (!(mysql= db_connect(current_host,current_db,current_user,opt_password))) 00642 { 00643 free_defaults(argv_to_free); 00644 return(1); /* purecov: deadcode */ 00645 } 00646 00647 if (mysql_query(mysql, "/*!40101 set @@character_set_database=binary */;")) 00648 { 00649 db_error(mysql); /* We shall countinue here, if --force was given */ 00650 return(1); 00651 } 00652 00653 if (lock_tables) 00654 lock_table(mysql, argc, argv); 00655 for (; *argv != NULL; argv++) 00656 if ((error= write_to_table(*argv, mysql))) 00657 if (exitcode == 0) 00658 exitcode= error; 00659 db_disconnect(current_host, mysql); 00660 } 00661 my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR)); 00662 #ifdef HAVE_SMEM 00663 my_free(shared_memory_base_name,MYF(MY_ALLOW_ZERO_PTR)); 00664 #endif 00665 free_defaults(argv_to_free); 00666 my_end(0); 00667 return(exitcode); 00668 }
Here is the call graph for this function:

| static void print_version | ( | void | ) | [static] |
Definition at line 174 of file mysqlimport.c.
References IMPORT_VERSION, MACHINE_TYPE, my_progname, MYSQL_SERVER_VERSION, NETWARE_SET_SCREEN_MODE, and SYSTEM_TYPE.
00175 { 00176 printf("%s Ver %s Distrib %s, for %s (%s)\n" ,my_progname, 00177 IMPORT_VERSION, MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE); 00178 NETWARE_SET_SCREEN_MODE(1); 00179 }
| static void safe_exit | ( | int | error, | |
| MYSQL * | mysql | |||
| ) | [static] |
Definition at line 448 of file mysqlimport.c.
References exit, ignore_errors, mysql, and mysql_close().
00449 { 00450 if (ignore_errors) 00451 return; 00452 if (mysql) 00453 mysql_close(mysql); 00454 exit(error); 00455 }
Here is the call graph for this function:

| static void usage | ( | void | ) | [static] |
Definition at line 182 of file mysqlimport.c.
References load_default_groups, my_long_options, my_print_help(), my_print_variables(), my_progname, print_defaults(), and print_version().
00183 { 00184 print_version(); 00185 puts("Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB"); 00186 puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n"); 00187 printf("\ 00188 Loads tables from text files in various formats. The base name of the\n\ 00189 text file must be the name of the table that should be used.\n\ 00190 If one uses sockets to connect to the MySQL server, the server will open and\n\ 00191 read the text file directly. In other cases the client will open the text\n\ 00192 file. The SQL command 'LOAD DATA INFILE' is used to import the rows.\n"); 00193 00194 printf("\nUsage: %s [OPTIONS] database textfile...",my_progname); 00195 print_defaults("my",load_default_groups); 00196 my_print_help(my_long_options); 00197 my_print_variables(my_long_options); 00198 }
Here is the call graph for this function:

| static int write_to_table | ( | char * | filename, | |
| MYSQL * | mysql | |||
| ) | [static] |
Definition at line 290 of file mysqlimport.c.
References add_load_option(), current_db, db_error_with_table(), DBUG_ENTER, DBUG_PRINT, DBUG_RETURN, enclosed, escaped, fields_terminated, fn_format(), FN_REFLEN, ignore, lines_terminated, longlong10_to_str, my_load_path(), mysql, mysql_info(), mysql_query(), NULL, opt_columns, opt_delete, opt_enclosed, opt_ignore_lines, opt_local_file, opt_low_priority, replace, silent, strend(), strmov(), to_unix_path(), and verbose.
Referenced by main().
00291 { 00292 char tablename[FN_REFLEN], hard_path[FN_REFLEN], 00293 sql_statement[FN_REFLEN*16+256], *end; 00294 DBUG_ENTER("write_to_table"); 00295 DBUG_PRINT("enter",("filename: %s",filename)); 00296 00297 fn_format(tablename, filename, "", "", 1 | 2); /* removes path & ext. */ 00298 if (!opt_local_file) 00299 strmov(hard_path,filename); 00300 else 00301 my_load_path(hard_path, filename, NULL); /* filename includes the path */ 00302 00303 if (opt_delete) 00304 { 00305 if (verbose) 00306 fprintf(stdout, "Deleting the old data from table %s\n", tablename); 00307 #ifdef HAVE_SNPRINTF 00308 snprintf(sql_statement, FN_REFLEN*16+256, "DELETE FROM %s", tablename); 00309 #else 00310 sprintf(sql_statement, "DELETE FROM %s", tablename); 00311 #endif 00312 if (mysql_query(mysql, sql_statement)) 00313 { 00314 db_error_with_table(mysql, tablename); 00315 DBUG_RETURN(1); 00316 } 00317 } 00318 to_unix_path(hard_path); 00319 if (verbose) 00320 { 00321 if (opt_local_file) 00322 fprintf(stdout, "Loading data from LOCAL file: %s into %s\n", 00323 hard_path, tablename); 00324 else 00325 fprintf(stdout, "Loading data from SERVER file: %s into %s\n", 00326 hard_path, tablename); 00327 } 00328 sprintf(sql_statement, "LOAD DATA %s %s INFILE '%s'", 00329 opt_low_priority ? "LOW_PRIORITY" : "", 00330 opt_local_file ? "LOCAL" : "", hard_path); 00331 end= strend(sql_statement); 00332 if (replace) 00333 end= strmov(end, " REPLACE"); 00334 if (ignore) 00335 end= strmov(end, " IGNORE"); 00336 end= strmov(strmov(end, " INTO TABLE "), tablename); 00337 00338 if (fields_terminated || enclosed || opt_enclosed || escaped) 00339 end= strmov(end, " FIELDS"); 00340 end= add_load_option(end, fields_terminated, " TERMINATED BY"); 00341 end= add_load_option(end, enclosed, " ENCLOSED BY"); 00342 end= add_load_option(end, opt_enclosed, 00343 " OPTIONALLY ENCLOSED BY"); 00344 end= add_load_option(end, escaped, " ESCAPED BY"); 00345 end= add_load_option(end, lines_terminated, " LINES TERMINATED BY"); 00346 if (opt_ignore_lines >= 0) 00347 end= strmov(longlong10_to_str(opt_ignore_lines, 00348 strmov(end, " IGNORE "),10), " LINES"); 00349 if (opt_columns) 00350 end= strmov(strmov(strmov(end, " ("), opt_columns), ")"); 00351 *end= '\0'; 00352 00353 if (mysql_query(mysql, sql_statement)) 00354 { 00355 db_error_with_table(mysql, tablename); 00356 DBUG_RETURN(1); 00357 } 00358 if (!silent) 00359 { 00360 if (mysql_info(mysql)) /* If NULL-pointer, print nothing */ 00361 { 00362 fprintf(stdout, "%s.%s: %s\n", current_db, tablename, 00363 mysql_info(mysql)); 00364 } 00365 } 00366 DBUG_RETURN(0); 00367 }
Here is the call graph for this function:

Here is the caller graph for this function:

CHARSET_INFO* charset_info = &my_charset_latin1 [static] |
Definition at line 63 of file mysqlimport.c.
| int counter |
Definition at line 38 of file mysqlimport.c.
Referenced by check_acl_user(), client(), fill_schema_schema_privileges(), fill_schema_user_privileges(), find_order_in_list(), Item_field::fix_fields(), list_dbs(), list_tables(), main(), mysql_ha_open(), mysql_insert(), mysql_revoke_all(), mysql_show_grants(), mysql_test_insert(), resolve_ref_in_select_and_group(), row_update_statistics_if_needed(), run_query_normal(), run_task(), setup_new_fields(), show_routine_grants(), sp_revoke_privileges(), and Qmgr::timerHandlingLab().
char * current_db = 0 [static] |
Definition at line 56 of file mysqlimport.c.
char * current_host = 0 [static] |
Definition at line 56 of file mysqlimport.c.
char * current_user = 0 [static] |
Definition at line 55 of file mysqlimport.c.
char * default_charset = (char*) MYSQL_DEFAULT_CHARSET_NAME [static] |
Definition at line 59 of file mysqlimport.c.
char * enclosed = 0 [static] |
Definition at line 57 of file mysqlimport.c.
char * escaped = 0 [static] |
Definition at line 58 of file mysqlimport.c.
| int exitcode = 0 |
char * fields_terminated = 0 [static] |
Definition at line 56 of file mysqlimport.c.
Definition at line 51 of file mysqlimport.c.
Referenced by get_options(), Dblqh::handle_nr_copy(), parse_ieee_bb(), and write_to_table().
my_bool ignore_errors = 0 [static] |
Definition at line 50 of file mysqlimport.c.
char * lines_terminated = 0 [static] |
Definition at line 57 of file mysqlimport.c.
const char* load_default_groups[] = { "mysqlimport","client",0 } [static] |
Definition at line 170 of file mysqlimport.c.
my_bool lock_tables = 0 [static] |
Definition at line 50 of file mysqlimport.c.
struct my_option my_long_options[] [static] |
Definition at line 70 of file mysqlimport.c.
char * opt_columns = 0 [static] |
my_bool opt_compress = 0 [static] |
Definition at line 51 of file mysqlimport.c.
my_bool opt_delete = 0 [static] |
char * opt_enclosed = 0 [static] |
Definition at line 57 of file mysqlimport.c.
longlong opt_ignore_lines = -1 [static] |
uint opt_local_file = 0 [static] |
Definition at line 54 of file mysqlimport.c.
Referenced by db_connect(), get_one_option(), and write_to_table().
my_bool opt_low_priority = 0 [static] |
uint opt_mysql_port = 0 [static] |
Definition at line 60 of file mysqlimport.c.
my_string opt_mysql_unix_port = 0 [static] |
Definition at line 61 of file mysqlimport.c.
char* opt_password = 0 [static] |
Definition at line 55 of file mysqlimport.c.
uint opt_protocol = 0 [static] |
Definition at line 60 of file mysqlimport.c.
my_bool opt_use_threads = 0 [static] |
my_bool replace = 0 [static] |
Definition at line 51 of file mysqlimport.c.
Referenced by get_options(), get_view_structure(), init_replace(), main(), and write_to_table().
Definition at line 51 of file mysqlimport.c.
Referenced by abort_not_supported_test(), convert_file(), die(), get_one_option(), get_options(), main(), run_test(), static_get_options(), term_echotc(), and write_to_table().
my_bool tty_password = 0 [static] |
Definition at line 52 of file mysqlimport.c.
Definition at line 50 of file mysqlimport.c.
1.4.7

