Re: [patch] with-database bug
Kevin Rosenberg <kevin-HJRc7zDS/[email protected]> Wed, 30 May 2007 07:19:07 -0600
| Newsgroups | gmane.lisp.clsql.devel |
|---|---|
| Message-ID | <[email protected]> |
Chaitanya Gupta wrote: > This patch is for the bug reported in > http://lists.b9.com/pipermail/clsql-help/2007-May/000823.html Thinking more about the report, and rereading the CLSQL documentation, I don't think the reported behaviour is a bug since the report is using 'nil' as the "A variable which is bound to the specified database". Futher, the documentation for connect is that the default for :make-default is T.[1] And, the documentation for with-database's argument of connect-args implies that the user is in charge of what parameters get passed to connect. Thus, unless otherwise documented, I think users can assume the defaults for connect will apply to with-database's use of connect. However, the current code tries the "rescue" the user who passes nil as the variable name by changing the nil to '*default-database*. This, in fact, might be the real problem. I think the better solution might be to signal an error if nil is passed as db-var. Then, undocumented issues about whether the new database connection is made the default or not go away. Unfortunately, making that change will somewhat break applications that have relied on CLSQL's undocumented behaviour. -- Kevin Rosenberg [email protected] [1] http://clsql.b9.com/manual/connect.html [2] http://clsql.b9.com/manual/with-database.html