Testing MySQL 4.0 ; detaching queries

From: Date: Wed, 28 Nov 2001 00:15:45 +0000
Subject: Testing MySQL 4.0 ; detaching queries
Groups: php.general 
Request: Send a blank email to php-general+get-75827@lists.php.net to get a copy of this message
We are planning to test MySQL v4.0.1 (multiple tests -- MyISAM and InnoDB) with live queries from our server in order to get real world testing of its stability with the same mix of queries we would send it if it were the production SQL server. The plan, at the moment, is to send a second query to the test server after sending it to the live one. This gets both inserts/updates as well as selects. Since the production app server will be doing this, we don't want a failure on the test SQL server to slow things down or cause a failure to the production environment. Two things we need in order to do this: 1. PHP should test connection to test MySQL server with timeout, so we don't wait if test MySQL server is down or unavailable (mysql_connect will wait for a long time). This is easy. Ideally, mysql_connect would have a timeout, but its not a showstopper. 2. PHP needs to send the query to the test server and continue WITHOUT results. At first we are not testing the validity of the queries. Its better to check elsewhere. Right now we don't want this testing to adversely affect the service in production. So either we need a way to have PHP detach the query (or run it asynchronously), or have the test MySQL server immediately return even though the query continues (this is my preference). This implies that every query will create a new connection. Is this a reasonable test? The timing won't be identical, but its as close as I can imagine getting. Any thoughts on how to accomplish this? Sincerely, Steven Roussey http://Network54.com/?pp=e

« previous php.general (#75827) next »