aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorMelanie2010-05-03 01:40:24 +0100
committerMelanie2010-05-03 01:40:24 +0100
commit9f8acbfe3e6206893822bc3b7edbadbd7cae7a16 (patch)
treedd9485b0c6b4cbfa0399501f43d7d70d4ed438aa /OpenSim/Data
parentMake the IUserAccountData properly unpack the god mode data, so grid gods (diff)
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-9f8acbfe3e6206893822bc3b7edbadbd7cae7a16.zip
opensim-SC_OLD-9f8acbfe3e6206893822bc3b7edbadbd7cae7a16.tar.gz
opensim-SC_OLD-9f8acbfe3e6206893822bc3b7edbadbd7cae7a16.tar.bz2
opensim-SC_OLD-9f8acbfe3e6206893822bc3b7edbadbd7cae7a16.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Data')
-rw-r--r--OpenSim/Data/SQLite/Resources/001_XInventoryStore.sql38
-rw-r--r--OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql9
-rw-r--r--OpenSim/Data/SQLite/SQLiteAuthenticationData.cs6
-rw-r--r--OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs2
-rw-r--r--OpenSim/Data/SQLite/SQLiteXInventoryData.cs2
-rw-r--r--OpenSim/Data/SQLiteLegacy/SQLiteAuthenticationData.cs6
6 files changed, 59 insertions, 4 deletions
diff --git a/OpenSim/Data/SQLite/Resources/001_XInventoryStore.sql b/OpenSim/Data/SQLite/Resources/001_XInventoryStore.sql
new file mode 100644
index 0000000..7e21996
--- /dev/null
+++ b/OpenSim/Data/SQLite/Resources/001_XInventoryStore.sql
@@ -0,0 +1,38 @@
1BEGIN TRANSACTION;
2
3CREATE TABLE inventoryfolders(
4 folderName varchar(255),
5 type integer,
6 version integer,
7 folderID varchar(255) primary key,
8 agentID varchar(255) not null default '00000000-0000-0000-0000-000000000000',
9 parentFolderID varchar(255) not null default '00000000-0000-0000-0000-000000000000');
10
11CREATE TABLE inventoryitems(
12 assetID varchar(255),
13 assetType integer,
14 inventoryName varchar(255),
15 inventoryDescription varchar(255),
16 inventoryNextPermissions integer,
17 inventoryCurrentPermissions integer,
18 invType integer,
19 creatorID varchar(255),
20 inventoryBasePermissions integer,
21 inventoryEveryOnePermissions integer,
22 salePrice integer default 99,
23 saleType integer default 0,
24 creationDate integer default 2000,
25 groupID varchar(255) default '00000000-0000-0000-0000-000000000000',
26 groupOwned integer default 0,
27 flags integer default 0,
28 inventoryID varchar(255) primary key,
29 parentFolderID varchar(255) not null default '00000000-0000-0000-0000-000000000000',
30 avatarID varchar(255) not null default '00000000-0000-0000-0000-000000000000',
31 inventoryGroupPermissions integer not null default 0);
32
33create index inventoryfolders_agentid on inventoryfolders(agentID);
34create index inventoryfolders_parentid on inventoryfolders(parentFolderID);
35create index inventoryitems_parentfolderid on inventoryitems(parentFolderID);
36create index inventoryitems_avatarid on inventoryitems(avatarID);
37
38COMMIT;
diff --git a/OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql b/OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql
new file mode 100644
index 0000000..545d233
--- /dev/null
+++ b/OpenSim/Data/SQLite/Resources/002_XInventoryStore.sql
@@ -0,0 +1,9 @@
1BEGIN TRANSACTION;
2
3ATTACH 'inventoryStore.db' AS old;
4
5INSERT INTO inventoryfolders (folderName, type, version, folderID, agentID, parentFolderID) SELECT `name` AS folderName, `type` AS type, `version` AS version, `UUID` AS folderID, `agentID` AS agentID, `parentID` AS parentFolderID from old.inventoryfolders;
6
7INSERT INTO inventoryitems (assetID, assetType, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType, creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType, creationDate, groupID, groupOwned, flags, inventoryID, parentFolderID, avatarID, inventoryGroupPermissions) SELECT `assetID`, `assetType` AS assetType, `inventoryName` AS inventoryName, `inventoryDescription` AS inventoryDescription, `inventoryNextPermissions` AS inventoryNextPermissions, `inventoryCurrentPermissions` AS inventoryCurrentPermissions, `invType` AS invType, `creatorsID` AS creatorID, `inventoryBasePermissions` AS inventoryBasePermissions, `inventoryEveryOnePermissions` AS inventoryEveryOnePermissions, `salePrice` AS salePrice, `saleType` AS saleType, `creationDate` AS creationDate, `groupID` AS groupID, `groupOwned` AS groupOwned, `flags` AS flags, `UUID` AS inventoryID, `parentFolderID` AS parentFolderID, `avatarID` AS avatarID, `inventoryGroupPermissions` AS inventoryGroupPermissions FROM old.inventoryitems;
8
9COMMIT;
diff --git a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs
index 086ac0a..a1412ff 100644
--- a/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAuthenticationData.cs
@@ -29,6 +29,8 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Data; 31using System.Data;
32using System.Reflection;
33using log4net;
32using OpenMetaverse; 34using OpenMetaverse;
33using OpenSim.Framework; 35using OpenSim.Framework;
34using Mono.Data.Sqlite; 36using Mono.Data.Sqlite;
@@ -37,6 +39,8 @@ namespace OpenSim.Data.SQLite
37{ 39{
38 public class SQLiteAuthenticationData : SQLiteFramework, IAuthenticationData 40 public class SQLiteAuthenticationData : SQLiteFramework, IAuthenticationData
39 { 41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43
40 private string m_Realm; 44 private string m_Realm;
41 private List<string> m_ColumnNames; 45 private List<string> m_ColumnNames;
42 private int m_LastExpire; 46 private int m_LastExpire;
@@ -157,7 +161,7 @@ namespace OpenSim.Data.SQLite
157 } 161 }
158 catch (Exception e) 162 catch (Exception e)
159 { 163 {
160 Console.WriteLine(e.ToString()); 164 m_log.Error("[SQLITE]: Exception storing authentication data", e);
161 //CloseCommand(cmd); 165 //CloseCommand(cmd);
162 return false; 166 return false;
163 } 167 }
diff --git a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
index 3c70aef..9b8e2fa 100644
--- a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
+++ b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Data.SQLite
59 if (!m_initialized) 59 if (!m_initialized)
60 { 60 {
61 m_Connection = new SqliteConnection(connectionString); 61 m_Connection = new SqliteConnection(connectionString);
62 Console.WriteLine(string.Format("OPENING CONNECTION FOR {0} USING {1}", storeName, connectionString)); 62 //Console.WriteLine(string.Format("OPENING CONNECTION FOR {0} USING {1}", storeName, connectionString));
63 m_Connection.Open(); 63 m_Connection.Open();
64 64
65 if (storeName != String.Empty) 65 if (storeName != String.Empty)
diff --git a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs
index be1d041..6064538 100644
--- a/OpenSim/Data/SQLite/SQLiteXInventoryData.cs
+++ b/OpenSim/Data/SQLite/SQLiteXInventoryData.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Data.SQLite
49 public SQLiteXInventoryData(string conn, string realm) 49 public SQLiteXInventoryData(string conn, string realm)
50 { 50 {
51 m_Folders = new SQLiteGenericTableHandler<XInventoryFolder>( 51 m_Folders = new SQLiteGenericTableHandler<XInventoryFolder>(
52 conn, "inventoryfolders", "InventoryStore"); 52 conn, "inventoryfolders", "XInventoryStore");
53 m_Items = new SqliteItemHandler( 53 m_Items = new SqliteItemHandler(
54 conn, "inventoryitems", String.Empty); 54 conn, "inventoryitems", String.Empty);
55 } 55 }
diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteAuthenticationData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteAuthenticationData.cs
index c64830a..760221d 100644
--- a/OpenSim/Data/SQLiteLegacy/SQLiteAuthenticationData.cs
+++ b/OpenSim/Data/SQLiteLegacy/SQLiteAuthenticationData.cs
@@ -29,6 +29,8 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Data; 31using System.Data;
32using System.Reflection;
33using log4net;
32using OpenMetaverse; 34using OpenMetaverse;
33using OpenSim.Framework; 35using OpenSim.Framework;
34using Mono.Data.SqliteClient; 36using Mono.Data.SqliteClient;
@@ -37,6 +39,8 @@ namespace OpenSim.Data.SQLiteLegacy
37{ 39{
38 public class SQLiteAuthenticationData : SQLiteFramework, IAuthenticationData 40 public class SQLiteAuthenticationData : SQLiteFramework, IAuthenticationData
39 { 41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43
40 private string m_Realm; 44 private string m_Realm;
41 private List<string> m_ColumnNames; 45 private List<string> m_ColumnNames;
42 private int m_LastExpire; 46 private int m_LastExpire;
@@ -162,7 +166,7 @@ namespace OpenSim.Data.SQLiteLegacy
162 } 166 }
163 catch (Exception e) 167 catch (Exception e)
164 { 168 {
165 Console.WriteLine(e.ToString()); 169 m_log.Error("[SQLITE]: Exception storing authentication data", e);
166 CloseCommand(cmd); 170 CloseCommand(cmd);
167 return false; 171 return false;
168 } 172 }