- Remove gcc warning (no previous declaration of msglang)

modified:
  storage/connect/ha_connect.cc

- Define strcasecmp for Linux
modified:
  storage/connect/rcmsg.c

- Avoid potential buffer overflow
modified:
  storage/connect/plgdbutl.cpp
  
- Change %d in %lld in VALUE_TOO_BIG message
modified:
  storage/connect/encas.h
  storage/connect/english.msg
  storage/connect/frcas.h
  storage/connect/french.msg
  storage/connect/frmsg.h
This commit is contained in:
Olivier Bertrand 2014-11-16 01:16:51 +01:00
parent 5d8311960a
commit b9165cb58d
8 changed files with 11 additions and 6 deletions

View file

@ -298,7 +298,7 @@
case MSG_VALSTR_TOO_LONG: p = "Value %s too long for string of length %d"; break;
case MSG_VALTYPE_NOMATCH: p = "Non matching Value types"; break;
case MSG_VALUE_ERROR: p = "Column %s: value is null"; break;
case MSG_VALUE_TOO_BIG: p = "Value %d too big for column %s"; break;
case MSG_VALUE_TOO_BIG: p = "Value %lld too big for column %s"; break;
case MSG_VALUE_TOO_LONG: p = "Value %s too long for column %s of length %d"; break;
case MSG_VAL_ALLOC_ERR: p = "Cannot allocate value node"; break;
case MSG_VIR_NO_DELETE: p = "Delete not allowed for %s tables"; break;

View file

@ -344,7 +344,7 @@
497 VALSTR_TOO_LONG "Value %s too long for string of length %d"
498 VALTYPE_NOMATCH "Non matching Value types"
499 VALUE_ERROR "Column %s: value is null"
500 VALUE_TOO_BIG "Value %d too big for column %s"
500 VALUE_TOO_BIG "Value %lld too big for column %s"
501 VALUE_TOO_LONG "Value %s too long for column %s of length %d"
502 VAL_ALLOC_ERR "Cannot allocate value node"
503 VIR_NO_DELETE "Delete not allowed for %s tables"

View file

@ -298,7 +298,7 @@
case MSG_VALSTR_TOO_LONG: p = "Valeur %s trop longue pour une chaîne de longueur %d"; break;
case MSG_VALTYPE_NOMATCH: p = "Disparité types de valeur"; break;
case MSG_VALUE_ERROR: p = "Colonne %s: bloc valeur nul"; break;
case MSG_VALUE_TOO_BIG: p = "Valeur %d trop grande pour la colonne %s"; break;
case MSG_VALUE_TOO_BIG: p = "Valeur %lld trop grande pour la colonne %s"; break;
case MSG_VALUE_TOO_LONG: p = "Valeur %s trop longue pour la colonne %s de longueur %d"; break;
case MSG_VAL_ALLOC_ERR: p = "Allocation impossible du noeud valeur"; break;
case MSG_VIR_NO_DELETE: p = "Delete impossible sur les tables %s"; break;

View file

@ -344,7 +344,7 @@
497 VALSTR_TOO_LONG "Valeur %s trop longue pour une chaîne de longueur %d"
498 VALTYPE_NOMATCH "Disparité types de valeur"
499 VALUE_ERROR "Colonne %s: bloc valeur nul"
500 VALUE_TOO_BIG "Valeur %d trop grande pour la colonne %s"
500 VALUE_TOO_BIG "Valeur %lld trop grande pour la colonne %s"
501 VALUE_TOO_LONG "Valeur %s trop longue pour la colonne %s de longueur %d"
502 VAL_ALLOC_ERR "Allocation impossible du noeud valeur"
503 VIR_NO_DELETE "Delete impossible sur les tables %s"

View file

@ -298,7 +298,7 @@
#define MSG_VALSTR_TOO_LONG "Valeur %s trop longue pour une chaîne de longueur %d"
#define MSG_VALTYPE_NOMATCH "Disparité types de valeur"
#define MSG_VALUE_ERROR "Colonne %s: bloc valeur nul"
#define MSG_VALUE_TOO_BIG "Valeur %d trop grande pour la colonne %s"
#define MSG_VALUE_TOO_BIG "Valeur %lld trop grande pour la colonne %s"
#define MSG_VALUE_TOO_LONG "Valeur %s trop longue pour la colonne %s de longueur %d"
#define MSG_VAL_ALLOC_ERR "Allocation impossible du noeud valeur"
#define MSG_VIR_NO_DELETE "Delete impossible sur les tables %s"

View file

@ -217,6 +217,7 @@ bool ExactInfo(void);
USETEMP UseTemp(void);
uint GetWorkSize(void);
void SetWorkSize(uint);
extern "C" const char *msglang(void);
static PCONNECT GetUser(THD *thd, PCONNECT xp);
static PGLOBAL GetPlug(THD *thd, PCONNECT& lxp);

View file

@ -122,7 +122,7 @@ static void global_open_error_msg(GLOBAL *g, int msgid, const char *path,
int len, rno= (int)errno;
char errmsg[256]= "";
strncat(errmsg, strerror(errno), 256);
strncat(errmsg, strerror(errno), 255);
switch (msgid)
{

View file

@ -21,6 +21,10 @@
#include "msgid.h"
#endif // NEWMSG
#if !defined(WIN32)
#define stricmp strcasecmp
#endif // !WIN32
char *msglang(void);
char *GetMsgid(int id)