QueryLogsMySql: updated code to use connection.Open() instead of OpenAsync() since it has a critical bug that will crash the entire DNS server which Oracle wont fix: https://bugs.mysql.com/bug.php?id=110789

This commit is contained in:
Shreyas Zare
2025-01-26 19:03:37 +05:30
parent ed3a6761dd
commit b83dbef692

View File

@@ -89,7 +89,7 @@ namespace QueryLogsMySql
{ {
await using (MySqlConnection connection = new MySqlConnection(_connectionString + $" Database={_databaseName};")) await using (MySqlConnection connection = new MySqlConnection(_connectionString + $" Database={_databaseName};"))
{ {
await connection.OpenAsync(); connection.Open(); //OpenAsync() has a critical bug that will crash the entire DNS server which Oracle wont fix: https://bugs.mysql.com/bug.php?id=110789
if (_maxLogRecords > 0) if (_maxLogRecords > 0)
{ {
@@ -179,7 +179,7 @@ namespace QueryLogsMySql
await using (MySqlConnection connection = new MySqlConnection(_connectionString + $" Database={_databaseName};")) await using (MySqlConnection connection = new MySqlConnection(_connectionString + $" Database={_databaseName};"))
{ {
await connection.OpenAsync(); connection.Open(); //OpenAsync() has a critical bug that will crash the entire DNS server which Oracle wont fix: https://bugs.mysql.com/bug.php?id=110789
await using (MySqlCommand command = connection.CreateCommand()) await using (MySqlCommand command = connection.CreateCommand())
{ {
@@ -316,7 +316,7 @@ namespace QueryLogsMySql
{ {
await using (MySqlConnection connection = new MySqlConnection(_connectionString)) await using (MySqlConnection connection = new MySqlConnection(_connectionString))
{ {
await connection.OpenAsync(); connection.Open(); //OpenAsync() has a critical bug that will crash the entire DNS server which Oracle wont fix: https://bugs.mysql.com/bug.php?id=110789
await using (MySqlCommand command = connection.CreateCommand()) await using (MySqlCommand command = connection.CreateCommand())
{ {
@@ -578,7 +578,7 @@ CREATE TABLE IF NOT EXISTS dns_logs
await using (MySqlConnection connection = new MySqlConnection(_connectionString + $" Database={_databaseName};")) await using (MySqlConnection connection = new MySqlConnection(_connectionString + $" Database={_databaseName};"))
{ {
await connection.OpenAsync(); connection.Open(); //OpenAsync() has a critical bug that will crash the entire DNS server which Oracle wont fix: https://bugs.mysql.com/bug.php?id=110789
//find total entries //find total entries
long totalEntries; long totalEntries;