mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
If there are no new prim items to store then don't bother opening the MySqlConnection only to do nothing with it.
This commit is contained in:
@@ -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, " +
|
||||
|
||||
Reference in New Issue
Block a user