Subject: bug#37459: Acknowledgement (26.2; sql syntax highlight problem when escaping single quote)

From: ndame <[email-masked]>
Date: Fri, 22 Nov 2019 15:44:37 +0100 (CET)

Browsing sql.el I found this code:
 
;; MariaDB is a drop-in replacement for MySQL, so just make the
;; MariaDB variables aliases of the MySQL ones.
 
(defvaralias 'sql-mariadb-program 'sql-mysql-program)
(defvaralias 'sql-mariadb-options 'sql-mysql-options)
(defvaralias 'sql-mariadb-login-params 'sql-mysql-login-params)

If mariadb is a drop in mysql replacement then all mysql-related fixes
should apply to it too, though later in the code mariadb sets up syntax
independetly, so the same bug affects it which the patch here fixes.
The correct solution could be setting up a mariadb syntax variable
and alias it to the mysql syntax variable to avoid duplicating the same code:

(mariadb

:name "MariaDB"

:free-software t

:font-lock sql-mode-mariadb-font-lock-keywords

:sqli-program sql-mariadb-program

:sqli-options sql-mariadb-options

:sqli-login sql-mariadb-login-params

:sqli-comint-func sql-comint-mariadb

:list-all "SHOW TABLES;"

:list-table "DESCRIBE %s;"

:prompt-regexp "^MariaDB \\[.*]> "

:prompt-cont-regexp "^ [\"'`-]> "

:syntax-alist ((?# . "< b"))
:input-filter sql-remove-tabs-filter)