If there are no new prim items to store then don't bother opening the MySqlConnection only to do nothing with it.
parent
522eff6138
commit
4ad45934c6
|
@ -1800,15 +1800,15 @@ namespace OpenSim.Data.MySQL
|
||||||
{
|
{
|
||||||
RemoveItems(primID);
|
RemoveItems(primID);
|
||||||
|
|
||||||
|
if (items.Count == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||||
{
|
{
|
||||||
dbcon.Open();
|
dbcon.Open();
|
||||||
|
|
||||||
using (MySqlCommand cmd = dbcon.CreateCommand())
|
using (MySqlCommand cmd = dbcon.CreateCommand())
|
||||||
{
|
{
|
||||||
if (items.Count == 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
cmd.CommandText = "insert into primitems (" +
|
cmd.CommandText = "insert into primitems (" +
|
||||||
"invType, assetType, name, " +
|
"invType, assetType, name, " +
|
||||||
"description, creationDate, nextPermissions, " +
|
"description, creationDate, nextPermissions, " +
|
||||||
|
|
Loading…
Reference in New Issue