Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

bulletsim
Justin Clark-Casey (justincc) 2011-04-28 23:43:42 +01:00
commit 5e578c9755
12 changed files with 222 additions and 46 deletions

View File

@ -1,34 +1,36 @@
The following people have contributed to OpenSim (Thank you The following people have contributed to OpenSim (Thank you
for your effort!) for your effort!)
Add your name in here if you have committed to OpenSim
= Current OpenSim Developers (in very rough order of appearance) = = Current OpenSim Developers (in very rough order of appearance) =
These folks represent the current core team for OpenSim, and are the These folks represent the current core team for OpenSim, and are the
people that make the day to day of OpenSim happen. people that make the day to day of OpenSim happen.
* justincc
* chi11ken (Genkii)
* dahlia
* Melanie Thielker
* Diva (Crista Lopes, University of California, Irvine)
* Dan Lake (Intel)
* Marck
* Mic Bowman (Intel)
* BlueWall (James Hughes)
= Core Developers Following the White Rabbit =
Core developers who have temporarily (we hope) gone chasing the white rabbit.
They are in all similar to the active core developers, except that they haven't
been that active lately, so their voting rights are awaiting their come back.
* MW (Tribal Media AB) * MW (Tribal Media AB)
* Adam Frisby (DeepThink Pty Ltd) * Adam Frisby (DeepThink Pty Ltd)
* MingChen (DeepThink Pty Ltd)
* lbsa71 (Tribal Media AB) * lbsa71 (Tribal Media AB)
* Sean Dague / sdague (IBM)
* Tedd
* justincc
* Teravus (w3z) * Teravus (w3z)
* Johan Berntsson (3Di)
* Ckrinke (Charles Krinke) * Ckrinke (Charles Krinke)
* chi11ken (Genkii)
* adjohn (Genkii)
* Dr Scofield aka Dirk Husemann (IBM Research - Zurich) * Dr Scofield aka Dirk Husemann (IBM Research - Zurich)
* dahlia
* mikem (3Di) * mikem (3Di)
* Melanie Thielker
* Homer_Horwitz * Homer_Horwitz
* idb (Ian Brown)
* Diva (Crista Lopes, University of California, Irvine)
* nlin (3Di) * nlin (3Di)
* Arthur Rodrigo S Valadares (IBM) * Arthur Rodrigo S Valadares (IBM)
* BlueWall (James Hughes) * John Hurliman
= Past Open Sim Developers = = Past Open Sim Developers =
These folks are alumns of the OpenSim core group, but are now These folks are alumns of the OpenSim core group, but are now
@ -44,6 +46,12 @@ where we are today.
* Dalien * Dalien
* Darok * Darok
* Alondria * Alondria
* Sean Dague / sdague (IBM)
* Tedd
* MingChen (DeepThink Pty Ltd)
* adjohn (Genkii)
* idb (Ian Brown)
* Johan Berntsson (3Di)
= Additional OpenSim Contributors = = Additional OpenSim Contributors =
@ -102,6 +110,7 @@ what it is today.
* Misterblue (Intel) * Misterblue (Intel)
* Mircea Kitsune * Mircea Kitsune
* mpallari * mpallari
* MrMonkE
* nornalbion * nornalbion
* Omar Vera Ustariz (IBM) * Omar Vera Ustariz (IBM)
* openlifegrid.com * openlifegrid.com

View File

@ -57,14 +57,14 @@ namespace OpenSim.Data.MSSQL
{ {
m_Realm = realm; m_Realm = realm;
m_ConnectionString = connectionString;
if (storeName != String.Empty) if (storeName != String.Empty)
{ {
Assembly assem = GetType().Assembly;
m_ConnectionString = connectionString;
using (SqlConnection conn = new SqlConnection(m_ConnectionString)) using (SqlConnection conn = new SqlConnection(m_ConnectionString))
{ {
conn.Open(); conn.Open();
Migration m = new Migration(conn, assem, storeName); Migration m = new Migration(conn, GetType().Assembly, storeName);
m.Update(); m.Update();
} }

View File

@ -61,7 +61,8 @@ namespace OpenSim.Data.MSSQL
} }
catch catch
{ {
// Something went wrong, so we're version 0 // Return -1 to indicate table does not exist
return -1;
} }
} }
return version; return version;

