diff options
author | monty@narttu.mysql.fi <> | 2000-11-15 23:00:06 +0200 |
---|---|---|
committer | monty@narttu.mysql.fi <> | 2000-11-15 23:00:06 +0200 |
commit | e69becf133867fff26b59ba74ec1ee722ce1e81e (patch) | |
tree | 622092bf596b26a1f762020729c03d573a5b216d /client/sql_string.cc | |
parent | 7a013339f84c48ea6194a35d9c00d0d549466b1d (diff) | |
download | mariadb-git-e69becf133867fff26b59ba74ec1ee722ce1e81e.tar.gz |
changed to use IO_CACHE instead of FILE
Diffstat (limited to 'client/sql_string.cc')
-rw-r--r-- | client/sql_string.cc | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/client/sql_string.cc b/client/sql_string.cc index 7ca2d3c419e..4b9ebef21f1 100644 --- a/client/sql_string.cc +++ b/client/sql_string.cc @@ -95,17 +95,6 @@ bool String::realloc(uint32 alloc_length) return FALSE; } - -#ifdef NOT_NEEDED -bool String::set(long num) -{ - if (alloc(14)) - return TRUE; - str_length=(uint32) (int10_to_str(num,Ptr,-10)-Ptr); - return FALSE; -} -#endif - bool String::set(longlong num) { if (alloc(21)) @@ -274,6 +263,7 @@ bool String::append(const char *s,uint32 arg_length) return FALSE; } +#ifdef TO_BE_REMOVED bool String::append(FILE* file, uint32 arg_length, myf my_flags) { if (realloc(str_length+arg_length)) @@ -286,6 +276,20 @@ bool String::append(FILE* file, uint32 arg_length, myf my_flags) str_length+=arg_length; return FALSE; } +#endif + +bool String::append(IO_CACHE* file, uint32 arg_length) +{ + if (realloc(str_length+arg_length)) + return TRUE; + if (my_b_read(file, (byte*) Ptr + str_length, arg_length)) + { + shrink(str_length); + return TRUE; + } + str_length+=arg_length; + return FALSE; +} uint32 String::numchars() { |