From cd9e1938ef503b423a652aff0b5d1e0a76361fc6 Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Mon, 25 Mar 2013 11:07:45 +0100 Subject: - Add a new table option SEPINDEX (not used yet) and remove an unused parameter to all catalog info functions. modified: storage/connect/catalog.h storage/connect/filamvct.cpp storage/connect/filamzip.cpp storage/connect/ha_connect.cc storage/connect/mycat.cc storage/connect/mycat.h storage/connect/reldef.cpp storage/connect/reldef.h storage/connect/tabdos.cpp storage/connect/tabfmt.cpp storage/connect/tabmul.cpp storage/connect/tabmysql.cpp storage/connect/tabodbc.cpp storage/connect/tabsys.cpp storage/connect/tabtbl.cpp storage/connect/tabvct.cpp storage/connect/tabwmi.cpp storage/connect/tabxml.cpp storage/connect/xindex.cpp --- storage/connect/tabxml.cpp | 59 ++++++++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 26 deletions(-) (limited to 'storage/connect/tabxml.cpp') diff --git a/storage/connect/tabxml.cpp b/storage/connect/tabxml.cpp index 050902b9560..cb593d39857 100644 --- a/storage/connect/tabxml.cpp +++ b/storage/connect/tabxml.cpp @@ -92,21 +92,21 @@ bool XMLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) //void *memp = Cat->GetDescp(); //PSZ dbfile = Cat->GetDescFile(); - Fn = Cat->GetStringCatInfo(g, Name, "Filename", NULL); - Encoding = Cat->GetStringCatInfo(g, Name, "Encoding", "UTF-8"); + Fn = Cat->GetStringCatInfo(g, "Filename", NULL); + Encoding = Cat->GetStringCatInfo(g, "Encoding", "UTF-8"); if (*Fn == '?') { strcpy(g->Message, MSG(MISSING_FNAME)); return true; } // endif fn - if ((signed)Cat->GetIntCatInfo(Name, "Flag", -1) != -1) { + if ((signed)Cat->GetIntCatInfo("Flag", -1) != -1) { strcpy(g->Message, MSG(DEPREC_FLAG)); return true; } // endif flag defrow = defcol = ""; - Cat->GetCharCatInfo(Name, "Coltype", "", buf, sizeof(buf)); + Cat->GetCharCatInfo("Coltype", "", buf, sizeof(buf)); switch (toupper(*buf)) { case 'A': // Attribute @@ -133,32 +133,39 @@ bool XMLDEF::DefineAM(PGLOBAL g, LPCSTR am, int poff) return true; } // endswitch typname - Tabname = Cat->GetStringCatInfo(g, Name, "Name", Name); // Deprecated - Tabname = Cat->GetStringCatInfo(g, Name, "Table_name", Tabname); - Rowname = Cat->GetStringCatInfo(g, Name, "Rownode", defrow); - Colname = Cat->GetStringCatInfo(g, Name, "Colnode", defcol); - Mulnode = Cat->GetStringCatInfo(g, Name, "Mulnode", ""); - XmlDB = Cat->GetStringCatInfo(g, Name, "XmlDB", ""); - Nslist = Cat->GetStringCatInfo(g, Name, "Nslist", ""); - DefNs = Cat->GetStringCatInfo(g, Name, "DefNs", ""); - Limit = Cat->GetIntCatInfo(Name, "Limit", 2); - Xpand = (Cat->GetIntCatInfo(Name, "Expand", 0) != 0); - Header = Cat->GetIntCatInfo(Name, "Header", 0); - Cat->GetCharCatInfo(Name, "Xmlsup", "*", buf, sizeof(buf)); - - if (*buf == '*') // Try the old (deprecated) option - Cat->GetCharCatInfo(Name, "Method", "*", buf, sizeof(buf)); - - if (*buf == '*') // Is there a default for the database? - Cat->GetCharCatInfo("Database", "Defxml", XMLSUP, - buf, sizeof(buf)); + Tabname = Cat->GetStringCatInfo(g, "Name", Name); // Deprecated + Tabname = Cat->GetStringCatInfo(g, "Table_name", Tabname); + Rowname = Cat->GetStringCatInfo(g, "Rownode", defrow); + Colname = Cat->GetStringCatInfo(g, "Colnode", defcol); + Mulnode = Cat->GetStringCatInfo(g, "Mulnode", ""); + XmlDB = Cat->GetStringCatInfo(g, "XmlDB", ""); + Nslist = Cat->GetStringCatInfo(g, "Nslist", ""); + DefNs = Cat->GetStringCatInfo(g, "DefNs", ""); + Limit = Cat->GetIntCatInfo("Limit", 2); + Xpand = (Cat->GetIntCatInfo("Expand", 0) != 0); + Header = Cat->GetIntCatInfo("Header", 0); + Cat->GetCharCatInfo("Xmlsup", "*", buf, sizeof(buf)); + +//if (*buf == '*') // Try the old (deprecated) option +// Cat->GetCharCatInfo("Method", "*", buf, sizeof(buf)); + +//if (*buf == '*') // Is there a default for the database? +// Cat->GetCharCatInfo("Defxml", XMLSUP, buf, sizeof(buf)); // Note that if no support is specified, the default is MS-DOM - Usedom = (toupper(*buf) == 'M' || toupper(*buf) == 'D'); + // on Windows and libxml2 otherwise + if (*buf == '*') +#if defined(WIN32) + Usedom = true; +#else // !WIN32 + Usedom = false; +#endif // !WIN32 + else + Usedom = (toupper(*buf) == 'M' || toupper(*buf) == 'D'); // Get eventual table node attribute - Attrib = Cat->GetStringCatInfo(g, Name, "Attribute", ""); - Hdattr = Cat->GetStringCatInfo(g, Name, "HeadAttr", ""); + Attrib = Cat->GetStringCatInfo(g, "Attribute", ""); + Hdattr = Cat->GetStringCatInfo(g, "HeadAttr", ""); return false; } // end of DefineAM -- cgit v1.2.1