aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs')
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs21
1 files changed, 20 insertions, 1 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
index a49043b..f50cc03 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
@@ -100,6 +100,15 @@ namespace OpenSim.Framework.Data.SQLite
100 100
101 public void UpdateAsset(AssetBase asset) 101 public void UpdateAsset(AssetBase asset)
102 { 102 {
103 MainLog.Instance.Verbose("AssetStorage",
104 "Asset: " + asset.FullID +
105 ", Name: " + asset.Name +
106 ", Description: " + asset.Description +
107 ", Type: " + asset.Type +
108 ", InvType: " + asset.InvType +
109 ", Temporary: " + asset.Temporary +
110 ", Local: " + asset.Local +
111 ", Data Length: " + asset.Data.Length );
103 DataTable assets = ds.Tables["assets"]; 112 DataTable assets = ds.Tables["assets"];
104 DataRow row = assets.Rows.Find(asset.FullID); 113 DataRow row = assets.Rows.Find(asset.FullID);
105 if (row == null) 114 if (row == null)
@@ -112,6 +121,11 @@ namespace OpenSim.Framework.Data.SQLite
112 { 121 {
113 fillAssetRow(row, asset); 122 fillAssetRow(row, asset);
114 } 123 }
124 if (ds.HasChanges()) {
125 DataSet changed = ds.GetChanges();
126 da.Update(changed, "assets");
127 ds.AcceptChanges();
128 }
115 } 129 }
116 130
117 public bool ExistsAsset(LLUUID uuid) 131 public bool ExistsAsset(LLUUID uuid)
@@ -122,7 +136,12 @@ namespace OpenSim.Framework.Data.SQLite
122 136
123 public void CommitAssets() // force a sync to the database 137 public void CommitAssets() // force a sync to the database
124 { 138 {
125 da.Update(ds, "assets"); 139 MainLog.Instance.Verbose("AssetStorage", "Attempting commit");
140 if (ds.HasChanges()) {
141 DataSet changed = ds.GetChanges();
142 da.Update(changed, "assets");
143 ds.AcceptChanges();
144 }
126 } 145 }
127 146
128 /*********************************************************************** 147 /***********************************************************************