Date: 05/04/01
- Next message: HurricaneIndy <email protected>: "[phplib] OT: Database Design"
- Previous message: darcy w. christ: "Re: Sv: [phplib] occasional problem with authentication"
- In reply to: Chris Johnson: "RE: Re[2]: Sv: [phplib] occasional problem with authentication"
- Next in thread: Philip Strnad: "Re: Sv: [phplib] occasional problem with authentication"
- Reply: Philip Strnad: "Re: Sv: [phplib] occasional problem with authentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Thanks Chris, for the suggestion. i actually patched my code a long
time ago when i saw those postings. i'm not sure about Philip, though.
You did make a comment about it causing trouble with the select
statement. My guess is that that is what is causing the trouble, since
as i found, when i experience this problem, i see an update, then select
and finally an insert. So if the select is failing, that would cause
the insert which would probably change the session that was being used,
or something like that. Anyway, that kind of behaviour would reflect
this problem.
does anyone know any more about this particular bug in mysql?
Chris Johnson wrote:
>
> Maxim pointed towards the behavior of ac_store() in ct_sql.inc. Perhaps
> this then has a relation to the known problem in ac_store() in
> ct_sql.inc in PHPLIB 7.2c. Here's my patched code at the end of that
> function:
>
> $this->db->query($uquery);
>
> # FIRST test to see if any rows were affected.
> # Zero rows affected could mean either there were no matching rows
> # whatsoever, OR that the update statement did match a row but
> made
> # no changes to the table data (i.e. UPDATE tbl SET col = 'x',
> when
> # "col" is _already_ set to 'x') so then,
> # SECOND, query(SELECT...) on the sid to determine if the row is in
> # fact there,
> # THIRD, verify that there is at least one row present, and if there
> # is not, then
> # FOURTH, insert the row as we've determined that it does not exist.
>
> # if ( $this->db->affected_rows() == 0
> # && $this->db->query($squery)
> # && $this->db->f(1) == 0
> # && !$this->db->query($iquery)) {
>
> // one line change below per discussion in PHPLIB mailing list
> // regarding duplicate entries in active_sessions and a change
> // to affected_rows() in MySQL 3.23 which caused this routine to fail in
> // earlier versions of PHPLIB. apparently 7.2c (this version) fixes the
> // affected_rows() thing but fails on the Select query. 15Feb2001, CJ.
>
> if ( $this->db->affected_rows() == 0
> && $this->db->query($squery)
> && $this->db->next_record() && $this->db->f(0) == 0 //
> maillist fix
> && !$this->db->query($iquery)) {
>
> $ret = false;
> }
> return $ret;
> }
-- ~darcy w. christ Elegant Communications Inc. 416.362.9772 x222 | 416.362.8324 fax--------------------------------------------------------------------- To unsubscribe, e-mail: phplib-unsubscribe <email protected> For additional commands, e-mail: phplib-help <email protected>
- Next message: HurricaneIndy <email protected>: "[phplib] OT: Database Design"
- Previous message: darcy w. christ: "Re: Sv: [phplib] occasional problem with authentication"
- In reply to: Chris Johnson: "RE: Re[2]: Sv: [phplib] occasional problem with authentication"
- Next in thread: Philip Strnad: "Re: Sv: [phplib] occasional problem with authentication"
- Reply: Philip Strnad: "Re: Sv: [phplib] occasional problem with authentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

