mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Add mongoDB access to json tables.
Filalize replacement oflongjmp by throw. modified: storage/connect/CMakeLists.txt modified: storage/connect/array.cpp modified: storage/connect/blkfil.cpp modified: storage/connect/colblk.cpp modified: storage/connect/connect.cc modified: storage/connect/filamtxt.cpp modified: storage/connect/filamvct.cpp modified: storage/connect/filter.cpp modified: storage/connect/ha_connect.cc modified: storage/connect/jdbconn.cpp modified: storage/connect/json.cpp modified: storage/connect/jsonudf.cpp modified: storage/connect/odbconn.cpp modified: storage/connect/plgdbsem.h modified: storage/connect/plgdbutl.cpp modified: storage/connect/plugutil.cpp modified: storage/connect/tabdos.cpp modified: storage/connect/tabfix.cpp modified: storage/connect/tabfmt.cpp modified: storage/connect/tabjson.cpp modified: storage/connect/tabjson.h modified: storage/connect/tabmul.cpp modified: storage/connect/tabmysql.cpp modified: storage/connect/tabpivot.cpp modified: storage/connect/tabsys.cpp modified: storage/connect/tabvct.cpp modified: storage/connect/tabvir.cpp modified: storage/connect/tabxml.cpp modified: storage/connect/valblk.cpp modified: storage/connect/value.cpp modified: storage/connect/xindex.cpp modified: storage/connect/xobject.cpp
This commit is contained in:
@@ -1314,11 +1314,7 @@ void TDBXML::CloseDB(PGLOBAL g)
|
||||
Docp->CloseDoc(g, To_Xb);
|
||||
|
||||
// This causes a crash in Diagnostics_area::set_error_status
|
||||
//#if defined(USE_TRY)
|
||||
// throw TYPE_AM_XML;
|
||||
//#else // !USE_TRY
|
||||
// longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
|
||||
//#endif // !USE_TRY
|
||||
} // endif DumpDoc
|
||||
|
||||
} // endif Changed
|
||||
@@ -1641,11 +1637,7 @@ void XMLCOL::ReadColumn(PGLOBAL g)
|
||||
if (ValNode->GetType() != XML_ELEMENT_NODE &&
|
||||
ValNode->GetType() != XML_ATTRIBUTE_NODE) {
|
||||
sprintf(g->Message, MSG(BAD_VALNODE), ValNode->GetType(), Name);
|
||||
#if defined(USE_TRY)
|
||||
throw TYPE_AM_XML;
|
||||
#else // !USE_TRY
|
||||
longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
|
||||
#endif // !USE_TRY
|
||||
} // endif type
|
||||
|
||||
// Get the Xname value from the XML file
|
||||
@@ -1656,11 +1648,7 @@ void XMLCOL::ReadColumn(PGLOBAL g)
|
||||
PushWarning(g, Tdbp);
|
||||
break;
|
||||
default:
|
||||
#if defined(USE_TRY)
|
||||
throw TYPE_AM_XML;
|
||||
#else // !USE_TRY
|
||||
longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
|
||||
#endif // !USE_TRY
|
||||
} // endswitch
|
||||
|
||||
Value->SetValue_psz(Valbuf);
|
||||
@@ -1711,11 +1699,7 @@ void XMLCOL::WriteColumn(PGLOBAL g)
|
||||
/* For columns having an Xpath, the Clist must be updated. */
|
||||
/*********************************************************************/
|
||||
if (Tdbp->CheckRow(g, Nod || Tdbp->Colname))
|
||||
#if defined(USE_TRY)
|
||||
throw TYPE_AM_XML;
|
||||
#else // !USE_TRY
|
||||
longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
|
||||
#endif // !USE_TRY
|
||||
|
||||
/*********************************************************************/
|
||||
/* Null values are represented by no node. */
|
||||
@@ -1787,15 +1771,7 @@ void XMLCOL::WriteColumn(PGLOBAL g)
|
||||
|
||||
if (ColNode == NULL) {
|
||||
strcpy(g->Message, MSG(COL_ALLOC_ERR));
|
||||
#if defined(USE_TRY)
|
||||
throw TYPE_AM_XML;
|
||||
#else // !USE_TRY
|
||||
#if defined(USE_TRY)
|
||||
throw TYPE_AM_XML;
|
||||
#else // !USE_TRY
|
||||
longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
|
||||
#endif // !USE_TRY
|
||||
#endif // !USE_TRY
|
||||
} // endif ColNode
|
||||
|
||||
} // endif ColNode
|
||||
@@ -1824,11 +1800,7 @@ void XMLCOL::WriteColumn(PGLOBAL g)
|
||||
|
||||
if (strlen(p) > (unsigned)Long) {
|
||||
sprintf(g->Message, MSG(VALUE_TOO_LONG), p, Name, Long);
|
||||
#if defined(USE_TRY)
|
||||
throw TYPE_AM_XML;
|
||||
#else // !USE_TRY
|
||||
longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
|
||||
#endif // !USE_TRY
|
||||
} else
|
||||
strcpy(Valbuf, p);
|
||||
|
||||
@@ -1878,11 +1850,7 @@ void XMULCOL::ReadColumn(PGLOBAL g)
|
||||
if (ValNode->GetType() != XML_ELEMENT_NODE &&
|
||||
ValNode->GetType() != XML_ATTRIBUTE_NODE) {
|
||||
sprintf(g->Message, MSG(BAD_VALNODE), ValNode->GetType(), Name);
|
||||
#if defined(USE_TRY)
|
||||
throw TYPE_AM_XML;
|
||||
#else // !USE_TRY
|
||||
longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
|
||||
#endif // !USE_TRY
|
||||
} // endif type
|
||||
|
||||
// Get the Xname value from the XML file
|
||||
@@ -1968,11 +1936,7 @@ void XMULCOL::WriteColumn(PGLOBAL g)
|
||||
/* For columns having an Xpath, the Clist must be updated. */
|
||||
/*********************************************************************/
|
||||
if (Tdbp->CheckRow(g, Nod))
|
||||
#if defined(USE_TRY)
|
||||
throw TYPE_AM_XML;
|
||||
#else // !USE_TRY
|
||||
longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
|
||||
#endif // !USE_TRY
|
||||
|
||||
/*********************************************************************/
|
||||
/* Find the column and value nodes to update or insert. */
|
||||
@@ -2021,11 +1985,7 @@ void XMULCOL::WriteColumn(PGLOBAL g)
|
||||
|
||||
if (len > 1 && !Tdbp->Xpand) {
|
||||
sprintf(g->Message, MSG(BAD_VAL_UPDATE), Name);
|
||||
#if defined(USE_TRY)
|
||||
throw TYPE_AM_XML;
|
||||
#else // !USE_TRY
|
||||
longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
|
||||
#endif // !USE_TRY
|
||||
} else
|
||||
ValNode = Nlx->GetItem(g, Tdbp->Nsub, Vxnp);
|
||||
|
||||
@@ -2067,11 +2027,7 @@ void XMULCOL::WriteColumn(PGLOBAL g)
|
||||
|
||||
if (ColNode == NULL) {
|
||||
strcpy(g->Message, MSG(COL_ALLOC_ERR));
|
||||
#if defined(USE_TRY)
|
||||
throw TYPE_AM_XML;
|
||||
#else // !USE_TRY
|
||||
longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
|
||||
#endif // !USE_TRY
|
||||
} // endif ColNode
|
||||
|
||||
} // endif ColNode
|
||||
@@ -2100,11 +2056,7 @@ void XMULCOL::WriteColumn(PGLOBAL g)
|
||||
|
||||
if (strlen(p) > (unsigned)Long) {
|
||||
sprintf(g->Message, MSG(VALUE_TOO_LONG), p, Name, Long);
|
||||
#if defined(USE_TRY)
|
||||
throw TYPE_AM_XML;
|
||||
#else // !USE_TRY
|
||||
longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
|
||||
#endif // !USE_TRY
|
||||
} else
|
||||
strcpy(Valbuf, p);
|
||||
|
||||
@@ -2136,11 +2088,7 @@ void XPOSCOL::ReadColumn(PGLOBAL g)
|
||||
|
||||
if (Tdbp->Clist == NULL) {
|
||||
strcpy(g->Message, MSG(MIS_TAG_LIST));
|
||||
#if defined(USE_TRY)
|
||||
throw TYPE_AM_XML;
|
||||
#else // !USE_TRY
|
||||
longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
|
||||
#endif // !USE_TRY
|
||||
} // endif Clist
|
||||
|
||||
if ((ValNode = Tdbp->Clist->GetItem(g, Rank, Vxnp))) {
|
||||
@@ -2152,11 +2100,7 @@ void XPOSCOL::ReadColumn(PGLOBAL g)
|
||||
PushWarning(g, Tdbp);
|
||||
break;
|
||||
default:
|
||||
#if defined(USE_TRY)
|
||||
throw TYPE_AM_XML;
|
||||
#else // !USE_TRY
|
||||
longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
|
||||
#endif // !USE_TRY
|
||||
} // endswitch
|
||||
|
||||
Value->SetValue_psz(Valbuf);
|
||||
@@ -2207,22 +2151,14 @@ void XPOSCOL::WriteColumn(PGLOBAL g)
|
||||
/* For all columns the Clist must be updated. */
|
||||
/*********************************************************************/
|
||||
if (Tdbp->CheckRow(g, true))
|
||||
#if defined(USE_TRY)
|
||||
throw TYPE_AM_XML;
|
||||
#else // !USE_TRY
|
||||
longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
|
||||
#endif // !USE_TRY
|
||||
|
||||
/*********************************************************************/
|
||||
/* Find the column and value nodes to update or insert. */
|
||||
/*********************************************************************/
|
||||
if (Tdbp->Clist == NULL) {
|
||||
strcpy(g->Message, MSG(MIS_TAG_LIST));
|
||||
#if defined(USE_TRY)
|
||||
throw TYPE_AM_XML;
|
||||
#else // !USE_TRY
|
||||
longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
|
||||
#endif // !USE_TRY
|
||||
} // endif Clist
|
||||
|
||||
n = Tdbp->Clist->GetLength();
|
||||
@@ -2247,11 +2183,7 @@ void XPOSCOL::WriteColumn(PGLOBAL g)
|
||||
|
||||
if (strlen(p) > (unsigned)Long) {
|
||||
sprintf(g->Message, MSG(VALUE_TOO_LONG), p, Name, Long);
|
||||
#if defined(USE_TRY)
|
||||
throw TYPE_AM_XML;
|
||||
#else // !USE_TRY
|
||||
longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
|
||||
#endif // !USE_TRY
|
||||
} else
|
||||
strcpy(Valbuf, p);
|
||||
|
||||
|
Reference in New Issue
Block a user