Commit graph

419 commits

Author SHA1 Message Date
Olivier Bertrand
614611d7c0 - Fix MDEV-13621 JDBC UPDATE containing single or double quote chars produces wrong result
in ha_connect::GetStringOption
  modified:   storage/connect/ha_connect.cc

- Begin implement data type BINARY
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/myutil.cpp
  modified:   storage/connect/valblk.cpp
  modified:   storage/connect/valblk.h
  modified:   storage/connect/value.cpp

- Fix MDEV-12422 CONNECT Engine to support CHECK TABLE
  Adding a fake check function returning HA_ADMIN_OK.
  modified:   storage/connect/ha_connect.h

- Treat TBL (thread) as local when connected to the current server
  and return by timeout when a TBL remote table connection fail (Thread only)
  modified:   storage/connect/myconn.cpp
  modified:   storage/connect/tabmysql.h
  modified:   storage/connect/tabtbl.cpp
  modified:   storage/connect/tabtbl.h

- Update some tests and result files
  modified:   storage/connect/mysql-test/connect/r/tbl_thread.result
  modified:   storage/connect/mysql-test/connect/t/tbl_thread.test
  modified:   storage/connect/mysql-test/connect/r/updelx.result

- Add the GetCsName function
  modified:   storage/connect/reldef.h
2017-08-26 11:02:53 +02:00
Olivier Bertrand
0387c13ee7 - Add a define making ha_connect.cc source unique for all MariaDB version.
#if defined(NEW_MAR)
#define stored_in_db stored_in_db()
#endif   // NEW_MAR)
  modified:   storage/connect/CMakeLists.txt
  modified:   storage/connect/ha_connect.cc

- Fix compile failure for some configuration of CONNECT.
This by updating the #ifdef's JDBC, MONGO and CMGO_SUPPORT.
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h

- Fix failure of zip.test (restore code wrongly deleted)
  modified:   storage/connect/tabjson.cpp

- Make sure thread TBL table structure is correctly initialized.
  modified:   storage/connect/tabtbl.cpp

- Add new test case in tbl_thread.test
  modified:   storage/connect/mysql-test/connect/r/tbl_thread.result
  modified:   storage/connect/mysql-test/connect/t/tbl_thread.test

- Remake a jar file after Java was updated
  modified:   storage/connect/mysql-test/connect/std_data/Mongo3.jar
2017-08-06 19:56:57 +02:00
Olivier Bertrand
d8f99f165b - Add FBLOCK when opening ODBC, JSON and MONGO tables.
This to have automatic closing in case of thrown error.
  modified:   storage/connect/cmgoconn.cpp
  modified:   storage/connect/cmgoconn.h
  modified:   storage/connect/filamzip.cpp
  modified:   storage/connect/javaconn.cpp
  modified:   storage/connect/javaconn.h
  modified:   storage/connect/odbconn.cpp
  modified:   storage/connect/odbconn.h
  modified:   storage/connect/plgdbsem.h
  modified:   storage/connect/plgdbutl.cpp

- Fix INCOL bug when inserting several lines to MONGO tables
  modified:   storage/connect/cmgoconn.cpp
  modified:   storage/connect/tabcmg.cpp
  modified:   storage/connect/tabjmg.cpp

- MONGO_SUPPORT is set for both MongoDB drivers
  CMGO_SUPPORT  is set only when the C driver is available
  modified:   storage/connect/CMakeLists.txt
  modified:   storage/connect/filter.h
  modified:   storage/connect/filter.h
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/mongo.cpp
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h

- Separate enums JCATINFO and
  modified:   storage/connect/javaconn.h
  modified:   storage/connect/jdbconn.cpp

- Fix crash when executing JDBC catfunc=driver
  modified:   storage/connect/jdbconn.cpp

- Report an error when the Mongo driver if explicitly
specified and not supported.
  modified:   storage/connect/mongo.cpp

- Fix bug causing catalog JSON tables to fail
  modified:   storage/connect/tabjson.cpp

