Andreas Fink wrote: > > >Hi Andreas, Hi others > > > >we recently changed this in gw/dlr.c: > > > >{ > > #ifdef DLR_MYSQL > > mysql_close(connection); > >- if (!mysql_errno(connection)) > >- error(0,"MYSQL: %s", mysql_error(connection)); > > #endif > > } > > > >Hmmm, don't we need some constructs to check if the mysql_close() call > >has been successfull?! And if this is not the way to do it (AFAIK, > >this has been taken from a mysql doc example by myself) how should we > >do this? > > the problem here is: > > mysql_close(connection) does deallocate the connection. So we can not > call mysql_errno on a handle which doesnt exist anymore. Furthermore, > we want to close the connection. If it fails or not is not really of > importance. We wont use the connection anymore after that.
ok, I understand about usage of deallocated pointers, that shouldn't be the question. But I'd like to be aware if things went well when closing the connection to the mysql engine. I'll back-check the mysql docs and see if there is some way do handle this. Stipe [EMAIL PROTECTED] ------------------------------------------------------------------- Wapme Systems AG Münsterstr. 248 40470 Düsseldorf Tel: +49-211-74845-0 Fax: +49-211-74845-299 E-Mail: [EMAIL PROTECTED] Internet: http://www.wapme-systems.de ------------------------------------------------------------------- wapme.net - wherever you are