[MDEV-18658] 10.3.9-MariaDB can not query equal operator with special character Created: 2019-02-20  Updated: 2019-03-11  Resolved: 2019-03-11

Status: Closed
Project: MariaDB Server
Component/s: PL/SQL
Affects Version/s: 10.3.9
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Hien V Nguyen Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Environment:

Windows Server 2016 64 bit



 Description   

I have a MariaDB database that has a filed TagName with value ~!@#$%^&*()_+|}{":?><./';[]\=-`
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 = '~!@#$%^&*()_+|}{":?><./'';[]\\=-`';

But in 10.3.9-MariaDB, the query

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

can not return any result.

Is this an issue or I missed some configuration?



 Comments   
Comment by Elena Stepanova [ 2019-03-11 ]

It works with the default configuration, so whatever you have, must be indeed due to your settings.

MariaDB [test]> SET @@SQL_MODE = CONCAT(@@SQL_MODE, ',NO_BACKSLASH_ESCAPES');
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [test]> create table t (c varchar(64));
Query OK, 0 rows affected (0.21 sec)
 
MariaDB [test]> insert into t values ('~!@#$%^&*()_+|}{":?><./'';[]\=-`');
Query OK, 1 row affected (0.05 sec)
 
MariaDB [test]> select * from t where c  = '~!@#$%^&*()_+|}{":?><./'';[]\=-`';
+---------------------------------+
| c                               |
+---------------------------------+
| ~!@#$%^&*()_+|}{":?><./';[]\=-` |
+---------------------------------+
1 row in set (0.00 sec)
 
MariaDB [test]> select @@version;
+-----------------+
| @@version       |
+-----------------+
| 10.3.12-MariaDB |
+-----------------+
1 row in set (0.00 sec)

You can also try a later version, maybe it was fixed since 10.3.9.

Generated at Thu Feb 08 08:45:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.