mirror of
https://github.com/mdbtools/mdbtools.git
synced 2025-09-18 18:22:07 +08:00
Fix namespace in mdb-export when using -I
Thanks George L. Emigh for the bug report.
This commit is contained in:
@@ -83,7 +83,7 @@ main(int argc, char **argv)
|
|||||||
char header_row = 1;
|
char header_row = 1;
|
||||||
char quote_text = 1;
|
char quote_text = 1;
|
||||||
char *insert_dialect = NULL;
|
char *insert_dialect = NULL;
|
||||||
char *namespace = "";
|
char *namespace = NULL;
|
||||||
int opt;
|
int opt;
|
||||||
char *value;
|
char *value;
|
||||||
size_t length;
|
size_t length;
|
||||||
@@ -209,8 +209,8 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
if (insert_dialect) {
|
if (insert_dialect) {
|
||||||
char *quoted_name;
|
char *quoted_name;
|
||||||
quoted_name = mdb->default_backend->quote_schema_name(NULL, argv[optind + 1]);
|
quoted_name = mdb->default_backend->quote_schema_name(namespace, argv[optind + 1]);
|
||||||
fprintf(stdout, "INSERT INTO %s%s (", namespace, quoted_name);
|
fprintf(stdout, "INSERT INTO %s (", quoted_name);
|
||||||
free(quoted_name);
|
free(quoted_name);
|
||||||
for (j=0;j<table->num_cols;j++) {
|
for (j=0;j<table->num_cols;j++) {
|
||||||
if (j>0) fputs(", ", stdout);
|
if (j>0) fputs(", ", stdout);
|
||||||
|
Reference in New Issue
Block a user