Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
674400d7
Commit
674400d7
authored
12 years ago
by
Cyril Vazquez
Browse files
Options
Downloads
Patches
Plain Diff
Fix: remove force_new_connect for performance
parent
1578cf56
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/trunk/core/class/class_db.php
+24
-17
24 additions, 17 deletions
core/trunk/core/class/class_db.php
with
24 additions
and
17 deletions
core/trunk/core/class/class_db.php
+
24
−
17
View file @
674400d7
...
...
@@ -51,25 +51,25 @@ class dbquery extends functions
* Debug mode activation.
* Integer 1,0
*/
pr
ivate
$_debug
;
// debug mode
pr
otected
$_debug
;
// debug mode
/**
* Debug query (debug mode). String
*/
pr
ivate
$_debugQuery
;
// request for the debug mode
pr
otected
$_debugQuery
;
// request for the debug mode
/**
* SQL link identifier
* Integer
*/
pr
ivate
$_sqlLink
;
// sql link identifier
pr
otected
$_sqlLink
;
// sql link identifier
/**
* To know where the script was stopped
* Integer
*/
pr
ivate
$_sqlError
;
// to know where the script was stopped
pr
otected
$_sqlError
;
// to know where the script was stopped
/**
* SQL query
...
...
@@ -81,27 +81,27 @@ class dbquery extends functions
* Number of queries made with this identifier
* Integer
*/
pr
ivate
$_nbQuery
;
// number of queries made with this identifier
pr
otected
$_nbQuery
;
// number of queries made with this identifier
/**
* Sent query result
* String
*/
pr
ivate
$_result
;
// sent query result
pr
otected
$_result
;
// sent query result
/**
* OCI query identifier
* @access private
* @var integer
*/
pr
ivate
$_statement
;
// OCI query identifier
pr
otected
$_statement
;
// OCI query identifier
pr
ivate
$_server
;
pr
ivate
$_port
;
pr
ivate
$_user
;
pr
ivate
$_password
;
pr
ivate
$_database
;
pr
ivate
$_databasetype
;
pr
otected
$_server
;
pr
otected
$_port
;
pr
otected
$_user
;
pr
otected
$_password
;
pr
otected
$_database
;
pr
otected
$_databasetype
;
//private $workspace;
public
function
__construct
()
...
...
@@ -220,9 +220,10 @@ class dbquery extends functions
' user='
.
$this
->
_user
.
' password='
.
$this
->
_password
.
' dbname='
.
$this
->
_database
.
' port='
.
$this
->
_port
,
PGSQL_CONNECT_FORCE_NEW
' port='
.
$this
->
_port
//,
//
PGSQL_CONNECT_FORCE_NEW
);
//
break
;
case
'SQLSERVER'
:
...
...
@@ -264,6 +265,12 @@ class dbquery extends functions
}
else
{
$this
->
select_db
();
/*switch($this->_databasetype)
{
case 'POSTGRESQL':
$this->query('SET application_name = ' . get_class($this));
break;
}*/
}
}
...
...
@@ -271,14 +278,14 @@ class dbquery extends functions
{
if
(
!
$this
->
_sqlLink
)
return
false
;
switch
(
$this
->
_databasetype
)
{
case
'MYSQL'
:
return
true
;
break
;
case
'POSTGRESQL'
:
if
(
@
pg_connection_status
(
$this
->
_sqlLink
)
==
PGSQL_CONNECTION_OK
)
if
(
pg_connection_status
(
$this
->
_sqlLink
)
==
PGSQL_CONNECTION_OK
)
return
true
;
break
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment