diff options
author | Justin Clarke Casey | 2008-01-15 22:16:43 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-01-15 22:16:43 +0000 |
commit | c15eec2cb0b4d549a75af98a06ce75170c9c1d4e (patch) | |
tree | 7df5e7cf4fe8cb228d269be50797607c4b41b1d4 /OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs | |
parent | Set svn:eol-style. (diff) | |
download | opensim-SC-c15eec2cb0b4d549a75af98a06ce75170c9c1d4e.zip opensim-SC-c15eec2cb0b4d549a75af98a06ce75170c9c1d4e.tar.gz opensim-SC-c15eec2cb0b4d549a75af98a06ce75170c9c1d4e.tar.bz2 opensim-SC-c15eec2cb0b4d549a75af98a06ce75170c9c1d4e.tar.xz |
* Restore non dash asset UUID persistence which was made dashed in r3069
* Apologies, any sqlite databases created between r3069 and this change will now contain unfindable assets.
* But sqlite asset databases used previous to r3069 will now work again.
* This change may have been done on purpose, so it's not impossible it will be re-reverted
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs index e2b28cd..76608c7 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs | |||
@@ -66,7 +66,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
66 | 66 | ||
67 | using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) | 67 | using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) |
68 | { | 68 | { |
69 | cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.UUID.ToString())); | 69 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); |
70 | using (IDataReader reader = cmd.ExecuteReader()) | 70 | using (IDataReader reader = cmd.ExecuteReader()) |
71 | { | 71 | { |
72 | if (reader.Read()) | 72 | if (reader.Read()) |
@@ -86,7 +86,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
86 | 86 | ||
87 | public void CreateAsset(AssetBase asset) | 87 | public void CreateAsset(AssetBase asset) |
88 | { | 88 | { |
89 | MainLog.Instance.Verbose("SQLITE", "Creating Asset " + asset.FullID.UUID.ToString()); | 89 | MainLog.Instance.Verbose("SQLITE", "Creating Asset " + Util.ToRawUuidString(asset.FullID)); |
90 | if (ExistsAsset(asset.FullID)) | 90 | if (ExistsAsset(asset.FullID)) |
91 | { | 91 | { |
92 | MainLog.Instance.Verbose("SQLITE", "Asset exists, updating instead. You should fix the caller for this!"); | 92 | MainLog.Instance.Verbose("SQLITE", "Asset exists, updating instead. You should fix the caller for this!"); |
@@ -96,7 +96,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
96 | { | 96 | { |
97 | using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn)) | 97 | using (SqliteCommand cmd = new SqliteCommand(InsertAssetSQL, m_conn)) |
98 | { | 98 | { |
99 | cmd.Parameters.Add(new SqliteParameter(":UUID", asset.FullID.UUID.ToString())); | 99 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID))); |
100 | cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name)); | 100 | cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name)); |
101 | cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description)); | 101 | cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description)); |
102 | cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type)); | 102 | cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type)); |
@@ -116,7 +116,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
116 | 116 | ||
117 | using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn)) | 117 | using (SqliteCommand cmd = new SqliteCommand(UpdateAssetSQL, m_conn)) |
118 | { | 118 | { |
119 | cmd.Parameters.Add(new SqliteParameter(":UUID", asset.FullID.UUID.ToString())); | 119 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(asset.FullID))); |
120 | cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name)); | 120 | cmd.Parameters.Add(new SqliteParameter(":Name", asset.Name)); |
121 | cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description)); | 121 | cmd.Parameters.Add(new SqliteParameter(":Description", asset.Description)); |
122 | cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type)); | 122 | cmd.Parameters.Add(new SqliteParameter(":Type", asset.Type)); |
@@ -145,7 +145,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
145 | { | 145 | { |
146 | using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) | 146 | using (SqliteCommand cmd = new SqliteCommand(SelectAssetSQL, m_conn)) |
147 | { | 147 | { |
148 | cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.UUID.ToString())); | 148 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); |
149 | using (IDataReader reader = cmd.ExecuteReader()) | 149 | using (IDataReader reader = cmd.ExecuteReader()) |
150 | { | 150 | { |
151 | if(reader.Read()) | 151 | if(reader.Read()) |
@@ -166,7 +166,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
166 | { | 166 | { |
167 | using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) | 167 | using (SqliteCommand cmd = new SqliteCommand(DeleteAssetSQL, m_conn)) |
168 | { | 168 | { |
169 | cmd.Parameters.Add(new SqliteParameter(":UUID", uuid.UUID.ToString())); | 169 | cmd.Parameters.Add(new SqliteParameter(":UUID", Util.ToRawUuidString(uuid))); |
170 | 170 | ||
171 | cmd.ExecuteNonQuery(); | 171 | cmd.ExecuteNonQuery(); |
172 | } | 172 | } |