[MDEV-17359] || operator is not understand by "like" in Oracle Created: 2018-10-03 Updated: 2018-10-19 Resolved: 2018-10-19 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Parser |
| Affects Version/s: | 10.3.9, 10.3 |
| Fix Version/s: | 10.3.11 |
| Type: | Bug | Priority: | Major |
| Reporter: | Jérôme Brauge | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
All OS |
||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Description |
|
with sql_mode=Oracle, the following query select * from dual where 'ab' like 'a'||'%'; failed with |
| Comments |
| Comment by Alice Sherepa [ 2018-10-03 ] | ||||||||||||||||||
|
Thanks for the report!
| ||||||||||||||||||
| Comment by Alexander Barkov [ 2018-10-04 ] | ||||||||||||||||||
Results returned by the Oracle database:– One row: SELECT 'x' FROM DUAL WHERE 1||1 LIKE 11; SELECT 'x' FROM DUAL WHERE 1 LIKE +1; SELECT 'x' FROM DUAL WHERE 1 LIKE 1+0; SELECT 'x' FROM DUAL WHERE 1+0 LIKE 1; SELECT 'x' FROM DUAL WHERE 1 LIKE 1*1; SELECT 'x' FROM DUAL WHERE 1*2 LIKE 2; SELECT 'x' FROM DUAL WHERE 1 LIKE CAST(1 AS VARCHAR(10)); SELECT 'x' FROM DUAL WHERE 1 LIKE CASE WHEN 1=1 THEN '1' ELSE '0' END; – Error: missing right parenthesis – Error: SQL command not properly ended" error Note: Oracle supports additive and multiplicative expressions in the right (the pattern) argument of the LIKE predicate. They also should be enabled. |