mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
- Fix a bug causing a crash when an XCOL table was the source of
a PROXY or PROXY based table. modified: storage/connect/colblk.cpp storage/connect/tabutil.cpp storage/connect/tabutil.h storage/connect/tabxcl.cpp storage/connect/tabxcl.h
This commit is contained in:
@ -178,7 +178,7 @@ bool COLBLK::InitValue(PGLOBAL g)
|
|||||||
(To_Tdb) ? To_Tdb->GetCat() : NULL)))
|
(To_Tdb) ? To_Tdb->GetCat() : NULL)))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
Status = BUF_READY;
|
AddStatus(BUF_READY);
|
||||||
Value->SetNullable(Nullable);
|
Value->SetNullable(Nullable);
|
||||||
|
|
||||||
#ifdef DEBTRACE
|
#ifdef DEBTRACE
|
||||||
|
@ -591,6 +591,17 @@ bool PRXCOL::Init(PGLOBAL g)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
} // end of Init
|
} // end of Init
|
||||||
|
|
||||||
|
/***********************************************************************/
|
||||||
|
/* Reset the column descriptor to non evaluated yet. */
|
||||||
|
/***********************************************************************/
|
||||||
|
void PRXCOL::Reset(void)
|
||||||
|
{
|
||||||
|
if (Colp)
|
||||||
|
Colp->Reset();
|
||||||
|
|
||||||
|
Status &= ~BUF_READ;
|
||||||
|
} // end of Reset
|
||||||
|
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
/* ReadColumn: */
|
/* ReadColumn: */
|
||||||
/***********************************************************************/
|
/***********************************************************************/
|
||||||
@ -600,7 +611,7 @@ void PRXCOL::ReadColumn(PGLOBAL g)
|
|||||||
htrc("PRX ReadColumn: name=%s\n", Name);
|
htrc("PRX ReadColumn: name=%s\n", Name);
|
||||||
|
|
||||||
if (Colp) {
|
if (Colp) {
|
||||||
Colp->ReadColumn(g);
|
Colp->Eval(g);
|
||||||
Value->SetValue_pval(To_Val);
|
Value->SetValue_pval(To_Val);
|
||||||
|
|
||||||
// Set null when applicable
|
// Set null when applicable
|
||||||
|
@ -105,6 +105,7 @@ class DllExport PRXCOL : public COLBLK {
|
|||||||
virtual int GetAmType(void) {return TYPE_AM_PRX;}
|
virtual int GetAmType(void) {return TYPE_AM_PRX;}
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
|
virtual void Reset(void);
|
||||||
virtual bool IsSpecial(void) {return Pseudo;}
|
virtual bool IsSpecial(void) {return Pseudo;}
|
||||||
virtual void ReadColumn(PGLOBAL g);
|
virtual void ReadColumn(PGLOBAL g);
|
||||||
bool Init(PGLOBAL g);
|
bool Init(PGLOBAL g);
|
||||||
|
@ -253,7 +253,7 @@ XCLCOL::XCLCOL(PGLOBAL g, PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i)
|
|||||||
void XCLCOL::ReadColumn(PGLOBAL g)
|
void XCLCOL::ReadColumn(PGLOBAL g)
|
||||||
{
|
{
|
||||||
if (((PTDBXCL)To_Tdb)->New) {
|
if (((PTDBXCL)To_Tdb)->New) {
|
||||||
Colp->ReadColumn(g);
|
Colp->Eval(g);
|
||||||
strcpy(Cbuf, To_Val->GetCharValue());
|
strcpy(Cbuf, To_Val->GetCharValue());
|
||||||
Cp = Cbuf;
|
Cp = Cbuf;
|
||||||
} // endif New
|
} // endif New
|
||||||
@ -272,9 +272,11 @@ void XCLCOL::ReadColumn(PGLOBAL g)
|
|||||||
} else if (Nullable) {
|
} else if (Nullable) {
|
||||||
Value->Reset();
|
Value->Reset();
|
||||||
Value->SetNull(true);
|
Value->SetNull(true);
|
||||||
} else
|
} else {
|
||||||
// Skip that row
|
// Skip that row
|
||||||
((PTDBXCL)To_Tdb)->RowFlag = 2;
|
((PTDBXCL)To_Tdb)->RowFlag = 2;
|
||||||
|
Colp->Reset();
|
||||||
|
} // endif Cp
|
||||||
|
|
||||||
if (Cp && *Cp)
|
if (Cp && *Cp)
|
||||||
// More to come from the same row
|
// More to come from the same row
|
||||||
|
@ -90,7 +90,7 @@ class XCLCOL : public PRXCOL {
|
|||||||
XCLCOL(PGLOBAL g, PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i);
|
XCLCOL(PGLOBAL g, PCOLDEF cdp, PTDB tdbp, PCOL cprec, int i);
|
||||||
|
|
||||||
// Methods
|
// Methods
|
||||||
virtual void Reset(void) {} // Evaluated only by TDBXCL
|
virtual void Reset(void) {Colp->Reset();} // Evaluated only by TDBXCL
|
||||||
virtual void ReadColumn(PGLOBAL g);
|
virtual void ReadColumn(PGLOBAL g);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Reference in New Issue
Block a user