- Protect by mutex the Ready variable of the TBLTBM table type
  modified:   storage/connect/tabtbl.cpp

- Put testing of Thread TBL tables in a separate test
With added case and modified old case that could avoid the test to fail.
  modified:   storage/connect/mysql-test/connect/r/tbl.result
  modified:   storage/connect/mysql-test/connect/t/tbl.test
  new file:   storage/connect/mysql-test/connect/r/tbl_thread.result
  new file:   storage/connect/mysql-test/connect/t/tbl_thread.test

- jmongo3.test no more exists
  deleted:    storage/connect/mysql-test/connect/t/jmongo3.test

- Add new tests for the MONGO feature (disabled)
  modified:   storage/connect/mysql-test/connect/disabled.def
  new file:   storage/connect/mysql-test/connect/r/json_java_2.result
  new file:   storage/connect/mysql-test/connect/r/json_java_3.result
  new file:   storage/connect/mysql-test/connect/r/json_mongo_c.result
  new file:   storage/connect/mysql-test/connect/r/mongo_c.result
  new file:   storage/connect/mysql-test/connect/r/mongo_java_2.result
  new file:   storage/connect/mysql-test/connect/r/mongo_java_3.result
  new file:   storage/connect/mysql-test/connect/std_data/Mongo2.jar
  new file:   storage/connect/mysql-test/connect/std_data/cities.json
  new file:   storage/connect/mysql-test/connect/t/json_java_2.test
  new file:   storage/connect/mysql-test/connect/t/json_java_3.test
  new file:   storage/connect/mysql-test/connect/t/json_mongo_c.test
  new file:   storage/connect/mysql-test/connect/t/mongo.inc
  new file:   storage/connect/mysql-test/connect/t/mongo_c.test
  new file:   storage/connect/mysql-test/connect/t/mongo_java_2.test
  new file:   storage/connect/mysql-test/connect/t/mongo_java_3.test
  new file:   storage/connect/mysql-test/connect/t/mongo_test.inc
2017-08-05 18:08:51 +02:00
Olivier Bertrand
7388f95319 -- Last wrappers version with support of Java Mongo discovery.
modified:   storage/connect/JavaWrappers.jar

-- Typo
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/plgdbutl.cpp
2017-07-23 11:58:20 +02:00
Olivier Bertrand
cfe3252afe -- No suppressing of the GetPlug function. It is GetUser that can cause memory leak
when xp is modified. The old xp must be poped or is never freed.
  modified:   storage/connect/ha_connect.cc
2017-07-22 17:23:26 +02:00
Olivier Bertrand
3329fbae19 -- Suppress the GetPlug function causing memory leak
modified:   storage/connect/ha_connect.h
  modified:   storage/connect/ha_connect.cc

-- Trace work storage allocation and freeing in DEVELOPMENT mode
   (Fix a compile error)
  modified:   storage/connect/plugutil.cpp
2017-07-22 00:21:59 +02:00
Olivier Bertrand
6fdd5cda6a Fix compile error. Modified user_connect.cc ha_connect.cc 2017-07-21 16:26:08 +02:00
Olivier Bertrand
8476d3052a -- Add mutex for user_connect handling
modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/user_connect.cc
  modified:   storage/connect/plgdbutl.cpp
  modified:   storage/connect/user_connect.cc

-- Trace work storage allocation and freeing in DEVELOPMENT mode
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/plugutil.cpp
2017-07-21 15:24:13 +02:00
Olivier Bertrand
e99af2a3fa -- Fix warnings from the new GCC 7
modified:   storage/connect/ha_connect.cc

