summaryrefslogtreecommitdiff
path: root/storage/connect/cmgfam.cpp
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2021-02-16 14:56:59 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2021-02-16 14:56:59 +0100
commite0072fadcb00edae74e748aee3148075b9cddae2 (patch)
tree625d5c0869cfbb322a2b4cdaab453e17fd5d31bf /storage/connect/cmgfam.cpp
parent1146e98b3af3e2b15df0598a860f4571663a98d0 (diff)
parentae7989ca2059869f81c837509e5ff554f7f63562 (diff)
downloadmariadb-git-10.6-halfmerge.tar.gz
Merge branch 'bb-10.5-release' into bb-10.6-release10.6-halfmerge
Diffstat (limited to 'storage/connect/cmgfam.cpp')
-rw-r--r--storage/connect/cmgfam.cpp49
1 files changed, 44 insertions, 5 deletions
diff --git a/storage/connect/cmgfam.cpp b/storage/connect/cmgfam.cpp
index 579b5b919a7..690c087c2bb 100644
--- a/storage/connect/cmgfam.cpp
+++ b/storage/connect/cmgfam.cpp
@@ -1,11 +1,11 @@
/************** CMGFAM C++ Program Source Code File (.CPP) *************/
/* PROGRAM NAME: cmgfam.cpp */
/* ------------- */
-/* Version 1.4 */
+/* Version 1.5 */
/* */
/* COPYRIGHT: */
/* ---------- */
-/* (C) Copyright to the author Olivier BERTRAND 20017 */
+/* (C) Copyright to the author Olivier BERTRAND 20017 - 2020 */
/* */
/* WHAT THIS PROGRAM DOES: */
/* ----------------------- */
@@ -29,7 +29,11 @@
#include "reldef.h"
#include "filamtxt.h"
#include "tabdos.h"
+#if defined(BSON_SUPPORT)
+#include "tabbson.h"
+#else
#include "tabjson.h"
+#endif // BSON_SUPPORT
#include "cmgfam.h"
#if defined(UNIX) || defined(UNIV_LINUX)
@@ -53,6 +57,7 @@ CMGFAM::CMGFAM(PJDEF tdp) : DOSFAM((PDOSDEF)NULL)
Pcg.Options = tdp->Options;
Pcg.Filter = tdp->Filter;
Pcg.Pipe = tdp->Pipe && tdp->Options != NULL;
+ Lrecl = tdp->Lrecl + tdp->Ending;
} else {
Pcg.Uristr = NULL;
Pcg.Db_name = NULL;
@@ -60,21 +65,55 @@ CMGFAM::CMGFAM(PJDEF tdp) : DOSFAM((PDOSDEF)NULL)
Pcg.Options = NULL;
Pcg.Filter = NULL;
Pcg.Pipe = false;
+ Lrecl = 0;
} // endif tdp
To_Fbt = NULL;
Mode = MODE_ANY;
Done = false;
- Lrecl = tdp->Lrecl + tdp->Ending;
} // end of CMGFAM standard constructor
- CMGFAM::CMGFAM(PCMGFAM tdfp) : DOSFAM(tdfp)
+#if defined(BSON_SUPPORT)
+ /***********************************************************************/
+/* Constructors. */
+/***********************************************************************/
+CMGFAM::CMGFAM(PBDEF tdp) : DOSFAM((PDOSDEF)NULL)
+{
+ Cmgp = NULL;
+ Pcg.Tdbp = NULL;
+
+ if (tdp) {
+ Pcg.Uristr = tdp->Uri;
+ Pcg.Db_name = tdp->Schema;
+ Pcg.Coll_name = tdp->Collname;
+ Pcg.Options = tdp->Options;
+ Pcg.Filter = tdp->Filter;
+ Pcg.Pipe = tdp->Pipe && tdp->Options != NULL;
+ Lrecl = tdp->Lrecl + tdp->Ending;
+ } else {
+ Pcg.Uristr = NULL;
+ Pcg.Db_name = NULL;
+ Pcg.Coll_name = NULL;
+ Pcg.Options = NULL;
+ Pcg.Filter = NULL;
+ Pcg.Pipe = false;
+ Lrecl = 0;
+ } // endif tdp
+
+ To_Fbt = NULL;
+ Mode = MODE_ANY;
+ Done = false;
+} // end of CMGFAM standard constructor
+#endif // BSON_SUPPORT
+
+CMGFAM::CMGFAM(PCMGFAM tdfp) : DOSFAM(tdfp)
{
+ Cmgp = tdfp->Cmgp;
Pcg = tdfp->Pcg;
To_Fbt = tdfp->To_Fbt;
Mode = tdfp->Mode;
Done = tdfp->Done;
- } // end of CMGFAM copy constructor
+} // end of CMGFAM copy constructor
/***********************************************************************/
/* Reset: reset position values at the beginning of file. */