Commit 88998cfa authored by Olivier Bertrand's avatar Olivier Bertrand

Commit merge resolved files

parent a8b7b6c8
/************* Colblk C++ Functions Source Code File (.CPP) ************/ /************* Colblk C++ Functions Source Code File (.CPP) ************/
/* Name: COLBLK.CPP Version 2.1 */ /* Name: COLBLK.CPP Version 2.1 */
/* */ /* */
<<<<<<< HEAD
/* (C) Copyright to the author Olivier BERTRAND 1998-2015 */ /* (C) Copyright to the author Olivier BERTRAND 1998-2015 */
=======
/* (C) Copyright to the author Olivier BERTRAND 1998-2014 */
>>>>>>> MariaDB/10.0
/* */ /* */
/* This file contains the COLBLK class functions. */ /* This file contains the COLBLK class functions. */
/***********************************************************************/ /***********************************************************************/
...@@ -115,11 +111,7 @@ bool COLBLK::Compare(PXOB xp) ...@@ -115,11 +111,7 @@ bool COLBLK::Compare(PXOB xp)
/***********************************************************************/ /***********************************************************************/
/* SetFormat: function used to set SELECT output format. */ /* SetFormat: function used to set SELECT output format. */
/***********************************************************************/ /***********************************************************************/
<<<<<<< HEAD
bool COLBLK::SetFormat(PGLOBAL, FORMAT& fmt) bool COLBLK::SetFormat(PGLOBAL, FORMAT& fmt)
=======
bool COLBLK::SetFormat(PGLOBAL g, FORMAT& fmt)
>>>>>>> MariaDB/10.0
{ {
fmt = Format; fmt = Format;
...@@ -183,11 +175,7 @@ bool COLBLK::InitValue(PGLOBAL g) ...@@ -183,11 +175,7 @@ bool COLBLK::InitValue(PGLOBAL g)
/***********************************************************************/ /***********************************************************************/
/* SetBuffer: prepare a column block for write operation. */ /* SetBuffer: prepare a column block for write operation. */
/***********************************************************************/ /***********************************************************************/
<<<<<<< HEAD
bool COLBLK::SetBuffer(PGLOBAL g, PVAL, bool, bool) bool COLBLK::SetBuffer(PGLOBAL g, PVAL, bool, bool)
=======
bool COLBLK::SetBuffer(PGLOBAL g, PVAL value, bool ok, bool check)
>>>>>>> MariaDB/10.0
{ {
sprintf(g->Message, MSG(UNDEFINED_AM), "SetBuffer"); sprintf(g->Message, MSG(UNDEFINED_AM), "SetBuffer");
return true; return true;
...@@ -226,11 +214,7 @@ void COLBLK::WriteColumn(PGLOBAL g) ...@@ -226,11 +214,7 @@ void COLBLK::WriteColumn(PGLOBAL g)
/***********************************************************************/ /***********************************************************************/
/* Make file output of a column descriptor block. */ /* Make file output of a column descriptor block. */
/***********************************************************************/ /***********************************************************************/
<<<<<<< HEAD
void COLBLK::Print(PGLOBAL, FILE *f, uint n) void COLBLK::Print(PGLOBAL, FILE *f, uint n)
=======
void COLBLK::Print(PGLOBAL g, FILE *f, uint n)
>>>>>>> MariaDB/10.0
{ {
char m[64]; char m[64];
int i; int i;
...@@ -253,11 +237,7 @@ void COLBLK::Print(PGLOBAL g, FILE *f, uint n) ...@@ -253,11 +237,7 @@ void COLBLK::Print(PGLOBAL g, FILE *f, uint n)
/***********************************************************************/ /***********************************************************************/
/* Make string output of a column descriptor block. */ /* Make string output of a column descriptor block. */
/***********************************************************************/ /***********************************************************************/
<<<<<<< HEAD
void COLBLK::Print(PGLOBAL, char *ps, uint) void COLBLK::Print(PGLOBAL, char *ps, uint)
=======
void COLBLK::Print(PGLOBAL g, char *ps, uint z)
>>>>>>> MariaDB/10.0
{ {
sprintf(ps, "R%d.%s", To_Tdb->GetTdb_No(), Name); sprintf(ps, "R%d.%s", To_Tdb->GetTdb_No(), Name);
} // end of Print } // end of Print
...@@ -317,15 +297,9 @@ FIDBLK::FIDBLK(PCOLUMN cp, OPVAL op) : SPCBLK(cp), Op(op) ...@@ -317,15 +297,9 @@ FIDBLK::FIDBLK(PCOLUMN cp, OPVAL op) : SPCBLK(cp), Op(op)
Buf_Type = TYPE_STRING; Buf_Type = TYPE_STRING;
*Format.Type = 'C'; *Format.Type = 'C';
Format.Length = Long; Format.Length = Long;
<<<<<<< HEAD
#if defined(__WIN__) #if defined(__WIN__)
Format.Prec = 1; // Case insensitive Format.Prec = 1; // Case insensitive
#endif // __WIN__ #endif // __WIN__
=======
#if defined(WIN32)
Format.Prec = 1; // Case insensitive
#endif // WIN32
>>>>>>> MariaDB/10.0
Constant = (!((PTDBASE)To_Tdb)->GetDef()->GetMultiple() && Constant = (!((PTDBASE)To_Tdb)->GetDef()->GetMultiple() &&
To_Tdb->GetAmType() != TYPE_AM_PLG && To_Tdb->GetAmType() != TYPE_AM_PLG &&
To_Tdb->GetAmType() != TYPE_AM_PLM); To_Tdb->GetAmType() != TYPE_AM_PLM);
...@@ -373,11 +347,7 @@ TIDBLK::TIDBLK(PCOLUMN cp) : SPCBLK(cp) ...@@ -373,11 +347,7 @@ TIDBLK::TIDBLK(PCOLUMN cp) : SPCBLK(cp)
/***********************************************************************/ /***********************************************************************/
/* ReadColumn: what this routine does is to return the table ID. */ /* ReadColumn: what this routine does is to return the table ID. */
/***********************************************************************/ /***********************************************************************/
<<<<<<< HEAD
void TIDBLK::ReadColumn(PGLOBAL) void TIDBLK::ReadColumn(PGLOBAL)
=======
void TIDBLK::ReadColumn(PGLOBAL g)
>>>>>>> MariaDB/10.0
{ {
if (Tname == NULL) { if (Tname == NULL) {
Tname = (char*)To_Tdb->GetName(); Tname = (char*)To_Tdb->GetName();
...@@ -436,11 +406,7 @@ SIDBLK::SIDBLK(PCOLUMN cp) : SPCBLK(cp) ...@@ -436,11 +406,7 @@ SIDBLK::SIDBLK(PCOLUMN cp) : SPCBLK(cp)
/***********************************************************************/ /***********************************************************************/
/* ReadColumn: what this routine does is to return the server ID. */ /* ReadColumn: what this routine does is to return the server ID. */
/***********************************************************************/ /***********************************************************************/
<<<<<<< HEAD
void SIDBLK::ReadColumn(PGLOBAL) void SIDBLK::ReadColumn(PGLOBAL)
=======
void SIDBLK::ReadColumn(PGLOBAL g)
>>>>>>> MariaDB/10.0
{ {
//if (Sname == NULL) { //if (Sname == NULL) {
Sname = (char*)To_Tdb->GetServer(); Sname = (char*)To_Tdb->GetServer();
......
...@@ -74,28 +74,19 @@ typedef struct _dbfheader { ...@@ -74,28 +74,19 @@ typedef struct _dbfheader {
//uchar Dbfox :4; /* FoxPro if equal to 3 */ //uchar Dbfox :4; /* FoxPro if equal to 3 */
uchar Version; /* Version information flags */ uchar Version; /* Version information flags */
char Filedate[3]; /* date, YYMMDD, binary. YY=year-1900 */ char Filedate[3]; /* date, YYMMDD, binary. YY=year-1900 */
<<<<<<< HEAD
private: private:
=======
private:
>>>>>>> MariaDB/10.0
/* The following four members are stored in little-endian format on disk */ /* The following four members are stored in little-endian format on disk */
char m_RecordsBuf[4]; /* records in the file */ char m_RecordsBuf[4]; /* records in the file */
char m_HeadlenBuf[2]; /* bytes in the header */ char m_HeadlenBuf[2]; /* bytes in the header */
char m_ReclenBuf[2]; /* bytes in a record */ char m_ReclenBuf[2]; /* bytes in a record */
char m_FieldsBuf[2]; /* Reserved but used to store fields */ char m_FieldsBuf[2]; /* Reserved but used to store fields */
<<<<<<< HEAD
public: public:
=======
public:
>>>>>>> MariaDB/10.0
char Incompleteflag; /* 01 if incomplete, else 00 */ char Incompleteflag; /* 01 if incomplete, else 00 */
char Encryptflag; /* 01 if encrypted, else 00 */ char Encryptflag; /* 01 if encrypted, else 00 */
char Reserved2[12]; /* for LAN use */ char Reserved2[12]; /* for LAN use */
char Mdxflag; /* 01 if production .mdx, else 00 */ char Mdxflag; /* 01 if production .mdx, else 00 */
char Language; /* Codepage */ char Language; /* Codepage */
char Reserved3[2]; char Reserved3[2];
<<<<<<< HEAD
uint Records(void) const {return uint4korr(m_RecordsBuf);} uint Records(void) const {return uint4korr(m_RecordsBuf);}
ushort Headlen(void) const {return uint2korr(m_HeadlenBuf);} ushort Headlen(void) const {return uint2korr(m_HeadlenBuf);}
...@@ -105,17 +96,6 @@ public: ...@@ -105,17 +96,6 @@ public:
void SetHeadlen(ushort num) {int2store(m_HeadlenBuf, num);} void SetHeadlen(ushort num) {int2store(m_HeadlenBuf, num);}
void SetReclen(ushort num) {int2store(m_ReclenBuf, num);} void SetReclen(ushort num) {int2store(m_ReclenBuf, num);}
void SetFields(ushort num) {int2store(m_FieldsBuf, num);} void SetFields(ushort num) {int2store(m_FieldsBuf, num);}
=======
uint Records() const { return uint4korr(m_RecordsBuf); }
ushort Headlen() const { return uint2korr(m_HeadlenBuf); }
ushort Reclen() const { return uint2korr(m_ReclenBuf); }
ushort Fields() const { return uint2korr(m_FieldsBuf); }
void SetHeadlen(ushort num) { int2store(m_HeadlenBuf, num); }
void SetReclen(ushort num) { int2store(m_ReclenBuf, num); }
void SetFields(ushort num) { int2store(m_FieldsBuf, num); }
>>>>>>> MariaDB/10.0
} DBFHEADER; } DBFHEADER;
/****************************************************************************/ /****************************************************************************/
...@@ -430,22 +410,13 @@ int DBFBASE::ScanHeader(PGLOBAL g, PSZ fname, int lrecl, char *defpath) ...@@ -430,22 +410,13 @@ int DBFBASE::ScanHeader(PGLOBAL g, PSZ fname, int lrecl, char *defpath)
} else if (rc == RC_FX) } else if (rc == RC_FX)
return -1; return -1;
<<<<<<< HEAD
if ((int)header.Reclen() != lrecl) { if ((int)header.Reclen() != lrecl) {
=======
if ((int) header.Reclen() != lrecl) {
>>>>>>> MariaDB/10.0
sprintf(g->Message, MSG(BAD_LRECL), lrecl, header.Reclen()); sprintf(g->Message, MSG(BAD_LRECL), lrecl, header.Reclen());
return -1; return -1;
} // endif Lrecl } // endif Lrecl
<<<<<<< HEAD
Records = (int)header.Records(); Records = (int)header.Records();
return (int)header.Headlen(); return (int)header.Headlen();
=======
Records = (int) header.Records();
return (int) header.Headlen();
>>>>>>> MariaDB/10.0
} // end of ScanHeader } // end of ScanHeader
/* ---------------------------- Class DBFFAM ------------------------------ */ /* ---------------------------- Class DBFFAM ------------------------------ */
...@@ -606,13 +577,8 @@ bool DBFFAM::AllocateBuffer(PGLOBAL g) ...@@ -606,13 +577,8 @@ bool DBFFAM::AllocateBuffer(PGLOBAL g)
header->Filedate[0] = datm->tm_year - 100; header->Filedate[0] = datm->tm_year - 100;
header->Filedate[1] = datm->tm_mon + 1; header->Filedate[1] = datm->tm_mon + 1;
header->Filedate[2] = datm->tm_mday; header->Filedate[2] = datm->tm_mday;
<<<<<<< HEAD
header->SetHeadlen((ushort)hlen); header->SetHeadlen((ushort)hlen);
header->SetReclen((ushort)reclen); header->SetReclen((ushort)reclen);
=======
header->SetHeadlen((ushort) hlen);
header->SetReclen((ushort) reclen);
>>>>>>> MariaDB/10.0
descp = (DESCRIPTOR*)header; descp = (DESCRIPTOR*)header;
// Currently only standard Xbase types are supported // Currently only standard Xbase types are supported
...@@ -673,22 +639,13 @@ bool DBFFAM::AllocateBuffer(PGLOBAL g) ...@@ -673,22 +639,13 @@ bool DBFFAM::AllocateBuffer(PGLOBAL g)
DBFHEADER header; DBFHEADER header;
if ((rc = dbfhead(g, Stream, Tdbp->GetFile(g), &header)) == RC_OK) { if ((rc = dbfhead(g, Stream, Tdbp->GetFile(g), &header)) == RC_OK) {
<<<<<<< HEAD
if (Lrecl != (int)header.Reclen()) { if (Lrecl != (int)header.Reclen()) {
=======
if (Lrecl != (int) header.Reclen()) {
>>>>>>> MariaDB/10.0
sprintf(g->Message, MSG(BAD_LRECL), Lrecl, header.Reclen()); sprintf(g->Message, MSG(BAD_LRECL), Lrecl, header.Reclen());
return true; return true;
} // endif Lrecl } // endif Lrecl
<<<<<<< HEAD
Records = (int)header.Records(); Records = (int)header.Records();
Headlen = (int)header.Headlen(); Headlen = (int)header.Headlen();
=======
Records = (int) header.Records();
Headlen = (int) header.Headlen();
>>>>>>> MariaDB/10.0
} else if (rc == RC_NF) { } else if (rc == RC_NF) {
Records = 0; Records = 0;
Headlen = 0; Headlen = 0;
...@@ -924,16 +881,10 @@ void DBFFAM::CloseTableFile(PGLOBAL g, bool abort) ...@@ -924,16 +881,10 @@ void DBFFAM::CloseTableFile(PGLOBAL g, bool abort)
if ((Stream= global_fopen(g, MSGID_OPEN_MODE_STRERROR, filename, "r+b"))) if ((Stream= global_fopen(g, MSGID_OPEN_MODE_STRERROR, filename, "r+b")))
{ {
char nRecords[4]; char nRecords[4];
<<<<<<< HEAD
int4store(nRecords, n); int4store(nRecords, n);
fseek(Stream, 4, SEEK_SET); // Get header.Records position fseek(Stream, 4, SEEK_SET); // Get header.Records position
fwrite(nRecords, sizeof(nRecords), 1, Stream); fwrite(nRecords, sizeof(nRecords), 1, Stream);
=======
int4store(&nRecords, n);
fseek(Stream, 4, SEEK_SET); // Get header.Records position
fwrite(&nRecords, sizeof(nRecords), 1, Stream);
>>>>>>> MariaDB/10.0
fclose(Stream); fclose(Stream);
Stream= NULL; Stream= NULL;
Records= n; // Update Records value Records= n; // Update Records value
...@@ -1008,22 +959,13 @@ bool DBMFAM::AllocateBuffer(PGLOBAL g) ...@@ -1008,22 +959,13 @@ bool DBMFAM::AllocateBuffer(PGLOBAL g)
/************************************************************************/ /************************************************************************/
DBFHEADER *hp = (DBFHEADER*)Memory; DBFHEADER *hp = (DBFHEADER*)Memory;
<<<<<<< HEAD
if (Lrecl != (int)hp->Reclen()) { if (Lrecl != (int)hp->Reclen()) {
=======
if (Lrecl != (int) hp->Reclen()) {
>>>>>>> MariaDB/10.0
sprintf(g->Message, MSG(BAD_LRECL), Lrecl, hp->Reclen()); sprintf(g->Message, MSG(BAD_LRECL), Lrecl, hp->Reclen());
return true; return true;
} // endif Lrecl } // endif Lrecl
<<<<<<< HEAD
Records = (int)hp->Records(); Records = (int)hp->Records();
Headlen = (int)hp->Headlen(); Headlen = (int)hp->Headlen();
=======
Records = (int) hp->Records();
Headlen = (int) hp->Headlen();
>>>>>>> MariaDB/10.0
} // endif Headlen } // endif Headlen
/**************************************************************************/ /**************************************************************************/
......
...@@ -410,11 +410,7 @@ void Json_Array_Add_deinit(UDF_INIT* initid) ...@@ -410,11 +410,7 @@ void Json_Array_Add_deinit(UDF_INIT* initid)
} // end of Json_Array_Add_deinit } // end of Json_Array_Add_deinit
/***********************************************************************/ /***********************************************************************/
<<<<<<< HEAD
/* Delete a value from a Json array. */ /* Delete a value from a Json array. */
=======
/* Add values to a Json array. */
>>>>>>> MariaDB/10.0
/***********************************************************************/ /***********************************************************************/
my_bool Json_Array_Delete_init(UDF_INIT *initid, UDF_ARGS *args, char *message) my_bool Json_Array_Delete_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
{ {
...@@ -433,11 +429,7 @@ my_bool Json_Array_Delete_init(UDF_INIT *initid, UDF_ARGS *args, char *message) ...@@ -433,11 +429,7 @@ my_bool Json_Array_Delete_init(UDF_INIT *initid, UDF_ARGS *args, char *message)
} // end of Json_Array_Delete_init } // end of Json_Array_Delete_init
char *Json_Array_Delete(UDF_INIT *initid, UDF_ARGS *args, char *result, char *Json_Array_Delete(UDF_INIT *initid, UDF_ARGS *args, char *result,
<<<<<<< HEAD
unsigned long *res_length, char *, char *) unsigned long *res_length, char *, char *)
=======
unsigned long *res_length, char *is_null, char *error)
>>>>>>> MariaDB/10.0
{ {
char *str; char *str;
int n; int n;
...@@ -459,11 +451,7 @@ char *Json_Array_Delete(UDF_INIT *initid, UDF_ARGS *args, char *result, ...@@ -459,11 +451,7 @@ char *Json_Array_Delete(UDF_INIT *initid, UDF_ARGS *args, char *result,
} else { } else {
n = *(int*)args->args[1]; n = *(int*)args->args[1];
arp = jvp->GetArray(); arp = jvp->GetArray();
<<<<<<< HEAD
arp->DeleteValue(n); arp->DeleteValue(n);
=======
arp->DeleteValue(n - 1);
>>>>>>> MariaDB/10.0
arp->InitArray(g); arp->InitArray(g);
if (!(str = Serialize(g, arp, NULL, 0))) { if (!(str = Serialize(g, arp, NULL, 0))) {
......
...@@ -21,15 +21,9 @@ ...@@ -21,15 +21,9 @@
#include "msgid.h" #include "msgid.h"
#endif // NEWMSG #endif // NEWMSG
<<<<<<< HEAD
#if !defined(__WIN__) #if !defined(__WIN__)
#define stricmp strcasecmp #define stricmp strcasecmp
#endif // !__WIN__ #endif // !__WIN__
=======
#if !defined(WIN32)
#define stricmp strcasecmp
#endif // !WIN32
>>>>>>> MariaDB/10.0
char *msglang(void); char *msglang(void);
......
...@@ -1482,11 +1482,6 @@ bool XMLCOL::ParseXpath(PGLOBAL g, bool mode) ...@@ -1482,11 +1482,6 @@ bool XMLCOL::ParseXpath(PGLOBAL g, bool mode)
// HTML like table, columns are retrieved by position // HTML like table, columns are retrieved by position
new(this) XPOSCOL(Value); // Change the class of this column new(this) XPOSCOL(Value); // Change the class of this column
Inod = -1; Inod = -1;
<<<<<<< HEAD
=======
// Tdbp->Hasnod = true;
// return false;
>>>>>>> MariaDB/10.0
} else if (Type == 0 && !mode) { } else if (Type == 0 && !mode) {
strcat(strcat(pbuf, "@"), Name); strcat(strcat(pbuf, "@"), Name);
} else { // Type == 1 } else { // Type == 1
......
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