Commit graph

1298 commits

Author SHA1 Message Date
Olivier Bertrand
ad0d2424dd Fix compile error for KVM. Modified filamdbf.cpp 2020-07-13 20:02:51 +02:00
Olivier Bertrand
1e07df99f3 - Fix MDEV-22561 Unable to access DBF inside a ZIP archive
modified:   storage/connect/filamdbf.cpp
  modified:   storage/connect/filamdbf.h
  modified:   storage/connect/filamzip.cpp
  modified:   storage/connect/filamzip.h
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/plgxml.cpp
  modified:   storage/connect/tabdos.cpp
  modified:   storage/connect/tabdos.h
  modified:   storage/connect/tabfix.h

- Add/Init Level class member
  modified:   storage/connect/mongo.cpp
  modified:   storage/connect/mongo.h
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h

- Typo
  modified:   storage/connect/connect.cc
2020-07-13 16:30:57 +02:00
Olivier Bertrand
2654ddd2d5 - Fix MDEV-22571 and MDEV-22572. Allow multiple ZIP table
and enable using special column in them.
  modified:   storage/connect/tabzip.cpp
  modified:   storage/connect/tabzip.h

- Fix some compiler errors
  modified:   storage/connect/tabcmg.cpp
2020-05-19 00:05:56 +02:00
Olivier Bertrand
f5f9659b15 - Fix https://stackoverflow.com/questions/60625778/import-complex-xml-from-multiple-files-in-mariadb/60637429#60637429
Import complex XML from multiple files in MariaDB
  Some row results are missing and replaced by the last file one.
  Thats because Nx and Sx column members are not reset when changing file.
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/tabxml.h
2020-03-11 14:52:20 +01:00
Olivier Bertrand
8ff3eb417c - Fix MDEV-21450
Failed compile when XML table type is not supported.
  Was because XMLDEF was unconditionally called from REST table.
  modified:   storage/connect/tabrest.cpp

- Make cmake less verbose
  modified:   storage/connect/CMakeLists.txt

- Hide Switch_to_definer_security_ctx not defined for 10.1 and 10.0
  modified:   storage/connect/ha_connect.cc
2020-01-12 19:59:07 +01:00
Olivier Bertrand
b1c8bf464b Make LIKE_FUNC only for version >= 10.2 in ha_connect.cc 2019-12-10 16:46:32 +01:00
Olivier Bertrand
4692094de7 Fix reldef.cpp (wrong flag for catalog columns) 2019-12-04 15:20:04 +01:00
Olivier Bertrand
817675459a Fix tabrest.cpp when used for OEM 2019-12-03 19:20:26 +01:00
Olivier Bertrand
579d572d25 Make restGetFile extern C 2019-12-03 18:06:05 +01:00
Olivier Bertrand
64b1b959f1 comment out <dlfnc.h> in tabrest.cppc 2019-12-01 01:16:23 +01:00
Olivier Bertrand
65310f5855 <dlfnc.h> in tabrest.cpp and redef.cpp 2019-12-01 00:14:24 +01:00
Olivier Bertrand
1f7f533144 Add include <dlfnc.h> in tabrest.cpp 2019-11-30 19:03:29 +01:00
Olivier Bertrand
f0da39be7f - Fix MDEV-13782
Problem with NOT LIKE queries.
  modified:   storage/connect/ha_connect.cc
  modified:   sql/item_cmpfunc.h

- Fix MDEV-21084
  Misusage of strncat could cause buffer overflow.
  modified:   storage/connect/reldef.cpp
  modified:   storage/connect/tabcmg.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabrest.cpp
  modified:   storage/connect/tabxml.cpp
2019-11-26 19:22:46 +01:00
Olivier Bertrand
fb91774e4e These changed were made after pulling 10.2.30 from origin
---------------------------------------------------------
- Temporarily fix MDEV-13782 by commenting out LIKE_FUNC in CondFilter
  modified:   storage/connect/ha_connect.cc

