Skip to content

Commit

Permalink
Merge pull request #740 from mydumper/737-rows-does-not-take-effect-i…
Browse files Browse the repository at this point in the history
…n-csv-format

Fixing csv --rows issues and refactoring
  • Loading branch information
davidducos committed Jul 6, 2022
2 parents e85b3a9 + 9cfa675 commit d5346af
Show file tree
Hide file tree
Showing 6 changed files with 300 additions and 266 deletions.
2 changes: 2 additions & 0 deletions mydumper_testing_db.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
SET GLOBAL local_infile=ON;

DROP DATABASE IF EXISTS myd_test;
CREATE DATABASE myd_test;
-- Tables and views
Expand Down
2 changes: 1 addition & 1 deletion src/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void configure_connection(MYSQL *conn, const char *name) {
mysql_options(conn, MYSQL_READ_DEFAULT_FILE, defaults_file);
}
mysql_options(conn, MYSQL_READ_DEFAULT_GROUP, name);

mysql_options(conn, MYSQL_OPT_LOCAL_INFILE, NULL);
if (compress_protocol)
mysql_options(conn, MYSQL_OPT_COMPRESS, NULL);

Expand Down
2 changes: 1 addition & 1 deletion src/mydumper_jobs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,7 @@ struct table_job * new_table_job(struct db_table *dbt, char *partition, char *wh
tj->where=where;
tj->order_by=order_by;
tj->nchunk=nchunk;
tj->filename = build_data_filename(dbt->database->filename, dbt->table_filename, tj->nchunk, 0);
// tj->filename = build_data_filename(dbt->database->filename, dbt->table_filename, tj->nchunk, 0);
tj->dbt=dbt;
return tj;
}
Expand Down
2 changes: 1 addition & 1 deletion src/mydumper_start_dump.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct table_job {
char *table;
char *partition;
guint nchunk;
char *filename;
// char *filename;
char *where;
char *order_by;
struct db_table *dbt;
Expand Down

0 comments on commit d5346af

Please sign in to comment.