1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

- Fix problems related to table file names when not specified:

Split unspecified VEC tables are no more allowed.
  Empty XML files are now accepted.
  Separate index files are now depending upon the SEPINDEX option
  and not allowed when file name is not specified.
  DROP now can erase table and index file.

modified:
  storage/connect/ha_connect.cc
  storage/connect/tabdos.cpp
  storage/connect/tabxml.cpp
This commit is contained in:
Olivier Bertrand
2013-03-29 01:28:48 +01:00
parent 0de0a46f02
commit dd8c89b2f4
3 changed files with 47 additions and 26 deletions

View File

@@ -383,7 +383,7 @@ int TDBXML::LoadTableFile(PGLOBAL g)
return RC_FX;
} // endif init
if (trace)
if (trace)
htrc("TDBXML: parsing %s rc=%d\n", filename, rc);
// Parse the XML file
@@ -391,8 +391,12 @@ int TDBXML::LoadTableFile(PGLOBAL g)
// Does the file exist?
int h= global_open(g, MSGID_NONE, filename, _O_RDONLY);
rc = (h == -1 && errno == ENOENT) ? RC_NF : RC_INFO;
if (h != -1) close(h);
if (h != -1) {
rc = (!_filelength(h)) ? RC_EF : RC_INFO;
close(h);
} else
rc = (errno == ENOENT) ? RC_NF : RC_INFO;
return rc;
} // endif Docp
@@ -487,8 +491,8 @@ bool TDBXML::Initialize(PGLOBAL g)
} else
TabNode = Root; // Try this ?
} else if (rc == RC_NF) {
// The XML file does not exist
} else if (rc == RC_NF || rc == RC_EF) {
// The XML file does not exist or is void
if (Mode == MODE_INSERT) {
// New Document
char buf[64];