mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Fix unhandled exception:
Force type int for ENUMs. Replace remaining longjmp. modified: storage/connect/array.cpp modified: storage/connect/colblk.cpp modified: storage/connect/connect.cc modified: storage/connect/filter.cpp modified: storage/connect/jdbconn.cpp modified: storage/connect/plgdbutl.cpp modified: storage/connect/tabdos.cpp modified: storage/connect/tabvir.cpp modified: storage/connect/tabxml.cpp modified: storage/connect/value.cpp modified: storage/connect/xobject.cpp
This commit is contained in:
@@ -519,7 +519,7 @@ bool ARRAY::FilTest(PGLOBAL g, PVAL valp, OPVAL opc, int opm)
|
|||||||
|
|
||||||
} else if (opc != OP_EXIST) {
|
} else if (opc != OP_EXIST) {
|
||||||
sprintf(g->Message, MSG(MISSING_ARG), opc);
|
sprintf(g->Message, MSG(MISSING_ARG), opc);
|
||||||
throw TYPE_ARRAY;
|
throw (int)TYPE_ARRAY;
|
||||||
} else // OP_EXIST
|
} else // OP_EXIST
|
||||||
return Nval > 0;
|
return Nval > 0;
|
||||||
|
|
||||||
@@ -681,14 +681,14 @@ void ARRAY::SetPrecision(PGLOBAL g, int p)
|
|||||||
{
|
{
|
||||||
if (Vblp == NULL) {
|
if (Vblp == NULL) {
|
||||||
strcpy(g->Message, MSG(PREC_VBLP_NULL));
|
strcpy(g->Message, MSG(PREC_VBLP_NULL));
|
||||||
throw TYPE_ARRAY;
|
throw (int)TYPE_ARRAY;
|
||||||
} // endif Vblp
|
} // endif Vblp
|
||||||
|
|
||||||
bool was = Vblp->IsCi();
|
bool was = Vblp->IsCi();
|
||||||
|
|
||||||
if (was && !p) {
|
if (was && !p) {
|
||||||
strcpy(g->Message, MSG(BAD_SET_CASE));
|
strcpy(g->Message, MSG(BAD_SET_CASE));
|
||||||
throw TYPE_ARRAY;
|
throw (int)TYPE_ARRAY;
|
||||||
} // endif Vblp
|
} // endif Vblp
|
||||||
|
|
||||||
if (was || !p)
|
if (was || !p)
|
||||||
@@ -699,7 +699,7 @@ void ARRAY::SetPrecision(PGLOBAL g, int p)
|
|||||||
if (!was && Type == TYPE_STRING)
|
if (!was && Type == TYPE_STRING)
|
||||||
// Must be resorted to eliminate duplicate strings
|
// Must be resorted to eliminate duplicate strings
|
||||||
if (Sort(g))
|
if (Sort(g))
|
||||||
throw TYPE_ARRAY;
|
throw (int)TYPE_ARRAY;
|
||||||
|
|
||||||
} // end of SetPrecision
|
} // end of SetPrecision
|
||||||
|
|
||||||
|
@@ -197,7 +197,7 @@ int COLBLK::GetLengthEx(void)
|
|||||||
void COLBLK::ReadColumn(PGLOBAL g)
|
void COLBLK::ReadColumn(PGLOBAL g)
|
||||||
{
|
{
|
||||||
sprintf(g->Message, MSG(UNDEFINED_AM), "ReadColumn");
|
sprintf(g->Message, MSG(UNDEFINED_AM), "ReadColumn");
|
||||||
throw TYPE_COLBLK;
|
throw (int)TYPE_COLBLK;
|
||||||
} // end of ReadColumn
|
} // end of ReadColumn
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
@@ -208,7 +208,7 @@ void COLBLK::ReadColumn(PGLOBAL g)
|
|||||||
void COLBLK::WriteColumn(PGLOBAL g)
|
void COLBLK::WriteColumn(PGLOBAL g)
|
||||||
{
|
{
|
||||||
sprintf(g->Message, MSG(UNDEFINED_AM), "WriteColumn");
|
sprintf(g->Message, MSG(UNDEFINED_AM), "WriteColumn");
|
||||||
throw TYPE_COLBLK;
|
throw (int)TYPE_COLBLK;
|
||||||
} // end of WriteColumn
|
} // end of WriteColumn
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
@@ -262,7 +262,7 @@ SPCBLK::SPCBLK(PCOLUMN cp)
|
|||||||
void SPCBLK::WriteColumn(PGLOBAL g)
|
void SPCBLK::WriteColumn(PGLOBAL g)
|
||||||
{
|
{
|
||||||
sprintf(g->Message, MSG(SPCOL_READONLY), Name);
|
sprintf(g->Message, MSG(SPCOL_READONLY), Name);
|
||||||
throw TYPE_COLBLK;
|
throw (int)TYPE_COLBLK;
|
||||||
} // end of WriteColumn
|
} // end of WriteColumn
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
|
@@ -188,7 +188,7 @@ PTDB CntGetTDB(PGLOBAL g, LPCSTR name, MODE mode, PHC h)
|
|||||||
PTDB tdbp;
|
PTDB tdbp;
|
||||||
PTABLE tabp;
|
PTABLE tabp;
|
||||||
PDBUSER dup = PlgGetUser(g);
|
PDBUSER dup = PlgGetUser(g);
|
||||||
volatile PCATLG cat = (dup) ? dup->Catalog : NULL; // Safe over longjmp
|
volatile PCATLG cat = (dup) ? dup->Catalog : NULL; // Safe over throw
|
||||||
|
|
||||||
if (trace)
|
if (trace)
|
||||||
printf("CntGetTDB: name=%s mode=%d cat=%p\n", name, mode, cat);
|
printf("CntGetTDB: name=%s mode=%d cat=%p\n", name, mode, cat);
|
||||||
|
@@ -94,7 +94,7 @@ BYTE OpBmp(PGLOBAL g, OPVAL opc)
|
|||||||
case OP_EXIST: bt = 0x00; break;
|
case OP_EXIST: bt = 0x00; break;
|
||||||
default:
|
default:
|
||||||
sprintf(g->Message, MSG(BAD_FILTER_OP), opc);
|
sprintf(g->Message, MSG(BAD_FILTER_OP), opc);
|
||||||
throw TYPE_ARRAY;
|
throw (int)TYPE_ARRAY;
|
||||||
} // endswitch opc
|
} // endswitch opc
|
||||||
|
|
||||||
return bt;
|
return bt;
|
||||||
@@ -1804,7 +1804,7 @@ PFIL PrepareFilter(PGLOBAL g, PFIL fp, bool having)
|
|||||||
break; // Remove eventual ending separator(s)
|
break; // Remove eventual ending separator(s)
|
||||||
|
|
||||||
// if (fp->Convert(g, having))
|
// if (fp->Convert(g, having))
|
||||||
// throw TYPE_ARRAY;
|
// (int)throw TYPE_ARRAY;
|
||||||
|
|
||||||
filp = fp;
|
filp = fp;
|
||||||
fp = fp->Next;
|
fp = fp->Next;
|
||||||
@@ -1837,7 +1837,7 @@ DllExport bool ApplyFilter(PGLOBAL g, PFIL filp)
|
|||||||
// return TRUE;
|
// return TRUE;
|
||||||
|
|
||||||
if (filp->Eval(g))
|
if (filp->Eval(g))
|
||||||
throw TYPE_FILTER;
|
throw (int)TYPE_FILTER;
|
||||||
|
|
||||||
if (trace > 1)
|
if (trace > 1)
|
||||||
htrc("PlugFilter filp=%p result=%d\n",
|
htrc("PlugFilter filp=%p result=%d\n",
|
||||||
|
@@ -1215,7 +1215,7 @@ void JDBConn::SetColumnValue(int rank, PSZ name, PVAL val)
|
|||||||
if (rank == 0)
|
if (rank == 0)
|
||||||
if (!name || (jn = env->NewStringUTF(name)) == nullptr) {
|
if (!name || (jn = env->NewStringUTF(name)) == nullptr) {
|
||||||
sprintf(g->Message, "Fail to allocate jstring %s", SVP(name));
|
sprintf(g->Message, "Fail to allocate jstring %s", SVP(name));
|
||||||
throw TYPE_AM_JDBC;
|
throw (int)TYPE_AM_JDBC;
|
||||||
} // endif name
|
} // endif name
|
||||||
|
|
||||||
// Returns 666 is case of error
|
// Returns 666 is case of error
|
||||||
@@ -1223,7 +1223,7 @@ void JDBConn::SetColumnValue(int rank, PSZ name, PVAL val)
|
|||||||
|
|
||||||
if (Check((ctyp == 666) ? -1 : 1)) {
|
if (Check((ctyp == 666) ? -1 : 1)) {
|
||||||
sprintf(g->Message, "Getting ctyp: %s", Msg);
|
sprintf(g->Message, "Getting ctyp: %s", Msg);
|
||||||
throw TYPE_AM_JDBC;
|
throw (int)TYPE_AM_JDBC;
|
||||||
} // endif Check
|
} // endif Check
|
||||||
|
|
||||||
if (val->GetNullable())
|
if (val->GetNullable())
|
||||||
@@ -1334,7 +1334,7 @@ void JDBConn::SetColumnValue(int rank, PSZ name, PVAL val)
|
|||||||
env->DeleteLocalRef(jn);
|
env->DeleteLocalRef(jn);
|
||||||
|
|
||||||
sprintf(g->Message, "SetColumnValue: %s rank=%d ctyp=%d", Msg, rank, (int)ctyp);
|
sprintf(g->Message, "SetColumnValue: %s rank=%d ctyp=%d", Msg, rank, (int)ctyp);
|
||||||
throw TYPE_AM_JDBC;
|
throw (int)TYPE_AM_JDBC;
|
||||||
} // endif Check
|
} // endif Check
|
||||||
|
|
||||||
if (rank == 0)
|
if (rank == 0)
|
||||||
|
@@ -473,7 +473,7 @@ bool PlugEvalLike(PGLOBAL g, LPCSTR strg, LPCSTR pat, bool ci)
|
|||||||
tp = g->Message;
|
tp = g->Message;
|
||||||
else if (!(tp = new char[strlen(pat) + strlen(strg) + 2])) {
|
else if (!(tp = new char[strlen(pat) + strlen(strg) + 2])) {
|
||||||
strcpy(g->Message, MSG(NEW_RETURN_NULL));
|
strcpy(g->Message, MSG(NEW_RETURN_NULL));
|
||||||
throw OP_LIKE;
|
throw (int)OP_LIKE;
|
||||||
} /* endif tp */
|
} /* endif tp */
|
||||||
|
|
||||||
sp = tp + strlen(pat) + 1;
|
sp = tp + strlen(pat) + 1;
|
||||||
@@ -484,7 +484,7 @@ bool PlugEvalLike(PGLOBAL g, LPCSTR strg, LPCSTR pat, bool ci)
|
|||||||
tp = g->Message; /* Use this as temporary work space. */
|
tp = g->Message; /* Use this as temporary work space. */
|
||||||
else if (!(tp = new char[strlen(pat) + 1])) {
|
else if (!(tp = new char[strlen(pat) + 1])) {
|
||||||
strcpy(g->Message, MSG(NEW_RETURN_NULL));
|
strcpy(g->Message, MSG(NEW_RETURN_NULL));
|
||||||
throw OP_LIKE;
|
throw (int)OP_LIKE;
|
||||||
} /* endif tp */
|
} /* endif tp */
|
||||||
|
|
||||||
strcpy(tp, pat); /* Make a copy to be worked into */
|
strcpy(tp, pat); /* Make a copy to be worked into */
|
||||||
|
@@ -2736,7 +2736,7 @@ void DOSCOL::WriteColumn(PGLOBAL g)
|
|||||||
if (Value->GetBinValue(p, Long, Status)) {
|
if (Value->GetBinValue(p, Long, Status)) {
|
||||||
sprintf(g->Message, MSG(BIN_F_TOO_LONG),
|
sprintf(g->Message, MSG(BIN_F_TOO_LONG),
|
||||||
Name, Value->GetSize(), Long);
|
Name, Value->GetSize(), Long);
|
||||||
longjmp(g->jumper[g->jump_level], 31);
|
throw 31;
|
||||||
} // endif
|
} // endif
|
||||||
|
|
||||||
} // end of WriteColumn
|
} // end of WriteColumn
|
||||||
|
@@ -1265,7 +1265,7 @@ char *MGOCOL::Mini(PGLOBAL g, const bson_t *bson, bool b)
|
|||||||
|
|
||||||
if (i >= Long) {
|
if (i >= Long) {
|
||||||
sprintf(g->Message, "Value too long for column %s", Name);
|
sprintf(g->Message, "Value too long for column %s", Name);
|
||||||
throw(TYPE_AM_MGO);
|
throw (int)TYPE_AM_MGO;
|
||||||
} // endif i
|
} // endif i
|
||||||
|
|
||||||
Mbuf[k] = 0;
|
Mbuf[k] = 0;
|
||||||
@@ -1351,7 +1351,7 @@ void MGOCOL::ReadColumn(PGLOBAL g)
|
|||||||
bson_destroy(doc);
|
bson_destroy(doc);
|
||||||
} else {
|
} else {
|
||||||
//strcpy(g->Message, "bson_iter_array failed (data is null)");
|
//strcpy(g->Message, "bson_iter_array failed (data is null)");
|
||||||
//throw(TYPE_AM_MGO);
|
//throw (int)TYPE_AM_MGO;
|
||||||
Value->Reset();
|
Value->Reset();
|
||||||
} // endif data
|
} // endif data
|
||||||
|
|
||||||
|
@@ -289,7 +289,7 @@ void VIRCOL::ReadColumn(PGLOBAL g)
|
|||||||
{
|
{
|
||||||
// This should never be called
|
// This should never be called
|
||||||
sprintf(g->Message, "ReadColumn: Column %s is not virtual", Name);
|
sprintf(g->Message, "ReadColumn: Column %s is not virtual", Name);
|
||||||
throw TYPE_COLBLK;
|
throw (int)TYPE_COLBLK;
|
||||||
} // end of ReadColumn
|
} // end of ReadColumn
|
||||||
|
|
||||||
/* ---------------------------TDBVICL class -------------------------- */
|
/* ---------------------------TDBVICL class -------------------------- */
|
||||||
|
@@ -1319,7 +1319,7 @@ void TDBXML::CloseDB(PGLOBAL g)
|
|||||||
Docp->CloseDoc(g, To_Xb);
|
Docp->CloseDoc(g, To_Xb);
|
||||||
|
|
||||||
// This causes a crash in Diagnostics_area::set_error_status
|
// This causes a crash in Diagnostics_area::set_error_status
|
||||||
// throw TYPE_AM_XML;
|
// throw (int)TYPE_AM_XML;
|
||||||
} // endif DumpDoc
|
} // endif DumpDoc
|
||||||
|
|
||||||
} // endif Changed
|
} // endif Changed
|
||||||
@@ -1642,7 +1642,7 @@ void XMLCOL::ReadColumn(PGLOBAL g)
|
|||||||
if (ValNode->GetType() != XML_ELEMENT_NODE &&
|
if (ValNode->GetType() != XML_ELEMENT_NODE &&
|
||||||
ValNode->GetType() != XML_ATTRIBUTE_NODE) {
|
ValNode->GetType() != XML_ATTRIBUTE_NODE) {
|
||||||
sprintf(g->Message, MSG(BAD_VALNODE), ValNode->GetType(), Name);
|
sprintf(g->Message, MSG(BAD_VALNODE), ValNode->GetType(), Name);
|
||||||
throw TYPE_AM_XML;
|
throw (int)TYPE_AM_XML;
|
||||||
} // endif type
|
} // endif type
|
||||||
|
|
||||||
// Get the Xname value from the XML file
|
// Get the Xname value from the XML file
|
||||||
@@ -1653,7 +1653,7 @@ void XMLCOL::ReadColumn(PGLOBAL g)
|
|||||||
PushWarning(g, Tdbp);
|
PushWarning(g, Tdbp);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw TYPE_AM_XML;
|
throw (int)TYPE_AM_XML;
|
||||||
} // endswitch
|
} // endswitch
|
||||||
|
|
||||||
Value->SetValue_psz(Valbuf);
|
Value->SetValue_psz(Valbuf);
|
||||||
@@ -1704,7 +1704,7 @@ void XMLCOL::WriteColumn(PGLOBAL g)
|
|||||||
/* For columns having an Xpath, the Clist must be updated. */
|
/* For columns having an Xpath, the Clist must be updated. */
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
if (Tdbp->CheckRow(g, Nod || Tdbp->Colname))
|
if (Tdbp->CheckRow(g, Nod || Tdbp->Colname))
|
||||||
throw TYPE_AM_XML;
|
throw (int)TYPE_AM_XML;
|
||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
/* Null values are represented by no node. */
|
/* Null values are represented by no node. */
|
||||||
@@ -1776,7 +1776,7 @@ void XMLCOL::WriteColumn(PGLOBAL g)
|
|||||||
|
|
||||||
if (ColNode == NULL) {
|
if (ColNode == NULL) {
|
||||||
strcpy(g->Message, MSG(COL_ALLOC_ERR));
|
strcpy(g->Message, MSG(COL_ALLOC_ERR));
|
||||||
throw TYPE_AM_XML;
|
throw (int)TYPE_AM_XML;
|
||||||
} // endif ColNode
|
} // endif ColNode
|
||||||
|
|
||||||
} // endif ColNode
|
} // endif ColNode
|
||||||
@@ -1795,7 +1795,7 @@ void XMLCOL::WriteColumn(PGLOBAL g)
|
|||||||
|
|
||||||
if (ValNode == NULL && AttNode == NULL) {
|
if (ValNode == NULL && AttNode == NULL) {
|
||||||
strcpy(g->Message, MSG(VAL_ALLOC_ERR));
|
strcpy(g->Message, MSG(VAL_ALLOC_ERR));
|
||||||
longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
|
throw (int)TYPE_AM_XML;
|
||||||
} // endif ValNode
|
} // endif ValNode
|
||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
@@ -1805,7 +1805,7 @@ void XMLCOL::WriteColumn(PGLOBAL g)
|
|||||||
|
|
||||||
if (strlen(p) > (unsigned)Long) {
|
if (strlen(p) > (unsigned)Long) {
|
||||||
sprintf(g->Message, MSG(VALUE_TOO_LONG), p, Name, Long);
|
sprintf(g->Message, MSG(VALUE_TOO_LONG), p, Name, Long);
|
||||||
throw TYPE_AM_XML;
|
throw (int)TYPE_AM_XML;
|
||||||
} else
|
} else
|
||||||
strcpy(Valbuf, p);
|
strcpy(Valbuf, p);
|
||||||
|
|
||||||
@@ -1855,7 +1855,7 @@ void XMULCOL::ReadColumn(PGLOBAL g)
|
|||||||
if (ValNode->GetType() != XML_ELEMENT_NODE &&
|
if (ValNode->GetType() != XML_ELEMENT_NODE &&
|
||||||
ValNode->GetType() != XML_ATTRIBUTE_NODE) {
|
ValNode->GetType() != XML_ATTRIBUTE_NODE) {
|
||||||
sprintf(g->Message, MSG(BAD_VALNODE), ValNode->GetType(), Name);
|
sprintf(g->Message, MSG(BAD_VALNODE), ValNode->GetType(), Name);
|
||||||
throw TYPE_AM_XML;
|
throw (int)TYPE_AM_XML;
|
||||||
} // endif type
|
} // endif type
|
||||||
|
|
||||||
// Get the Xname value from the XML file
|
// Get the Xname value from the XML file
|
||||||
@@ -1866,7 +1866,7 @@ void XMULCOL::ReadColumn(PGLOBAL g)
|
|||||||
PushWarning(g, Tdbp);
|
PushWarning(g, Tdbp);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
|
throw (int)TYPE_AM_XML;
|
||||||
} // endswitch
|
} // endswitch
|
||||||
|
|
||||||
if (!b) {
|
if (!b) {
|
||||||
@@ -1941,7 +1941,7 @@ void XMULCOL::WriteColumn(PGLOBAL g)
|
|||||||
/* For columns having an Xpath, the Clist must be updated. */
|
/* For columns having an Xpath, the Clist must be updated. */
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
if (Tdbp->CheckRow(g, Nod))
|
if (Tdbp->CheckRow(g, Nod))
|
||||||
throw TYPE_AM_XML;
|
throw (int)TYPE_AM_XML;
|
||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
/* Find the column and value nodes to update or insert. */
|
/* Find the column and value nodes to update or insert. */
|
||||||
@@ -1990,7 +1990,7 @@ void XMULCOL::WriteColumn(PGLOBAL g)
|
|||||||
|
|
||||||
if (len > 1 && !Tdbp->Xpand) {
|
if (len > 1 && !Tdbp->Xpand) {
|
||||||
sprintf(g->Message, MSG(BAD_VAL_UPDATE), Name);
|
sprintf(g->Message, MSG(BAD_VAL_UPDATE), Name);
|
||||||
throw TYPE_AM_XML;
|
throw (int)TYPE_AM_XML;
|
||||||
} else
|
} else
|
||||||
ValNode = Nlx->GetItem(g, Tdbp->Nsub, Vxnp);
|
ValNode = Nlx->GetItem(g, Tdbp->Nsub, Vxnp);
|
||||||
|
|
||||||
@@ -2032,7 +2032,7 @@ void XMULCOL::WriteColumn(PGLOBAL g)
|
|||||||
|
|
||||||
if (ColNode == NULL) {
|
if (ColNode == NULL) {
|
||||||
strcpy(g->Message, MSG(COL_ALLOC_ERR));
|
strcpy(g->Message, MSG(COL_ALLOC_ERR));
|
||||||
throw TYPE_AM_XML;
|
throw (int)TYPE_AM_XML;
|
||||||
} // endif ColNode
|
} // endif ColNode
|
||||||
|
|
||||||
} // endif ColNode
|
} // endif ColNode
|
||||||
@@ -2051,7 +2051,7 @@ void XMULCOL::WriteColumn(PGLOBAL g)
|
|||||||
|
|
||||||
if (ValNode == NULL && AttNode == NULL) {
|
if (ValNode == NULL && AttNode == NULL) {
|
||||||
strcpy(g->Message, MSG(VAL_ALLOC_ERR));
|
strcpy(g->Message, MSG(VAL_ALLOC_ERR));
|
||||||
longjmp(g->jumper[g->jump_level], TYPE_AM_XML);
|
throw (int)TYPE_AM_XML;
|
||||||
} // endif ValNode
|
} // endif ValNode
|
||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
@@ -2061,7 +2061,7 @@ void XMULCOL::WriteColumn(PGLOBAL g)
|
|||||||
|
|
||||||
if (strlen(p) > (unsigned)Long) {
|
if (strlen(p) > (unsigned)Long) {
|
||||||
sprintf(g->Message, MSG(VALUE_TOO_LONG), p, Name, Long);
|
sprintf(g->Message, MSG(VALUE_TOO_LONG), p, Name, Long);
|
||||||
throw TYPE_AM_XML;
|
throw (int)TYPE_AM_XML;
|
||||||
} else
|
} else
|
||||||
strcpy(Valbuf, p);
|
strcpy(Valbuf, p);
|
||||||
|
|
||||||
@@ -2093,7 +2093,7 @@ void XPOSCOL::ReadColumn(PGLOBAL g)
|
|||||||
|
|
||||||
if (Tdbp->Clist == NULL) {
|
if (Tdbp->Clist == NULL) {
|
||||||
strcpy(g->Message, MSG(MIS_TAG_LIST));
|
strcpy(g->Message, MSG(MIS_TAG_LIST));
|
||||||
throw TYPE_AM_XML;
|
throw (int)TYPE_AM_XML;
|
||||||
} // endif Clist
|
} // endif Clist
|
||||||
|
|
||||||
if ((ValNode = Tdbp->Clist->GetItem(g, Rank, Vxnp))) {
|
if ((ValNode = Tdbp->Clist->GetItem(g, Rank, Vxnp))) {
|
||||||
@@ -2105,7 +2105,7 @@ void XPOSCOL::ReadColumn(PGLOBAL g)
|
|||||||
PushWarning(g, Tdbp);
|
PushWarning(g, Tdbp);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw TYPE_AM_XML;
|
throw (int)TYPE_AM_XML;
|
||||||
} // endswitch
|
} // endswitch
|
||||||
|
|
||||||
Value->SetValue_psz(Valbuf);
|
Value->SetValue_psz(Valbuf);
|
||||||
@@ -2156,14 +2156,14 @@ void XPOSCOL::WriteColumn(PGLOBAL g)
|
|||||||
/* For all columns the Clist must be updated. */
|
/* For all columns the Clist must be updated. */
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
if (Tdbp->CheckRow(g, true))
|
if (Tdbp->CheckRow(g, true))
|
||||||
throw TYPE_AM_XML;
|
throw (int)TYPE_AM_XML;
|
||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
/* Find the column and value nodes to update or insert. */
|
/* Find the column and value nodes to update or insert. */
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
if (Tdbp->Clist == NULL) {
|
if (Tdbp->Clist == NULL) {
|
||||||
strcpy(g->Message, MSG(MIS_TAG_LIST));
|
strcpy(g->Message, MSG(MIS_TAG_LIST));
|
||||||
throw TYPE_AM_XML;
|
throw (int)TYPE_AM_XML;
|
||||||
} // endif Clist
|
} // endif Clist
|
||||||
|
|
||||||
n = Tdbp->Clist->GetLength();
|
n = Tdbp->Clist->GetLength();
|
||||||
@@ -2188,7 +2188,7 @@ void XPOSCOL::WriteColumn(PGLOBAL g)
|
|||||||
|
|
||||||
if (strlen(p) > (unsigned)Long) {
|
if (strlen(p) > (unsigned)Long) {
|
||||||
sprintf(g->Message, MSG(VALUE_TOO_LONG), p, Name, Long);
|
sprintf(g->Message, MSG(VALUE_TOO_LONG), p, Name, Long);
|
||||||
throw TYPE_AM_XML;
|
throw (int)TYPE_AM_XML;
|
||||||
} else
|
} else
|
||||||
strcpy(Valbuf, p);
|
strcpy(Valbuf, p);
|
||||||
|
|
||||||
|
@@ -1451,7 +1451,7 @@ void TYPVAL<PSZ>::SetValue(uint n)
|
|||||||
|
|
||||||
if (k > Len) {
|
if (k > Len) {
|
||||||
sprintf(g->Message, MSG(VALSTR_TOO_LONG), buf, Len);
|
sprintf(g->Message, MSG(VALSTR_TOO_LONG), buf, Len);
|
||||||
longjmp(g->jumper[g->jump_level], 138);
|
throw 138;
|
||||||
} else
|
} else
|
||||||
SetValue_psz(buf);
|
SetValue_psz(buf);
|
||||||
|
|
||||||
@@ -1505,7 +1505,7 @@ void TYPVAL<PSZ>::SetValue(ulonglong n)
|
|||||||
|
|
||||||
if (k > Len) {
|
if (k > Len) {
|
||||||
sprintf(g->Message, MSG(VALSTR_TOO_LONG), buf, Len);
|
sprintf(g->Message, MSG(VALSTR_TOO_LONG), buf, Len);
|
||||||
longjmp(g->jumper[g->jump_level], 138);
|
throw 138;
|
||||||
} else
|
} else
|
||||||
SetValue_psz(buf);
|
SetValue_psz(buf);
|
||||||
|
|
||||||
|
@@ -84,7 +84,7 @@ double XOBJECT::GetFloatValue(void)
|
|||||||
CONSTANT::CONSTANT(PGLOBAL g, void *value, short type)
|
CONSTANT::CONSTANT(PGLOBAL g, void *value, short type)
|
||||||
{
|
{
|
||||||
if (!(Value = AllocateValue(g, value, (int)type)))
|
if (!(Value = AllocateValue(g, value, (int)type)))
|
||||||
throw TYPE_CONST;
|
throw (int)TYPE_CONST;
|
||||||
|
|
||||||
Constant = true;
|
Constant = true;
|
||||||
} // end of CONSTANT constructor
|
} // end of CONSTANT constructor
|
||||||
@@ -95,7 +95,7 @@ CONSTANT::CONSTANT(PGLOBAL g, void *value, short type)
|
|||||||
CONSTANT::CONSTANT(PGLOBAL g, int n)
|
CONSTANT::CONSTANT(PGLOBAL g, int n)
|
||||||
{
|
{
|
||||||
if (!(Value = AllocateValue(g, &n, TYPE_INT)))
|
if (!(Value = AllocateValue(g, &n, TYPE_INT)))
|
||||||
throw TYPE_CONST;
|
throw (int)TYPE_CONST;
|
||||||
|
|
||||||
Constant = true;
|
Constant = true;
|
||||||
} // end of CONSTANT constructor
|
} // end of CONSTANT constructor
|
||||||
@@ -117,7 +117,7 @@ void CONSTANT::Convert(PGLOBAL g, int newtype)
|
|||||||
{
|
{
|
||||||
if (Value->GetType() != newtype)
|
if (Value->GetType() != newtype)
|
||||||
if (!(Value = AllocateValue(g, Value, newtype)))
|
if (!(Value = AllocateValue(g, Value, newtype)))
|
||||||
throw TYPE_CONST;
|
throw (int)TYPE_CONST;
|
||||||
|
|
||||||
} // end of Convert
|
} // end of Convert
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user