10.3.9-MariaDB can not query equal operator with special character I have a MariaDB database that has a filed TagName with value ~!@#$%^&amp;*()_+|}{":?>&lt;./';[]\=-` 

I had set mode SET @@SQL_MODE = CONCAT(@@SQL_MODE, ',NO_BACKSLASH_ESCAPES'); 

When I try to created DB in MySQL 8.0.13, this query work well and return 1 row 

select * from taginfo1 where TagName = '~!@#$%^&amp;*()_+|}{":?&gt;&lt;./'';[]\\=-`';


But in 10.3.9-MariaDB, the query 

select * from taginfo1 where TagName = '~!@#$%^&amp;*()_+|}{":?&gt;&lt;./'';[]\\=-`';


can not return any result.

Is this an MariaDB issue or I missed some configuration?
According to the documentation about sql_mode NO_BACKSLASH_ESCAPES:


  Disables using the backslash character \ as an escape character within
  strings, making it equivalent to an ordinary character.


Your string has a double backslash in it. In the NO_BACKSLASH_ESCAPES sql_mode this will be interpreted as a double backslash whereas in the default sql_mode it's interpreted as a single backslash.

Below are some tests with MariaDB 10.3.13 using the following table: 

CREATE TABLE taginfo1 (id int unsigned PRIMARY KEY, TagName varchar(200));


Default sql_mode

INSERT INTO taginfo1 (id, TagName) VALUES (1, '~!@#$%^&amp;*()_+|}{":?&gt;&lt;./'';[]\\=-`');
SELECT * FROM taginfo1 WHERE TagName = '~!@#$%^&amp;*()_+|}{":?&gt;&lt;./'';[]\\=-`';
+----+---------------------------------+
| id | TagName                         |
+----+---------------------------------+
|  1 | ~!@#$%^&amp;*()_+|}{":?&gt;&lt;./';[]\=-` |
+----+---------------------------------+


Note that one backslash has disappeared.

sql_mode with NO_BACKSLASH_ESCAPES

SELECT * FROM taginfo1 WHERE TagName = '~!@#$%^&amp;*()_+|}{":?&gt;&lt;./'';[]\\=-`';
Empty set (0.000 sec)


Let's remove one backslash from the WHERE clause:

SELECT * FROM taginfo1 WHERE TagName = '~!@#$%^&amp;*()_+|}{":?&gt;&lt;./'';[]\=-`';
+----+---------------------------------+
| id | TagName                         |
+----+---------------------------------+
|  1 | ~!@#$%^&amp;*()_+|}{":?&gt;&lt;./';[]\=-` |
+----+---------------------------------+


Then let's insert a second row while we're in NO_BACKSLASH_ESCAPES mode:

INSERT INTO taginfo1 (id, TagName) VALUES (2, '~!@#$%^&amp;*()_+|}{":?&gt;&lt;./'';[]\\=-`');

SELECT * FROM taginfo1 WHERE TagName = '~!@#$%^&amp;*()_+|}{":?&gt;&lt;./'';[]\\=-`';
+----+----------------------------------+
| id | TagName                          |
+----+----------------------------------+
|  2 | ~!@#$%^&amp;*()_+|}{":?&gt;&lt;./';[]\\=-` |
+----+----------------------------------+


As far as I can tell, this all works as per the documentation. If you really get different results in 10.3.9, then presumably there was a bug that's been fixed.