- Remove use of hack tables
  modified:   storage/connect/connect.cc
  modified:   storage/connect/connect.h
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/xtable.h
2019-11-24 22:58:55 +01:00
Olivier Bertrand
b4bfa12b00 Fix compile error (missing declaration) in tabrest.cpp 2019-11-21 20:12:06 +01:00
Olivier Bertrand
420789512f Fix compile error (missing declaration) in tabrest.cpp 2019-11-21 19:38:17 +01:00
Olivier Bertrand
7a9eca1191 Fix compile error (imcomplete switch) in ha_connect.cc 2019-11-21 18:33:52 +01:00
Olivier Bertrand
3ad054170c These changed were made after pulling 10.2.30 from origin
---------------------------------------------------------
- Temporarily fix MDEV-13782 by commenting out LIKE_FUNC i, CondFilter
  modified:   storage/connect/ha_connect.cc

- Make Rest available for MariaDB binary distributed versions.
  modified:   storage/connect/CMakeLists.txt

- Remove unused declaration
  modified:   storage/connect/filter.h
2019-11-21 16:27:50 +01:00
Olivier Bertrand
9c0e462ff2 Fix missing declaration in tabrest.cpp causing compiling failure on Linux 2019-11-16 15:59:16 +01:00
Olivier Bertrand
2cb4b152c8 =====================================================================
This new CONNECT version 1.07 fully implements NOSQL support.
It allows working on JSON or XML data retrieved as REST query results
from all binary distributions of MariaDB when cpprestsdk is installed
and the GetRest library is available.
=====================================================================
- Make Rest available for MariaDB binary distributed versions.
  Change RestGet function so it can be called from a library.
  modified:   storage/connect/CMakeLists.txt
  modified:   storage/connect/restget.cpp
  modified:   storage/connect/tabrest.cpp

- Make column FLAG option available to discovery functions.
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/plgdbsem.h

- Update CONNECT version number and date.
  modified:   storage/connect/ha_connect.cc

- Move OEMColumns function from mycat.cc to reldef.cpp.
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/reldef.cpp

- Allocate tables as TABREF (was RELDEF)
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/mycat.h

- Fix MDEV-20845 by commenting out TIMEOUT setting.
  modified:   storage/connect/myconn.cpp

- Call DefineAM before calling GetColCatInfo. Column offset
  is now based on record format instead of table type.
  The RECFM_VCT format was added.
  This enables tables to specify the record format and is
  useful in particular for OEM tables.
  modified:   storage/connect/plgdbsem.h
  modified:   storage/connect/reldef.cpp
  modified:   storage/connect/reldef.h
  modified:   storage/connect/tabdos.cpp
  modified:   storage/connect/tabdos.h
  modified:   storage/connect/tabfix.cpp
  modified:   storage/connect/tabfmt.cpp
  modified:   storage/connect/tabmysql.cpp
  modified:   storage/connect/tabutil.cpp
  modified:   storage/connect/tabutil.h
  modified:   storage/connect/tabvct.cpp
  modified:   storage/connect/xindex.cpp
2019-11-16 14:59:54 +01:00
Oleksandr Byelkin
6680b04961 Merge remote-tracking branch 'connect/10.2' into 10.2 2019-10-30 21:56:35 +01:00
Oleksandr Byelkin
36f67a7dff Merge branch '10.1' into 10.2 2019-10-30 21:33:01 +01:00
Oleksandr Byelkin
708d46158b Merge remote-tracking branch 'connect/10.1' into 10.1 2019-10-30 13:55:35 +01:00
Sergei Golubchik
be780c0555 fix CONNECT engine to issue the correct error message 2019-10-28 08:17:56 +01:00
Olivier Bertrand
a00b713130 Fix wrong second parameter in snprintf 2019-10-16 22:12:47 +02:00
Olivier Bertrand
b56589eaf2 Some small changes.
===================
- Fix unhandled throws, add some trace + typo
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/tabodbc.cpp
  modified:   storage/connect/valblk.cpp
  modified:   storage/connect/value.cpp