-- Set NULL false in SetJsonValue
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/tabjson.cpp
2017-07-19 23:30:40 +02:00
Olivier Bertrand
f590296c28 -- Finalize work on MongoDB access
Implement discovery for the MongoDB Java Driver
   Create classes to minimize code and avoid dupicates
   Rearrange and rename implied files
  modified:   storage/connect/CMakeLists.txt
  renamed:    storage/connect/mongofam.cpp -> storage/connect/cmgfam.cpp
  renamed:    storage/connect/mongofam.h -> storage/connect/cmgfam.h
  modified:   storage/connect/cmgoconn.h
  modified:   storage/connect/javaconn.h
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/jmgoconn.cpp
  modified:   storage/connect/jmgoconn.h
  modified:   storage/connect/mongo.cpp
  modified:   storage/connect/mongo.h
  renamed:    storage/connect/tabmgo.cpp -> storage/connect/tabcmg.cpp
  renamed:    storage/connect/tabmgo.h -> storage/connect/tabcmg.h
  modified:   storage/connect/tabjmg.cpp
  modified:   storage/connect/tabjmg.h
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h

-- Trace Sarea allocation and freeing
  modified:   storage/connect/connect.cc
  modified:   storage/connect/plugutil.cpp
  modified:   storage/connect/user_connect.cc

-- Null Json values where not mark as null in JSNX::SetJsonValue
   This was added in TYPE_NULL (declared as TYPE_VOID)
  modified:   storage/connect/json.cpp
  modified:   storage/connect/json.h
  modified:   storage/connect/jsonudf.cpp

-- Null JValues are ignored in JSNX::CalculateArray
   Also done in tabjson.cpp for JSONCOL::CalculateArray
  modified:   storage/connect/json.h
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/tabjson.cpp

-- Null JSON values now represented by connect_json_null session variable
  modified:   storage/connect/json.cpp
  modified:   storage/connect/json.h
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/tabjson.cpp

-- JVALUE has size = 1
  modified:   storage/connect/json.h

-- Fix by vuvova because Debian compilation failure.
  modified:   storage/connect/value.cpp
2017-07-18 13:16:55 +02:00
Olivier Bertrand
a9d32010d0 - Fix MDEV-13239 Suppress the restriction about no blanks
around , and = in the OPTION_LIST.
  modified:   storage/connect/ha_connect.cc
2017-07-04 19:18:14 +02:00
Olivier Bertrand
b63f847743 - Suppress warning when creating mongo JSON tables
modified:   storage/connect/ha_connect.cc

- Add catalog table for Mongo java driver tables
  modified:   storage/connect/mongo.cpp
  modified:   storage/connect/mongo.h
  modified:   storage/connect/tabjmg.cpp
  modified:   storage/connect/tabjmg.h
2017-07-03 22:28:55 +02:00
Olivier Bertrand
94e5d7de85 - Add Support of the MongoDB Java Driver.
modified:   storage/connect/CMakeLists.txt
  modified:   storage/connect/JavaWrappers.jar
  modified:   storage/connect/colblk.h
  modified:   storage/connect/filter.cpp
  modified:   storage/connect/filter.h
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/ha_connect.h
  modified:   storage/connect/jdbccat.h
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/jdbconn.h
  modified:   storage/connect/mongofam.cpp
  modified:   storage/connect/mongofam.h
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/mycat.h
  modified:   storage/connect/tabext.h
  modified:   storage/connect/tabjdbc.cpp
  modified:   storage/connect/tabjdbc.h
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
  modified:   storage/connect/tabmgo.cpp
  modified:   storage/connect/tabmgo.h
  created:    storage/connect/Mongo2Interface.java
  created:    storage/connect/Mongo3Interface.java
  created:    storage/connect/cmgoconn.cpp
  created:    storage/connect/cmgoconn.h
  created:    storage/connect/javaconn.cpp
  created:    storage/connect/javaconn.h
  created:    storage/connect/jmgfam.cpp
  created:    storage/connect/jmgfam.h
  created:    storage/connect/jmgoconn.cpp
  created:    storage/connect/jmgoconn.h
  created:    storage/connect/mongo.cpp
  created:    storage/connect/mongo.h
  created:    storage/connect/tabjmg.cpp
  created:    storage/connect/tabjmg.h

