Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.5.19
-
None
-
mariadb Ver 15.1 Distrib 10.5.19-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
Description
It is not "subquery", just "query".
Unbelievably, I was entering a query that someone sent me by email. It was split in several lines, which I copied and pasted in a client terminal. It replied with an error. I could spot no errors, and the query was very similar to a previous one which only had a single find_in_set condition. So I started recalling the query by ↑(up arrow) and removing a space. The last attempt succeeded. Here's the last but one and the last:
MariaDB [mail]> Select m.id as messageid, d.domain as SpfDomain from message_in as m, domain as d, msg_ref as r where r.domain = d.id and r.message_in = m.id and find_in_set('spf', r.auth)>0 and find_in_set('aligned', r.auth)>0 limit 2;
|
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' and find_in_set('aligned', r.auth)>0 limit 2' at line 1
|
MariaDB [mail]>
|
MariaDB [mail]> Select m.id as messageid, d.domain as SpfDomain from message_in as m, domain as d, msg_ref as r where r.domain = d.id and r.message_in = m.id and find_in_set('spf', r.auth)>0 and find_in_set('aligned', r.auth)>0 limit 2;
|
+-----------+------------------------+
|
| messageid | SpfDomain |
|
+-----------+------------------------+
|
| 1229557 | mailop.org |
|
| 1229558 | studiolegalemantini.it |
|
+-----------+------------------------+
|
2 rows in set (0.001 sec)
|
The difference is a single space before the last `and`.
The database is depicted here