summaryrefslogtreecommitdiff
path: root/client/sql_string.h
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2000-11-15 23:00:06 +0200
committerunknown <monty@narttu.mysql.fi>2000-11-15 23:00:06 +0200
commit9a846a52ae62f701c2d54d3f468e2ead393acf91 (patch)
tree622092bf596b26a1f762020729c03d573a5b216d /client/sql_string.h
parentf3d2341f1f30384d92b285c1e421d8c599ee2b79 (diff)
downloadmariadb-git-9a846a52ae62f701c2d54d3f468e2ead393acf91.tar.gz
changed to use IO_CACHE instead of FILE
BitKeeper/deleted/.del-mf_reccache.c: ***MISSING WEAVE*** Docs/manual.texi: Fix licence information + update changelog client/mysqlimport.c: Fixed typo client/sql_string.cc: Added support for IO_CACHE client/sql_string.h: Added support for IO_CACHE include/my_sys.h: More options for IO_CACHE mysql.proj: Update mysys/Makefile.am: Remoced mf_reccache.c mysys/mf_cache.c: Fixed return value on error and optimzed used of write cache files mysys/mf_iocache.c: More options for IO_CACHE mysys/my_vsnprintf.c: Optimized code sql/mf_iocache.cc: merge with mf_iocache.c sql/net_pkg.cc: cleanup sql/sql_class.cc: Support for transaction safe log files sql/sql_string.cc: Added support for IO_CACHE sql/sql_string.h: Added support for IO_CACHE sql/time.cc: cleanup BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'client/sql_string.h')
-rw-r--r--client/sql_string.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/client/sql_string.h b/client/sql_string.h
index 8711cf314ad..74dbc4cc6bd 100644
--- a/client/sql_string.h
+++ b/client/sql_string.h
@@ -100,16 +100,16 @@ public:
bool set(ulonglong num);
bool set(double num,uint decimals=2);
inline void free()
+ {
+ if (alloced)
{
- if (alloced)
- {
- alloced=0;
- Alloced_length=0;
- my_free(Ptr,MYF(0));
- Ptr=0;
- }
+ alloced=0;
+ Alloced_length=0;
+ my_free(Ptr,MYF(0));
+ Ptr=0;
+ str_length=0; /* Safety */
}
-
+ }
inline bool alloc(uint32 arg_length)
{
if (arg_length < Alloced_length)
@@ -152,7 +152,7 @@ public:
bool copy(const char *s,uint32 arg_length); // Allocate new string
bool append(const String &s);
bool append(const char *s,uint32 arg_length=0);
- bool append(FILE* file, uint32 arg_length, myf my_flags);
+ bool append(IO_CACHE* file, uint32 arg_length);
int strstr(const String &search,uint32 offset=0); // Returns offset to substring or -1
int strrstr(const String &search,uint32 offset=0); // Returns offset to substring or -1
bool replace(uint32 offset,uint32 arg_length,const String &to);