aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorRobert Adams2013-11-24 07:23:12 -0800
committerRobert Adams2013-11-24 07:23:12 -0800
commit3193bcaae1cbe86d22c4ade5c79d5e25d11a59da (patch)
treec96b96a7302f5323df63f6255e528de68ab67c6f /OpenSim/Data
parentMerge branch 'master' into varregion (diff)
parentRevert "Fix issue where sitting on non-root linked prims would send camera to... (diff)
downloadopensim-SC_OLD-3193bcaae1cbe86d22c4ade5c79d5e25d11a59da.zip
opensim-SC_OLD-3193bcaae1cbe86d22c4ade5c79d5e25d11a59da.tar.gz
opensim-SC_OLD-3193bcaae1cbe86d22c4ade5c79d5e25d11a59da.tar.bz2
opensim-SC_OLD-3193bcaae1cbe86d22c4ade5c79d5e25d11a59da.tar.xz
Merge branch 'master' into varregion
Diffstat (limited to 'OpenSim/Data')
-rw-r--r--OpenSim/Data/PGSQL/PGSQLSimulationData.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
index b063607..1505f87 100644
--- a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
@@ -839,7 +839,7 @@ namespace OpenSim.Data.PGSQL
839 839
840 public void StoreRegionWindlightSettings(RegionLightShareData wl) 840 public void StoreRegionWindlightSettings(RegionLightShareData wl)
841 { 841 {
842 string sql = @"select count (region_id) from regionwindlight where ""region_id"" = :region_id ;"; 842 string sql = @"select region_id from regionwindlight where ""region_id"" = :region_id limit 1;";
843 bool exists = false; 843 bool exists = false;
844 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) 844 using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString))
845 { 845 {
@@ -847,7 +847,8 @@ namespace OpenSim.Data.PGSQL
847 using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn)) 847 using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn))
848 { 848 {
849 cmd.Parameters.Add(_Database.CreateParameter("region_id", wl.regionID.ToString() )); 849 cmd.Parameters.Add(_Database.CreateParameter("region_id", wl.regionID.ToString() ));
850 exists = cmd.ExecuteNonQuery() > 0; 850 NpgsqlDataReader dr = cmd.ExecuteReader();
851 exists = dr.Read();
851 } 852 }
852 } 853 }
853 if (exists) 854 if (exists)
@@ -990,7 +991,7 @@ namespace OpenSim.Data.PGSQL
990 conn.Open(); 991 conn.Open();
991 using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn)) 992 using (NpgsqlCommand cmd = new NpgsqlCommand(sql, conn))
992 { 993 {
993 cmd.Parameters.Add(_Database.CreateParameter("region_id", wl.regionID)); 994 cmd.Parameters.Add(_Database.CreateParameter("region_id", wl.regionID.ToString()));
994 cmd.Parameters.Add(_Database.CreateParameter("water_color_r", wl.waterColor.X)); 995 cmd.Parameters.Add(_Database.CreateParameter("water_color_r", wl.waterColor.X));
995 cmd.Parameters.Add(_Database.CreateParameter("water_color_g", wl.waterColor.Y)); 996 cmd.Parameters.Add(_Database.CreateParameter("water_color_g", wl.waterColor.Y));
996 cmd.Parameters.Add(_Database.CreateParameter("water_color_b", wl.waterColor.Z)); 997 cmd.Parameters.Add(_Database.CreateParameter("water_color_b", wl.waterColor.Z));
@@ -1008,7 +1009,7 @@ namespace OpenSim.Data.PGSQL
1008 cmd.Parameters.Add(_Database.CreateParameter("big_wave_direction_y", wl.bigWaveDirection.Y)); 1009 cmd.Parameters.Add(_Database.CreateParameter("big_wave_direction_y", wl.bigWaveDirection.Y));
1009 cmd.Parameters.Add(_Database.CreateParameter("little_wave_direction_x", wl.littleWaveDirection.X)); 1010 cmd.Parameters.Add(_Database.CreateParameter("little_wave_direction_x", wl.littleWaveDirection.X));
1010 cmd.Parameters.Add(_Database.CreateParameter("little_wave_direction_y", wl.littleWaveDirection.Y)); 1011 cmd.Parameters.Add(_Database.CreateParameter("little_wave_direction_y", wl.littleWaveDirection.Y));
1011 cmd.Parameters.Add(_Database.CreateParameter("normal_map_texture", wl.normalMapTexture)); 1012 cmd.Parameters.Add(_Database.CreateParameter("normal_map_texture", wl.normalMapTexture.ToString()));
1012 cmd.Parameters.Add(_Database.CreateParameter("horizon_r", wl.horizon.X)); 1013 cmd.Parameters.Add(_Database.CreateParameter("horizon_r", wl.horizon.X));
1013 cmd.Parameters.Add(_Database.CreateParameter("horizon_g", wl.horizon.Y)); 1014 cmd.Parameters.Add(_Database.CreateParameter("horizon_g", wl.horizon.Y));
1014 cmd.Parameters.Add(_Database.CreateParameter("horizon_b", wl.horizon.Z)); 1015 cmd.Parameters.Add(_Database.CreateParameter("horizon_b", wl.horizon.Z));