summaryrefslogtreecommitdiff
path: root/storage/connect/filamvct.cpp
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2015-03-18 13:30:14 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2015-03-18 13:30:14 +0100
commit2bb42803df520285dacd753f728ed21994027116 (patch)
tree7eb4d32d2c91cda4d0959a42035fd11966ad8d04 /storage/connect/filamvct.cpp
parent57aaccef52c22760450f02618213ec90ba0e873e (diff)
downloadmariadb-git-2bb42803df520285dacd753f728ed21994027116.tar.gz
This commit includes changes done in a previous (deleted) branch plus new ones.
From the previous branch: commit eda4928ff122a0845baf5ade83b4aa29244a3a89 Author: Olivier Bertrand <bertrandop@gmail.com> Date: Mon Mar 9 22:34:56 2015 +0100 - Add discovery to JSON tables When columns are not defined, CONNECT analyses the json file to find column definitions. This wors only on table that are an array of objects. Pair keys are used to generate the column names and pair values are used for its definition. When the LEVEL option is defined as a not null integer, the eventual JPATH is scanned up to the LEVEL value. From the current one: - Fix MDEV-7521 when column names are utf8 encoded (not a general multi-charset fix) - Adds more to JSON discovery processing and UDF's - Use PlugDup everywhere it replaces PlugSubAlloc + strcpy.
Diffstat (limited to 'storage/connect/filamvct.cpp')
-rwxr-xr-xstorage/connect/filamvct.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/storage/connect/filamvct.cpp b/storage/connect/filamvct.cpp
index c449347bbcb..e1f11bbf4cf 100755
--- a/storage/connect/filamvct.cpp
+++ b/storage/connect/filamvct.cpp
@@ -5,7 +5,7 @@
/* */
/* COPYRIGHT: */
/* ---------- */
-/* (C) Copyright to the author Olivier BERTRAND 2005-2014 */
+/* (C) Copyright to the author Olivier BERTRAND 2005-2015 */
/* */
/* WHAT THIS PROGRAM DOES: */
/* ----------------------- */
@@ -1451,8 +1451,7 @@ bool VCMFAM::OpenTableFile(PGLOBAL g)
/*******************************************************************/
fp = (PFBLOCK)PlugSubAlloc(g, NULL, sizeof(FBLOCK));
fp->Type = TYPE_FB_MAP;
- fp->Fname = (char*)PlugSubAlloc(g, NULL, strlen(filename) + 1);
- strcpy((char*)fp->Fname, filename);
+ fp->Fname = PlugDup(g, filename);
fp->Next = dbuserp->Openlist;
dbuserp->Openlist = fp;
fp->Count = 1;
@@ -2844,8 +2843,7 @@ bool VMPFAM::MapColumnFile(PGLOBAL g, MODE mode, int i)
/*******************************************************************/
fp = (PFBLOCK)PlugSubAlloc(g, NULL, sizeof(FBLOCK));
fp->Type = TYPE_FB_MAP;
- fp->Fname = (char*)PlugSubAlloc(g, NULL, strlen(filename) + 1);
- strcpy((char*)fp->Fname, filename);
+ fp->Fname = PlugDup(g, filename);
fp->Next = dup->Openlist;
dup->Openlist = fp;
fp->Count = 1;