Keep the connection to the database open for as little as possible,

and that while in a lock.  That way, multiple checkins all happening at
once can't overflow mysql with too many connections.


git-svn-id: svn://10.0.0.236/trunk@33571 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
terry%mozilla.org
1999-06-03 20:32:20 +00:00
parent 8c4f75f993
commit 891049d55c
2 changed files with 10 additions and 1 deletions

View File

@@ -116,7 +116,7 @@ if {![info exists forcetreeid]} {
ConnectToDatabase
AddToDatabase $appendjunk $plainlog
DisconnectFromDatabase
}
Unlock

View File

@@ -91,6 +91,15 @@ proc ConnectToDatabase {} {
}
}
proc DisconnectFromDatabase {} {
global mysqlhandle
if {[info exists mysqlhandle]} {
mysqlclose $mysqlhandle
unset mysqlhandle
}
}
proc SendSQL { str } {
# puts $str
global mysqlhandle errorInfo