Skip to content

Commit b3f9838

Browse files
committed
Update 10.1 with changes from 10.0
1 parent 48a77e6 commit b3f9838

30 files changed

+905
-393
lines changed
371 KB
Binary file not shown.

storage/connect/connect.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
#include "tabcol.h"
4343
#include "catalog.h"
4444
#include "ha_connect.h"
45-
#include "mycat.h"
4645

4746
#define my_strupr(p) my_caseup_str(default_charset_info, (p));
4847
#define my_strlwr(p) my_casedn_str(default_charset_info, (p));
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
2+
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
3+
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
4+
<security>
5+
<requestedPrivileges>
6+
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
7+
</requestedPrivileges>
8+
</security>
9+
</trustInfo>
10+
</assembly>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
La ressource de manifeste a �t� mise � jour pour la derni�re fois � 15:13:07,47 le 21/03/2015
Binary file not shown.
Binary file not shown.

storage/connect/domdoc.cpp

Lines changed: 89 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ PXNODE DOMNODE::GetNext(PGLOBAL g)
275275
{
276276
if (Nodep->nextSibling == NULL)
277277
Next = NULL;
278-
else if (!Next)
278+
else // if (!Next)
279279
Next = new(g) DOMNODE(Doc, Nodep->nextSibling);
280280

281281
return Next;
@@ -288,7 +288,7 @@ PXNODE DOMNODE::GetChild(PGLOBAL g)
288288
{
289289
if (Nodep->firstChild == NULL)
290290
Children = NULL;
291-
else if (!Children)
291+
else // if (!Children)
292292
Children = new(g) DOMNODE(Doc, Nodep->firstChild);
293293

294294
return Children;
@@ -441,15 +441,27 @@ PXNODE DOMNODE::SelectSingleNode(PGLOBAL g, char *xp, PXNODE np)
441441
/******************************************************************/
442442
PXATTR DOMNODE::GetAttribute(PGLOBAL g, char *name, PXATTR ap)
443443
{
444-
MSXML2::IXMLDOMElementPtr ep = Nodep;
445-
MSXML2::IXMLDOMAttributePtr atp = ep->getAttributeNode(name);
444+
MSXML2::IXMLDOMElementPtr ep;
445+
MSXML2::IXMLDOMNamedNodeMapPtr nmp;
446+
MSXML2::IXMLDOMAttributePtr atp;
447+
448+
if (name) {
449+
ep = Nodep;
450+
atp = ep->getAttributeNode(name);
451+
nmp = NULL;
452+
} else {
453+
nmp = Nodep->Getattributes();
454+
atp = nmp->Getitem(0);
455+
} // endif name
446456

447457
if (atp) {
448458
if (ap) {
449459
((PDOMATTR)ap)->Atrp = atp;
460+
((PDOMATTR)ap)->Nmp = nmp;
461+
((PDOMATTR)ap)->K = 0;
450462
return ap;
451463
} else
452-
return new(g) DOMATTR(Doc, atp);
464+
return new(g) DOMATTR(Doc, atp, nmp);
453465

454466
} else
455467
return NULL;
@@ -617,14 +629,85 @@ bool DOMNODELIST::DropItem(PGLOBAL g, int n)
617629
/******************************************************************/
618630
/* DOMATTR constructor. */
619631
/******************************************************************/
620-
DOMATTR::DOMATTR(PXDOC dp, MSXML2::IXMLDOMAttributePtr ap)
632+
DOMATTR::DOMATTR(PXDOC dp, MSXML2::IXMLDOMAttributePtr ap,
633+
MSXML2::IXMLDOMNamedNodeMapPtr nmp)
621634
: XMLATTRIBUTE(dp)
622635
{
623636
Atrp = ap;
637+
Nmp = nmp;
624638
Ws = NULL;
625639
Len = 0;
640+
K = 0;
626641
} // end of DOMATTR constructor
627642

643+
/******************************************************************/
644+
/* Return the attribute name. */
645+
/******************************************************************/
646+
char *DOMATTR::GetName(PGLOBAL g)
647+
{
648+
if (!WideCharToMultiByte(CP_ACP, 0, Atrp->nodeName, -1,
649+
Name, sizeof(Name), NULL, NULL)) {
650+
strcpy(g->Message, MSG(NAME_CONV_ERR));
651+
return NULL;
652+
} // endif
653+
654+
return Name;
655+
} // end of GetName
656+
657+
/******************************************************************/
658+
/* Return the next attribute node. */
659+
/* This funtion is implemented as needed by XMLColumns. */
660+
/******************************************************************/
661+
PXATTR DOMATTR::GetNext(PGLOBAL g)
662+
{
663+
if (!Nmp)
664+
return NULL;
665+
666+
if (++K >= Nmp->Getlength()) {
667+
Nmp->reset();
668+
Nmp = NULL;
669+
K = 0;
670+
return NULL;
671+
} // endif K
672+
673+
Atrp = Nmp->Getitem(K);
674+
return this;
675+
} // end of GetNext
676+
677+
/******************************************************************/
678+
/* Return the content of a node and subnodes. */
679+
/******************************************************************/
680+
RCODE DOMATTR::GetText(PGLOBAL g, char *buf, int len)
681+
{
682+
RCODE rc = RC_OK;
683+
684+
if (!WideCharToMultiByte(CP_UTF8, 0, Atrp->text, -1,
685+
buf, len, NULL, NULL)) {
686+
DWORD lsr = GetLastError();
687+
688+
switch (lsr) {
689+
case 0:
690+
case ERROR_INSUFFICIENT_BUFFER: // 122L
691+
sprintf(g->Message, "Truncated %s content", GetName(g));
692+
rc = RC_INFO;
693+
break;
694+
case ERROR_NO_UNICODE_TRANSLATION: // 1113L
695+
sprintf(g->Message, "Invalid character(s) in %s content",
696+
GetName(g));
697+
rc = RC_INFO;
698+
break;
699+
default:
700+
sprintf(g->Message, "System error getting %s content",
701+
GetName(g));
702+
rc = RC_FX;
703+
break;
704+
} // endswitch
705+
706+
} // endif
707+
708+
return rc;
709+
} // end of GetText
710+
628711
/******************************************************************/
629712
/* Set the text content of an attribute. */
630713
/******************************************************************/

storage/connect/domdoc.h

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,24 @@ class DOMATTR : public XMLATTRIBUTE {
122122
friend class DOMDOC;
123123
friend class DOMNODE;
124124
public:
125+
// Properties
126+
virtual char *GetName(PGLOBAL g);
127+
virtual PXATTR GetNext(PGLOBAL);
128+
125129
// Methods
126-
virtual bool SetText(PGLOBAL g, char *txtp, int len);
130+
virtual RCODE GetText(PGLOBAL g, char *bufp, int len);
131+
virtual bool SetText(PGLOBAL g, char *txtp, int len);
127132

128133
protected:
129134
// Constructor
130-
DOMATTR(PXDOC dp, MSXML2::IXMLDOMAttributePtr ap);
135+
DOMATTR(PXDOC dp, MSXML2::IXMLDOMAttributePtr ap,
136+
MSXML2::IXMLDOMNamedNodeMapPtr nmp = NULL);
131137

132138
// Members
133-
MSXML2::IXMLDOMAttributePtr Atrp;
134-
WCHAR *Ws;
135-
int Len;
139+
MSXML2::IXMLDOMAttributePtr Atrp;
140+
MSXML2::IXMLDOMNamedNodeMapPtr Nmp;
141+
char Name[64];
142+
WCHAR *Ws;
143+
int Len;
144+
long K;
136145
}; // end of class DOMATTR

storage/connect/filamap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ typedef class MAPFAM *PMAPFAM;
1717
/* This is the variable file access method using file mapping. */
1818
/***********************************************************************/
1919
class DllExport MAPFAM : public TXTFAM {
20+
friend class TDBJSON;
2021
public:
2122
// Constructor
2223
MAPFAM(PDOSDEF tdp);

storage/connect/filamtxt.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class DllExport TXTFAM : public BLOCK {
4242
virtual PTXF Duplicate(PGLOBAL g) = 0;
4343
virtual bool GetUseTemp(void) {return false;}
4444
virtual int GetDelRows(void) {return DelRows;}
45+
PFBLOCK GetTo_Fb(void) {return To_Fb;}
4546
int GetCurBlk(void) {return CurBlk;}
4647
void SetTdbp(PTDBDOS tdbp) {Tdbp = tdbp;}
4748
int GetBlock(void) {return Block;}

0 commit comments

Comments
 (0)