- tdbp not initialized when catched exception
in CntGetTDB (connect.cc line 188)
  modified:   storage/connect/connect.h

- CheckCleanup should sometimes doing cleanup on pure info
Sometimes MariaDB loops on info to get the size of all tables in a database.
This can sometimes fail by exhausted memory.
CheckCleanup now have a force boolean parameter (defaulting to false)
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/user_connect.cc
  modified:   storage/connect/user_connect.h

Change the copyright of some source files
  modified:   storage/connect/connect.cc
  modified:   storage/connect/connect.h
  modified:   storage/connect/engmsg.h
  modified:   storage/connect/global.h
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/ha_connect.h
  modified:   storage/connect/msgid.h
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/mycat.h
  modified:   storage/connect/os.h
  modified:   storage/connect/osutil.c
  modified:   storage/connect/osutil.h
  modified:   storage/connect/user_connect.cc
  modified:   storage/connect/user_connect.h
2017-07-02 22:41:11 +02:00
Olivier Bertrand
c746b768ad Tabname defaults to the table name for MONGO tables
modified:   storage/connect/ha_connect.cc
2017-06-03 23:33:51 +02:00
Olivier Bertrand
aef1493224 Protect Info function against NULL g pointer
modified:   storage/connect/ha_connect.cc

Update failing test
  modified:   storage/connect/mysql-test/connect/t/secure_file_priv.test
2017-06-01 10:14:03 +02:00
Olivier Bertrand
de1a9b172a Add table option FILTER used by Mongo and Json tables.
modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/mongofam.cpp
  modified:   storage/connect/mycat.h
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
  modified:   storage/connect/tabmgo.cpp
  modified:   storage/connect/tabmgo.h

Fix a regression bug in MongoFam
(all = true only when no Options)
  modified:   storage/connect/mongofam.cpp

Fix a regression bug in JsonCol
(in JSONCOL::GetJpath)
  modified:   storage/connect/tabjson.cpp
2017-05-29 19:46:59 +02:00
Olivier Bertrand
cbdfdfc829 Add CHECK TABLE to the list of accepted commands.
This is to avoid an error to be reported when executing this command on a CONNECT table.
  modified:   storage/connect/ha_connect.cc
2017-05-28 12:43:54 +02:00
Olivier Bertrand
7f02ab70b3 Recognize xmlsup option case insensitive
modified:   storage/connect/ha_connect.cc

Update tests to reflect recent changes, in particular new Jpath syntax
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/mysql-test/connect/r/alter_xml.result
  modified:   storage/connect/mysql-test/connect/r/bin.result
  modified:   storage/connect/mysql-test/connect/r/dir.result
  modified:   storage/connect/mysql-test/connect/r/grant.result
  modified:   storage/connect/mysql-test/connect/r/grant2.result
  modified:   storage/connect/mysql-test/connect/r/infoschema-9739.result
  modified:   storage/connect/mysql-test/connect/r/ini_grant.result
  modified:   storage/connect/mysql-test/connect/r/jdbc_new.result
  modified:   storage/connect/mysql-test/connect/r/mysql_discovery.result
  modified:   storage/connect/mysql-test/connect/r/mysql_exec.result
  modified:   storage/connect/mysql-test/connect/r/mysql_grant.result
  modified:   storage/connect/mysql-test/connect/r/mysql_new.result
  modified:   storage/connect/mysql-test/connect/r/unsigned.result
  modified:   storage/connect/mysql-test/connect/r/upd.result
  modified:   storage/connect/mysql-test/connect/r/xml.result
  modified:   storage/connect/mysql-test/connect/r/xml_grant.result
  modified:   storage/connect/mysql-test/connect/r/xml_html.result
  modified:   storage/connect/mysql-test/connect/r/xml_mdev5261.result
  modified:   storage/connect/mysql-test/connect/r/xml_mult.result
  modified:   storage/connect/mysql-test/connect/r/xml_zip.result
  modified:   storage/connect/mysql-test/connect/t/alter_xml.test
  modified:   storage/connect/mysql-test/connect/t/dir.test
  modified:   storage/connect/mysql-test/connect/t/infoschema-9739.test
  modified:   storage/connect/mysql-test/connect/t/jdbc_new.test
  modified:   storage/connect/mysql-test/connect/t/mysql_exec.test
  modified:   storage/connect/mysql-test/connect/t/mysql_new.test
  modified:   storage/connect/mysql-test/connect/t/unsigned.test
  modified:   storage/connect/mysql-test/connect/t/upd.test
  modified:   storage/connect/mysql-test/connect/t/xml.test
  modified:   storage/connect/mysql-test/connect/t/xml_grant.test
  modified:   storage/connect/mysql-test/connect/t/xml_html.test
  modified:   storage/connect/mysql-test/connect/t/xml_mdev5261.test
  modified:   storage/connect/mysql-test/connect/t/xml_mult.test
  modified:   storage/connect/mysql-test/connect/t/xml_zip.test
