NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Error when logging to MySQL database after windows update

I have recently getting errors when my sequence try to log something to PROP_BINARY:

An error occurred calling 'LogResults' in 'ITSDBLog' of 'zNI TestStand Database Logging'
An error occurred executing a statement.
Schema: MySQL Insert (NI)
Statement: PROP_BINARY.
Description: Arithmetic result exceeded 32 bits.
Number: -2147024362
NativeError: -2147024362
SQLState:
Reported by: Provider

I tested with 64 bit version TS2017,2023 and 2024 and all get the same error as soon as I include something to PROP_BINARY, e.g. an array.

Switching to 32 bit, and it works. And also TS2014 64 bit works, which was a bit surprising, but that seems a bit backwards to use.

The error started to appear recently and it seems to be linked to some update from "Windows Update", if I revert the latest updates the logging works again.

 

Anyone that has seen the same and found a solution?

0 Kudos
Message 1 of 13
(984 Views)

Since the error message did not include any stack information, unclear what operation in the DBLog.dll that is throwing the exception. Some questions that might be of value to help someone from NI to reproduce:
1. What version of MySQL are you using?

2. Are you using the default schema, or have you altered it in some way?

3. Do you have any information on what Windows Update installed that preceded seeing the error?

Scott Richardson
https://testeract.com
0 Kudos
Message 2 of 13
(971 Views)

Thank you! After posting here I found where to file bug reports directly to NI. And in that report I included the information you suggest.

 

Actually we have small modifications to the default schema. However, that same modification is applied to all the schemas and it is only the PROP_BINARY that is throwing the error. But I will try running with an unaltered database schema to verify that our modification doesn't introduce this error.

 

For reference, no error on Windows 10 build 19045.4894 but it is present on build 19045.5011

0 Kudos
Message 3 of 13
(951 Views)

Hi,

we are facing the same issue since the cumulative Update for Windows 10 21H2 for x64 based Systems (KB5044273) has been rolled out to our new production line's PCs. This turned us crazy for a whole day until we tracked it down to the Windows update. We assume that a change in the .NET framework causes this by a difference in the SQL Client.

We are running it against a MariaDB 10.10 (x64) and are using MySQL ODBC 8.0 Unicode client.

 

Would be great if you could share the reply to your bug report herein also.

 

0 Kudos
Message 4 of 13
(919 Views)

@greenferret wrote:

Thank you! After posting here I found where to file bug reports directly to NI. And in that report I included the information you suggest.

 

Actually we have small modifications to the default schema. However, that same modification is applied to all the schemas and it is only the PROP_BINARY that is throwing the error. But I will try running with an unaltered database schema to verify that our modification doesn't introduce this error.

 

For reference, no error on Windows 10 build 19045.4894 but it is present on build 19045.5011


Thanks for the info! It's tricky without the stack trace, but your questions are a great starting point. To add on:

  1. Knowing the MySQL version is crucial since certain versions handle database operations differently, and some may have compatibility issues with DBLog.dll.

  2. The schema changes could definitely play a role. Any customizations or non-standard schema alterations might cause unexpected behaviors, especially if DBLog is assuming a default structure.

  3. The Windows Update part is also key—updates sometimes break compatibility with certain libraries or dependencies. If there's a list of recently installed updates, that could help narrow things down. C4Yourself

Hopefully, someone from NI can weigh in with more insight, but these details should help with troubleshooting!

0 Kudos
Message 5 of 13
(916 Views)

Thank you too for your quick reply. We are one step further:

 

We uninstalled the update package KB5044029, then after a reboot Teststand could log into the MariaDB server again without the failure.

 

The description of this package:

October 8, 2024-KB5044029 Cumulative Update for .NET Framework 3.5 and 4.8.1 for Windows 10 Version 21H2 and Windows 10 Version 22H2

 

To us it proves that there was an incompatible change in the .NET framework handling the SQL connection.
Curious now to get the correct answer from NI.

0 Kudos
Message 6 of 13
(909 Views)

Interesting, we have also seen that uninstalling a Windows update solves the issue but identified other ones:

Windows 10: KB5044273

Windows 11: KB5044285

If we uninstall them it starts working again.

0 Kudos
Message 7 of 13
(894 Views)

finally we encountered the issue again and could track it down to binary data in a SQL statement (PROP_BINARY).

 

We changed the client ODBC driver from MySQL ODBC connector 8.0.32 (x64) to MariaDB ODBC connector 3.1.20 (x64) which solves the issue (up this date, crossing fingers now...)

 

0 Kudos
Message 8 of 13
(833 Views)

We have previously tested the MariaDB Connector, but we encountered other problems with that one and kept the MySQL connector. However, that was when we still were using the 32 bit version.

0 Kudos
Message 9 of 13
(779 Views)

I just tested "MariaDB ODBC connector 3.1.20 (x64)" but I still get the same error trying to write to PROP_BINARY.

0 Kudos
Message 10 of 13
(755 Views)