2019-10-16 17:40:49 +02:00
Eugene Kosov
5e65c67cfc fix clang warning 2019-10-03 17:45:36 +03:00
Olivier Bertrand
425dc6d66f - Remove some incorrect compile flags
Just keep the /MDd flag but only for Windows Debug REST compile
  modified:   storage/connect/CMakeLists.txt

- Add a trace to EvalColumns
  modified:   storage/connect/connect.cc

- Remove a file not belonging to CONNECT
  deleted:    rest.h
2019-09-10 15:59:40 +02:00
Vladislav Vaintroub
7e7b6ec4d6 Fix connect RESTSDK support.
Remove debug output,
remove overriding of the Windows C runtime flags(linker warning)
do not add code that depends on restsdk if library is not going
to be linked.

freaking Connect
2019-09-09 13:52:30 +02:00
Monty
9cba6c5aa3 Updated mtr files to support different compiled in options
This allows one to run the test suite even if any of the following
options are changed:
- character-set-server
- collation-server
- join-cache-level
- log-basename
- max-allowed-packet
- optimizer-switch
- query-cache-size and query-cache-type
- skip-name-resolve
- table-definition-cache
- table-open-cache
- Some innodb options
etc

Changes:
- Don't print out the value of system variables as one can't depend on
  them to being constants.
- Don't set global variables to 'default' as the default may not
  be the same as the test was started with if there was an additional
  option file. Instead save original value and reset it at end of test.
- Test that depends on the latin1 character set should include
  default_charset.inc or set the character set to latin1
- Test that depends on the original optimizer switch, should include
  default_optimizer_switch.inc
- Test that depends on the value of a specific system variable should
  set it in the test (like optimizer_use_condition_selectivity)
- Split subselect3.test into subselect3.test and subselect3.inc to
  make it easier to set and reset system variables.
- Added .opt files for test that required specfic options that could
  be changed by external configuration files.
- Fixed result files in rockdsb & tokudb that had not been updated for
  a while.
2019-09-01 19:17:35 +03:00
Oleksandr Byelkin
14149d6c33 Merge remote-tracking branch 'connect/10.2' into 10.2 2019-08-30 16:52:43 +02:00
Marko Mäkelä
5f35e103ee Merge 10.1 into 10.2 2019-08-28 15:23:21 +03:00
Eugene Kosov
d4866c7d0d fix clang warnings 2019-08-28 10:14:20 +03:00
Olivier Bertrand
0043593b9d Fix xml(2)_mult.test result mismatch 2019-08-24 17:32:38 +02:00
Olivier Bertrand
dd30ba4c1b In CONNECT version 1.6.10 NOSQL facility is enhanced by a new way to retrieve NOSQL data.
In addition to files and Mongo collections, JSON as well as XML and CSV data can be retrieved
from the net as answers from REST queries. Because it uses and external package (cpprestsdk)
this is currently available only to MariaDB servers compiled from source.

-- Add the REST support when Microsoft Casablanca package (cpprestsdk) is installed.
-- Add compile flags needed on Windows /MD or /MDd (debug)
-- Also include some changes specific to MariaDB 10.3.
  modified:   storage/connect/CMakeLists.txt

-- Add conditional REST support
-- Added string options HTTP and URI.
-- Added added internal table type TAB_REST.
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/mycat.h
  modified:   storage/connect/plgdbsem.h

-- Add conditional code based on the preprocessor definition MARIADB
-- This to be able to use the same code in CONNECT and EOM modules
  modified:   storage/connect/osutil.h
  modified:   storage/connect/tabrest.cpp

-- Add files for the REST OEM module
  added:      storage/connect/mini-global.h
  added:      storage/connect/rest.def

-- Fix MDEV-19648 Variable connect_conv_size doesn't change
-- Change Variable wrong block parameter from 8169 to 1.
-- Also change connect_conv_size default value to 1024.
  modified:   storage/connect/ha_connect.cc

-- Fix compilation error when ZIP is not supported
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/tabfmt.cpp

-- Replace PlugSetPath by some concat (crashed on Fedora) + typo
  modified:   storage/connect/reldef.cpp

