question

rwyoung01 avatar image
rwyoung01 asked

Update of a table in the MySQL linked server fails with a syntax error after SQL Server security update

I have a linked server that has been running this update for several years. It is on a SQL 2012 and 2012 R2 OS. We took a Microsoft security update this weekend and now this query is failing. I have included the error message. I can go to MYSQL Workbench with the same userid and make the update and the syntac is very similar. I am using MYSQL ODBC 8.0.26 which is the latest. I have install this ODBC driver on my personal PC and get the same results.

UPDATE ivr
SET Ivr.exported = '2021-07-26 18:25:12.0000000'
FROM   OPENQUERY(MYSQLprd, 'SELECT id, exported FROM us_apikcmorg.ivr_request') as ivr
where IVR.id = '0ac65de5-ed48-11eb-b181-0e7426bee2cd'

Here is the error:

OLE DB provider "MSDASQL" for linked server "MYSQLprd" returned message "[MySQL][ODBC 8.0(w) Driver][mysqld-5.7.33-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.`ivr_request` SET `exported`=? WHERE `id`=? AND `exported` IS NULL' at line 1".

Msg 7343, Level 16, State 4, Line 1

mysql
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.