Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4782/src/backends/monet5
Modified Files:
sql.mx sql_result.mx
Log Message:
only pass quote to SQLload_file if user passed one.
U sql_result.mx
Index: sql_result.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_result.mx,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -d -r1.124 -r1.125
--- sql_result.mx 14 Aug 2009 17:01:21 -0000 1.124
+++ sql_result.mx 15 Aug 2009 18:14:41 -0000 1.125
@@ -495,7 +495,7 @@
fmt[i].size = ATOMsize(fmt[i].adt);
}
if (TABLETcreate_bats(&as, (BUN) (sz < 0 ? 1000 : sz)) >= 0) {
- if (SQLload_file(cntxt, &as, bs, out, sep, rsep, *ssep,
offset, sz) != BUN_NONE && !as.error)
+ if (SQLload_file(cntxt, &as, bs, out, sep, rsep,
ssep?ssep[0]:0, offset, sz) != BUN_NONE && !as.error)
bats = TABLETcollect_bats(&as);
}
if (as.error)
U sql.mx
Index: sql.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql.mx,v
retrieving revision 1.351
retrieving revision 1.352
diff -u -d -r1.351 -r1.352
--- sql.mx 14 Aug 2009 17:01:16 -0000 1.351
+++ sql.mx 15 Aug 2009 18:14:40 -0000 1.352
@@ -2398,13 +2398,17 @@
len = strlen((char*)(*R));
GDKstrFromStr(rsep=GDKmalloc(len+1), *R, len); len = 0;
len = strlen((char*)(*S));
- GDKstrFromStr(ssep=GDKmalloc(len+1), *S, len); len = 0;
+ if (*S && strcmp(str_nil,*(char**)S)) {
+ GDKstrFromStr(ssep=GDKmalloc(len+1), *S, len);
+ len = 0;
+ }
len = strlen((char*)(*N));
GDKstrFromStr(ns=GDKmalloc(len+1), *N, len); len = 0;
b = mvc_import_table(cntxt, m, *s, *sname, *tname, (char*)tsep,
(char*)rsep, (char*)ssep, (char*)ns, *sz, *offset);
GDKfree(tsep);
GDKfree(rsep);
- GDKfree(ssep);
+ if(ssep)
+ GDKfree(ssep);
GDKfree(ns);
if (!b)
throw(SQL, "importTable", "failed to import table");
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins