Skip to content

Commit

Permalink
Fix an issue with profile fetching query where its passing a UUID dow…
Browse files Browse the repository at this point in the history
…n to the query incorrectly. Did an exhaustive search of all the statements building queries and found 2 more unhandled cases which I also fixed. Bumped the version number to 8617
  • Loading branch information
mdickson committed Aug 5, 2023
1 parent ecb328a commit 488a7f4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion OpenSim/Data/MySQL/MySQLInventoryData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ public void addInventoryItem(InventoryItemBase item)
result.Parameters.AddWithValue("?salePrice", item.SalePrice);
result.Parameters.AddWithValue("?saleType", unchecked((sbyte)item.SaleType));
result.Parameters.AddWithValue("?creationDate", item.CreationDate);
result.Parameters.AddWithValue("?groupID", item.GroupID);
result.Parameters.AddWithValue("?groupID", item.GroupID.ToString());
result.Parameters.AddWithValue("?groupOwned", item.GroupOwned);
result.Parameters.AddWithValue("?flags", item.Flags);

Expand Down
6 changes: 3 additions & 3 deletions OpenSim/Data/MySQL/MySQLUserProfilesData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public OSDArray GetClassifiedRecords(UUID creatorId)
dbcon.Open();
using (MySqlCommand cmd = new MySqlCommand(query, dbcon))
{
cmd.Parameters.AddWithValue("?Id", creatorId);
cmd.Parameters.AddWithValue("?Id", creatorId.ToString());
using( MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.Default))
{
if(reader.HasRows)
Expand Down Expand Up @@ -142,8 +142,8 @@ public bool UpdateClassifiedRecord(UserClassifiedAdd ad, ref string result)
+ "`simname`,"
+ "`posglobal`,"
+ "`parcelname`,"
+ "`classifiedflags`,"
+ "`priceforlisting`) "
+ "`classifiedflags`,"
+ "`priceforlisting`) "
+ "VALUES ("
+ "?ClassifiedId,"
+ "?CreatorId,"
Expand Down
2 changes: 1 addition & 1 deletion OpenSim/Framework/VersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class VersionInfo
{
public const string VersionNumber = "0.9.2.2";
public const string AssemblyVersionNumber = "0.9.2.2";
public const string Release = "8615";
public const string Release = "8617";

public const Flavour VERSION_FLAVOUR = Flavour.Dev;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@ public bool updateTransactionStatus(UUID transactionID, int status, string descr
MySqlCommand cmd = new MySqlCommand(sql, dbcon);
cmd.Parameters.AddWithValue("?status", status);
cmd.Parameters.AddWithValue("?desc", description);
cmd.Parameters.AddWithValue("?tranid", transactionID);
cmd.Parameters.AddWithValue("?tranid", transactionID.ToString());

if (cmd.ExecuteNonQuery() > 0) bRet = true;

Expand Down

0 comments on commit 488a7f4

Please sign in to comment.