Corrupted query results in memory.

Corrupted query results in memory.

am 09.11.2007 21:02:31 von Max Thayer

------_=_NextPart_001_01C8230B.765A8122
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

I posted an issue to the mysql dev forums last week with regards to an
issue we are encountering. The issue as we understood it last week was
simple...after some time (undetermined as of then) query results from
the web app (a PHP/MySQL/Javascript Ajax app.) would come back all
'wonky.' Upon issuing a mysql-server restart the data would be fine,
and query results back to normal. This morning I figured out how to
replicate the issue. Issue a double request for the mysql result set.
Due to the "Ajaxy" nature of my web app it isn't the same as a double
HTTPRequest of POST, as it is requesting a result set back from the
database twice in a row before the response is collected.

We run Apache 2.2 on FreeBSD 6.1.x, I am currently running MySQL
5.0.x....given the fact that I can repeat and reproduce the problem by
either hitting my refresh button twice, or by hitting my javascript/Ajax
button twice before I get my first response....can anyone point me in a
direction to narrow down why my code might be doing this? I am using
PDO with prepared statements and MySQL stored procedures to produce my
result sets... if you asked me yesterday, I'd have said I wasn't doing
any thing that MySQL couldn't handle...but apparently that isn't the
case...

Max H. Thayer
Software Developer
Center for High-Throughput Structural Biology
=20
Hauptman-Woodward Medical Research Inst.
700 Ellicott St.
Buffalo, NY 14203
Phone: 716-898-8637
Fax: 716-898-8660
http://www.chtsb.org =20
http://www.hwi.buffalo.edu =20


------_=_NextPart_001_01C8230B.765A8122--

RE: Corrupted query results in memory.

am 10.11.2007 02:16:58 von Instruct ICC

> This morning I figured out how to
> replicate the issue. Issue a double request for the mysql result set.
> Due to the "Ajaxy" nature of my web app it isn't the same as a double
> HTTPRequest of POST, as it is requesting a result set back from the
> database twice in a row before the response is collected.

I think we'd have to see how you are doing your "Ajaxy" implementation. Th=
is is the lowest level of Ajax I use now http://www.xajaxproject.org/docs/x=
ajax-in-10-minutes.php

If it's asynchronous, how can a second request wonk it up? Did you roll yo=
ur own using XMLHttpRequest directly?


> We run Apache 2.2 on FreeBSD 6.1.x, I am currently running MySQL
> 5.0.x....given the fact that I can repeat and reproduce the problem by
> either hitting my refresh button twice, or by hitting my javascript/Ajax
> button twice before I get my first response....can anyone point me in a
> direction to narrow down why my code might be doing this? I am using
> PDO with prepared statements and MySQL stored procedures to produce my
> result sets... if you asked me yesterday, I'd have said I wasn't doing
> any thing that MySQL couldn't handle...but apparently that isn't the
> case...

I'm still rooting for "MySQL could handle it".

I wouldn't think it necessary, but maybe you need to obtain table locks for=
your needs.

--MAE Alumnus rocking the high compensation to effort ratio in this CS worl=
d of no-accountability-maybe-we'll-fix-it-in-the-next-release-but -pay-to-fi=
nd-out-beotch. Thank you Billy boy.
____________________________________________________________ _____
Climb to the top of the charts!=A0 Play Star Shuffle:=A0 the word scramble =
challenge with star power.
http://club.live.com/star_shuffle.aspx?icid=3Dstarshuffle_wl mailtextlink_oc=
t=

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: Corrupted query results in memory.

am 10.11.2007 03:05:12 von Bastien Koert

--_815e4860-2106-4694-98c8-19670bf59c22_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


so the simple solution is to disable the button after the call until the re=
sults are returned
=20
bastien> Date: Fri, 9 Nov 2007 15:02:31 -0500> From: mthayer@hwi.buffalo.ed=
u> To: php-db@lists.php.net> Subject: [PHP-DB] Corrupted query results in m=
emory.> > I posted an issue to the mysql dev forums last week with regards =
to an> issue we are encountering. The issue as we understood it last week w=
as> simple...after some time (undetermined as of then) query results from> =
the web app (a PHP/MySQL/Javascript Ajax app.) would come back all> 'wonky.=
' Upon issuing a mysql-server restart the data would be fine,> and query re=
sults back to normal. This morning I figured out how to> replicate the issu=
e. Issue a double request for the mysql result set.> Due to the "Ajaxy" nat=
ure of my web app it isn't the same as a double> HTTPRequest of POST, as it=
is requesting a result set back from the> database twice in a row before t=
he response is collected.> > We run Apache 2.2 on FreeBSD 6.1.x, I am curre=
ntly running MySQL> 5.0.x....given the fact that I can repeat and reproduce=
the problem by> either hitting my refresh button twice, or by hitting my j=
avascript/Ajax> button twice before I get my first response....can anyone p=
oint me in a> direction to narrow down why my code might be doing this? I a=
m using> PDO with prepared statements and MySQL stored procedures to produc=
e my> result sets... if you asked me yesterday, I'd have said I wasn't doin=
g> any thing that MySQL couldn't handle...but apparently that isn't the> ca=
se...> > Max H. Thayer> Software Developer> Center for High-Throughput Stru=
ctural Biology> > Hauptman-Woodward Medical Research Inst.> 700 Ellicott St=
..> Buffalo, NY 14203> Phone: 716-898-8637> Fax: 716-898-8660> http://www.ch=
tsb.org > http://www.hwi.buffalo.edu i.buffalo.edu/> >=20
____________________________________________________________ _____
Send a smile, make someone laugh, have some fun! Start now!
http://www.freemessengeremoticons.ca/?icid=3DEMENCA122=

--_815e4860-2106-4694-98c8-19670bf59c22_--