2017-05-25 21:43:11 +02:00
Olivier Bertrand
3e36eb230b Fix gcc compiler warnings reported by Sergei
modified:   storage/connect/array.cpp
  modified:   storage/connect/array.h
  modified:   storage/connect/blkfil.cpp
  modified:   storage/connect/blkfil.h
  modified:   storage/connect/block.h
  modified:   storage/connect/colblk.cpp
  modified:   storage/connect/colblk.h
  modified:   storage/connect/csort.h
  modified:   storage/connect/filamvct.cpp
  modified:   storage/connect/filter.cpp
  modified:   storage/connect/filter.h
  modified:   storage/connect/global.h
  modified:   storage/connect/json.h
  modified:   storage/connect/plgdbsem.h
  modified:   storage/connect/plgdbutl.cpp
  modified:   storage/connect/tabcol.cpp
  modified:   storage/connect/tabcol.h
  modified:   storage/connect/tabdos.cpp
  modified:   storage/connect/tabdos.h
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/table.cpp
  modified:   storage/connect/tabodbc.cpp
  modified:   storage/connect/tabodbc.h
  modified:   storage/connect/tabsys.h
  modified:   storage/connect/tabxml.h
  modified:   storage/connect/value.cpp
  modified:   storage/connect/value.h
  modified:   storage/connect/xindex.cpp
  modified:   storage/connect/xindex.h
  modified:   storage/connect/xobject.cpp
  modified:   storage/connect/xobject.h
  modified:   storage/connect/xtable.h

Set values as nullable when retrieving catalog info
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/mysql-test/connect/r/odbc_oracle.result
  modified:   storage/connect/odbconn.cpp

Change format of Jpath
  modified:   storage/connect/json.cpp
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/mysql-test/connect/r/json.result
  modified:   storage/connect/mysql-test/connect/r/json_udf.result
  modified:   storage/connect/mysql-test/connect/r/json_udf_bin.result
  modified:   storage/connect/mysql-test/connect/r/zip.result
  modified:   storage/connect/mysql-test/connect/t/json.test
  modified:   storage/connect/mysql-test/connect/t/json_udf.test
  modified:   storage/connect/mysql-test/connect/t/json_udf_bin.test
  modified:   storage/connect/mysql-test/connect/t/zip.test
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
  modified:   storage/connect/tabmgo.cpp

Change null representation from ??? to <null>
  modified:   storage/connect/json.cpp

Change the name of UDF that are equal to a native JSON function name
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h
  modified:   storage/connect/mysql-test/connect/t/json_udf.inc
  modified:   storage/connect/mysql-test/connect/t/json_udf2.inc

Fix bug in making JSON project info
  modified:   storage/connect/mongofam.cpp

Fix COMPUTE when one argument is null
  modified:   storage/connect/value.cpp

Value is null only when nullable
  modified:   storage/connect/value.h
