WL#3705: Concatenation of '' strings and 0x strings
Affects: Server-7.1 — Status: Assigned — Priority: Medium
We should allow concatenation of 0x strings and '' strings. That is: SELECT _latin1 0x41 'A'; SELECT 'A' _latin1 0x41; should return 'AA' as just SELECT 'A' 'A'; returns 'AA'. This syntax allows to embed "tricky" characters into a string. For example, carriage return: SELECT 'A' _latin1 0x5C 'B'; -- should return 'A\B' It can be especially useful when @@sql_mode=NO_BACKSLASH_ESCAPES, which should be the recommended mode for sjis, cp932, big5 and gbk users to avoid problems with multibyte characters having "slash" as the second byte. Note, this feature should not work if SQL_MODE is not ANSI_QUOTES, because MySQL currently treats the second string as an identifier. For example: mysql> select 0x41 'q' from tuu; +---+ | q | +---+ | A | +---+ 1 row in set (0.00 sec)
Copyright (c) 2000, 2015, Oracle Corporation and/or its affiliates. All rights reserved.