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

Introducing functions global_open() and global_fopen() for these purposes:

- Removing duplicate code to generate error message text
- In the future they will most likely check secure_file_priv directory.


modified:
  storage/connect/filamdbf.cpp
  storage/connect/filamfix.cpp
  storage/connect/filamtxt.cpp
  storage/connect/filamvct.cpp
  storage/connect/libdoc.cpp
  storage/connect/maputil.cpp
  storage/connect/plgdbsem.h
  storage/connect/plgdbutl.cpp
  storage/connect/tabfmt.cpp
  storage/connect/tabmul.cpp
  storage/connect/tabxml.cpp
  storage/connect/xindex.cpp
This commit is contained in:
Alexander Barkov
2013-02-06 15:17:34 +04:00
parent 9aa88d5050
commit 22a8fb03db
12 changed files with 140 additions and 94 deletions

View File

@@ -130,10 +130,8 @@ PQRYRES CSVColumns(PGLOBAL g, char *fn, char sep, char q, int hdr, int mxr)
/*********************************************************************/
PlugSetPath(filename, fn, PlgGetDataPath(g));
if (!(infile = fopen(filename, "r"))) {
sprintf(g->Message, MSG(CANNOT_OPEN), filename);
if (!(infile= global_fopen(g, MSGID_CANNOT_OPEN, filename, "r")))
return NULL;
} // endif infile
if (hdr) {
/*******************************************************************/