2017-05-23 19:35:50 +02:00
Sergei Golubchik
da4d71d10d Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
iangilfillan
f0ec34002a Correct FSF address 2017-03-10 18:21:29 +01:00
Sergei Golubchik
b6a1d6538b compiler warnings 2017-03-10 18:21:22 +01:00
Olivier Bertrand
b2956b2ab4 Update version number and date
modified:   storage/connect/ha_connect.cc

Add conditional SE exception support
  modified:   storage/connect/json.cpp
  modified:   storage/connect/plgdbutl.cpp

Change %p in %x in some sprintf functions.
This to avoid some compiler warnings.
  modified:   storage/connect/tabwmi.cpp
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/value.h

Add JavaWrappers.jar to the class path
  modified:   storage/connect/jdbconn.cpp

Fix wrong declare (char *buf[256]; --> char  buf[256];)
  modified:   storage/connect/xindex.cpp
2017-03-02 12:12:53 +01:00
Olivier Bertrand
6f34d8807c All changes made on 10.1 2017-02-16 18:01:48 +01:00
Sergei Golubchik
2195bb4e41 Merge branch '10.1' into 10.2 2017-02-10 17:01:45 +01:00
Olivier Bertrand
82913b0e90 Commit changes made for version 10.1 2017-01-17 19:39:49 +01:00
Sergei Golubchik
4a5d25c338 Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
Olivier Bertrand
4314768150 Modified version number 2016-12-25 12:32:05 +01:00
Olivier Bertrand
e6b563f8be Fix some XML table type bugs:
- in DOMNODELIST::DropItem
  if (Listp == NULL || Listp->length <= n)
    return true;
is wrong, should be:
  if (Listp == NULL || Listp->length < n)
    return true;
- Crash in discovery with libxml2 in XMLColumns because:
            if (!tdp->Usedom)    // nl was destroyed
              vp->nl = vp->pn->GetChildElements(g);
is executed with vp->pn uninitialized. Fixed by adding:
          vp->pn = node;
line 264.
-In discovery with libxml2 some columns are not found.
Because list was not recovered properly, nodes being modified and not reallocated.
Fixed lines 214 and 277.
  modified:   storage/connect/domdoc.cpp
  modified:   storage/connect/tabxml.cpp

Add support for zipped table files
  modified:   storage/connect/domdoc.cpp
  modified:   storage/connect/domdoc.h
  modified:   storage/connect/filamap.cpp
  modified:   storage/connect/filamap.h
  modified:   storage/connect/filamzip.cpp
  modified:   storage/connect/filamzip.h
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/libdoc.cpp
  modified:   storage/connect/plgdbutl.cpp
  modified:   storage/connect/plgxml.cpp
  modified:   storage/connect/plgxml.h
  modified:   storage/connect/tabdos.cpp
  modified:   storage/connect/tabdos.h
  modified:   storage/connect/tabfmt.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabxml.cpp
2016-12-23 16:58:32 +01:00
Olivier Bertrand
952306502e - MDEV-11295: developing handling files contained in ZIP file.
Enable using multiple zip files
  modified:   storage/connect/filamzip.cpp
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/ha_connect.h
  modified:   storage/connect/mycat.h
  modified:   storage/connect/tabdos.cpp
  modified:   storage/connect/tabdos.h
  modified:   storage/connect/tabfmt.cpp
  modified:   storage/connect/tabjson.cpp
2016-12-14 14:20:23 +01:00
Olivier Bertrand
d44723e621 - MDEV-11295: developing handling files contained in ZIP file.
A first experimental and limited implementation.
  modified:   storage/connect/CMakeLists.txt
  modified:   storage/connect/filamap.cpp
  new file:   storage/connect/filamzip.cpp
  new file:   storage/connect/filamzip.h
  modified:   storage/connect/ha_connect.cc
  new file:   storage/connect/ioapi.c
  new file:   storage/connect/ioapi.h
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/plgdbsem.h
  modified:   storage/connect/plgdbutl.cpp
  modified:   storage/connect/tabdos.cpp
  modified:   storage/connect/tabdos.h
  modified:   storage/connect/tabfmt.cpp
  modified:   storage/connect/tabfmt.h
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
  new file:   storage/connect/tabzip.cpp
  new file:   storage/connect/tabzip.h
  new file:   storage/connect/unzip.c
  new file:   storage/connect/unzip.h
  new file:   storage/connect/zip.c
