Changeset: b7f88cc62341 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/b7f88cc62341
Modified Files:
        sql/backends/monet5/sql_cat.c
Branch: Jul2021
Log Message:

A more defensive line, compare ids instead of names for future proofness


diffs (12 lines):

diff --git a/sql/backends/monet5/sql_cat.c b/sql/backends/monet5/sql_cat.c
--- a/sql/backends/monet5/sql_cat.c
+++ b/sql/backends/monet5/sql_cat.c
@@ -161,7 +161,7 @@ validate_alter_table_add_table(mvc *sql,
                throw(SQL,call,SQLSTATE(42000) "ALTER TABLE: can't add a 
temporary table into a %s", errtable);
        if (ms->base.id != ps->base.id)
                throw(SQL,call,SQLSTATE(42000) "ALTER TABLE: all children 
tables of '%s.%s' must be part of schema '%s'", msname, mtname, msname);
-       if (strcmp(rmt->base.name, rpt->base.name) == 0)
+       if (rmt->base.id == rpt->base.id)
                throw(SQL,call,SQLSTATE(42000) "ALTER TABLE: a %s can't be a 
child of itself", errtable);
        node *n = members_find_child_id(rmt->members, rpt->base.id);
        if (n && !update)
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to