Subject: 31.0.50: sql-mode: MariaDB and Mysql both handle escaped apostrophes in the same way.
From: Vincenzo Pupillo <[email-masked]>
To: [email-masked]
Date: Mon, 17 Mar 2025 22:53:17 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Ciao,
This patch fixes the way apostrophes are escaped in MariaDB product.
Thanks.

Vincenzo

From d476df25bc5a75db984e714c2cc3477454d72368 Mon Sep 17 00:00:00 2001
From: Vincenzo Pupillo <[email-masked]>
Date: Mon, 17 Mar 2025 22:35:23 +0100
Subject: [PATCH] MariaDB and Mysql handle escaped aphostrophes in the same
 way.

* lisp/progmodes/sql.el (sql-mode): MariaDB and Mysql both handle
escaped apostrophes in the same way.
---
 lisp/progmodes/sql.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index a1c50a06990..58fbf3c51e7 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -4164,7 +4164,7 @@ sql-mode
               (eval
                '(syntax-propertize-rules
                  ;; Handle escaped apostrophes within strings.
-                 ((if (eq sql-product 'mysql)
+                 ((if (member sql-product '(mysql mariadb))
                       "\\\\'"
                     "''")
                   (0
-- 
2.48.1