GNU bug report logs - #37459
26.2; sql syntax highlight problem when escaping single quote

Previous Next

Package: emacs;

Reported by: ndame <emacsuser <at> freemail.hu>

Date: Thu, 19 Sep 2019 12:51:01 UTC

Severity: minor

Tags: fixed, patch

Found in version 26.2

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 37459 <at> debbugs.gnu.org (full text, mbox):

From: ndame <emacsuser <at> freemail.hu>
To: "37459 <at> debbugs.gnu.org" <37459 <at> debbugs.gnu.org>
Subject: Re: bug#37459: Acknowledgement (26.2; sql syntax highlight problem
 when escaping single quote)
Date: Fri, 22 Nov 2019 15:44:37 +0100 (CET)
[Message part 1 (text/plain, inline)]
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)



 
[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 282 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.