persist test feature in mysql

This commit is contained in:
UbitUmarov
2023-03-13 12:40:24 +00:00
parent 5740d99286
commit adde3cbb0a
2 changed files with 13 additions and 3 deletions

View File

@@ -229,7 +229,7 @@ namespace OpenSim.Data.MySQL
"PathTaperX, PathTaperY, PathTwist, " +
"PathTwistBegin, ProfileBegin, ProfileEnd, " +
"ProfileCurve, ProfileHollow, Texture, " +
"ExtraParams, State, LastAttachPoint, Media) " +
"ExtraParams, State, LastAttachPoint, Media, MatOvrd) " +
"values (?UUID, " +
"?Shape, ?ScaleX, ?ScaleY, ?ScaleZ, " +
"?PCode, ?PathBegin, ?PathEnd, " +
@@ -241,7 +241,7 @@ namespace OpenSim.Data.MySQL
"?PathTwistBegin, ?ProfileBegin, " +
"?ProfileEnd, ?ProfileCurve, " +
"?ProfileHollow, ?Texture, ?ExtraParams, " +
"?State, ?LastAttachPoint, ?Media)";
"?State, ?LastAttachPoint, ?Media, ?MatOvrd)";
FillShapeCommand(cmd, prim);
@@ -1830,6 +1830,10 @@ namespace OpenSim.Data.MySQL
if (row["Media"] is not System.DBNull)
s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]);
if (row["MatOvrd"] is not System.DBNull)
s.RenderMaterialsOvrFromRawBin((byte[])row["MatOvrd"]);
else
s.RenderMaterialsOvrFromRawBin(null);
return s;
}
@@ -1873,7 +1877,10 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("ExtraParams", s.ExtraParams);
cmd.Parameters.AddWithValue("State", s.State);
cmd.Parameters.AddWithValue("LastAttachPoint", s.LastAttachPoint);
cmd.Parameters.AddWithValue("Media", null == s.Media ? null : s.Media.ToXml());
cmd.Parameters.AddWithValue("Media", s.Media?.ToXml());
byte[] matovrdata = s.RenderMaterialsOvrToRawBin();
cmd.Parameters.AddWithValue("MatOvrd", matovrdata);
}
public virtual void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)

View File

@@ -550,3 +550,6 @@ BEGIN;
ALTER TABLE `land` ADD COLUMN `environment` MEDIUMTEXT default NULL;
COMMIT;
:VERSION 64 #----- material overrides
ALTER TABLE `primshapes` ADD COLUMN `MatOvrd` blob default NULL;
COMMIT;