Migrate from the Oracle Mysql connector to the more performance Pomello MySqlConnector dll.

This commit is contained in:
Michael Dickson 2023-07-02 22:27:37 -04:00
parent ad7d157279
commit 1c6cce4cea
43 changed files with 83 additions and 150 deletions

4
.gitattributes vendored
View file

@ -1,3 +1,7 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
# Denote all files that are truly binary and should not be modified.
*.lsl binary
*.dat binary
*.bmp binary

View file

@ -9,7 +9,6 @@
<ItemGroup>
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Mono.Addins" Version="1.4.1" />
<PackageReference Include="MySql.Data" Version="8.0.31" />
</ItemGroup>
<ItemGroup>
<Reference Include="Nini">

View file

@ -31,7 +31,6 @@ using System.Collections.Generic;
using System.Data;
using OpenMetaverse;
using OpenSim.Framework;
using MySql.Data.MySqlClient;
namespace OpenSim.Data.MySQL
{

View file

@ -30,10 +30,9 @@ using System.Data;
using System.Reflection;
using System.Collections.Generic;
using log4net;
using MySql.Data.MySqlClient;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Data;
using MySqlConnector;
namespace OpenSim.Data.MySQL
{

View file

@ -32,7 +32,7 @@ using System.Reflection;
using System.Data;
using OpenMetaverse;
using OpenSim.Framework;
using MySql.Data.MySqlClient;
using MySqlConnector;
namespace OpenSim.Data.MySQL
{

View file

@ -31,9 +31,9 @@ using System.Data;
using System.Reflection;
using System.Threading;
using log4net;
using MySqlConnector;
using OpenMetaverse;
using OpenSim.Framework;
using MySql.Data.MySqlClient;
namespace OpenSim.Data.MySQL
{

View file

@ -30,11 +30,9 @@ using System.Collections.Generic;
using System.Data;
using System.Reflection;
using log4net;
using MySql.Data.MySqlClient;
using MySqlConnector;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Data;
namespace OpenSim.Data.MySQL
{

View file

@ -30,10 +30,9 @@ using System.Reflection;
using System.Collections.Generic;
using System.Data;
using OpenSim.Framework;
using OpenSim.Framework.Console;
using log4net;
using MySql.Data.MySqlClient;
using OpenMetaverse;
using MySqlConnector;
namespace OpenSim.Data.MySQL
{

View file

@ -25,13 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using MySqlConnector;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using OpenMetaverse;
using OpenSim.Framework;
using MySql.Data.MySqlClient;
namespace OpenSim.Data.MySQL
{

View file

@ -26,12 +26,8 @@
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using MySqlConnector;
using OpenMetaverse;
using OpenSim.Framework;
using MySql.Data.MySqlClient;
namespace OpenSim.Data.MySQL
{

View file

@ -30,7 +30,7 @@ using System.Collections.Generic;
using System.Data;
using System.Reflection;
using System.Text;
using MySql.Data.MySqlClient;
using MySqlConnector;
using OpenMetaverse;
namespace OpenSim.Data.MySQL

View file

@ -26,14 +26,6 @@
*/
using System;
using System.Collections.Generic;
using System.Data;
using System.Reflection;
using System.Threading;
using log4net;
using OpenMetaverse;
using OpenSim.Framework;
using MySql.Data.MySqlClient;
namespace OpenSim.Data.MySQL
{

View file

@ -26,15 +26,10 @@
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using OpenSim.Framework;
using OpenSim.Data.MySQL;
using OpenMetaverse;
using MySql.Data.MySqlClient;
using MySqlConnector;
namespace OpenSim.Data.MySQL
{

View file

@ -26,14 +26,8 @@
*/
using System;
using System.Collections.Generic;
using System.Data;
using System.Reflection;
using System.Threading;
using log4net;
using MySqlConnector;
using OpenMetaverse;
using OpenSim.Framework;
using MySql.Data.MySqlClient;
namespace OpenSim.Data.MySQL
{

View file

@ -29,10 +29,10 @@ using System;
using System.Collections.Generic;
using System.Reflection;
using log4net;
using MySql.Data.MySqlClient;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Data;
using MySqlConnector;
namespace OpenSim.Data.MySQL
{

View file

@ -25,15 +25,10 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using MySqlConnector;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.IO;
using System.Reflection;
using System.Text.RegularExpressions;
using log4net;
using MySql.Data.MySqlClient;
namespace OpenSim.Data.MySQL
{
@ -65,19 +60,35 @@ namespace OpenSim.Data.MySQL
base.ExecuteScript(conn, script);
return;
}
MySqlScript scr = new MySqlScript((MySqlConnection)conn);
foreach (string sql in script)
{
foreach (string sql in script)
try
{
scr.Query = sql;
scr.Error += delegate(object sender, MySqlScriptErrorEventArgs args)
using (MySqlCommand cmd = new MySqlCommand(sql, (MySqlConnection)conn))
{
throw new Exception(sql);
};
scr.Execute();
cmd.ExecuteNonQuery();
}
}
catch (Exception)
{
throw new Exception(sql);
}
}
// XXX Was
//MySqlScript scr = new MySqlScript((MySqlConnection)conn);
//{
// foreach (string sql in script)
// {
// scr.Query = sql;
// scr.Error += delegate(object sender, MySqlScriptErrorEventArgs args)
// {
// throw new Exception(sql);
// };
// scr.Execute();
// }
//}
}
}
}

View file

@ -29,9 +29,9 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using MySqlConnector;
using OpenMetaverse;
using OpenSim.Framework;
using MySql.Data.MySqlClient;
namespace OpenSim.Data.MySQL
{

View file

@ -25,16 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using MySqlConnector;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using OpenSim.Framework;
using OpenSim.Data.MySQL;
using OpenMetaverse;
using MySql.Data.MySqlClient;
namespace OpenSim.Data.MySQL
{

View file

@ -26,14 +26,8 @@
*/
using System;
using System.Collections.Generic;
using System.Data;
using System.Reflection;
using System.Threading;
using log4net;
using MySqlConnector;
using OpenMetaverse;
using OpenSim.Framework;
using MySql.Data.MySqlClient;
namespace OpenSim.Data.MySQL
{

View file

@ -26,14 +26,12 @@
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Reflection;
using MySql.Data.MySqlClient;
using MySqlConnector;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Data;
using RegionFlags = OpenSim.Framework.RegionFlags;
namespace OpenSim.Data.MySQL

View file

@ -32,7 +32,7 @@ using System.Drawing;
using System.Reflection;
using System.Text;
using log4net;
using MySql.Data.MySqlClient;
using MySqlConnector;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;

View file

@ -26,12 +26,8 @@
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using MySqlConnector;
using OpenMetaverse;
using OpenSim.Framework;
using MySql.Data.MySqlClient;
namespace OpenSim.Data.MySQL
{

View file

@ -26,13 +26,11 @@
*/
using System;
using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Data;
using MySql.Data.MySqlClient;
using System.Collections.Generic;
namespace OpenSim.Data.MySQL
{
/// <summary>

View file

@ -28,12 +28,11 @@
using System;
using System.Data;
using System.Reflection;
using OpenSim.Data;
using OpenSim.Framework;
using MySql.Data.MySqlClient;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using log4net;
using MySqlConnector;
namespace OpenSim.Data.MySQL
{

View file

@ -32,12 +32,10 @@ using System.IO;
using System.IO.Compression;
using System.Reflection;
using System.Security.Cryptography;
using System.Text;
using log4net;
using MySql.Data.MySqlClient;
using MySqlConnector;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Data;
namespace OpenSim.Data.MySQL
{

View file

@ -31,9 +31,9 @@ using System.Data;
using System.Text;
using System.Reflection;
using log4net;
using MySql.Data.MySqlClient;
using OpenMetaverse;
using OpenSim.Framework;
using MySqlConnector;
namespace OpenSim.Data.MySQL
{

View file

@ -52,7 +52,7 @@
<ItemGroup>
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Mono.Addins" Version="1.4.1" />
<PackageReference Include="MySql.Data" Version="8.0.31" />
<PackageReference Include="MySqlConnector" Version="2.2.6" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />

View file

@ -130,6 +130,7 @@
<ItemGroup>
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Mono.Addins" Version="1.4.1" />
<PackageReference Include="MySqlConnector" Version="2.2.6" />
<PackageReference Include="System.Data.SQLite" Version="1.0.116" />
</ItemGroup>
</Project>

View file

@ -25,23 +25,19 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using log4net.Config;
using NUnit.Framework;
using NUnit.Framework.Constraints;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Tests.Common;
using System.Data.Common;
using log4net;
// DBMS-specific:
using MySql.Data.MySqlClient;
using OpenSim.Data.MySQL;
using System.Data.SQLite;
using OpenSim.Data.SQLite;
using MySqlConnector;
namespace OpenSim.Data.Tests
{

View file

@ -25,24 +25,18 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using log4net.Config;
using NUnit.Framework;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Tests.Common;
using System.Text;
using log4net;
using System.Reflection;
using System.Data.Common;
// DBMS-specific:
using MySql.Data.MySqlClient;
using OpenSim.Data.MySQL;
using System.Data.SQLite;
using OpenSim.Data.SQLite;
using MySqlConnector;
namespace OpenSim.Data.Tests
{

View file

@ -25,22 +25,15 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using log4net.Config;
using NUnit.Framework;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Tests.Common;
using log4net;
using System.Reflection;
using System.Data.Common;
// DBMS-specific:
using MySql.Data.MySqlClient;
using OpenSim.Data.MySQL;
using System.Data.SQLite;
using OpenSim.Data.SQLite;
using MySqlConnector;
namespace OpenSim.Data.Tests
{

View file

@ -31,10 +31,10 @@
<ItemGroup>
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Mono.Addins" Version="1.4.1" />
<PackageReference Include="MySqlConnector" Version="2.2.6" />
<PackageReference Include="NUnit" Version="2.7.1" />
<PackageReference Include="NUnitTestAdapter" Version="2.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
<PackageReference Include="MySql.Data" Version="8.0.31" />
<PackageReference Include="System.Data.SQLite" Version="1.0.116" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
</ItemGroup>

View file

@ -29,24 +29,21 @@ using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using log4net.Config;
using NUnit.Framework;
using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Tests.Common;
using log4net;
using System.Reflection;
using System.Data.Common;
using System.Threading;
// DBMS-specific:
using MySql.Data.MySqlClient;
using OpenSim.Data.MySQL;
using System.Data.SQLite;
using OpenSim.Data.SQLite;
using MySqlConnector;
namespace OpenSim.Data.Tests
{

View file

@ -33,7 +33,7 @@ namespace OpenSim
{
public const string VersionNumber = "0.9.2.2";
public const string AssemblyVersionNumber = "0.9.2.2";
public const string Release = "8510";
public const string Release = "8584";
public const Flavour VERSION_FLAVOUR = Flavour.Dev;

View file

@ -272,6 +272,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="MailKit" Version="3.4.2" />
<PackageReference Include="MySqlConnector" Version="2.2.6" />
<PackageReference Include="NUnit" Version="2.7.1" />
<PackageReference Include="NUnitTestAdapter" Version="2.3.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />

View file

@ -106,7 +106,7 @@
<PackageReference Include="MailKit" Version="3.4.2" />
<PackageReference Include="MimeKit" Version="3.4.2" />
<PackageReference Include="Mono.Addins" Version="1.4.1" />
<PackageReference Include="MySql.Data" Version="8.0.31" />
<PackageReference Include="MySqlConnector" Version="2.2.6" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
</ItemGroup>
</Project>

View file

@ -64,6 +64,6 @@
<ItemGroup>
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Mono.Addins" Version="1.4.1" />
<PackageReference Include="MySql.Data" Version="8.0.31" />
<PackageReference Include="MySqlConnector" Version="2.2.6" />
</ItemGroup>
</Project>

View file

@ -21,15 +21,13 @@ using System.Collections.Generic;
using System.Data;
using System.Reflection;
using System.Text;
using MySql.Data.MySqlClient;
using Nini.Config;
using OpenSim.Data.MySQL;
using OpenSim.Data.PGSQL;
using OpenSim.Data.SQLite;
using Npgsql;
using NpgsqlTypes;
using OpenMetaverse; // Necessary for UUID type
using MySqlConnector;
namespace Gloebit.GloebitMoneyModule
{

View file

@ -18,13 +18,10 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlTypes;
using System.Reflection;
using System.Xml;
using log4net;
using MySql.Data.MySqlClient;
using Nini.Config;
using MySqlConnector;
using OpenSim.Data.MySQL;
using OpenSim.Data.PGSQL;
using OpenSim.Data.SQLite;

View file

@ -18,6 +18,8 @@
using System;
using Nini.Config;
using MySqlConnector;
using OpenSim.Data.MySQL;
using OpenSim.Data.PGSQL;
using OpenSim.Data.SQLite;

View file

@ -31,9 +31,8 @@ using System.Reflection;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using log4net;
using MySql.Data.MySqlClient;
using OpenMetaverse;
using MySqlConnector;
namespace OpenSim.Data.MySQL.MoneyData
{

View file

@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Mono.Addins" Version="1.4.1" />
<PackageReference Include="MySql.Data" Version="8.0.31" />
<PackageReference Include="MySqlConnector" Version="2.2.6" />
</ItemGroup>
<ItemGroup>
<Reference Include="Nini">

View file

@ -33,7 +33,7 @@ using OpenSim.Region.OptionalModules.Currency;
using log4net;
using System.Reflection;
using OpenMetaverse;
using MySqlConnector;
namespace OpenSim.Server.MoneyServer
{
@ -135,7 +135,7 @@ namespace OpenSim.Server.MoneyServer
return dbm.Manager.getBalance(userID);
}
#pragma warning disable CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
catch (MySql.Data.MySqlClient.MySqlException e)
catch (MySqlException e)
{
#pragma warning restore CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
dbm.Manager.Reconnect();
@ -162,7 +162,7 @@ namespace OpenSim.Server.MoneyServer
return dbm.Manager.withdrawMoney(transactionID, senderID, amount);
}
#pragma warning disable CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
catch (MySql.Data.MySqlClient.MySqlException e)
catch (MySqlException e)
{
#pragma warning restore CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
dbm.Manager.Reconnect();
@ -189,7 +189,7 @@ namespace OpenSim.Server.MoneyServer
return dbm.Manager.giveMoney(transactionID, receiverID, amount);
}
#pragma warning disable CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
catch (MySql.Data.MySqlClient.MySqlException e)
catch (MySqlException e)
{
#pragma warning restore CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
dbm.Manager.Reconnect();
@ -219,10 +219,8 @@ namespace OpenSim.Server.MoneyServer
{
return dbm.Manager.setTotalSale(transaction.Receiver, transaction.ObjectUUID, transaction.Type, 1, transaction.Amount, time);
}
#pragma warning disable CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
catch (MySql.Data.MySqlClient.MySqlException e)
catch (MySqlException)
{
#pragma warning restore CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
dbm.Manager.Reconnect();
return dbm.Manager.setTotalSale(transaction.Receiver, transaction.ObjectUUID, transaction.Type, 1, transaction.Amount, time);
}
@ -247,7 +245,7 @@ namespace OpenSim.Server.MoneyServer
return dbm.Manager.addTransaction(transaction);
}
#pragma warning disable CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
catch (MySql.Data.MySqlClient.MySqlException e)
catch (MySqlException e)
{
#pragma warning restore CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
dbm.Manager.Reconnect();
@ -293,7 +291,7 @@ namespace OpenSim.Server.MoneyServer
ret = dbm.Manager.addUser(userID, 0, status, type); // make Balance Table
}
#pragma warning disable CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
catch (MySql.Data.MySqlClient.MySqlException e)
catch (MySqlException e)
{
#pragma warning restore CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
dbm.Manager.Reconnect();
@ -324,7 +322,7 @@ namespace OpenSim.Server.MoneyServer
return dbm.Manager.updateTransactionStatus(transactionID, status, description);
}
#pragma warning disable CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
catch (MySql.Data.MySqlClient.MySqlException e)
catch (MySqlException e)
{
#pragma warning restore CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
dbm.Manager.Reconnect();
@ -351,7 +349,7 @@ namespace OpenSim.Server.MoneyServer
return dbm.Manager.SetTransExpired(deadTime);
}
#pragma warning disable CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
catch (MySql.Data.MySqlClient.MySqlException e)
catch (MySqlException e)
{
#pragma warning restore CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
dbm.Manager.Reconnect();
@ -378,7 +376,7 @@ namespace OpenSim.Server.MoneyServer
return dbm.Manager.ValidateTransfer(secureCode, transactionID);
}
#pragma warning disable CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
catch (MySql.Data.MySqlClient.MySqlException e)
catch (MySqlException e)
{
#pragma warning restore CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
dbm.Manager.Reconnect();
@ -405,7 +403,7 @@ namespace OpenSim.Server.MoneyServer
return dbm.Manager.FetchTransaction(transactionID);
}
#pragma warning disable CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
catch (MySql.Data.MySqlClient.MySqlException e)
catch (MySqlException e)
{
#pragma warning restore CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
dbm.Manager.Reconnect();
@ -436,7 +434,7 @@ namespace OpenSim.Server.MoneyServer
arrTransaction = dbm.Manager.FetchTransaction(userID, startTime, endTime, index, 1);
}
#pragma warning disable CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
catch (MySql.Data.MySqlClient.MySqlException e)
catch (MySqlException e)
{
#pragma warning restore CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
dbm.Manager.Reconnect();
@ -585,7 +583,7 @@ namespace OpenSim.Server.MoneyServer
userInfo = dbm.Manager.fetchUserInfo(user.UserID);
}
#pragma warning disable CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
catch (MySql.Data.MySqlClient.MySqlException e)
catch (MySqlException e)
{
#pragma warning restore CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
dbm.Manager.Reconnect();
@ -636,7 +634,7 @@ namespace OpenSim.Server.MoneyServer
return userInfo;
}
#pragma warning disable CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
catch (MySql.Data.MySqlClient.MySqlException e)
catch (MySqlException e)
{
#pragma warning restore CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
dbm.Manager.Reconnect();
@ -664,7 +662,7 @@ namespace OpenSim.Server.MoneyServer
return dbm.Manager.getTransactionNum(userID, startTime, endTime);
}
#pragma warning disable CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
catch (MySql.Data.MySqlClient.MySqlException e)
catch (MySqlException e)
{
#pragma warning restore CS0168 // Variable ist deklariert, wird jedoch niemals verwendet
dbm.Manager.Reconnect();