Description: mdb-schema: fix namespace support when using INSERTs
Author: Jean-Michel Vourgère <jmv_deb@nirgal.com>
Origin: upstream, commit:7e34078bcc9a7b23ab028db969cdf77c0b283752
Forwarded: not-needed
Last-Update: 2012-01-30
diff --git a/src/util/mdb-export.c b/src/util/mdb-export.c
index afbf8b1..ac5cd1b 100644
--- a/src/util/mdb-export.c
+++ b/src/util/mdb-export.c
@@ -83,7 +83,7 @@ main(int argc, char **argv)
 	char header_row = 1;
 	char quote_text = 1;
 	char *insert_dialect = NULL;
-	char *namespace = "";
+	char *namespace = NULL;
 	int  opt;
 	char *value;
 	size_t length;
@@ -209,8 +209,8 @@ main(int argc, char **argv)
 
 		if (insert_dialect) {
 			char *quoted_name;
-			quoted_name = mdb->default_backend->quote_schema_name(NULL, argv[optind + 1]);
-			fprintf(stdout, "INSERT INTO %s%s (", namespace, quoted_name);
+			quoted_name = mdb->default_backend->quote_schema_name(namespace, argv[optind + 1]);
+			fprintf(stdout, "INSERT INTO %s (", quoted_name);
 			free(quoted_name);
 			for (j=0;j<table->num_cols;j++) {
 				if (j>0) fputs(", ", stdout);
