I had similar issue with executing query over ODBC to SQL Server 2016.
Execute Query: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
The reason - MS SQL Table field was defined as nvarchar(max). Changing the type to nvarchar(4000) fixed the issue.
I had the same problem and i see that the problem was the ODBC driver, when connect with the same ODBC in the MySQL Client, that all the fields in all the rows was “NULL”
When i changed “MySQL ODBC 8.0 Unicode Driver” by “MySQL ODBC 8.0 ANSI Driver” the query starts to work
You need to download and install the MySQL ODBC ANSI driver to your system and configure it under the ODBC Data Source Administrator tool in Windows, then you can use it in your Connect to Database activity in UiPath Studio.