mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-20017 Implement TO_CHAR() Oracle compatible function
TO_CHAR(expr, fmt) - expr: required parameter, data/time/timestamp type expression - fmt: optional parameter, format string, supports YYYY/YYY/YY/RRRR/RR/MM/MON/MONTH/MI/DD/DY/HH/HH12/HH24/SS and special characters. The default value is "YYYY-MM-DD HH24:MI:SS" In Oracle, TO_CHAR() can also be used to convert numbers to strings, but this is not supported. This will gave an error in this patch. Other things: - If format strings is a constant, it's evaluated only once and if there is any errors in it, they are given at once and the statement will abort. Original author: woqutech Lots of optimizations and cleanups done as part of review
This commit is contained in:
@ -740,7 +740,7 @@ public:
|
||||
thread_specific= s.thread_specific;
|
||||
s.alloced= 0;
|
||||
}
|
||||
bool fill(uint32 max_length,char fill);
|
||||
bool fill(size_t max_length,char fill);
|
||||
/*
|
||||
Replace substring with string
|
||||
If wrong parameter or not enough memory, do nothing
|
||||
|
Reference in New Issue
Block a user