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.cs24
1 files changed, 14 insertions, 10 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
index f50cc03..aef9350 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs
@@ -121,11 +121,8 @@ namespace OpenSim.Framework.Data.SQLite
121 { 121 {
122 fillAssetRow(row, asset); 122 fillAssetRow(row, asset);
123 } 123 }
124 if (ds.HasChanges()) { 124 da.Update(ds, "assets");
125 DataSet changed = ds.GetChanges(); 125 ds.AcceptChanges();
126 da.Update(changed, "assets");
127 ds.AcceptChanges();
128 }
129 } 126 }
130 127
131 public bool ExistsAsset(LLUUID uuid) 128 public bool ExistsAsset(LLUUID uuid)
@@ -133,15 +130,22 @@ namespace OpenSim.Framework.Data.SQLite
133 DataRow row = ds.Tables["assets"].Rows.Find(uuid); 130 DataRow row = ds.Tables["assets"].Rows.Find(uuid);
134 return (row != null); 131 return (row != null);
135 } 132 }
133
134 public void DeleteAsset(LLUUID uuid)
135 {
136 DataRow row = ds.Tables["assets"].Rows.Find(uuid);
137 if (row != null) {
138 row.Delete();
139 }
140 da.Update(ds, "assets");
141 ds.AcceptChanges();
142 }
136 143
137 public void CommitAssets() // force a sync to the database 144 public void CommitAssets() // force a sync to the database
138 { 145 {
139 MainLog.Instance.Verbose("AssetStorage", "Attempting commit"); 146 MainLog.Instance.Verbose("AssetStorage", "Attempting commit");
140 if (ds.HasChanges()) { 147 // da.Update(ds, "assets");
141 DataSet changed = ds.GetChanges(); 148 // ds.AcceptChanges();
142 da.Update(changed, "assets");
143 ds.AcceptChanges();
144 }
145 } 149 }
146 150
147 /*********************************************************************** 151 /***********************************************************************