Changeset: 6aae575c3ed2 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/6aae575c3ed2 Modified Files: sql/backends/monet5/sql.c Branch: nested Log Message:
initial parsing of array value string diffs (30 lines): diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c --- a/sql/backends/monet5/sql.c +++ b/sql/backends/monet5/sql.c @@ -5865,6 +5865,8 @@ bailout: throw(SQL, "SQLfrom_json", SQLSTATE(HY013) MAL_MALLOC_FAIL); } +#define skipspace(s) while(*s && isspace(*s)) s++; + static str ARRAYparser(char *s, BAT **bats, int nr, int elm, int id, int oanr, sql_subtype *t) { @@ -5875,6 +5877,8 @@ ARRAYparser(char *s, BAT **bats, int nr, s++; skipspace(s); /* insert id */ + (void)id; + (void)oanr; elm++; int oelm = elm; while (*s && s[0] != '}') { @@ -5908,7 +5912,7 @@ ARRAYparser(char *s, BAT **bats, int nr, s++; skipspace(s); } - if (!s && s[0] != '}') + if (!s || s[0] != '}') throw(SQL, "SQLfrom_varchar", SQLSTATE(42000) "missing } at end of array value"); return MAL_SUCCEED; } _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org