Skip to content

Commit e3d37bf

Browse files
committed
Merge branch 'connect/10.1' into 10.1
2 parents 7f19330 + ad916ef commit e3d37bf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+5922
-1739
lines changed

storage/connect/connect.cc

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -735,17 +735,12 @@ static void SetSwapValue(PVAL valp, char *kp)
735735
/* IndexRead: fetch a record having the index value. */
736736
/***********************************************************************/
737737
RCODE CntIndexRead(PGLOBAL g, PTDB ptdb, OPVAL op,
738-
const void *key, int len, bool mrr)
738+
const key_range *kr, bool mrr)
739739
{
740-
char *kp= (char*)key;
741740
int n, x;
742-
short lg;
743-
bool rcb;
744741
RCODE rc;
745-
PVAL valp;
746-
PCOL colp;
747742
XXBASE *xbp;
748-
PTDBDOX tdbp;
743+
PTDBDOX tdbp;
749744

750745
if (!ptdb)
751746
return RC_FX;
@@ -757,13 +752,13 @@ RCODE CntIndexRead(PGLOBAL g, PTDB ptdb, OPVAL op,
757752
return RC_FX;
758753
} else if (x == 2) {
759754
// Remote index
760-
if (ptdb->ReadKey(g, op, key, len))
755+
if (ptdb->ReadKey(g, op, kr))
761756
return RC_FX;
762757

763758
goto rnd;
764759
} else if (x == 3) {
765-
if (key)
766-
((PTDBASE)ptdb)->SetRecpos(g, *(int*)key);
760+
if (kr)
761+
((PTDBASE)ptdb)->SetRecpos(g, *(int*)kr->key);
767762

768763
if (op == OP_SAME)
769764
return RC_NF;
@@ -790,7 +785,14 @@ RCODE CntIndexRead(PGLOBAL g, PTDB ptdb, OPVAL op,
790785

791786
xbp= (XXBASE*)tdbp->To_Kindex;
792787

793-
if (key) {
788+
if (kr) {
789+
char *kp= (char*)kr->key;
790+
int len= kr->length;
791+
short lg;
792+
bool rcb;
793+
PVAL valp;
794+
PCOL colp;
795+
794796
for (n= 0; n < tdbp->Knum; n++) {
795797
colp= (PCOL)tdbp->To_Key_Col[n];
796798

@@ -832,10 +834,10 @@ RCODE CntIndexRead(PGLOBAL g, PTDB ptdb, OPVAL op,
832834

833835
kp+= valp->GetClen();
834836

835-
if (len == kp - (char*)key) {
837+
if (len == kp - (char*)kr->key) {
836838
n++;
837839
break;
838-
} else if (len < kp - (char*)key) {
840+
} else if (len < kp - (char*)kr->key) {
839841
strcpy(g->Message, "Key buffer is too small");
840842
return RC_FX;
841843
} // endif len

storage/connect/connect.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ bool CntRewindTable(PGLOBAL g, PTDB tdbp);
3636
int CntCloseTable(PGLOBAL g, PTDB tdbp, bool nox, bool abort);
3737
int CntIndexInit(PGLOBAL g, PTDB tdbp, int id, bool sorted);
3838
RCODE CntReadNext(PGLOBAL g, PTDB tdbp);
39-
RCODE CntIndexRead(PGLOBAL g, PTDB, OPVAL op, const void *k, int n, bool mrr);
39+
RCODE CntIndexRead(PGLOBAL g, PTDB, OPVAL op, const key_range *kr, bool mrr);
4040
RCODE CntWriteRow(PGLOBAL g, PTDB tdbp);
4141
RCODE CntUpdateRow(PGLOBAL g, PTDB tdbp);
4242
RCODE CntDeleteRow(PGLOBAL g, PTDB tdbp, bool all);
@@ -60,7 +60,7 @@ class TDBDOX: public TDBDOS {
6060
friend int MakeIndex(PGLOBAL, PTDB, PIXDEF);
6161
friend int CntCloseTable(PGLOBAL, PTDB, bool, bool);
6262
friend int CntIndexInit(PGLOBAL, PTDB, int, bool);
63-
friend RCODE CntIndexRead(PGLOBAL, PTDB, OPVAL, const void*, int, bool);
63+
friend RCODE CntIndexRead(PGLOBAL, PTDB, OPVAL, const key_range*, bool);
6464
friend RCODE CntDeleteRow(PGLOBAL, PTDB, bool);
6565
friend int CntIndexRange(PGLOBAL, PTDB, const uchar**, uint*,
6666
bool*, key_part_map*);

storage/connect/english.msg

Lines changed: 0 additions & 366 deletions
This file was deleted.

storage/connect/french.msg

Lines changed: 0 additions & 366 deletions
This file was deleted.

0 commit comments

Comments
 (0)