← Back to team overview

anewt-developers team mailing list archive

[Branch ~uws/anewt/anewt.uws] Rev 1789: [database] Don't try to connect before each query

 

------------------------------------------------------------
revno: 1789
committer: Wouter Bolsterlee <uws@xxxxxxxxx>
branch nick: anewt
timestamp: Sat 2010-10-02 15:15:14 +0200
message:
  [database] Don't try to connect before each query
  
  Avoid checking for a valid connection for each executed
  query. It adds extra server roundtrips for at least the
  MySQL backends and does not work reliably anyway.
  
  This also means that disconnected connections do not
  automatically try to (re)connect anymore, but relying on
  this was bad practice and couldn't possibly work reliably
  with transactions anyway.
modified:
  database/prepared-query.lib.php


--
lp:anewt
https://code.launchpad.net/~uws/anewt/anewt.uws

Your team Anewt developers is subscribed to branch lp:anewt.
To unsubscribe from this branch go to https://code.launchpad.net/~uws/anewt/anewt.uws/+edit-subscription
=== modified file 'database/prepared-query.lib.php'
--- database/prepared-query.lib.php	2009-07-20 20:41:56 +0000
+++ database/prepared-query.lib.php	2010-10-02 13:15:14 +0000
@@ -98,7 +98,6 @@
 	 */
 	public function executev($values=null)
 	{
-		$this->connection->connect();
 		$sql = $this->sql_template->fillv($values);
 		$result_set = $this->connection->execute_sql($sql);
 		return $result_set;