Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed "dry execution" of queries (which just set autocommit = false…

…). Removed port assignment as port has a default value now. Added a TRUE parameter to be passed to cubrid_connect() function to establish a new connection even if parameters are the same. This is how MySQL driver for CI does.
  • Loading branch information...
commit 5e39169ed3ddc5d374bec31313a93775edba9056 1 parent 7b298de
@kadishmal kadishmal authored
Showing with 3 additions and 24 deletions.
  1. +3 −24 system/database/drivers/cubrid/cubrid_driver.php
View
27 system/database/drivers/cubrid/cubrid_driver.php
@@ -74,30 +74,9 @@ class CI_DB_cubrid_driver extends CI_DB {
*/
function db_connect()
{
- // If no port is defined by the user, use the default value
- if ($this->port == '')
- {
- $this->port = self::DEFAULT_PORT;
- }
-
- $conn = cubrid_connect($this->hostname, $this->port, $this->database, $this->username, $this->password);
-
- if ($conn)
- {
- // Check if a user wants to run queries in dry, i.e. run the
- // queries but not commit them.
- if (isset($this->auto_commit) && ! $this->auto_commit)
- {
- cubrid_set_autocommit($conn, CUBRID_AUTOCOMMIT_FALSE);
- }
- else
- {
- cubrid_set_autocommit($conn, CUBRID_AUTOCOMMIT_TRUE);
- $this->auto_commit = TRUE;
- }
- }
-
- return $conn;
+ // TRUE is passed to cubrid_connect to force to create a new link
+ // instead of reusing a possibly open connection.
+ return cubrid_connect($this->hostname, $this->port, $this->database, $this->username, $this->password, TRUE);
}
// --------------------------------------------------------------------
Please sign in to comment.
Something went wrong with that request. Please try again.