2016-12-12 10:57:19 +01:00
kevg
780db8e252 fix build and some warnings 2016-11-24 17:36:02 +03:00
Olivier Bertrand
5884aa15d4 - Fix MDEV-11234. Escape quoting character. Should be doubled.
Now it is also possible to escape it by a backslash.
  modified:   storage/connect/tabfmt.cpp

- Prepare making VEC table type support conditional.
  VEC tables might be unsupported in future versions
  modified:   storage/connect/CMakeLists.txt
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/reldef.cpp
  modified:   storage/connect/xindex.cpp

- MDEV-11067 suggested to add configuration support to the Apache wrapper.
  Was added but commented out until prooved it is really useful.
  modified:   storage/connect/ApacheInterface.java
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/jdbccat.h
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/jdbconn.h
  modified:   storage/connect/tabjdbc.cpp
  modified:   storage/connect/tabjdbc.h

- Remove useless members.
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/jdbconn.h

- New UDF countin.
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h
2016-11-06 14:57:27 +01:00
Sergei Golubchik
06b7fce9f2 Merge branch '10.1' into 10.2 2016-09-09 08:33:08 +02:00
Olivier Bertrand
213765cc22 - Fix MDEV-10496. Memory leak in discovery
modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/mycat.cc

- Fix wrong lrecl calculation for virtual columns
  modified:   storage/connect/reldef.cpp

- Typo
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/json.cpp
2016-09-05 13:18:04 +02:00
Olivier Bertrand
a2934d2710 - JdbcInterface: change return type of ...Field function
modified:   storage/connect/JdbcInterface.java

- Change Version number and date
  modified:   storage/connect/ha_connect.cc

- Implement the test on connect_type_conv YES/NO
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/odbconn.cpp

- Fix MDEV-10520. Local schema was confused with remote schema
  modified:   storage/connect/tabjdbc.cpp
  modified:   storage/connect/tabodbc.cpp

- Fix crash when using mapped indices. Was trying to write in a mapped
  file declared as read only.
  modified:   storage/connect/xindex.cpp
2016-08-10 18:27:31 +02:00
Olivier Bertrand
44012db635 All changes made on 10.1 for last 11 commits 2016-07-14 20:12:22 +02:00
Sergei Golubchik
932646b1ff Merge branch '10.1' into 10.2 2016-06-30 16:38:05 +02:00
Monty
4dc5075860 Fixed compiler warnings and test failures found by buildbot
Fixed ccfilter to detect errors where the column is included in the error message
2016-06-24 02:25:14 +03:00
Olivier Bertrand
7e64b07968 - Add column pattern and table type argument to catalog tables
modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/jdbconn.h
  modified:   storage/connect/odbccat.h
  modified:   storage/connect/odbconn.cpp
  modified:   storage/connect/tabjdbc.cpp
  modified:   storage/connect/tabjdbc.h
  modified:   storage/connect/tabodbc.cpp
  modified:   storage/connect/tabodbc.h

- Avoid longjump in AllocCatInfo functions
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/jdbconn.h
  modified:   storage/connect/odbconn.cpp

- Change GetColumns error return value from 0 to -1
  modified:   storage/connect/JdbcInterface.class
  modified:   storage/connect/JdbcInterface.java
2016-06-20 16:37:57 +02:00
Otto Kekäläinen
effbe7dd7b General spell fixing in comments and strings 2016-06-08 14:17:23 +03:00
Olivier Bertrand
a9ac3506d2 git90.msg + git91.msg 2016-06-02 23:36:19 +02:00
Olivier Bertrand
613680a041 - Fix MDEV-10111 Reconize unsigned integers when creating tables via srcdef
modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/myconn.cpp

