[9.0] Replace escape_string with alternatives#8647
Conversation
|
The integration (client) tests are all failing with: I see the above also for the PR targeting the |
|
Hi, I've fixed up the failures now, full details are below (it now includes a backport), but they should all be ready for review. (It looks like the tests are failing for various DIRACX reasons now rather than problems with these PRs.) Regards, The one affecting the v8r0 branch was the MySQL connection tripping up over a unicode string; I saw that on the v9r0 branch too when I ran the tests locally. If you want to store unicode then you're meant to do some other specific set-up (pick charsets and encodings for the table). The defaults have changed so it's sometimes possible, but it's safer if we just drop the two unicode test case parameters for this function: They're more testing the exact MySQL version & config in the test-suite rather than how well the escaping is working! I've removed them from all 3 branches. The TransformationSystem is error is due to a bug in the way the parameters to the database are escaped. This has been fixed by my proper parameterisation of the queries in 9.1. In the earlier branches it was relying on the escaping function using double quotes so that it could wrap them with single quotes: The new function uses single quotes so they get mixed up and generate invalid SQL. I've fixed this by backporting the proper parameterised query PR for the TransformationSystem. It's a clean cherry-pick on v9, I had to do more work on it for v8. |
Backport of #8645 & #8613.
BEGINRELEASENOTES
*Core
FIX: Replace escape_string with alternatives
*TransformationSystem
FIX: Parameterise SQL in TransformationSystem
ENDRELEASENOTES