Stefan Manegold wrote:
Index: sql_schema.mx =================================================================== RCS file: /cvsroot/monetdb/sql/src/server/sql_schema.mx,v retrieving revision 1.122 retrieving revision 1.123 diff -u -d -r1.122 -r1.123 --- sql_schema.mx 17 Apr 2007 12:27:07 -0000 1.122 +++ sql_schema.mx 18 Apr 2007 09:16:26 -0000 1.123 @@ -602,11 +602,10 @@ { char *tname = qname_table(qname); sql_schema *ss = cur_schema(sql); - sql_trigger * t= NULL;
if (!schema_privs(sql->role_id, ss)) return sql_error(sql, 02, "DROP TRIGGER: access denied for %s to schema ;'%s'", stack_get_string(sql, "current_user"), ss->base.name); - if ((t = mvc_bind_trigger(sql, ss, tname )) == NULL) + if (mvc_bind_trigger(sql, ss, tname ) == NULL) return sql_error(sql, 02, "DROP TRIGGER: unknown trigger %s\n", tname); mvc_drop_trigger(sql, ss, tname); return stmt_none();
Why I should not use the t?
well, of course you can use t, but the code above does (no longer) use t, and icc correctly tell us that declaring and setting a variable without using it does not make much sense...
I found similar examples in the code. Maybe the the t was used after.
for sure, t must be used in these other cases; otherwise, icc would (correcly!) complain.
since your yesterday's changes (removal of "mvc_drop_dependencies(sql, t->base.id);") t was not used any more; cf. http://monetdb.cvs.sourceforge.net/monetdb/sql/src/server/sql_schema.mx?view... http://monetdb.cvs.sourceforge.net/monetdb/sql/src/server/sql_schema.mx?r1=1.120&r2=1.121
in fact, you originally intorduced "mvc_drop_dependencies(sql, t->base.id);", and hence the need for t on Tue Oct 31 2006, cf., http://monetdb.cvs.sourceforge.net/monetdb/sql/src/server/sql_schema.mx?view... http://monetdb.cvs.sourceforge.net/monetdb/sql/src/server/sql_schema.mx?r1=1.99&r2=1.100
but then apparently forgot to clean-up properly, when removing "mvc_drop_dependencies(sql, t->base.id);", again ...
I agree with this change I think it does affect the semantics of the function. Yes yes, I know that I just all my updates in this file. It was my fault. Sorry again. :)
It does not affect the semantics. Sorry I forgot the *not* Regards, Romulo
you do agree although it does affect the semantics?
well, I hoped it would not change the semantics...
can you explain in what way it does change the semantics?
Stefan
Regards, Romulo