diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-06-24 07:16:08 +0300 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-06-24 07:16:08 +0300 |
commit | 2e4984c185ddcd2da789017cd147338846ff409a (patch) | |
tree | 0293831900c860600efbaa747ea886d9d1cbf5bd /storage/connect/valblk.cpp | |
parent | 792b53e80806df893ee62c9a1c1bd117114c8c6d (diff) | |
parent | a6087e7dc1ef3561d8189c8db15e9591d0f9b520 (diff) | |
download | mariadb-git-10.0-FusionIO.tar.gz |
Merge tag 'mariadb-10.0.20' into 10.0-FusionIO10.0-FusionIO
Conflicts:
storage/innobase/os/os0file.cc
storage/xtradb/os/os0file.cc
storage/xtradb/srv/srv0start.cc
Diffstat (limited to 'storage/connect/valblk.cpp')
-rw-r--r-- | storage/connect/valblk.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/storage/connect/valblk.cpp b/storage/connect/valblk.cpp index df7011583cd..5fefcba5856 100644 --- a/storage/connect/valblk.cpp +++ b/storage/connect/valblk.cpp @@ -1,7 +1,7 @@ /************ Valblk C++ Functions Source Code File (.CPP) *************/ /* Name: VALBLK.CPP Version 2.1 */ /* */ -/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */ +/* (C) Copyright to the author Olivier BERTRAND 2005-2015 */ /* */ /* This file contains the VALBLK and derived classes functions. */ /* Second family is VALBLK, representing simple suballocated arrays */ @@ -23,7 +23,7 @@ /* Include relevant MariaDB header file. */ /***********************************************************************/ #include "my_global.h" -#if defined(WIN32) +#if defined(__WIN__) //#include <windows.h> #else #include "osutil.h" @@ -132,7 +132,7 @@ VALBLK::VALBLK(void *mp, int type, int nval, bool un) /***********************************************************************/ /* Raise error for numeric types. */ /***********************************************************************/ -PSZ VALBLK::GetCharValue(int n) +PSZ VALBLK::GetCharValue(int) { PGLOBAL& g = Global; @@ -145,7 +145,7 @@ PSZ VALBLK::GetCharValue(int n) /***********************************************************************/ /* Set format so formatted dates can be converted on input. */ /***********************************************************************/ -bool VALBLK::SetFormat(PGLOBAL g, PSZ fmt, int len, int year) +bool VALBLK::SetFormat(PGLOBAL g, PSZ, int, int) { sprintf(g->Message, MSG(NO_DATE_FMT), Type); return true; @@ -752,7 +752,7 @@ double CHRBLK::GetFloatValue(int n) /***********************************************************************/ /* STRING GetCharString: get string representation of a char value. */ /***********************************************************************/ -char *CHRBLK::GetCharString(char *p, int n) +char *CHRBLK::GetCharString(char *, int n) { return (char *)GetValPtrEx(n); } // end of GetCharString @@ -1155,10 +1155,9 @@ void STRBLK::SetValue(PVAL valp, int n) void STRBLK::SetValue(PSZ p, int n) { if (p) { - if (!Sorted || !n || !Strp[n-1] || strcmp(p, Strp[n-1])) { - Strp[n] = (PSZ)PlugSubAlloc(Global, NULL, strlen(p) + 1); - strcpy(Strp[n], p); - } else + if (!Sorted || !n || !Strp[n-1] || strcmp(p, Strp[n-1])) + Strp[n] = (PSZ)PlugDup(Global, p); + else Strp[n] = Strp[n-1]; } else |