Is this the fix for bug 3394 that you just closed? If so, was this really intended for the default branch (in which case the bug should be NEXTFEATURERELEASE) or should this have gone to the Feb2013 branch? On 2013-11-11 22:14, Niels Nes wrote:
Changeset: 63c54046f8c4 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=63c54046f8c4 Modified Files: sql/backends/monet5/sql.mx sql/test/BugTracker-2013/Tests/Cannot_Find_Column_Type.Bug-3394.sql Branch: default Log Message:
handle added types also in declared tables
diffs (43 lines):
diff --git a/sql/backends/monet5/sql.mx b/sql/backends/monet5/sql.mx --- a/sql/backends/monet5/sql.mx +++ b/sql/backends/monet5/sql.mx @@ -3993,12 +3993,13 @@ mvc_declared_table_column_wrap(Client cn str msg = getSQLContext(cntxt,mb, &m, NULL); sql_schema *s = NULL; sql_table *t = NULL; + sql_type *type = NULL; sql_subtype tpe; int *ret = (int *) getArgReference(stk, pci, 0); int *rs = (int *) getArgReference(stk, pci, 1); str *tname = (str *) getArgReference(stk, pci, 2); str *name = (str *) getArgReference(stk, pci, 3); - str *type = (str *) getArgReference(stk, pci, 4); + str *typename = (str *) getArgReference(stk, pci, 4); int *digits = (int *) getArgReference(stk, pci, 5); int *scale = (int *) getArgReference(stk, pci, 6);
@@ -4006,8 +4007,11 @@ mvc_declared_table_column_wrap(Client cn return msg; if (*rs != 0) throw(SQL, "sql.dtColumn", "Cannot access declared table"); - if (!sql_find_subtype(&tpe, *type, *digits, *scale)) + if (!sql_find_subtype(&tpe, *typename, *digits, *scale) && + (type = mvc_bind_type(m, *typename)) == NULL) throw(SQL, "sql.dtColumn", "Cannot find column type"); + if (type) + sql_init_subtype(&tpe, type, 0, 0); s = mvc_bind_schema(m, dt_schema); if ( s == NULL) throw(SQL,"sql.declared_table_column","3F000!Schema missing"); diff --git a/sql/test/BugTracker-2013/Tests/Cannot_Find_Column_Type.Bug-3394.sql b/sql/test/BugTracker-2013/Tests/Cannot_Find_Column_Type.Bug-3394.sql --- a/sql/test/BugTracker-2013/Tests/Cannot_Find_Column_Type.Bug-3394.sql +++ b/sql/test/BugTracker-2013/Tests/Cannot_Find_Column_Type.Bug-3394.sql @@ -45,3 +45,8 @@ begin end;
select tmp4(); + +drop function tmp4; +drop function tmp3; +drop function tmp2; +drop function tmp1; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
-- Sjoerd Mullender