diff options
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/Migration.cs | 9 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLXInventoryData.cs | 10 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteXInventoryData.cs | 8 |
3 files changed, 20 insertions, 7 deletions
diff --git a/OpenSim/Data/Migration.cs b/OpenSim/Data/Migration.cs index 4f113a2..c177097 100644 --- a/OpenSim/Data/Migration.cs +++ b/OpenSim/Data/Migration.cs | |||
@@ -67,7 +67,6 @@ namespace OpenSim.Data | |||
67 | /// really want is the assembly of your database class. | 67 | /// really want is the assembly of your database class. |
68 | /// | 68 | /// |
69 | /// </summary> | 69 | /// </summary> |
70 | |||
71 | public class Migration | 70 | public class Migration |
72 | { | 71 | { |
73 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 72 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -173,8 +172,6 @@ namespace OpenSim.Data | |||
173 | ExecuteScript(_conn, script); | 172 | ExecuteScript(_conn, script); |
174 | } | 173 | } |
175 | 174 | ||
176 | |||
177 | |||
178 | public void Update() | 175 | public void Update() |
179 | { | 176 | { |
180 | InitMigrationsTable(); | 177 | InitMigrationsTable(); |
@@ -186,8 +183,8 @@ namespace OpenSim.Data | |||
186 | return; | 183 | return; |
187 | 184 | ||
188 | // to prevent people from killing long migrations. | 185 | // to prevent people from killing long migrations. |
189 | m_log.InfoFormat("[MIGRATIONS] Upgrading {0} to latest revision {1}.", _type, migrations.Keys[migrations.Count - 1]); | 186 | m_log.InfoFormat("[MIGRATIONS]: Upgrading {0} to latest revision {1}.", _type, migrations.Keys[migrations.Count - 1]); |
190 | m_log.Info("[MIGRATIONS] NOTE: this may take a while, don't interupt this process!"); | 187 | m_log.Info("[MIGRATIONS]: NOTE - this may take a while, don't interrupt this process!"); |
191 | 188 | ||
192 | foreach (KeyValuePair<int, string[]> kvp in migrations) | 189 | foreach (KeyValuePair<int, string[]> kvp in migrations) |
193 | { | 190 | { |
@@ -206,7 +203,7 @@ namespace OpenSim.Data | |||
206 | } | 203 | } |
207 | catch (Exception e) | 204 | catch (Exception e) |
208 | { | 205 | { |
209 | m_log.DebugFormat("[MIGRATIONS] Cmd was {0}", e.Message.Replace("\n", " ")); | 206 | m_log.DebugFormat("[MIGRATIONS]: Cmd was {0}", e.Message.Replace("\n", " ")); |
210 | m_log.Debug("[MIGRATIONS]: An error has occurred in the migration. This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Continuing."); | 207 | m_log.Debug("[MIGRATIONS]: An error has occurred in the migration. This may mean you could see errors trying to run OpenSim. If you see database related errors, you will need to fix the issue manually. Continuing."); |
211 | ExecuteScript("ROLLBACK;"); | 208 | ExecuteScript("ROLLBACK;"); |
212 | } | 209 | } |
diff --git a/OpenSim/Data/MySQL/MySQLXInventoryData.cs b/OpenSim/Data/MySQL/MySQLXInventoryData.cs index 0fe801d..3c73095 100644 --- a/OpenSim/Data/MySQL/MySQLXInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLXInventoryData.cs | |||
@@ -64,14 +64,22 @@ namespace OpenSim.Data.MySQL | |||
64 | 64 | ||
65 | public bool StoreFolder(XInventoryFolder folder) | 65 | public bool StoreFolder(XInventoryFolder folder) |
66 | { | 66 | { |
67 | if (folder.folderName.Length > 64) | ||
68 | folder.folderName = folder.folderName.Substring(0, 64); | ||
69 | |||
67 | return m_Folders.Store(folder); | 70 | return m_Folders.Store(folder); |
68 | } | 71 | } |
69 | 72 | ||
70 | public bool StoreItem(XInventoryItem item) | 73 | public bool StoreItem(XInventoryItem item) |
71 | { | 74 | { |
75 | if (item.inventoryName.Length > 64) | ||
76 | item.inventoryName = item.inventoryName.Substring(0, 64); | ||
77 | if (item.inventoryDescription.Length > 128) | ||
78 | item.inventoryDescription = item.inventoryDescription.Substring(0, 128); | ||
79 | |||
72 | return m_Items.Store(item); | 80 | return m_Items.Store(item); |
73 | } | 81 | } |
74 | 82 | ||
75 | public bool DeleteFolders(string field, string val) | 83 | public bool DeleteFolders(string field, string val) |
76 | { | 84 | { |
77 | return m_Folders.Delete(field, val); | 85 | return m_Folders.Delete(field, val); |
diff --git a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs index 6064538..ca651e1 100644 --- a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs +++ b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs | |||
@@ -66,11 +66,19 @@ namespace OpenSim.Data.SQLite | |||
66 | 66 | ||
67 | public bool StoreFolder(XInventoryFolder folder) | 67 | public bool StoreFolder(XInventoryFolder folder) |
68 | { | 68 | { |
69 | if (folder.folderName.Length > 64) | ||
70 | folder.folderName = folder.folderName.Substring(0, 64); | ||
71 | |||
69 | return m_Folders.Store(folder); | 72 | return m_Folders.Store(folder); |
70 | } | 73 | } |
71 | 74 | ||
72 | public bool StoreItem(XInventoryItem item) | 75 | public bool StoreItem(XInventoryItem item) |
73 | { | 76 | { |
77 | if (item.inventoryName.Length > 64) | ||
78 | item.inventoryName = item.inventoryName.Substring(0, 64); | ||
79 | if (item.inventoryDescription.Length > 128) | ||
80 | item.inventoryDescription = item.inventoryDescription.Substring(0, 128); | ||
81 | |||
74 | return m_Items.Store(item); | 82 | return m_Items.Store(item); |
75 | } | 83 | } |
76 | 84 | ||