- Fix MDEV-10136 crash on SELECT jsonget_string(NULL, 'a')
  modified:   storage/connect/jsonudf.cpp

- Assert longjmp initialized when suballocating
  modified:   storage/connect/plugutil.c

- Avoid crash in MakeRecord when table->vcol_set isnull (trace > 1)
  modified:   storage/connect/ha_connect.cc
2016-06-02 22:11:08 +02:00
Olivier Bertrand
ead4147b13 - Reconize the JDBC type -7 (BIT)
modified:   storage/connect/jdbconn.cpp

- Add the global variable connect_java_wrapper
  This enables to use different wrappers
  modified:   storage/connect/CMakeLists.txt
  renamed:    storage/connect/java/ap/JdbcInterface.class -> storage/connect/JdbcApacheInterface.class
  renamed:    storage/connect/java/ap/JdbcInterface.java -> storage/connect/JdbcApacheInterface.java
  renamed:    storage/connect/java/ds/JdbcInterface.class -> storage/connect/JdbcDSInterface.class
  renamed:    storage/connect/java/ds/JdbcInterface.java -> storage/connect/JdbcDSInterface.java
  modified:   storage/connect/ha_connect.cc
  deleted:    storage/connect/java/std/JdbcInterface.class
  deleted:    storage/connect/java/std/JdbcInterface.java
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/jdbconn.h

- Add JDBC tests (disabled)
  modified:   storage/connect/mysql-test/connect/disabled.def
  new file:   storage/connect/mysql-test/connect/r/jdbc.result
  new file:   storage/connect/mysql-test/connect/r/jdbc_new.result
  new file:   storage/connect/mysql-test/connect/r/jdbc_oracle.result
  new file:   storage/connect/mysql-test/connect/r/jdbc_postgresql.result
  new file:   storage/connect/mysql-test/connect/std_data/girls.txt
  new file:   storage/connect/mysql-test/connect/t/jdbc.test
  new file:   storage/connect/mysql-test/connect/t/jdbc_new.test
  new file:   storage/connect/mysql-test/connect/t/jdbc_oracle.test
  new file:   storage/connect/mysql-test/connect/t/jdbc_postgresql.test
  new file:   storage/connect/mysql-test/connect/t/jdbconn.inc
  new file:   storage/connect/mysql-test/connect/t/jdbconn_cleanup.inc

- Typo
  modified:   storage/connect/jsonudf.cpp
2016-05-26 18:48:47 +02:00
Olivier Bertrand
f8bc587c1a Merge branch '10.1' of https://github.com/MariaDB/server into ob-10.1 2016-05-22 14:49:14 +02:00
Olivier Bertrand
9a5c586024 Merge branch '10.0' of https://github.com/MariaDB/server into 10.0 2016-05-22 11:13:10 +02:00
Olivier Bertrand
c92f2606ea Commit changes made from 10.1 2016-05-21 12:11:27 +02:00
Olivier Bertrand
2f2797e52f - JDBC tables can be connected via foreign server wrapper
Redesign the handling of errors and exceptions
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/jdbconn.h
  modified:   storage/connect/tabjdbc.cpp
  modified:   storage/connect/tabjdbc.h
2016-05-20 00:18:29 +02:00
Olivier Bertrand
5af076e564 Add all changes made on 10.1 2016-05-12 23:08:22 +02:00
Olivier Bertrand
6aa163bce8 - Continue working on the JDBC table type
Suppress the jpath option
  add the connect_jvm_path and connect_class_path global variables
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/jdbccat.h
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/jdbconn.h
  modified:   storage/connect/tabjdbc.cpp
  modified:   storage/connect/tabjdbc.h

- Add the envar UDF
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h

- Fix MDEV-9950
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/plgdbutl.cpp
2016-05-12 12:20:52 +02:00