[MDEV-12076] CONCAT behavior with NULL is different to Oracle Created: 2017-02-16 Updated: 2017-04-09 Resolved: 2017-03-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Parser |
| Affects Version/s: | 10.2.3 |
| Fix Version/s: | 10.3.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Alvin Richards (Inactive) | Assignee: | Alexander Barkov |
| Resolution: | Duplicate | Votes: | 1 |
| Labels: | Compatibility, datatype | ||
| Issue Links: |
|
||||||||
| Description |
ProblemGiven the following statement
In MariaDB this returns NULL, in Oracle this returns 'TDSMGR'. In SQL_MODE='Oracle' this different behavior causes significant problems. BackgroundCONCAT Function is different implemented. https://www.techonthenet.com/mariadb/functions/concat.php ReproduceSee above Workaround
or
SolutionFor SQL_MODE = 'Oracle' ensure that CONCAT exhibits the Oracle behaviour. |
| Comments |
| Comment by Alexander Bienemann (Inactive) [ 2017-02-16 ] |
|
A possible workaround or implementation might by e.g. a UDF or an „alias“ of the form CONCAT_LAZY_EVAL(a,b,c) = CONCAT(UNNULL(a), UNNULL(b), UNNULL(c)) where UNNULL(a) = IF(a IS NULL, "", a) etc. |