diff options
author | unknown <gluh@gluh.mysql.r18.ru> | 2003-07-08 15:06:05 +0500 |
---|---|---|
committer | unknown <gluh@gluh.mysql.r18.ru> | 2003-07-08 15:06:05 +0500 |
commit | 4adf180432bba0e2f7e67ecb8fa5aa6d9ed86bdb (patch) | |
tree | a979e1c2c78c95f85202f78b6dd431c7f083b46b /sql/sql_string.cc | |
parent | 01e7f418afb1ab646487e4a14179ed2d2bd8f008 (diff) | |
download | mariadb-git-4adf180432bba0e2f7e67ecb8fa5aa6d9ed86bdb.tar.gz |
SAPDB date/time finctions
mysql-test/r/cast.result:
Changes for SAPDB date/time finctions
Diffstat (limited to 'sql/sql_string.cc')
-rw-r--r-- | sql/sql_string.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/sql_string.cc b/sql/sql_string.cc index 0a3e8d0db9f..e7d7b08c93c 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -390,6 +390,23 @@ bool String::append(IO_CACHE* file, uint32 arg_length) return FALSE; } +bool String::append_with_prefill(const char *s,uint32 arg_length, + uint32 full_length, char fill_char) +{ + int t_length= arg_length > full_length ? arg_length : full_length; + + if (realloc(str_length + t_length)) + return TRUE; + t_length= full_length - arg_length; + if (t_length > 0) + { + bfill(Ptr+str_length, t_length, fill_char); + str_length=str_length + t_length; + } + append(s, arg_length); + return FALSE; +} + uint32 String::numchars() { return str_charset->cset->numchars(str_charset, Ptr, Ptr+str_length); |