Changeset: 71c4eac4604e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=71c4eac4604e
Modified Files:
monetdb5/modules/mal/tablet.c
sql/backends/monet5/sql_result.c
Branch: Jul2015
Log Message:
Properly distinguish (through a hack) between STDIN and file in COPY INTO.
This has an effect if the COPY INTO is e.g. in the createdb directory
where the old test was incorrect.
diffs (24 lines):
diff --git a/monetdb5/modules/mal/tablet.c b/monetdb5/modules/mal/tablet.c
--- a/monetdb5/modules/mal/tablet.c
+++ b/monetdb5/modules/mal/tablet.c
@@ -1256,7 +1256,7 @@ SQLproducer(void *p)
base = end = s = task->input[cur];
*s = 0;
task->cur = cur;
- if (task->b == task->cntxt->fdin) {
+ if (task->as->filename == NULL) {
consoleinput = 1;
goto parseSTDIN;
}
diff --git a/sql/backends/monet5/sql_result.c b/sql/backends/monet5/sql_result.c
--- a/sql/backends/monet5/sql_result.c
+++ b/sql/backends/monet5/sql_result.c
@@ -805,7 +805,7 @@ mvc_import_table(Client cntxt, BAT ***ba
as.error = NULL;
as.tryall = 0;
as.complaints = NULL;
- as.filename = "";
+ as.filename = m->scanner.rs == bs ? NULL : "";
fmt = as.format = (Column *) GDKzalloc(sizeof(Column) *
(as.nr_attrs + 1));
if (fmt == NULL) {
sql_error(m, 500, "failed to allocate memory ");
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list