List:General Discussion« Previous MessageNext Message »
From:Darryle Steplight Date:June 3 2009 3:40pm
Subject:Re: Why doesn't mySQL stop a query when the browser tab is closedL
View as plain text  
Hi Daevid,

You can always stop the query by running

SHOW PROCESSLIST;

from the command line or your MySql Admin tool. The above command will
show you all of the queries that are currently running along with
their PID# and state. Find the query your want to stop, and run the
following command
KILL #; (where # is the process id)

As far as the relationship between killing queries and the browser, I
think the previous comments pretty much summed it up.


On Wed, Jun 3, 2009 at 10:22 AM, Jerry Schwartz
<jschwartz@stripped> wrote:
>
>
>>-----Original Message-----
>>From: Jay Blanchard [mailto:jblanchard@stripped]
>>Sent: Wednesday, June 03, 2009 8:46 AM
>>To: Daevid Vincent; mysql@stripped
>>Subject: RE: Why doesn't mySQL stop a query when the browser tab is
>>closedL
>>
>>[snip]
>>I just noticed a horrible thing.
>>[/snip]
>>
>>Keep in mind that the query event is server side and is not tied to the
>>browser (client side) once it has begun because of the statelessness of
>>the connection. You would have to have some sort of onClose() event from
>>the browser that would trigger a query cancellation.
>>
> [JS] Going beyond that, the browser is at several removes from the MySQL
> server. Typically the browser talks to the web server, then the web server
> runs some application code (PHP or whatever), and then the application code
> talks to the MySQL server. The only part of this chain that "knows" what the
> MySQL server is doing is the last bit, the application code, which is
> typically waiting for a response.
>
> Getting back to the user, HTTP itself is a stateless protocol. That means
> the web server has no way of knowing if the user, the browser, or even the
> user's computer is still there; it also doesn't really know what the user
> last did (it's up to the application code to remember that somehow).
>
> In order for an end user to cancel a query, there would have to be some way
> for the user to tell the browser to tell the web server to tell the
> application code to tell the MySQL server to stop. I'm pretty sure you could
> create a "tired of waiting" button for the user, but I haven't done it
> myself.
>
> Regards,
>
> Jerry Schwartz
> The Infoshop by Global Information Incorporated
> 195 Farmington Ave.
> Farmington, CT 06032
>
> 860.674.8796 / FAX: 860.674.8341
>
> www.the-infoshop.com
>
>
>
>
>
>>--
>>MySQL General Mailing List
>>For list archives: http://lists.mysql.com/mysql
>>To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>>infoshop.com
>
>
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
>



-- 
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?
Thread
Why doesn't mySQL stop a query when the browser tab is closedLDaevid Vincent3 Jun
  • RE: Why doesn't mySQL stop a query when the browser tab is closedLJay Blanchard3 Jun
    • RE: Why doesn't mySQL stop a query when the browser tab is closedLJerry Schwartz3 Jun
      • Re: Why doesn't mySQL stop a query when the browser tab is closedLDarryle Steplight3 Jun
        • RE: Why doesn't mySQL stop a query when the browser tab is closedLDaevid Vincent3 Jun
          • RE: Why doesn't mySQL stop a query when the browser tab is closedLMartin Gainty3 Jun
          • Re: Why doesn't mySQL stop a query when the browser tab is closedLJohnny Withers3 Jun
            • Re: Why doesn't mySQL stop a query when the browser tab is closedLEric Bergen26 Jul
              • Re: Why doesn't mySQL stop a query when the browser tab is closedLJohnny Withers27 Jul
                • RE: Why doesn't mySQL stop a query when the browser tab is closedLWalton Hoops27 Jul