Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
Description
Currently Item_func_length::print() prints ``length()'':
EXPLAIN EXTENDED SELECT LENGTH('a'), OCTET_LENGTH('a'); |
SHOW WARNINGS;
|
+-------+------+------------------------------------------------------------------------+
|
| Level | Code | Message |
|
+-------+------+------------------------------------------------------------------------+
|
| Note | 1003 | select length('a') AS `LENGTH('a')`,length('a') AS `OCTET_LENGTH('a')` |
|
+-------+------+------------------------------------------------------------------------+
|
We're going to implement MDEV-12783 soon, which will translate LENGTH() to OCTET_LENGTH() or CHAR_LENGTH() depending on sql_mode.
To make the result of Item_func_lengt::print() unambiguously work in virtual columns independently from sql_mode, will change Item_func_length::print() to print ``octet_length()'':
+-------+------+------------------------------------------------------------------------------------+
|
| Level | Code | Message |
|
+-------+------+------------------------------------------------------------------------------------+
|
| Note | 1003 | select octet_length('a') AS `LENGTH('a')`,octet_length('a') AS `OCTET_LENGTH('a')` |
|
+-------+------+------------------------------------------------------------------------------------+
|
Attachments
Issue Links
- blocks
-
MDEV-12783 sql_mode=ORACLE: Functions LENGTH() and LENGTHB()
- Closed