diff --git a/.gitignore b/.gitignore index e3df21eb17b..85d68f2853d 100644 --- a/.gitignore +++ b/.gitignore @@ -245,6 +245,11 @@ storage/mroonga/vendor/groonga/src/suggest/groonga-suggest-create-dataset *.ko *.obj *.elf +*.exp +*.manifest +*.dep +*.idb +*.res # Precompiled Headers *.gch diff --git a/storage/connect/mysql-test/connect/r/xml_html.result b/storage/connect/mysql-test/connect/r/xml_html.result index 7b5e0febe6e..143f46529f6 100644 --- a/storage/connect/mysql-test/connect/r/xml_html.result +++ b/storage/connect/mysql-test/connect/r/xml_html.result @@ -1,5 +1,5 @@ Warnings: -Warning 1105 No file name. Table will use t1.xml +Warning 1105 No file name. Table will use t1.xml SET NAMES utf8; # # Testing HTML like XML file @@ -11,9 +11,9 @@ CREATE TABLE beers ( ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='beers.xml' TABNAME='table' OPTION_LIST='xmlsup=libxml2,rownode=tr,colnode=td'; SELECT * FROM beers; -Name Origin Description -Huntsman Bath, UK Wonderful hop, light alcohol -Tuborg Danmark In small bottles +Name Origin Description +Huntsman Bath, UK Wonderful hop, light alcohol +Tuborg Danmark In small bottles DROP TABLE beers; # # Testing HTML file @@ -26,7 +26,7 @@ CREATE TABLE coffee ( ENGINE=CONNECT TABLE_TYPE=XML FILE_NAME='coffee.htm' TABNAME='TABLE' HEADER=1 OPTION_LIST='xmlsup=libxml2,Coltype=HTML'; SELECT * FROM coffee; -Name Cups Type Sugar -T. Sexton 10 Espresso No -J. Dinnen 5 Decaf Yes +Name Cups Type Sugar +T. Sexton 10 Espresso No +J. Dinnen 5 Decaf Yes DROP TABLE coffee; diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp index 1c1ff8a2ffe..4f7af638d0c 100644 --- a/storage/connect/tabxml.cpp +++ b/storage/connect/tabxml.cpp @@ -313,10 +313,6 @@ PQRYRES XMLColumns(PGLOBAL g, char *dp, char *tab, PTOS topt, bool info) pxcp = xcp; -// for (j = lvl - 1; j >= 0; j--) -// if (jrp[j] && (jrp[j] = jrp[j]->GetNext())) -// goto more; - if (vp->atp) vp->atp = vp->atp->GetNext(g); @@ -421,8 +417,6 @@ XMLDEF::XMLDEF(void) bool XMLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) { char *defrow, *defcol, buf[10]; -//void *memp = Cat->GetDescp(); -//PSZ dbfile = Cat->GetDescFile(); Fn = GetStringCatInfo(g, "Filename", NULL); Encoding = GetStringCatInfo(g, "Encoding", "UTF-8"); @@ -479,12 +473,6 @@ bool XMLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) Header = GetIntCatInfo("Header", 0); GetCharCatInfo("Xmlsup", "*", buf, sizeof(buf)); -//if (*buf == '*') // Try the old (deprecated) option -// GetCharCatInfo("Method", "*", buf, sizeof(buf)); - -//if (*buf == '*') // Is there a default for the database? -// GetCharCatInfo("Defxml", XMLSUP, buf, sizeof(buf)); - // Note that if no support is specified, the default is MS-DOM // on Windows and libxml2 otherwise if (*buf == '*') @@ -499,7 +487,6 @@ bool XMLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) // Get eventual table node attribute Attrib = GetStringCatInfo(g, "Attribute", ""); Hdattr = GetStringCatInfo(g, "HeadAttr", ""); - return false; } // end of DefineAM @@ -519,30 +506,6 @@ PTDB XMLDEF::GetTable(PGLOBAL g, MODE m) return tdbp; } // end of GetTable -#if 0 -/***********************************************************************/ -/* DeleteTableFile: Delete XML table files using platform API. */ -/***********************************************************************/ -bool XMLDEF::DeleteTableFile(PGLOBAL g) - { - char filename[_MAX_PATH]; - bool rc; - - // Delete the XML table file if not protected - if (!IsReadOnly()) { - PlugSetPath(filename, Fn, GetPath()); -#if defined(WIN32) - rc = !DeleteFile(filename); -#else // UNIX - rc = remove(filename); -#endif // UNIX - } else - rc =true; - - return rc; // Return true if error - } // end of DeleteTableFile -#endif // 0 - /* ------------------------- TDBXML Class ---------------------------- */ /***********************************************************************/ @@ -854,7 +817,6 @@ bool TDBXML::Initialize(PGLOBAL g) To_Xb = Docp->LinkXblock(g, Mode, rc, filename); // Add a CONNECT comment node -// sprintf(buf, " Created by CONNECT %s ", version); strcpy(buf, " Created by the MariaDB CONNECT Storage Engine"); Docp->AddComment(g, buf); @@ -1279,7 +1241,6 @@ void TDBXML::CloseDB(PGLOBAL g) if (Docp) { if (Changed) { char filename[_MAX_PATH]; -// PDBUSER dup = (PDBUSER)g->Activityp->Aptr; // We used the file name relative to recorded datapath PlugSetPath(filename, Xfile, GetPath()); @@ -1321,7 +1282,6 @@ void TDBXML::CloseDB(PGLOBAL g) NewRow = false; Hasnod = false; Write = false; -// Bufdone = false; Nodedone = false; Void = false; Nrow = -1; @@ -1413,8 +1373,6 @@ bool XMLCOL::AllocBuf(PGLOBAL g, bool mode) if (Valbuf) return false; // Already done -//Valbuf = (char*)PlugSubAlloc(g, NULL, Long + 1); -//Valbuf[Long] = '\0'; return ParseXpath(g, mode); } // end of AllocBuf @@ -1506,8 +1464,6 @@ bool XMLCOL::ParseXpath(PGLOBAL g, bool mode) // HTML like table, columns are retrieved by position new(this) XPOSCOL(Value); // Change the class of this column Inod = -1; -// Tdbp->Hasnod = true; -// return false; } else if (Type == 0 && !mode) { strcat(strcat(pbuf, "@"), Name); } else { // Type == 1 @@ -1657,7 +1613,6 @@ void XMLCOL::WriteColumn(PGLOBAL g) int done = 0; int i, n, k = 0; PXNODE TopNode = NULL; -//PXATTR AttNode = NULL; if (trace > 1) htrc("XML WriteColumn: col %s R%d coluse=%.4X status=%.4X\n", @@ -1892,7 +1847,6 @@ void XMULCOL::WriteColumn(PGLOBAL g) int done = 0; int i, n, len, k = 0; PXNODE TopNode = NULL; -//PXATTR AttNode = NULL; if (trace) htrc("XML WriteColumn: col %s R%d coluse=%.4X status=%.4X\n",