Fix MySQL and PGSQL *UserProfilesData.GetUserAppData() calls to correctly set the UserId parameter instead of the non-existing Id parameter when writing a record because none yet exists.

SQLite version is already correct for this.
sedebug
Justin Clark-Casey (justincc) 2015-01-13 20:33:36 +00:00
parent 59c0df962a
commit 492d49eb08
2 changed files with 2 additions and 2 deletions

View File

@ -1022,7 +1022,7 @@ namespace OpenSim.Data.MySQL
using (MySqlCommand put = new MySqlCommand(query, dbcon)) using (MySqlCommand put = new MySqlCommand(query, dbcon))
{ {
put.Parameters.AddWithValue("?Id", props.UserId.ToString()); put.Parameters.AddWithValue("?UserId", props.UserId.ToString());
put.Parameters.AddWithValue("?TagId", props.TagId.ToString()); put.Parameters.AddWithValue("?TagId", props.TagId.ToString());
put.Parameters.AddWithValue("?DataKey", props.DataKey.ToString()); put.Parameters.AddWithValue("?DataKey", props.DataKey.ToString());
put.Parameters.AddWithValue("?DataVal", props.DataVal.ToString()); put.Parameters.AddWithValue("?DataVal", props.DataVal.ToString());

View File

@ -999,7 +999,7 @@ namespace OpenSim.Data.PGSQL
using (NpgsqlCommand put = new NpgsqlCommand(query, dbcon)) using (NpgsqlCommand put = new NpgsqlCommand(query, dbcon))
{ {
put.Parameters.Add(m_database.CreateParameter("Id", props.UserId)); put.Parameters.Add(m_database.CreateParameter("UserId", props.UserId));
put.Parameters.Add(m_database.CreateParameter("TagId", props.TagId)); put.Parameters.Add(m_database.CreateParameter("TagId", props.TagId));
put.Parameters.Add(m_database.CreateParameter("DataKey", props.DataKey.ToString())); put.Parameters.Add(m_database.CreateParameter("DataKey", props.DataKey.ToString()));
put.Parameters.Add(m_database.CreateParameter("DataVal", props.DataVal.ToString())); put.Parameters.Add(m_database.CreateParameter("DataVal", props.DataVal.ToString()));