Commit 652b9648 authored by Olivier Bertrand's avatar Olivier Bertrand

- Fix a bug in XCOL tables. When a row was filtered internally the XColumn

  was not reset causing rows to be lost.
modified:
  storage/connect/connect.cc
  storage/connect/ha_connect.cc
  storage/connect/tabxcl.cpp

- Typo
modified:
  storage/connect/connect.cc
  storage/connect/ha_connect.cc
parent c4cf40c2
......@@ -416,14 +416,14 @@ RCODE EvalColumns(PGLOBAL g, PTDB tdbp, bool mrr)
for (colp= tdbp->GetColumns(); rc == RC_OK && colp;
colp= colp->GetNext()) {
colp->Reset();
colp->Reset();
// Virtual columns are computed by MariaDB
if (!colp->GetColUse(U_VIRTUAL) && (!mrr || colp->GetKcol()))
if (colp->Eval(g))
rc= RC_FX;
// Virtual columns are computed by MariaDB
if (!colp->GetColUse(U_VIRTUAL) && (!mrr || colp->GetKcol()))
if (colp->Eval(g))
rc= RC_FX;
} // endfor colp
} // endfor colp
err:
g->jump_level--;
......
......@@ -2188,7 +2188,7 @@ PFIL ha_connect::CondFilter(PGLOBAL g, Item *cond)
if (trace)
htrc("Func type=%d argnum=%d\n", condf->functype(),
condf->argument_count());
condf->argument_count());
switch (condf->functype()) {
case Item_func::EQUAL_FUNC:
......
......@@ -266,6 +266,7 @@ bool XCLCOL::Init(PGLOBAL g, PTDBASE tp)
void XCLCOL::ReadColumn(PGLOBAL g)
{
if (((PTDBXCL)To_Tdb)->New) {
Colp->Reset(); // In case of failed filtering
Colp->Eval(g);
strncpy(Cbuf, To_Val->GetCharValue(), Colp->GetLength());
Cbuf[Colp->GetLength()] = 0;
......
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