mariadb/storage/connect/rcmsg.c
Olivier Bertrand 175ce0e7f5 - Remove warning on not used tabtyp variable in connect_assisted_discovery
modified:   storage/connect/ha_connect.cc

- Fix a bug causing CONNECT to loop when expanding a JSON column
  when the expanded column value is null or void array.
- Adding the FullArray option to JSON tables.
- Skipping expanded JSON lines when the expanded column value is null.
  modified:   storage/connect/connect.cc
  modified:   storage/connect/tabdos.h
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h

- Fix MDEV-13353 No file privilege for ODBC, JDBC, MONGO, MAC, WMI file types.
  modified:   storage/connect/ha_connect.cc

- Make some Json UDFs  to accept a non JSON item as 1st parameter.
  modified:   storage/connect/json.cpp
  modified:   storage/connect/json.h
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h

- Update Json UDF tests to cope with above changes.
  modified:   storage/connect/mysql-test/connect/r/json_udf.result
  modified:   storage/connect/mysql-test/connect/r/json_udf_bin.result
  modified:   storage/connect/mysql-test/connect/r/vcol.result
  modified:   storage/connect/mysql-test/connect/t/json_udf.test
  modified:   storage/connect/mysql-test/connect/t/vcol.test

- Fix some compiler warning treated as error
  PlugSubAlloc no more exported because it does throw.
  modified:   storage/connect/global.h
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h

- Other files modified (?) when going back to wrong merge
  modified:   storage/connect/CMakeLists.txt
  modified:   storage/connect/array.cpp
  modified:   storage/connect/colblk.cpp
  modified:   storage/connect/connect.cc
  modified:   storage/connect/csort.cpp
  modified:   storage/connect/domdoc.cpp
  modified:   storage/connect/filamap.cpp
  modified:   storage/connect/filamgz.cpp
  modified:   storage/connect/filamtxt.cpp
  modified:   storage/connect/filamzip.cpp
  modified:   storage/connect/filter.cpp
  modified:   storage/connect/fmdlex.c
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/macutil.cpp
  modified:   storage/connect/myconn.cpp
  modified:   storage/connect/odbconn.cpp
  modified:   storage/connect/plgdbutl.cpp
  modified:   storage/connect/plugutil.cpp
  modified:   storage/connect/preparse.h
  modified:   storage/connect/rcmsg.c
  modified:   storage/connect/rcmsg.h
  modified:   storage/connect/reldef.cpp
  modified:   storage/connect/tabdos.cpp
  modified:   storage/connect/tabfmt.cpp
  modified:   storage/connect/tabmac.cpp
  modified:   storage/connect/tabmul.cpp
  modified:   storage/connect/tabmysql.cpp
  modified:   storage/connect/tabmysql.h
  modified:   storage/connect/tabodbc.cpp
  modified:   storage/connect/tabtbl.cpp
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/value.cpp
  modified:   storage/connect/xobject.cpp
2018-02-25 14:31:28 +01:00

69 lines
2 KiB
C

/**************** RCMsg C Program Source Code File (.C) ****************/
/* PROGRAM NAME: RCMSG */
/* ------------- */
/* Version 1.3 */
/* */
/* COPYRIGHT */
/* ---------- */
/* (C) Copyright to the author Olivier BERTRAND: 2005 - 2014 */
/* */
/* WHAT THIS PROGRAM DOES */
/* ----------------------- */
/* This program simulates LoadString. */
/* */
/***********************************************************************/
#if !defined(XMSG)
#include <stdio.h>
#include <string.h>
#include "resource.h"
#include "rcmsg.h"
#if defined(NEWMSG)
#include "msgid.h"
#endif // NEWMSG
#if !defined(__WIN__)
#define stricmp strcasecmp
#endif // !__WIN__
char *msglang(void);
const char *GetMsgid(int id)
{
const char *p = NULL;
// This conditional until a real fix is found for MDEV-7304
#if defined(FRENCH)
if (!stricmp(msglang(), "french"))
switch (id) {
#include "frids.h"
#if defined(NEWMSG)
#include "frcas.h"
#endif // NEWMSG
} // endswitch(id)
else // English
#endif // FRENCH
switch (id) {
#include "enids.h"
#if defined(NEWMSG)
#include "encas.h"
#endif // NEWMSG
} // endswitch(id)
return p;
} // end of GetMsgid
int GetRcString(int id, char *buf, int bufsize)
{
const char *p = NULL;
char msg[32];
if (!(p = GetMsgid(id))) {
sprintf(msg, "ID=%d unknown", id);
p = msg;
} // endif p
return sprintf(buf, "%.*s", bufsize-1, p);
} // end of GetRcString
#endif // !XMSG