Ticket #279 (new defect)

Opened 5 months ago

Last modified 3 months ago

MySQLStore error(s) in PHP 2.1.1 library

Reported by: http://gsm.hallofkvasir.org/ Assigned to:
Priority: minor Milestone:
Keywords: MySQL DBStore Cc:
Project: php-openid OpenID Protocol:
Series: 2.x.x Web Browser:

Description

Greets.

The second point below might be a configuration issue, but I will put it in here anyhow. The first point is definitely a bug.

1) There is a mis-typed parameter symbol in line 46 of the MySQLStore.php file. There is a "!" where it should be a "?" (at least, with it being a !, there was a problem parsing for a prepared statement).

2) Transactions do not seem to be implemented well for SQLStore in general. In my (brief and non-comprehensive) testing, it seemed that Auth_OpenID_DatabaseConnection::commit() was called without Auth_OpenID_DatabaseConnection::begin ever having been previously called (so it was trying to commit a non-existant transaction and therefore failing).

Change History

09/11/08 16:43:56 changed by http://keturn.myopenid.com/

Thanks for the report. Is the transaction error reproducible? Can you give us more details?

09/11/08 16:56:39 changed by http://keturn.myopenid.com/

as for the bang in the prepared statement, its meaning is documented at http://pear.php.net/manual/en/package.database.db.intro-execute.php

09/12/08 09:51:56 changed by http://gsm.hallofkvasir.org/

For the bang part of the issue, that is all well and good if you are using PEAR::DB. I happen to not be, and it doesn't seem to be standard sql with, for instance, PDO. As for the transaction one, when I get some more time I will try to write up a reproduction.

09/12/08 13:29:02 changed by http://keturn.myopenid.com/

Oh, yes, I think that implementation of MySQLStore only supports Pear::DB. You'll likely need another implementation for another interface.