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:
@@ -116,7 +116,7 @@ if {![info exists forcetreeid]} {
|
||||
|
||||
ConnectToDatabase
|
||||
AddToDatabase $appendjunk $plainlog
|
||||
|
||||
DisconnectFromDatabase
|
||||
}
|
||||
Unlock
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user