|
MariaDB [test]> SELECT QUOTE(CAST(NULL AS CHAR CHARACTER SET utf8)), QUOTE(_ucs2 0x0061), QUOTE(CAST(NULL AS CHAR CHARACTER SET ucs2));
|
+----------------------------------------------+---------------------+----------------------------------------------+
|
| QUOTE(CAST(NULL AS CHAR CHARACTER SET utf8)) | QUOTE(_ucs2 0x0061) | QUOTE(CAST(NULL AS CHAR CHARACTER SET ucs2)) |
|
+----------------------------------------------+---------------------+----------------------------------------------+
|
| NULL | 'a' | 乕䱌 |
|
+----------------------------------------------+---------------------+----------------------------------------------+
|
1 row in set (0.00 sec)
|
The expected result according to the manual
for the third column should be a string 'NULL' (four letters),
similar to the first column.
For non-NULL values QUOTE seem to work fine for an UCS2 argument,
as the second column demonstrates.
|