-- Avoid possible buffer overflow
-- In particular by the function ShowValue.
  modified:   storage/connect/tabdos.cpp
  modified:   storage/connect/tabfmt.cpp
  modified:   storage/connect/value.cpp
  modified:   storage/connect/value.h

-- Add some cast to avoid some compiler warnings
  modified:   storage/connect/filamdbf.cpp

-- Fix some C++ error
  modified:   storage/connect/javaconn.cpp
  modified:   storage/connect/jmgoconn.cpp
  modified:   storage/connect/plugutil.cpp

-- Add some tracing + typo
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/tabjson.cpp

-- Add the xtrc tracing function
  modified:   storage/connect/global.h
  modified:   storage/connect/plugutil.cpp

-- Modify tracing to use xtrc and some typo
  modified:   storage/connect/array.cpp
  modified:   storage/connect/block.h

-- Miscellaneous Typo and warning suppressing changes
  modified:   storage/connect/connect.cpp
  modified:   storage/connect/connect.h
  modified:   storage/connect/filamvct.cpp
  modified:   storage/connect/inihandl.cpp
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/libdoc.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabtbl.cpp
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/user_connect.cc
  modified:   storage/connect/user_connect.h

-- Update failing test results and disbling
  modified:   storage/connect/mysql-test/connect/disabled.def
  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/jdbc.result
  modified:   storage/connect/mysql-test/connect/r/jdbc_postgresql.result
  modified:   storage/connect/mysql-test/connect/r/xml.result
  modified:   storage/connect/mysql-test/connect/r/xml2.result
  modified:   storage/connect/mysql-test/connect/r/xml2_mult.result
  modified:   storage/connect/mysql-test/connect/r/xml_mult.result

-- Add an option
  modified:   storage/connect/mysql-test/connect/t/grant.test
2019-08-24 16:14:24 +02:00
Olivier Bertrand
6c593cd358 Typo 2019-08-22 23:34:42 +02:00
Olivier Bertrand
c0f9042500 Some small changes.
===================
- Modify tracing to use htrc to be compatible with old versions
  when this code is used to make an EOM module.
  modified:   storage/connect/restget.cpp
  modified:   storage/connect/tabrest.cpp

- Path apparently not needed for the cpprest lib on Linux
  modified:   storage/connect/CMakeLists.txt
2019-08-19 18:06:34 +02:00
Olivier Bertrand
4d93c7f3b0 In CONNECT version 1.6.10 NOSQL facility is enhanced by a new way to retrieve NOSQL data.
In addition to files and Mongo collections, JSON as well as XML and CSV data can be retrieved
from the net as answers from REST queries. Because it uses and external package (cpprestsdk)
this is currently available only to MariaDB servers compiled from source.

-- Add compile flags needed on Windows /MD or /MDd (debug)
-- Also include some changes needed on Linux
  modified:   storage/connect/CMakeLists.txt

- Add the xtrc tracing function
  modified:   storage/connect/global.h
  modified:   storage/connect/plugutil.cpp

- Modify tracing to use xtrc and some typo
  modified:   storage/connect/array.cpp
  modified:   storage/connect/block.h
  modified:   storage/connect/restget.cpp

- Fix compilation error when ZIP is not supported
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/tabfmt.cpp

- Add some tracing + typo
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/tabjson.cpp

- Add conditional code based on MARIADB
  This to be able to use the same code in CONNECT and EOM modules
  modified:   storage/connect/osutil.h
  modified:   storage/connect/tabrest.cpp

- Replace PlugSetPath by some concat (crashed on Fedora) + typo
  modified:   storage/connect/reldef.cpp

- Try to fix test failures
  modified:   zlib/CMakeLists.txt
2019-08-17 16:58:58 +02:00
Monty
fe8181aca1 Fixed issues found by valgrind
- mysqltest didn't free read_command_buf
- wait_for_slave_param did write different things to the log if valgrind
  was used.
- Table open cache should not write the initial variable value as it
  can depend on the configuration or if valgrind is used
