If there are no new prim items to store then don't bother opening the MySqlConnection only to do nothing with it.

0.7.4.1
Justin Clark-Casey (justincc) 2012-04-30 16:00:31 +01:00
parent 522eff6138
commit 4ad45934c6
1 changed files with 3 additions and 3 deletions

View File

@ -1800,15 +1800,15 @@ namespace OpenSim.Data.MySQL
{
RemoveItems(primID);
if (items.Count == 0)
return;
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
{
dbcon.Open();
using (MySqlCommand cmd = dbcon.CreateCommand())
{
if (items.Count == 0)
return;
cmd.CommandText = "insert into primitems (" +
"invType, assetType, name, " +
"description, creationDate, nextPermissions, " +