Store NULL in the 'DynAttrs' column if the prim doesn't have any dynamic attributes

user_profiles
Oren Hurvitz 2013-01-22 08:55:15 +02:00 committed by Justin Clark-Casey (justincc)
parent fdec05a15e
commit 86802bcf93
3 changed files with 15 additions and 3 deletions

View File

@ -2090,7 +2090,11 @@ VALUES
parameters.Add(_Database.CreateParameter("PassTouches", 0));
parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum));
parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl));
parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml()));
if (prim.DynAttrs.Count > 0)
parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml()));
else
parameters.Add(_Database.CreateParameter("DynAttrs", null));
return parameters.ToArray();
}

View File

@ -1645,7 +1645,11 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum);
cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl);
cmd.Parameters.AddWithValue("DynAttrs", prim.DynAttrs.ToXml());
if (prim.DynAttrs.Count > 0)
cmd.Parameters.AddWithValue("DynAttrs", prim.DynAttrs.ToXml());
else
cmd.Parameters.AddWithValue("DynAttrs", null);
}
/// <summary>

View File

@ -2145,7 +2145,11 @@ namespace OpenSim.Data.SQLite
row["VolumeDetect"] = 0;
row["MediaURL"] = prim.MediaUrl;
row["DynAttrs"] = prim.DynAttrs.ToXml();
if (prim.DynAttrs.Count > 0)
row["DynAttrs"] = prim.DynAttrs.ToXml();
else
row["DynAttrs"] = null;
}
/// <summary>