Commit 9ca150aa authored by Olivier Bertrand's avatar Olivier Bertrand

2>libdoc.cpp

2>D:\CommonSource\mariadb-10.0\include\my_pthread.h(120) : warning C4005: '_REENTRANT' : redéfinition de macro
2>        D:\Libxml\include\libxml/xmlexports.h(77) : voir la définition précédente de '_REENTRANT'
2>.\libdoc.cpp(378) : error C2664: 'strlen' : impossible de convertir le paramètre 1 de 'xmlChar *' en 'const char *'
2>        Les types pointés n'ont aucun rapport entre eux ; conversion nécessitant reinterpret_cast, cast de style C ou cast de style fonction
2>.\libdoc.cpp(379) : error C2664: 'copy_and_convert' : impossible de convertir le paramètre 4 de 'xmlChar *' en 'const char *'
2>        Les types pointés n'ont aucun rapport entre eux ; conversion nécessitant reinterpret_cast, cast de style C ou cast de style fonction
2>

Fix for that.
parent f1b87189
...@@ -1317,7 +1317,7 @@ bool ha_connect::OpenTable(PGLOBAL g, bool del) ...@@ -1317,7 +1317,7 @@ bool ha_connect::OpenTable(PGLOBAL g, bool del)
istable= true; istable= true;
// strmake(tname, table_name, sizeof(tname)-1); // strmake(tname, table_name, sizeof(tname)-1);
if (xmod == MODE_ANY && *tdbp->GetName() != '#') { if (xmod == MODE_ANY && stop && *tdbp->GetName() != '#') {
// We are in a create index query // We are in a create index query
if (!((PTDBASE)tdbp)->GetDef()->Indexable()) { if (!((PTDBASE)tdbp)->GetDef()->Indexable()) {
sprintf(g->Message, "Table %s cannot be indexed", tdbp->GetName()); sprintf(g->Message, "Table %s cannot be indexed", tdbp->GetName());
......
...@@ -373,10 +373,11 @@ bool LIBXMLDOC::CheckDocument(FILE *of, xmlNodePtr np) ...@@ -373,10 +373,11 @@ bool LIBXMLDOC::CheckDocument(FILE *of, xmlNodePtr np)
/******************************************************************/ /******************************************************************/
int LIBXMLDOC::Decode(xmlChar *cnt, char *buf, int n) int LIBXMLDOC::Decode(xmlChar *cnt, char *buf, int n)
{ {
uint dummy_errors; const char *txt = (const char *)cnt;
uint32 len= copy_and_convert(buf, n, &my_charset_latin1, uint dummy_errors;
cnt, strlen(cnt), &my_charset_utf8_bin, uint32 len= copy_and_convert(buf, n, &my_charset_latin1, txt,
&dummy_errors); strlen(txt), &my_charset_utf8_bin,
&dummy_errors);
buf[len]= '\0'; buf[len]= '\0';
return 0; return 0;
} // end of Decode } // end of Decode
...@@ -398,9 +399,9 @@ xmlChar *LIBXMLDOC::Encode(PGLOBAL g, char *txt) ...@@ -398,9 +399,9 @@ xmlChar *LIBXMLDOC::Encode(PGLOBAL g, char *txt)
buf = Buf; buf = Buf;
} // endif g } // endif g
uint dummy_errors; uint dummy_errors;
uint32 len= copy_and_convert(buf, o, ocs, uint32 len= copy_and_convert(buf, o, ocs,
txt, i, ics, txt, i, ics,
&dummy_errors); &dummy_errors);
buf[len]= '\0'; buf[len]= '\0';
return BAD_CAST buf; return BAD_CAST buf;
} // end of Encode } // end of Encode
......
...@@ -904,22 +904,25 @@ int TDBXML::DeleteDB(PGLOBAL g, int irc) ...@@ -904,22 +904,25 @@ int TDBXML::DeleteDB(PGLOBAL g, int irc)
/***********************************************************************/ /***********************************************************************/
void TDBXML::CloseDB(PGLOBAL g) void TDBXML::CloseDB(PGLOBAL g)
{ {
if (Changed) { if (Docp) {
char filename[_MAX_PATH]; if (Changed) {
// PDBUSER dup = (PDBUSER)g->Activityp->Aptr; char filename[_MAX_PATH];
// PDBUSER dup = (PDBUSER)g->Activityp->Aptr;
// We used the file name relative to recorded datapath // We used the file name relative to recorded datapath
PlugSetPath(filename, Xfile, GetPath()); PlugSetPath(filename, Xfile, GetPath());
if (Mode == MODE_INSERT) if (Mode == MODE_INSERT)
TabNode->AddText(g, "\n"); TabNode->AddText(g, "\n");
// Save the modified document // Save the modified document
int rc = Docp->DumpDoc(g, filename); int rc = Docp->DumpDoc(g, filename);
} // endif Changed } // endif Changed
// Free the document and terminate XML processing
Docp->CloseDoc(g, To_Xb);
} // endif docp
// Free the document and terminate XML processing
Docp->CloseDoc(g, To_Xb);
} // end of CloseDB } // end of CloseDB
// ------------------------ XMLCOL functions ---------------------------- // ------------------------ XMLCOL functions ----------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment