diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2019-11-24 22:58:55 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2019-11-24 22:58:55 +0100 |
commit | fb91774e4e6451298af51e31356a8b8fb1b19487 (patch) | |
tree | 08858b138184ad2565acfe745d1151996c229e99 /storage | |
parent | b4bfa12b0044f7e4659e919784a6ed2252ca21b8 (diff) | |
download | mariadb-git-fb91774e4e6451298af51e31356a8b8fb1b19487.tar.gz |
These changed were made after pulling 10.2.30 from origin
---------------------------------------------------------
- Temporarily fix MDEV-13782 by commenting out LIKE_FUNC in CondFilter
modified: storage/connect/ha_connect.cc
- Remove use of hack tables
modified: storage/connect/connect.cc
modified: storage/connect/connect.h
modified: storage/connect/ha_connect.cc
modified: storage/connect/xtable.h
Diffstat (limited to 'storage')
-rw-r--r-- | storage/connect/connect.cc | 64 | ||||
-rw-r--r-- | storage/connect/connect.h | 2 | ||||
-rw-r--r-- | storage/connect/ha_connect.cc | 14 | ||||
-rw-r--r-- | storage/connect/xtable.h | 5 |
4 files changed, 44 insertions, 41 deletions
diff --git a/storage/connect/connect.cc b/storage/connect/connect.cc index 461391d2896..dfc619cf4af 100644 --- a/storage/connect/connect.cc +++ b/storage/connect/connect.cc @@ -566,7 +566,7 @@ int CntCloseTable(PGLOBAL g, PTDB tdbp, bool nox, bool abort) rc = tdbp->DeleteDB(g, RC_EF); // Specific A.M. delete routine } else if (tdbp->GetMode() == MODE_UPDATE && tdbp->IsIndexed()) - rc = ((PTDBDOX)tdbp)->Txfp->UpdateSortedRows(g); + rc = ((PTDBDOS)tdbp)->GetTxfp()->UpdateSortedRows(g); switch (rc) { case RC_FX: @@ -593,7 +593,7 @@ int CntCloseTable(PGLOBAL g, PTDB tdbp, bool nox, bool abort) if (!tdbp->IsRemote()) { // Make all the eventual indexes - PTDBDOX tbxp = (PTDBDOX)tdbp; + PTDBDOS tbxp = (PTDBDOS)tdbp; tbxp->ResetKindex(g, NULL); tbxp->SetKey_Col(NULL); rc = tbxp->ResetTableOpt(g, true, tbxp->GetDef()->Indexable() == 1); @@ -622,8 +622,8 @@ int CntCloseTable(PGLOBAL g, PTDB tdbp, bool nox, bool abort) int CntIndexInit(PGLOBAL g, PTDB ptdb, int id, bool sorted) { PIXDEF xdp; - PTDBDOX tdbp; - DOXDEF *dfp; + PTDBDOS tdbp; + DOSDEF *dfp; if (!ptdb) return -1; @@ -633,9 +633,9 @@ int CntIndexInit(PGLOBAL g, PTDB ptdb, int id, bool sorted) } else if (ptdb->GetDef()->Indexable() == 3) { return 1; } else - tdbp= (PTDBDOX)ptdb; + tdbp= (PTDBDOS)ptdb; - dfp= (DOXDEF*)tdbp->To_Def; + dfp= (DOSDEF*)tdbp->GetDef(); //if (!(k= colp->GetKey())) // if (colp->GetOpt() >= 2) { @@ -645,16 +645,16 @@ int CntIndexInit(PGLOBAL g, PTDB ptdb, int id, bool sorted) // This is a pseudo indexed sorted block optimized column // return 0; - if (tdbp->To_Kindex) - if (((XXBASE*)tdbp->To_Kindex)->GetID() == id) { - tdbp->To_Kindex->Reset(); // Same index - return (tdbp->To_Kindex->IsMul()) ? 2 : 1; + if (tdbp->GetKindex()) + if (((XXBASE*)tdbp->GetKindex())->GetID() == id) { + tdbp->GetKindex()->Reset(); // Same index + return (tdbp->GetKindex()->IsMul()) ? 2 : 1; } else { - tdbp->To_Kindex->Close(); - tdbp->To_Kindex= NULL; + tdbp->GetKindex()->Close(); + tdbp->SetKindex(NULL); } // endif colp - for (xdp= dfp->To_Indx; xdp; xdp= xdp->GetNext()) + for (xdp= dfp->GetIndx(); xdp; xdp= xdp->GetNext()) if (xdp->GetID() == id) break; @@ -676,7 +676,7 @@ int CntIndexInit(PGLOBAL g, PTDB ptdb, int id, bool sorted) if (tdbp->InitialyzeIndex(g, xdp, sorted)) return 0; - return (tdbp->To_Kindex->IsMul()) ? 2 : 1; + return (tdbp->GetKindex()->IsMul()) ? 2 : 1; } // end of CntIndexInit #if defined(WORDS_BIGENDIAN) @@ -710,7 +710,7 @@ RCODE CntIndexRead(PGLOBAL g, PTDB ptdb, OPVAL op, int n, x; RCODE rc; XXBASE *xbp; - PTDBDOX tdbp; + PTDBDOS tdbp; if (!ptdb) return RC_FX; @@ -736,12 +736,12 @@ RCODE CntIndexRead(PGLOBAL g, PTDB ptdb, OPVAL op, goto rnd; } else - tdbp= (PTDBDOX)ptdb; + tdbp= (PTDBDOS)ptdb; // Set reference values and index operator - if (!tdbp->To_Link || !tdbp->To_Kindex) { + if (!tdbp->GetLink() || !tdbp->GetKindex()) { // if (!tdbp->To_Xdp) { - sprintf(g->Message, "Index not initialized for table %s", tdbp->Name); + sprintf(g->Message, "Index not initialized for table %s", tdbp->GetName()); return RC_FX; #if 0 } // endif !To_Xdp @@ -754,7 +754,7 @@ RCODE CntIndexRead(PGLOBAL g, PTDB ptdb, OPVAL op, #endif // 0 } // endif !To_Kindex - xbp= (XXBASE*)tdbp->To_Kindex; + xbp= (XXBASE*)tdbp->GetKindex(); if (kr) { char *kp= (char*)kr->key; @@ -764,13 +764,13 @@ RCODE CntIndexRead(PGLOBAL g, PTDB ptdb, OPVAL op, PVAL valp; PCOL colp; - for (n= 0; n < tdbp->Knum; n++) { - colp= (PCOL)tdbp->To_Key_Col[n]; + for (n= 0; n < tdbp->GetKnum(); n++) { + colp= (PCOL)tdbp->Key(n); if (colp->GetColUse(U_NULLS)) kp++; // Skip null byte - valp= tdbp->To_Link[n]->GetValue(); + valp= tdbp->Link(n)->GetValue(); if (!valp->IsTypeNum()) { if (colp->GetColUse(U_VAR)) { @@ -840,7 +840,7 @@ int CntIndexRange(PGLOBAL g, PTDB ptdb, const uchar* *key, uint *len, bool b, rcb; PVAL valp; PCOL colp; - PTDBDOX tdbp; + PTDBDOS tdbp; XXBASE *xbp; if (!ptdb) @@ -865,35 +865,35 @@ int CntIndexRange(PGLOBAL g, PTDB ptdb, const uchar* *key, uint *len, return k[1] - k[0] + 1; } else - tdbp= (PTDBDOX)ptdb; + tdbp= (PTDBDOS)ptdb; - if (!tdbp->To_Kindex || !tdbp->To_Link) { - if (!tdbp->To_Xdp) { - sprintf(g->Message, "Index not initialized for table %s", tdbp->Name); + if (!tdbp->GetKindex() || !tdbp->GetLink()) { + if (!tdbp->GetXdp()) { + sprintf(g->Message, "Index not initialized for table %s", tdbp->GetName()); DBUG_PRINT("Range", ("%s", g->Message)); return -1; } else // Dynamic index - return tdbp->To_Xdp->GetMaxSame(); // TODO a better estimate + return tdbp->GetXdp()->GetMaxSame(); // TODO a better estimate } else - xbp= (XXBASE*)tdbp->To_Kindex; + xbp= (XXBASE*)tdbp->GetKindex(); for (b= false, i= 0; i < 2; i++) { p= kp= key[i]; if (kp) { - for (n= 0; n < tdbp->Knum; n++) { + for (n= 0; n < tdbp->GetKnum(); n++) { if (kmap[i] & (key_part_map)(1 << n)) { if (b == true) // Cannot do indexing with missing intermediate key return -1; - colp= (PCOL)tdbp->To_Key_Col[n]; + colp= (PCOL)tdbp->Key(n); if (colp->GetColUse(U_NULLS)) p++; // Skip null byte ??? - valp= tdbp->To_Link[n]->GetValue(); + valp= tdbp->Link(n)->GetValue(); if (!valp->IsTypeNum()) { if (colp->GetColUse(U_VAR)) { diff --git a/storage/connect/connect.h b/storage/connect/connect.h index 3a60cd40160..d1fc2ea592f 100644 --- a/storage/connect/connect.h +++ b/storage/connect/connect.h @@ -46,6 +46,7 @@ int CntIndexRange(PGLOBAL g, PTDB ptdb, const uchar* *key, uint *len, bool *incl, key_part_map *kmap); PGLOBAL CntExit(PGLOBAL g); +#if 0 /***********************************************************************/ /* Definition of classes XKPDEF, DOXDEF, TDBDOX */ /* These classes purpose is chiefly to access protected items! */ @@ -76,3 +77,4 @@ class XKPDEF: public KPARTDEF { public: XKPDEF(const char *name, int n) : KPARTDEF((PSZ)name, n) {} }; // end of class XKPDEF +#endif // 0 diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc index 79175724158..91fef719ee7 100644 --- a/storage/connect/ha_connect.cc +++ b/storage/connect/ha_connect.cc @@ -2966,12 +2966,10 @@ PCFIL ha_connect::CheckCond(PGLOBAL g, PCFIL filp, const Item *cond) case Item_func::LE_FUNC: vop= OP_LE; break; case Item_func::GE_FUNC: vop= OP_GE; break; case Item_func::GT_FUNC: vop= OP_GT; break; -#if 0 - case Item_func::LIKE_FUNC: - vop= OP_LIKE; - neg= ((Item_func_like*)condf)->negated; - break; -#endif // 0 + //case Item_func::LIKE_FUNC: + // vop = OP_LIKE; + // neg= ((Item_func_like*)condf)->negated; + // break; case Item_func::ISNOTNULL_FUNC: neg= true; // fall through @@ -3789,9 +3787,9 @@ int ha_connect::index_init(uint idx, bool sorted) active_index= MAX_KEY; rc= HA_ERR_INTERNAL_ERROR; } else if (tdbp->GetKindex()) { - if (((PTDBDOX)tdbp)->To_Kindex->GetNum_K()) { + if (((PTDBDOS)tdbp)->GetKindex()->GetNum_K()) { if (tdbp->GetFtype() != RECFM_NAF) - ((PTDBDOX)tdbp)->GetTxfp()->ResetBuffer(g); + ((PTDBDOS)tdbp)->GetTxfp()->ResetBuffer(g); active_index= idx; // } else { // Void table diff --git a/storage/connect/xtable.h b/storage/connect/xtable.h index bc9265e0223..1b499e09047 100644 --- a/storage/connect/xtable.h +++ b/storage/connect/xtable.h @@ -173,9 +173,12 @@ class DllExport TDBASE : public TDB { inline void SetKindex(PKXBASE kxp) {To_Kindex = kxp;} // Properties - virtual PKXBASE GetKindex(void) {return To_Kindex;} + PKXBASE GetKindex(void) {return To_Kindex;} + PXOB *GetLink(void) {return To_Link;} + PIXDEF GetXdp(void) {return To_Xdp;} void ResetKindex(PGLOBAL g, PKXBASE kxp); PCOL Key(int i) {return (To_Key_Col) ? To_Key_Col[i] : NULL;} + PXOB Link(int i) { return (To_Link) ? To_Link[i] : NULL; } // Methods virtual bool IsUsingTemp(PGLOBAL) {return false;} |