From dd8e728abdeb507fc1bd628cbb9fb0f6a1159a50 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sun, 2 Mar 2008 20:33:46 +0000 Subject: [PATCH] Thank you kindly, Ahzzmandius for adding owner_uuid support to the MSSQL data driver. --- OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs | 8 ++++---- OpenSim/Framework/Data.MSSQL/MSSQLManager.cs | 9 +++++++-- OpenSim/Framework/Data.MSSQL/Resources/Mssql-regions.sql | 1 + 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs index 36484373c1..1ea45bfa13 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs @@ -224,13 +224,13 @@ namespace OpenSim.Framework.Data.MSSQL sql += "[serverIP], [serverPort], [serverURI], [locX], [locY], [locZ], [eastOverrideHandle], [westOverrideHandle], [southOverrideHandle], [northOverrideHandle], [regionAssetURI], [regionAssetRecvKey], "; sql += - "[regionAssetSendKey], [regionUserURI], [regionUserRecvKey], [regionUserSendKey], [regionMapTexture], [serverHttpPort], [serverRemotingPort]) VALUES "; + "[regionAssetSendKey], [regionUserURI], [regionUserRecvKey], [regionUserSendKey], [regionMapTexture], [serverHttpPort], [serverRemotingPort], [owner_uuid]) VALUES "; sql += "(@regionHandle, @regionName, @uuid, @regionRecvKey, @regionSecret, @regionSendKey, @regionDataURI, "; sql += "@serverIP, @serverPort, @serverURI, @locX, @locY, @locZ, @eastOverrideHandle, @westOverrideHandle, @southOverrideHandle, @northOverrideHandle, @regionAssetURI, @regionAssetRecvKey, "; sql += - "@regionAssetSendKey, @regionUserURI, @regionUserRecvKey, @regionUserSendKey, @regionMapTexture, @serverHttpPort, @serverRemotingPort);"; + "@regionAssetSendKey, @regionUserURI, @regionUserRecvKey, @regionUserSendKey, @regionMapTexture, @serverHttpPort, @serverRemotingPort, @owner_uuid);"; Dictionary parameters = new Dictionary(); @@ -260,7 +260,7 @@ namespace OpenSim.Framework.Data.MSSQL parameters["regionMapTexture"] = profile.regionMapTextureID.ToString(); parameters["serverHttpPort"] = profile.httpPort.ToString(); parameters["serverRemotingPort"] = profile.remotingPort.ToString(); - + parameters["owner_uuid"] = profile.owner_uuid.ToString(); bool returnval = false; @@ -324,4 +324,4 @@ namespace OpenSim.Framework.Data.MSSQL return null; } } -} \ No newline at end of file +} diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs b/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs index 085cf57fd1..0433d1e32e 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs @@ -264,7 +264,12 @@ namespace OpenSim.Framework.Data.MSSQL regionprofile.regionUserURI = (string)reader["regionUserURI"]; regionprofile.regionUserRecvKey = (string)reader["regionUserRecvKey"]; regionprofile.regionUserSendKey = (string)reader["regionUserSendKey"]; - + try + { + regionprofile.owner_uuid = new LLUUID((string)reader["owner_uuid"]); + } + catch(Exception ex) + {} // World Map Addition string tempRegionMap = reader["regionMapTexture"].ToString(); if (tempRegionMap != String.Empty) @@ -522,4 +527,4 @@ namespace OpenSim.Framework.Data.MSSQL dllVersion.Revision); } } -} \ No newline at end of file +} diff --git a/OpenSim/Framework/Data.MSSQL/Resources/Mssql-regions.sql b/OpenSim/Framework/Data.MSSQL/Resources/Mssql-regions.sql index c5d8329cf4..b29a2abcb9 100644 --- a/OpenSim/Framework/Data.MSSQL/Resources/Mssql-regions.sql +++ b/OpenSim/Framework/Data.MSSQL/Resources/Mssql-regions.sql @@ -31,6 +31,7 @@ CREATE TABLE [dbo].[regions]( [regionMapTexture] [varchar](255) COLLATE Latin1_General_CI_AS NULL, [serverHttpPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL, [serverRemotingPort] [varchar](255) COLLATE Latin1_General_CI_AS NULL, + [owner_uuid] [varchar](36) COLLATE Latin1_General_CI_AS NULL, PRIMARY KEY CLUSTERED ( [uuid] ASC