View File

@ -492,12 +492,11 @@ ELSE
using (SqlConnection conn = new SqlConnection(m_connectionString)) using (SqlConnection conn = new SqlConnection(m_connectionString))
using (SqlCommand cmd = new SqlCommand(sql, conn)) using (SqlCommand cmd = new SqlCommand(sql, conn))
{ {
conn.Open();
foreach (TaskInventoryItem taskItem in items) foreach (TaskInventoryItem taskItem in items)
{ {
cmd.Parameters.AddRange(CreatePrimInventoryParameters(taskItem)); cmd.Parameters.AddRange(CreatePrimInventoryParameters(taskItem));
conn.Open();
cmd.ExecuteNonQuery(); cmd.ExecuteNonQuery();
cmd.Parameters.Clear(); cmd.Parameters.Clear();
} }
} }
@ -1154,9 +1153,9 @@ VALUES
PrimitiveBaseShape baseShape = new PrimitiveBaseShape(); PrimitiveBaseShape baseShape = new PrimitiveBaseShape();
baseShape.Scale = new Vector3( baseShape.Scale = new Vector3(
Convert.ToSingle(shapeRow["ScaleX"]), (float)Convert.ToDouble(shapeRow["ScaleX"]),
Convert.ToSingle(shapeRow["ScaleY"]), (float)Convert.ToDouble(shapeRow["ScaleY"]),
Convert.ToSingle(shapeRow["ScaleZ"])); (float)Convert.ToDouble(shapeRow["ScaleZ"]));
// paths // paths
baseShape.PCode = Convert.ToByte(shapeRow["PCode"]); baseShape.PCode = Convert.ToByte(shapeRow["PCode"]);
@ -1194,7 +1193,10 @@ VALUES
} }
if (!(shapeRow["Media"] is System.DBNull) ) if (!(shapeRow["Media"] is System.DBNull) )
{
baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]); baseShape.Media = PrimitiveBaseShape.MediaList.FromXml((string)shapeRow["Media"]);
}
return baseShape; return baseShape;
} }
@ -1573,7 +1575,16 @@ VALUES
parameters.Add(_Database.CreateParameter("Texture", s.TextureEntry)); parameters.Add(_Database.CreateParameter("Texture", s.TextureEntry));
parameters.Add(_Database.CreateParameter("ExtraParams", s.ExtraParams)); parameters.Add(_Database.CreateParameter("ExtraParams", s.ExtraParams));
parameters.Add(_Database.CreateParameter("State", s.State)); parameters.Add(_Database.CreateParameter("State", s.State));
parameters.Add(_Database.CreateParameter("Media", null == s.Media ? null : s.Media.ToXml()));
if(null == s.Media )
{
parameters.Add(_Database.CreateParameter("Media", DBNull.Value));
}
else
{
parameters.Add(_Database.CreateParameter("Media", s.Media.ToXml()));
}
return parameters.ToArray(); return parameters.ToArray();
} }

View File

@ -22,7 +22,11 @@ COMMIT
BEGIN TRANSACTION BEGIN TRANSACTION
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users]') AND type in (N'U'))
INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey, accountType) SELECT [UUID] AS UUID, [passwordHash] AS passwordHash, [passwordSalt] AS passwordSalt, [webLoginKey] AS webLoginKey, 'UserAccount' as [accountType] FROM users; INSERT INTO auth (UUID, passwordHash, passwordSalt, webLoginKey, accountType) SELECT [UUID] AS UUID, [passwordHash] AS passwordHash, [passwordSalt] AS passwordSalt, [webLoginKey] AS webLoginKey, 'UserAccount' as [accountType] FROM users;
COMMIT COMMIT

