OpenEuphoria.org Ticket #136: euweb does not check for failed connection from edbi_open()

When the user is unable to log into the database (e.g. 'user'@'localhost' on mysql db localhost:3306/listfilt ) , in this example caused by a permissions issue, mysql_real_connect() returns NULL, which is returned by edbi_open().

euweb does not check for a null return value. This should be fixed, euweb should detect and report when the attempt to connect to the database has failed.

edbi's mysql driver also has a bug, there is no error checking to make sure that dbh is in fact a valid pointer (or at least non-NULL), leading to a machine exception later. There is not much edbi can do about this, but a nicer human readable error (such as 'MySQL database handle is NULL') would be better than just seeing a machine exception.

Details

Type: Bug Report Severity: Major Category: General
Assigned To: jimcbrown Status: Accepted Reported Release:
Fixed in SVN #: View VCS: none Milestone:

1. Comment by jimcbrown Oct 01, 2010

Accepting.

2. Comment by jimcbrown Oct 29, 2010

  • bump*

3. Comment by jeremy Oct 29, 2010

The new version of edbi is much smarter on this. I just need to pull down the new mercurial repo and go from there.

Search



Quick Links

User menu

Not signed in.

Misc Menu