- A variable in GetResult was used uninitalized
2019-08-12 15:41:14 +03:00
Olivier Bertrand
d302cb3534 Typo 2019-07-31 11:17:59 +02:00
Olivier Bertrand
e4797a991f In CONNECT version 1.6.10 NOSQL facility is enhanced by a new way to retrieve NOSQL data.
In addition to files and Mongo collections, JSON as well as XML and CSV data can be retrieved
from the net as answers from REST queries. Because it uses and external package (cpprestsdk)
this is currently available only to MariaDB servers compiled from source.

-- Add the REST support when Microsoft Casablanca package (cpprestsdk) is installed.
-- Also include some changes specific to MariaDB 10.3.
  modified:   storage/connect/CMakeLists.txt

-- Add conditional REST support
-- Added string options HTTP and URI.
-- Added added internal table type TAB_REST.
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/mycat.cc
  modified:   storage/connect/mycat.h
  modified:   storage/connect/plgdbsem.h

-- Fix MDEV-19648 Variable connect_conv_size doesn't change
-- Change Variable wrong block parameter from 8169 to 1.
-- Also change connect_conv_size default value to 1024.
  modified:   storage/connect/ha_connect.cc

-- Avoid possible buffer overflow
-- In particular by the function ShowValue.
  modified:   storage/connect/tabdos.cpp
  modified:   storage/connect/tabfmt.cpp
  modified:   storage/connect/value.cpp
  modified:   storage/connect/value.h

-- Add some cast to avoid some compiler warnings
  modified:   storage/connect/filamdbf.cpp

-- Fix some C++ error
  modified:   storage/connect/javaconn.cpp
  modified:   storage/connect/jmgoconn.cpp
  modified:   storage/connect/plugutil.cpp

-- Miscellaneous Typo and warning suppressing changes
  modified:   storage/connect/connect.cpp
  modified:   storage/connect/connect.h
  modified:   storage/connect/filamvct.cpp
  modified:   storage/connect/inihandl.cpp
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/libdoc.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabtbl.cpp
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/user_connect.cc
  modified:   storage/connect/user_connect.h

-- Update failing test results and disbling
  modified:   storage/connect/mysql-test/connect/disabled.def
  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/jdbc.result
  modified:   storage/connect/mysql-test/connect/r/jdbc_postgresql.result
  modified:   storage/connect/mysql-test/connect/r/xml.result
  modified:   storage/connect/mysql-test/connect/r/xml2.result
  modified:   storage/connect/mysql-test/connect/r/xml2_mult.result
  modified:   storage/connect/mysql-test/connect/r/xml_mult.result

-- Add an option
  modified:   storage/connect/mysql-test/connect/t/grant.test
2019-07-30 22:45:04 +02:00
Oleksandr Byelkin
32c6f40a63 Merge branch '10.1' into 10.2 2019-07-26 13:39:17 +02:00
Oleksandr Byelkin
25d216dcd5 Merge remote-tracking branch 'connect/10.1' into 10.1 2019-07-26 07:57:57 +02:00
Marko Mäkelä
6962855185 Merge 10.1 into 10.2 2019-07-18 13:10:09 +03:00
Sergei Golubchik
a43edf73f3 restore RESTRICT_SYMBOL_EXPORTS(zlib)
that was lost in c54271723c

remove zlib/libxml2 workaround in CONNECT
2019-07-10 08:58:28 +02:00
Eugene Kosov
4f1e4aa2ca fix clang warnings 2019-07-09 22:16:43 +03:00
Eugene Kosov
26c389b7b7 Merge 10.1 into 10.2 2019-07-09 13:22:22 +03:00
Aleksey Midenkov
0fe212a880 MDEV-19785 Storage CONNECT compilation error: unknown type name 'UNZFAM'
Another fail fix:

undefined reference to `ZipLoadFile`
2019-07-08 20:14:51 +03:00
Eugene Kosov
d36c107a6b imporve clang build
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug

Maintainer mode makes all warnings errors. This patch fix warnings. Mostly about
deprecated `register` keyword.

Too much warnings came from Mroonga and I gave up on it.
2019-06-25 13:21:36 +03:00
Marko Mäkelä
26a14ee130 Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00