View File

@ -13,5 +13,28 @@ PRIMARY KEY CLUSTERED
) ON [PRIMARY] ) ON [PRIMARY]
COMMIT
:VERSION 2
BEGIN TRANSACTION
CREATE TABLE dbo.Tmp_Avatars
(
PrincipalID uniqueidentifier NOT NULL,
[Name] varchar(32) NOT NULL,
Value text NOT NULL DEFAULT '',
) ON [PRIMARY]
TEXTIMAGE_ON [PRIMARY]
IF EXISTS(SELECT * FROM dbo.Avatars)
EXEC('INSERT INTO dbo.Tmp_Avatars (PrincipalID, Name, Value)
SELECT PrincipalID, CONVERT(text, Name), Value FROM dbo.Avatars WITH (HOLDLOCK TABLOCKX)')
DROP TABLE dbo.Avatars
EXECUTE sp_rename N'dbo.Tmp_Avatars', N'Avatars', 'OBJECT'
COMMIT COMMIT

View File

@ -15,6 +15,8 @@ COMMIT
BEGIN TRANSACTION BEGIN TRANSACTION
INSERT INTO Friends (PrincipalID, Friend, Flags, Offered) SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends; IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[userfriends]') AND type in (N'U'))
INSERT INTO Friends (PrincipalID, Friend, Flags, Offered)
SELECT [ownerID], [friendID], [friendPerms], 0 FROM userfriends;
COMMIT COMMIT

View File

@ -222,4 +222,17 @@ ALTER TABLE [regions] ADD [Token] varchar(255) NOT NULL DEFAULT 0;
COMMIT COMMIT
:VERSION 8
BEGIN TRANSACTION
ALTER TABLE regions ALTER COLUMN regionName VarChar(128)
DROP INDEX IX_regions_name ON dbo.regions
ALTER TABLE regions ALTER COLUMN regionName VarChar(128) null
CREATE NONCLUSTERED INDEX IX_regions_name ON dbo.regions
(
regionName
) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
COMMIT

View File

@ -238,7 +238,10 @@ alter table inventoryitems
COMMIT COMMIT
:VERSION 8
ALTER TABLE inventoryitems
ADD CONSTRAINT DF_inventoryitems_creatorID
DEFAULT '00000000-0000-0000-0000-000000000000' FOR creatorID
:GO

View File

@ -7,14 +7,7 @@ CREATE TABLE [Presence] (
[RegionID] uniqueidentifier NOT NULL, [RegionID] uniqueidentifier NOT NULL,
[SessionID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', [SessionID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
[SecureSessionID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000', [SecureSessionID] uniqueidentifier NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
[Online] char(5) NOT NULL DEFAULT 'false',
[Login] char(16) NOT NULL DEFAULT '0',
[Logout] char(16) NOT NULL DEFAULT '0',
[Position] char(64) NOT NULL DEFAULT '<0,0,0>',
[LookAt] char(64) NOT NULL DEFAULT '<0,0,0>',
[HomeRegionID] uniqueidentifier NOT NULL,
[HomePosition] CHAR(64) NOT NULL DEFAULT '<0,0,0>',
[HomeLookAt] CHAR(64) NOT NULL DEFAULT '<0,0,0>',
) )
ON [PRIMARY] ON [PRIMARY]
@ -28,3 +21,11 @@ CREATE UNIQUE INDEX SessionID ON Presence(SessionID);
CREATE INDEX UserID ON Presence(UserID); CREATE INDEX UserID ON Presence(UserID);
COMMIT COMMIT
:VERSION 2
BEGIN TRANSACTION
ALTER TABLE Presence ADD LastSeen DateTime
COMMIT

View File

@ -1,4 +1,3 @@
:VERSION 1 :VERSION 1
CREATE TABLE [dbo].[prims]( CREATE TABLE [dbo].[prims](
@ -926,11 +925,121 @@ ALTER TABLE regionsettings ADD loaded_creation_datetime int NOT NULL default 0
COMMIT COMMIT
:VERSION 24 :VERSION 24
-- Added post 0.7
BEGIN TRANSACTION BEGIN TRANSACTION
ALTER TABLE prims ADD COLUMN MediaURL varchar(255) ALTER TABLE prims ADD MediaURL varchar(255)
ALTER TABLE primshapes ADD COLUMN Media TEXT ALTER TABLE primshapes ADD Media TEXT NULL
COMMIT
:VERSION 25
BEGIN TRANSACTION
CREATE TABLE "regionwindlight" (
"region_id" varchar(36) NOT NULL DEFAULT '000000-0000-0000-0000-000000000000',
"water_color_r" [float] NOT NULL DEFAULT '4.000000',
"water_color_g" [float] NOT NULL DEFAULT '38.000000',
"water_color_b" [float] NOT NULL DEFAULT '64.000000',
"water_fog_density_exponent" [float] NOT NULL DEFAULT '4.0',
"underwater_fog_modifier" [float] NOT NULL DEFAULT '0.25',
"reflection_wavelet_scale_1" [float] NOT NULL DEFAULT '2.0',
"reflection_wavelet_scale_2" [float] NOT NULL DEFAULT '2.0',
"reflection_wavelet_scale_3" [float] NOT NULL DEFAULT '2.0',
"fresnel_scale" [float] NOT NULL DEFAULT '0.40',
"fresnel_offset" [float] NOT NULL DEFAULT '0.50',
"refract_scale_above" [float] NOT NULL DEFAULT '0.03',
"refract_scale_below" [float] NOT NULL DEFAULT '0.20',
"blur_multiplier" [float] NOT NULL DEFAULT '0.040',
"big_wave_direction_x" [float] NOT NULL DEFAULT '1.05',
"big_wave_direction_y" [float] NOT NULL DEFAULT '-0.42',
"little_wave_direction_x" [float] NOT NULL DEFAULT '1.11',
"little_wave_direction_y" [float] NOT NULL DEFAULT '-1.16',
"normal_map_texture" varchar(36) NOT NULL DEFAULT '822ded49-9a6c-f61c-cb89-6df54f42cdf4',
"horizon_r" [float] NOT NULL DEFAULT '0.25',
"horizon_g" [float] NOT NULL DEFAULT '0.25',
"horizon_b" [float] NOT NULL DEFAULT '0.32',
"horizon_i" [float] NOT NULL DEFAULT '0.32',
"haze_horizon" [float] NOT NULL DEFAULT '0.19',
"blue_density_r" [float] NOT NULL DEFAULT '0.12',
"blue_density_g" [float] NOT NULL DEFAULT '0.22',
"blue_density_b" [float] NOT NULL DEFAULT '0.38',
"blue_density_i" [float] NOT NULL DEFAULT '0.38',
"haze_density" [float] NOT NULL DEFAULT '0.70',
"density_multiplier" [float] NOT NULL DEFAULT '0.18',
"distance_multiplier" [float] NOT NULL DEFAULT '0.8',
"max_altitude" int NOT NULL DEFAULT '1605',
"sun_moon_color_r" [float] NOT NULL DEFAULT '0.24',
"sun_moon_color_g" [float] NOT NULL DEFAULT '0.26',
"sun_moon_color_b" [float] NOT NULL DEFAULT '0.30',
"sun_moon_color_i" [float] NOT NULL DEFAULT '0.30',
"sun_moon_position" [float] NOT NULL DEFAULT '0.317',
"ambient_r" [float] NOT NULL DEFAULT '0.35',
"ambient_g" [float] NOT NULL DEFAULT '0.35',
"ambient_b" [float] NOT NULL DEFAULT '0.35',
"ambient_i" [float] NOT NULL DEFAULT '0.35',
"east_angle" [float] NOT NULL DEFAULT '0.00',
"sun_glow_focus" [float] NOT NULL DEFAULT '0.10',
"sun_glow_size" [float] NOT NULL DEFAULT '1.75',
"scene_gamma" [float] NOT NULL DEFAULT '1.00',
"star_brightness" [float] NOT NULL DEFAULT '0.00',
"cloud_color_r" [float] NOT NULL DEFAULT '0.41',
"cloud_color_g" [float] NOT NULL DEFAULT '0.41',
"cloud_color_b" [float] NOT NULL DEFAULT '0.41',
"cloud_color_i" [float] NOT NULL DEFAULT '0.41',
"cloud_x" [float] NOT NULL DEFAULT '1.00',
"cloud_y" [float] NOT NULL DEFAULT '0.53',
"cloud_density" [float] NOT NULL DEFAULT '1.00',
"cloud_coverage" [float] NOT NULL DEFAULT '0.27',
"cloud_scale" [float] NOT NULL DEFAULT '0.42',
"cloud_detail_x" [float] NOT NULL DEFAULT '1.00',
"cloud_detail_y" [float] NOT NULL DEFAULT '0.53',
"cloud_detail_density" [float] NOT NULL DEFAULT '0.12',
"cloud_scroll_x" [float] NOT NULL DEFAULT '0.20',
"cloud_scroll_x_lock" tinyint NOT NULL DEFAULT '0',
"cloud_scroll_y" [float] NOT NULL DEFAULT '0.01',
"cloud_scroll_y_lock" tinyint NOT NULL DEFAULT '0',
"draw_classic_clouds" tinyint NOT NULL DEFAULT '1',
PRIMARY KEY ("region_id")
)
COMMIT TRANSACTION
:VERSION 26
BEGIN TRANSACTION
ALTER TABLE regionsettings ADD map_tile_ID CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'
COMMIT
:VERSION 27 #---------------------
BEGIN TRANSACTION
ALTER TABLE land ADD MediaType VARCHAR(32) NOT NULL DEFAULT 'none/none'
ALTER TABLE land ADD MediaDescription VARCHAR(255) NOT NULL DEFAULT ''
ALTER TABLE land ADD MediaSize VARCHAR(16) NOT NULL DEFAULT '0,0'
ALTER TABLE land ADD MediaLoop bit NOT NULL DEFAULT 0
ALTER TABLE land ADD ObscureMusic bit NOT NULL DEFAULT 0
ALTER TABLE land ADD ObscureMedia bit NOT NULL DEFAULT 0
COMMIT
:VERSION 28 #---------------------
BEGIN TRANSACTION
ALTER TABLE prims
ADD CONSTRAINT DF_prims_CreatorID
DEFAULT '00000000-0000-0000-0000-000000000000'
FOR CreatorID
ALTER TABLE prims ALTER COLUMN CreatorID uniqueidentifier NOT NULL
ALTER TABLE primitems
ADD CONSTRAINT DF_primitems_CreatorID
DEFAULT '00000000-0000-0000-0000-000000000000'
FOR CreatorID
ALTER TABLE primitems ALTER COLUMN CreatorID uniqueidentifier NOT NULL
COMMIT COMMIT

View File

@ -19,7 +19,7 @@ CREATE TABLE [UserAccounts] (
:VERSION 2 :VERSION 2
BEGIN TRANSACTION BEGIN TRANSACTION
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[users]') AND type in (N'U'))
INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT [UUID] AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID, INSERT INTO UserAccounts (PrincipalID, ScopeID, FirstName, LastName, Email, ServiceURLs, Created) SELECT [UUID] AS PrincipalID, '00000000-0000-0000-0000-000000000000' AS ScopeID,
username AS FirstName, username AS FirstName,
lastname AS LastName, lastname AS LastName,