summaryrefslogtreecommitdiff
path: root/client/sql_string.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/sql_string.cc')
-rw-r--r--client/sql_string.cc26
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()
{