Commit b9165cb5 authored by Olivier Bertrand's avatar Olivier Bertrand

- 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
parent 5d831196
......@@ -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;
......
......@@ -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"
......
......@@ -298,7 +298,7 @@
case MSG_VALSTR_TOO_LONG: p = "Valeur %s trop longue pour une chane 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;
......
......@@ -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"
......
......@@ -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"
......
......@@ -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);
......
......@@ -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)
{
......
......@@ -21,6 +21,10 @@
#include "msgid.h"
#endif // NEWMSG
#if !defined(WIN32)
#define stricmp strcasecmp
#endif // !WIN32
char *msglang(void);
char *GetMsgid(int id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment