Commit graph

1684 commits

Author SHA1 Message Date
Olivier Bertrand
49428c8fa6 Fix compile error on LINUX (no suitable operator delete) 2020-11-04 11:36:29 +01:00
Olivier Bertrand
78ccc605a5 Fix compile error on LINUX (LARGE_INTEGER) 2020-11-03 23:19:22 +01:00
Olivier Bertrand
28af4212b6 - Implementation of the Json BJSON representation.
VAL structures replace VALUE classes in binary trees.
  These parsed binary trees are swapped and saved on file
  Swapping is to replace pointers by offsets to make it portable.
  In restoring, class pointers to functions are realloced on place.
  Making BJSON files is done by the new UDF function jfile_bjson.
  modified:   storage/connect/block.h
  modified:   storage/connect/filamtxt.cpp
  modified:   storage/connect/filamtxt.h
  modified:   storage/connect/global.h
  modified:   storage/connect/json.cpp
  modified:   storage/connect/json.h
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
  modified:   storage/connect/value.h

- Make file (record) length and map memory possibly larger than MAX_INT
  modified:   storage/connect/filamap.cpp
  modified:   storage/connect/filamvct.cpp
  modified:   storage/connect/maputil.cpp
  modified:   storage/connect/maputil.h
  modified:   storage/connect/tabdos.cpp
  modified:   storage/connect/xindex.cpp

- Make column length as bytes (not characters)
  This when making column definitions
  modified:   storage/connect/ha_connect.cc

- Change the message when making index fails
  modified:   storage/connect/ha_connect.cc

- Update tests and results to reflect recent changes
  modified:   storage/connect/mysql-test/connect/r/alter_xml.result
  modified:   storage/connect/mysql-test/connect/r/alter_xml2.result
  modified:   storage/connect/mysql-test/connect/r/jdbc_oracle.result
  modified:   storage/connect/mysql-test/connect/r/json.result
  modified:   storage/connect/mysql-test/connect/r/json_java_2.result
  modified:   storage/connect/mysql-test/connect/r/json_java_3.result
  modified:   storage/connect/mysql-test/connect/r/json_mongo_c.result
  modified:   storage/connect/mysql-test/connect/r/mongo_c.result
  modified:   storage/connect/mysql-test/connect/r/mongo_java_2.result
  modified:   storage/connect/mysql-test/connect/r/mongo_java_3.result
  modified:   storage/connect/mysql-test/connect/r/odbc_oracle.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_html.result
  modified:   storage/connect/mysql-test/connect/r/xml2_mult.result
  modified:   storage/connect/mysql-test/connect/r/xml2_zip.result
  modified:   storage/connect/mysql-test/connect/r/xml_html.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/alter_xml2.test
  modified:   storage/connect/mysql-test/connect/t/jdbc_oracle.test
  modified:   storage/connect/mysql-test/connect/t/json.test
  modified:   storage/connect/mysql-test/connect/t/mongo_test.inc
  modified:   storage/connect/mysql-test/connect/t/odbc_oracle.test
  modified:   storage/connect/mysql-test/connect/t/xml.test
  modified:   storage/connect/mysql-test/connect/t/xml2.test
  modified:   storage/connect/mysql-test/connect/t/xml2_html.test
  modified:   storage/connect/mysql-test/connect/t/xml2_mult.test
  modified:   storage/connect/mysql-test/connect/t/xml2_zip.test
  modified:   storage/connect/mysql-test/connect/t/xml_html.test
  modified:   storage/connect/mysql-test/connect/t/xml_mult.test
  modified:   storage/connect/mysql-test/connect/t/xml_zip.test

- Typo
  modified:   storage/connect/value.cpp
2020-11-03 18:40:28 +01:00
Marko Mäkelä
533a13af06 Merge 10.3 into 10.4 2020-11-03 14:49:17 +02:00
Oleksandr Byelkin
794f665139 Merge branch '10.2' into 10.3 2020-10-30 17:23:53 +01:00
Marko Mäkelä
7b2bb67113 Merge 10.3 into 10.4 2020-10-29 13:38:38 +02:00
Oleksandr Byelkin
65e26bc1ba Merge branch '10.1' into 10.2 2020-10-28 10:56:38 +01:00
Marko Mäkelä
a8de8f261d Merge 10.2 into 10.3 2020-10-28 10:01:50 +02:00
Oleksandr Byelkin
784473b986 Merge remote-tracking branch 'connect/10.2' into 10.2 2020-10-26 09:08:44 +01:00
Olivier Bertrand
dc3a693b70 - Inline MakePtr and MakeOff with OFFSET as size_t
Also add a new member Saved_Size in the Global structure.
  modified:   storage/connect/global.h
  modified:   storage/connect/plugutil.cpp
  modified:   storage/connect/user_connect.cc
  modified:   storage/connect/jsonudf.cpp

- Add session variables json_all_path and default_depth
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/mongo.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabxml.cpp

- ADD column options JPATH and XPATH
  Work as FIELD_FORMAT but are more readable
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/ha_connect.h
  modified:   storage/connect/mysql-test/connect/r/json_java_2.result
  modified:   storage/connect/mysql-test/connect/r/json_java_3.result
  modified:   storage/connect/mysql-test/connect/r/json_mongo_c.result

- Handle negative numbes in the option list
  modified:   storage/connect/ha_connect.cc

- Fix Json parse that could crash the server.
  Was because it could use THROW out of the TRY block.
  Also handle all error by THROW.
  It is now done by a new class JSON.
  modified:   storage/connect/json.cpp
  modified:   storage/connect/json.h

- Add a new UDF function jfile_translate.
  It translate a Json file to pretty = 0.
  Fast because it does not a real parse of the file.
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h

- Add a now options JSIZE and STRINGIFY to Json tables.
  STRINGIFY makes Objects or Arrays to be returned by their
  json representation instead of by their concatenated values.
  JSIZE allows to specify the LRECL (was 256) defaults to 1024.
  Also fix a bug about locating the sub-table by its path.
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
2020-10-18 17:20:44 +02:00
Olivier Bertrand
5d2ddef26e Fix search for json subtable in tabjson.cpp 2020-10-06 12:50:12 +02:00
Olivier Bertrand
d4138e7eed Fix compile error in tabjson.cpp (ULONG -> ulong) 2020-10-05 15:21:58 +02:00
Olivier Bertrand
307258c8ee - Use BIN type when charset='binary'
modified:   storage/connect/ha_connect.cc

- Allow JSON columns to be "binary"
  By setting their type as VARBINAY(132)
  and their name begin with Jbin_
  modified:   storage/connect/json.h
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/value.cpp
  modified:   storage/connect/value.h

- CHARSET BINARY cannot be used for text columns
  modified:   storage/connect/mysql-test/connect/r/updelx.result
  modified:   storage/connect/mysql-test/connect/t/updelx.test
2020-10-05 12:29:51 +02:00
Olivier Bertrand
c6eb127ca8 - Fix allocating work space larger than 4GB
The variable connect_work_size is now ulong or ulonglong for 64bit machines.
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/user_connect.cc
2020-10-03 19:06:05 +02:00
Olivier Bertrand
99ab562a92 - Make possible to allocate work space larger than 4GB
All variables handling sizes that were uint are now size_t.
  The variable connect_work_size is now ulong (was uint);
  Also make Json functiosn to allocate a larger memory (M=9 was 7)
  modified:   storage/connect/global.h
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/json.cpp
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/plgdbutl.cpp
  modified:   storage/connect/plugutil.cpp
  modified:   storage/connect/user_connect.cc

- Fix uninitialised variable (pretty) in Json_File.
  Make Jbin_file accept the same arguments as Json_File ones.
  modified:   storage/connect/jsonudf.cpp

- Change the Level option to Depth (the word currently used)
  (Level being still accepted)
  modified:   storage/connect/mongo.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabxml.cpp

- Suppress 2nd argument default value for MYSQLtoPLG function
  modified:   storage/connect/myutil.h

- Allow REST tables to be create not specifying a file_name
  modified:   storage/connect/tabrest.cpp
2020-10-01 19:18:26 +02:00
Oleksandr Byelkin
57325e4706 Merge branch '10.3' into 10.4 2020-08-03 14:44:06 +02:00
Oleksandr Byelkin
c32f71af7e Merge branch '10.2' into 10.3 2020-08-03 13:41:29 +02:00
Oleksandr Byelkin
6d8af36bc7 Merge remote-tracking branch 'connect/10.2' into 10.2 2020-08-02 11:14:56 +02:00
Olivier Bertrand
671d9b6c61 - 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-07-16 16:30:54 +02:00
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
Marko Mäkelä
8059148154 Merge 10.3 into 10.4 2020-06-03 07:32:09 +03:00
Marko Mäkelä
8300f639a1 Merge 10.2 into 10.3 2020-06-02 10:25:11 +03:00
Sergei Golubchik
4832b751ad cmake: quieter 2020-05-31 11:29:43 +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
e3163524ea - 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
2020-05-18 23:52:33 +02:00
Marko Mäkelä
2c3c851d2c Merge 10.3 into 10.4 2020-05-05 20:33:10 +03:00
Oleksandr Byelkin
7fb73ed143 Merge branch '10.2' into 10.3 2020-05-04 16:47:11 +02:00
Oleksandr Byelkin
ca091e6372 Merge branch '10.1' into 10.2 2020-05-02 08:44:17 +02:00
Marko Mäkelä
e2f1f88fa6 Merge 10.3 into 10.4 2020-03-30 14:50:23 +03:00
Marko Mäkelä
1a9b6c4c7f Merge 10.2 into 10.3 2020-03-30 11:12:56 +03:00
Marko Mäkelä
de9072ca19 Connect: Remove some unused variables 2020-03-21 12:52:07 +02:00
Monty
1242eb3d32 Removed double records_in_range calls from multi_range_read_info_const
This was to remove a performance regression between 10.3 and 10.4
In 10.5 we will have a better implementation of records_in_range
that will enable us to get more statistics.
This change was not done in 10.4 because the 10.5 will be part of
a larger change that is not suitable for the GA 10.4 version

Other things:
- Changed default handler block_size to 8192 to fix things statistics
  for engines that doesn't set the block size.
- Fixed a bug in spider when using multiple part const ranges
  (Patch from Kentoku)
2020-03-17 02:16:48 +02:00
Olivier Bertrand
674197e2ff Disable set warnings as errors for Windows 2020-03-14 18:08:15 +01:00
Olivier Bertrand
45b9fa4a8a Fix compile error in tabcmg.cpp 2020-03-12 23:25:18 +01:00
Olivier Bertrand
4a8b55330c Resolved ha_connect.cc and CMakeLists.txt 2020-03-12 19:36:54 +01:00
Olivier Bertrand
d26b4eb4c0 Pull new version from origin 2020-03-12 19:16:36 +01:00
Olivier Bertrand
4ba36cfa0c - 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-12 19:06:03 +01:00
Olivier Bertrand
41acc81f4d - 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 23:14:19 +01: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
Monty
4d61f1247a Fixed compiler warnings from gcc 7.4.1
- Fixed possible error in rocksdb/rdb_datadic.cc
2020-01-29 23:23:55 +02:00
Oleksandr Byelkin
6918157e98 Merge branch '10.3' into 10.4 2020-01-21 23:15:02 +01:00
Oleksandr Byelkin
ade89fc898 Merge branch '10.2' into 10.3 2020-01-21 09:11:14 +01:00
Oleksandr Byelkin
3a1716a7e7 Merge branch '10.1' into 10.2 2020-01-20 16:15:05 +01:00
Oleksandr Byelkin
d07664498b Merge remote-tracking branch 'connect/10.2' into 10.2 2020-01-20 16:10:30 +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
85f2217cc8 - Update grant tests for new MariaDB version 10.1.44
modified:   storage/connect/mysql-test/connect/disabled.def
  modified:   storage/connect/mysql-test/connect/r/grant.result
  modified:   storage/connect/mysql-test/connect/r/ini_grant.result
  modified:   storage/connect/mysql-test/connect/r/mysql_grant.result
  modified:   storage/connect/mysql-test/connect/r/xml2_grant.result
  modified:   storage/connect/mysql-test/connect/r/xml_grant.result
  modified:   storage/connect/mysql-test/connect/t/grant.inc
  modified:   storage/connect/mysql-test/connect/t/grant.test
  modified:   storage/connect/mysql-test/connect/t/grant2.test
  modified:   storage/connect/mysql-test/connect/t/ini_grant.test
  modified:   storage/connect/mysql-test/connect/t/mysql_grant.test
2020-01-12 00:52:46 +01:00
Olivier Bertrand
54449161f8 Merge with last MariaDB version 2020-01-11 18:34:57 +01:00
Olivier Bertrand
98f70fa26b - 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
2020-01-11 16:05:39 +01:00
Olivier Bertrand
0b624debdf Update to version 1.07 (as for MariaDB 10.2) 2020-01-09 16:10:25 +01:00
Marko Mäkelä
4c25e75ce7 Merge 10.3 into 10.4 2019-12-27 18:20:28 +02:00
Marko Mäkelä
5ab70e7f68 Merge 10.2 into 10.3 2019-12-27 15:14:48 +02:00
Marko Mäkelä
73985d8301 Merge 10.1 into 10.2 2019-12-23 07:14:51 +02:00
Vladislav Vaintroub
8d2f6d3ca5 Fix overly chatty connect cmake, once again 2019-12-11 16:57:59 +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
Oleksandr Byelkin
a15234bf4b Merge branch '10.3' into 10.4 2019-12-09 15:09:41 +01:00
Oleksandr Byelkin
008ee867a4 Merge branch '10.2' into 10.3 2019-12-04 17:46:28 +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
Oleksandr Byelkin
425437b290 Merge remote-tracking branch 'connect/10.2' into 10.2 2019-12-03 15:42:54 +01:00
Oleksandr Byelkin
f8b5e147da Merge branch '10.1' into 10.2 2019-12-03 14:45:06 +01:00
Faustin Lammler
2df2238cb8 Lintian complains on spelling error
The lintian check complains on spelling error:
https://salsa.debian.org/mariadb-team/mariadb-10.3/-/jobs/95739
2019-12-02 12:41:13 +02: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
ce49812ec5 Commit conflict resolving after pulling from origin 10.3 2019-11-24 18:19:33 +01:00
Olivier Bertrand
afc21ab6d8 Commit some changes before pulling from origin CMakeLists.txt connect.cc 2019-11-23 16:11:46 +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
Eugene Kosov
8fbfcce911 cleanup: remove always true condition to fix clang warning 2019-11-19 17:09:43 +07: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
Marko Mäkelä
ec40980ddd Merge 10.3 into 10.4 2019-11-01 15:23:18 +02:00
Oleksandr Byelkin
55b2281a5d Merge branch '10.2' into 10.3 2019-10-31 10:58:06 +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
Marko Mäkelä
c11e5cdd12 Merge 10.3 into 10.4 2019-10-10 11:19:25 +03:00
Marko Mäkelä
892378fb9d Merge 10.2 into 10.3 2019-10-09 13:25:11 +03:00
Eugene Kosov
5e65c67cfc fix clang warning 2019-10-03 17:45:36 +03:00
David Carlier
631c5ab45f Removing obsolete register keyword 2019-09-21 00:21:10 +03:00
Marko Mäkelä
60c04be659 Merge 10.3 into 10.4 2019-09-12 12:16:40 +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
Marko Mäkelä
da9201dd5b Merge 10.2 into 10.3 2019-09-10 09:25:20 +03: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
Oleksandr Byelkin
4f10d0918d Merge branch '10.3' into 10.4 2019-09-02 14:57:05 +02:00
Oleksandr Byelkin
b0ff5a6a73 Merge branch '10.2' into 10.3 2019-09-02 09:01:54 +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
Marko Mäkelä
db4a27ab73 Merge 10.3 into 10.4 2019-08-31 06:53:45 +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ä
1a3c365953 Merge 10.2 into 10.3 2019-08-29 12:00:12 +03: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
672cc34cf5 Fix change in xml2 test result 2019-08-22 23:24:27 +02:00
Olivier Bertrand
7628fd3c6e Include all changes made on 10.2 2019-08-22 16:16:23 +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
Marko Mäkelä
1d15a28e52 Merge 10.3 into 10.4 2019-08-14 18:06:51 +03:00
Marko Mäkelä
65d48b4a7b Merge 10.2 to 10.3 2019-08-13 19:28:51 +03: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
2792c6e7b0 Merge branch '10.3' into 10.4 2019-07-28 13:43:26 +02:00
Oleksandr Byelkin
d97342b6f2 Merge branch '10.2' into 10.3 2019-07-26 22:42:35 +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ä
e9c1701e11 Merge 10.3 into 10.4 2019-07-25 18:42:06 +03:00
Marko Mäkelä
ef44ec4afa Merge 10.2 into 10.3 2019-07-19 12:31:56 +03:00
Marko Mäkelä
6962855185 Merge 10.1 into 10.2 2019-07-18 13:10:09 +03:00
Eugene Kosov
0f83c8878d Merge 10.2 into 10.3 2019-07-16 18:39:21 +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
e91fb70f99 MDEV-19785 Storage CONNECT compilation error: unknown type name 'UNZFAM'
Another fail fix:

undefined reference to `ZipLoadFile`
2019-07-09 10:01:54 +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
Aleksey Midenkov
1bb57e59a1 MDEV-19785 Storage CONNECT compilation error: unknown type name 'UNZFAM'
Another fail fix:

undefined reference to `ZipLoadFile`
2019-07-08 13:25:04 +03:00
Eugene Kosov
c9aa495fb6 MDEV-19955 make argument of handler::ha_write_row() const
MDEV-19486 and one more similar bug appeared because handler::write_row() interface
welcomes to modify buffer by storage engine. But callers are not ready for that
thus bugs are possible in future.

handler::write_row():
handler::ha_write_row(): make argument const
2019-07-05 13:14:19 +03:00
Olivier Bertrand
06b3715f26 Record some failing test results (dir,xml,xml2) 2019-06-28 11:53:58 +02:00
Olivier Bertrand
ec4795add6 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-06-27 17:54:28 +02: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
Eugene Kosov
a82e42fd13 NFC: refactor Field::is_equal() and related stuff
Make Field::is_equal() const and return bool as it's a naturally fitting
type for it. Also it's agrument was narrowed to Column_definition.

InnoDB can change type of some columns by itself. InnoDB-specific code used to
reside in Field_xxx:is_equal() methods. Now engine-specific stuff was
moved to a virtual methods of handler::can_convert{string,varstring,blob,geom}.
These methods are called by Field::can_be_converted_by_engine() which is a
double dispatch pattern.

Some InnoDB-specific code still resides in compare_keys_but_name(). It should
be moved from here someday to handler::compare_key_parts(...) or similar.

IS_EQUAL_WITH_REINTERPRET_COMPATIBLE_CHARSET
IS_EQUAL_WITH_REINTERPRET_COMPATIBLE_CHARSET_BUT_COLLATE: both was removed

IS_EQUAL_NO, IS_EQUAL_YES are not needed now and should be removed
along with deprecated handler::check_if_incompatible_data().

HA_EXTENDED_TYPES_CONVERSION: was removed as such logic is not needed now by
server code.

ALTER_COLUMN_EQUAL_PACK_LENGTH: was renamed to a more generic
ALTER_COLUMN_TYPE_CHANGE_BY_ENGINE
2019-06-22 14:09:12 +03:00
Oleksandr Byelkin
c07325f932 Merge branch '10.3' into 10.4 2019-05-19 20:55:37 +02:00
Marko Mäkelä
be85d3e61b Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
Marko Mäkelä
26a14ee130 Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
Oleksandr Byelkin
c51f85f882 Merge branch '10.2' into 10.3 2019-05-12 17:20:23 +02:00
Vicențiu Ciorbaru
cb248f8806 Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
Oleksandr Byelkin
54d0a55adf fix of results 2019-05-05 20:06:29 +02:00
Oleksandr Byelkin
ad53218a9d Merge remote-tracking branch 'connect/10.2' into 10.2 2019-05-05 09:15:47 +02:00
Oleksandr Byelkin
8cbb14ef5d Merge branch '10.1' into 10.2 2019-05-04 17:04:55 +02:00
Sergei Golubchik
5fe0087a72 CONNECT compilation failure 2019-04-26 20:50:31 +02:00
Olivier Bertrand
e049f92392 Squashed commit of connect/10.0:
commit ac275d0b4ad (connect/10.0)
Author: Olivier Bertrand <bertrandop@gmail.com>
Date:   Wed Mar 27 12:46:20 2019 +0100

    Comment out unrecognized command line options: Modified CMakeLists.txt

commit 592f1f75ad6
Author: Olivier Bertrand <bertrandop@gmail.com>
Date:   Tue Mar 26 19:52:33 2019 +0100

    Replace Command not recognized by CMake modified: CMakeLists.txt

commit 00f72199b16
Author: Olivier Bertrand <bertrandop@gmail.com>
Date:   Tue Mar 26 18:15:08 2019 +0100

    - Fix MDEV-15793: Server crash in PlugCloseFile with sql_mode=''
      Fixed by replacing sprinf by snprintf in ShowValue to avoid
      buffer overflow. It nows always use a buffer and returns int.
      modified:   storage/connect/tabdos.cpp
      modified:   storage/connect/tabfmt.cpp
      modified:   storage/connect/value.cpp
      modified:   storage/connect/value.h

    - Fix MDEV-18292: CONNECT Engine JDBC not able to issue
      simple UPDATE statement from trigger or stored procedure
      Was not fixed when the same table was called several times
      with different modes. Fixed by checking if a new statement
      is compatible in the start_stmt function. It nows do the
      same checks than external_lock.
      modified:   storage/connect/ha_connect.cc
      modified:   storage/connect/ha_connect.h

    - typo
      modified:   storage/connect/user_connect.cc

    - Fix GetTableName that returned wrong value under Windows
      modified:   storage/connect/ha_connect.cc

    - Fix MDEV-13136: enhance CREATE SERVER MyServerName
      FOREIGN DATA WRAPPER to work with CONNECT engine
      modified:   storage/connect/tabjdbc.cpp

    - Add a function to retrieve User variable value (DEVELOPMENT only)
      modified:   storage/connect/ha_connect.cc
      modified:   storage/connect/jsonudf.cpp
      modified:   storage/connect/jsonudf.h
      modified:   storage/connect/tabjdbc.cpp

    - Fix MDEV-18192: CONNECT Engine JDBC not able to issue
      simple UPDATE statement from trigger or stored procedure
      modified:   storage/connect/tabext.cpp
      modified:   storage/connect/tabext.h
      modified:   storage/connect/tabjdbc.cpp

    - Enable CONNECT tables to have triggers
      Update version number
      modified:   storage/connect/ha_connect.cc

    - Make user and password defined in CREATE TABLE have precedence on
      the ones specified in a Federated Server.
      modified:   storage/connect/tabjdbc.cpp

    - JSONColumns: Copy locally constant strings to fix error in OEM modules
      modified:   storage/connect/tabjson.cpp

commit 99de7f4e486
Author: Olivier Bertrand <bertrandop@gmail.com>
Date:   Sun Jan 27 15:16:15 2019 +0100

    - Fix MDEV-18192: CONNECT Engine JDBC not able to issue
      simple UPDATE statement from trigger or stored procedure
      modified:   storage/connect/tabext.cpp
      modified:   storage/connect/tabext.h
      modified:   storage/connect/tabjdbc.cpp

    - Enable CONNECT tables to have triggers
      Update version number
      modified:   storage/connect/ha_connect.cc

    - Make user and password defined in CREATE TABLE have precedence on
      the ones specified in a Federated Server.
      modified:   storage/connect/tabjdbc.cpp

    - JSONColumns: Copy locally constant strings to fix error in OEM modules
      modified:   storage/connect/tabjson.cpp
2019-04-26 16:49:25 +02:00
Monty
a024649081 Fixed compiler warnings form gcc 7.3.1 2019-04-19 13:17:14 +03:00
Marko Mäkelä
5c3ff5cb93 Merge 10.3 into 10.4 2019-04-02 11:04:54 +03:00
Sergei Golubchik
4e1d3f83b7 Merge branch '10.2' into 10.3 2019-03-29 19:41:41 +01:00
Sergei Golubchik
f2a0c758da Merge branch '10.1' into 10.2 2019-03-29 10:58:20 +01:00
Sergei Golubchik
d8084116b5 MDEV-7066 No Source RPMs ... (and so no "yum-builddep MariaDB-server" either)
special cases:

* change systemd detection to use CHECK_LIBRARY_EXISTS at least once,
  to have it detected by build_depends.cmake
* similarly, use find_library for pam
* unixODBC is weird, libodbc.so is in the unixODBC package, not
  in the unixODBC-devel, where normally all .so files belong.
  Packaging bug? As a workaround, use find_file(sql.h) instead of
  find_path(sql.h) to make sure that /usr/include/sql.h (not /usr/include)
  is cached by cmake, and later build_depends.cmake will select
  unixODBC-devel, as a package owning /usr/include/sql.h file.
2019-03-27 22:51:37 +01:00
Sergei Golubchik
f97d879bf8 cmake: re-enable -Werror in the maintainer mode
now we can afford it. Fix -Werror errors. Note:
* old gcc is bad at detecting uninit variables, disable it.
* time_t is int or long, cast it for printf's
2019-03-27 22:51:37 +01:00
Olivier Bertrand
4e583a276f Fixed compiler warning in connect engine 2019-03-25 23:58:04 +01:00
Olivier Bertrand
6b1e133874 Fixed compiler warning in connect engine 2019-03-25 23:54:09 +01:00
Olivier Bertrand
48d2141ba5 - Fix MDEV-15793: Server crash in PlugCloseFile with sql_mode=''
Fixed by replacing sprinf by snprintf in ShowValue to avoid
  buffer overflow. It nows always use a buffer and returns int.
  modified:   storage/connect/tabdos.cpp
  modified:   storage/connect/tabfmt.cpp
  modified:   storage/connect/value.cpp
  modified:   storage/connect/value.h
2019-03-25 17:36:35 +01:00
Olivier Bertrand
35bc91e24a Typo 2019-03-24 17:32:01 +01:00
Olivier Bertrand
fc1f3908c1 - Fix MDEV-15793: Server crash in PlugCloseFile with sql_mode=''
Fixed by replacing sprinf by snprintf in ShowValue to avoid
  buffer overflow. It nows always use a buffer and returns int.
  modified:   storage/connect/tabdos.cpp
  modified:   storage/connect/tabfmt.cpp
  modified:   storage/connect/value.cpp
  modified:   storage/connect/value.h
2019-03-23 17:51:40 +01:00
Sergei Golubchik
b64fde8f38 Merge branch '10.2' into 10.3 2019-03-17 13:06:41 +01:00
Sergei Golubchik
3d2d060b62 fix gcc 8 compiler warnings
There were two newly enabled warnings:
1. cast for a function pointers. Affected sql_analyse.h, mi_write.c
   and ma_write.cc, mf_iocache-t.cc, mysqlbinlog.cc, encryption.cc, etc

2. memcpy/memset of nontrivial structures. Fixed as:
* the warning disabled for InnoDB
* TABLE, TABLE_SHARE, and TABLE_LIST got a new method reset() which
  does the bzero(), which is safe for these classes, but any other
  bzero() will still cause a warning
* Table_scope_and_contents_source_st uses `TABLE_LIST *` (trivial)
  instead of `SQL_I_List<TABLE_LIST>` (not trivial) so it's safe to
  bzero now.
* added casts in debug_sync.cc and sql_select.cc (for JOIN)
* move assignment method for MDL_request instead of memcpy()
* PARTIAL_INDEX_INTERSECT_INFO::init() instead of bzero()
* remove constructor from READ_RECORD() to make it trivial
* replace some memcpy() with c++ copy assignments
2019-03-14 16:33:17 +01:00
Monty
f2f40a17ef Fixed compiler warning in connect engine 2019-03-14 12:14:21 +02:00
Olivier Bertrand
66197aa0d5 Typo 2019-03-04 12:26:47 +01:00
Olivier Bertrand
0a43be3929 - Fix MDEV-18292: CONNECT Engine JDBC not able to issue
simple UPDATE statement from trigger or stored procedure
  Was not fixed when the same table was called several times
  with different modes. Fixed by checking if a new statement
  is compatible in the start_stmt function. It nows do the
  same checks than external_lock.
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/ha_connect.h

- typo
  modified:   storage/connect/user_connect.cc
2019-03-04 12:18:35 +01:00
Olivier Bertrand
d421df7ea6 - Fix MDEV-18292: CONNECT Engine JDBC not able to issue
simple UPDATE statement from trigger or stored procedure
  Was not fixed when the same table was called several times
  with different modes. Fixed by checking if a new statement
  is compatible in the start_stmt function. It nows do the
  same checks than external_lock.
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/ha_connect.h

- typo
  modified:   storage/connect/user_connect.cc
2019-03-03 21:24:02 +01:00
Sachin
d00f19e832 MDEV-371 Unique Index for long columns
This patch implements engine independent unique hash index.

Usage:- Unique HASH index can be created automatically for blob/varchar/test column whose key
 length > handler->max_key_length()
or it can be explicitly specified.

  Automatic Creation:-
   Create TABLE t1 (a blob unique);
  Explicit Creation:-
   Create TABLE t1 (a int , unique(a) using HASH);

Internal KEY_PART Representations:-
 Long unique key_info will have 2 representations.
 (lets understand this with an example create table t1(a blob, b blob , unique(a, b)); )

 1. User Given Representation:- key_info->key_part array will be similar to what user has defined.
 So in case of example it will have 2 key_parts (a, b)

 2. Storage Engine Representation:- In this case there will be only one key_part and it will point to
 HASH_FIELD. This key_part will be always after user defined key_parts.

 So:- User Given Representation          [a] [b] [hash_key_part]
                  key_info->key_part ----^
  Storage Engine Representation          [a] [b] [hash_key_part]
                  key_info->key_part ------------^

 Table->s->key_info will have User Given Representation, While table->key_info will have Storage Engine
 Representation.Representation can be changed into each other by calling re/setup_keyinfo_hash function.

Working:-

1. So when user specifies HASH_INDEX or key_length is > handler->max_key_length(), In mysql_prepare_create_table
One extra vfield is added (for each long unique key). And key_info->algorithm is set to HA_KEY_ALG_LONG_HASH.

2. In init_from_binary_frm_image values for hash_keypart is set (like fieldnr , field and flags)

3. In parse_vcol_defs, HASH_FIELD->vcol_info is created. Item_func_hash is used with list of Item_fields,
   When Explicit length is given by user then Item_left is used to concatenate Item_field values.

4. In ha_write_row/ha_update_row check_duplicate_long_entry_key is called which will create the hash key from
table->record[0] and then call ha_index_read_map , if we found duplicated hash , we will compare the result
field by field.
2019-02-22 00:35:40 +01:00
Oleksandr Byelkin
93ac7ae70f Merge branch '10.3' into 10.4 2019-02-21 14:40:52 +01:00
Oleksandr Byelkin
b953d70d15 Merge branch '10.2' into 10.3 2019-02-12 12:04:10 +01:00
Igor Babaev
cd00d03fe2 MDEV-16188 Fixed the code of ha_partition::multi_range_read_info()
The code was rewritten in the same way as the code of
ha_partition::multi_range_read_info_const() had been rewritten
earlier.

The fix allowed to run spider.partition_mrr.
2019-02-10 21:15:48 -08:00
Sergei Golubchik
ca325a46d2 CONNECT: update test results 2019-02-10 00:21:43 +01:00
Sergei Golubchik
894f44b60b CONNECT: Windows paths
Followup for db8f0daeb4
2019-02-09 22:54:10 +01:00
Olivier Bertrand
dc8d1ada9f Fix xml result by setting eol as lf modified: storage/connect/mysql-test/connect/r/xml.result 2019-02-09 18:24:28 +01:00
Olivier Bertrand
ae88fe4519 Fix xml result mismatch modified: storage/connect/mysql-test/connect/r/xml.result 2019-02-09 17:03:20 +01:00
Olivier Bertrand
58dfdfc0dd - Fix GetTableName that returned wrong value under Windows
modified:   storage/connect/ha_connect.cc
2019-02-09 13:07:56 +01:00
Oleksandr Byelkin
65c5ef9b49 dirty merge 2019-02-07 13:59:31 +01:00
Igor Babaev
33907360f5 MDEV-16188 Post-merge corrections and adjustments 2019-02-04 22:44:33 -08:00
Sergei Golubchik
db8f0daeb4 CONNECT: calculate table_name from the path
CONNECT used to compute table file path as
table->s->db_name + table->s->table_name
instead of using table->s->path. This was incorrect and now it breaks
for temporary tables during ALTER TABLE.

Temporarily "fix" it by making CONNECT to use what it always used
as a table name - the last component in the table->s->path.
2019-02-05 01:34:17 +01:00
Oleksandr Byelkin
1ed1b7794f Merge remote-tracking branch 'connect/11.2' into 10.2 2019-02-04 16:09:42 +01:00
Marko Mäkelä
a249e57b68 Merge 10.1 into 10.2
Temporarily disable a test for
commit 2175bfce3e
because fixing it in 10.2 requires updating libmariadb.
2019-02-03 17:22:05 +02:00
Olivier Bertrand
a0e26599a3 - Fix MDEV-13136: enhance CREATE SERVER MyServerName
FOREIGN DATA WRAPPER to work with CONNECT engine
  modified:   storage/connect/tabjdbc.cpp

- Add a function to retrieve User variable value (DEVELOPMENT only)
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h
  modified:   storage/connect/tabjdbc.cpp
2019-02-03 15:19:04 +01:00
Olivier Bertrand
990f8e8146 - Fix MDEV-13136: enhance CREATE SERVER MyServerName
FOREIGN DATA WRAPPER to work with CONNECT engine
  modified:   storage/connect/tabjdbc.cpp

- Add a function to retrieve User variable value (DEVELOPMENT only)
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/jsonudf.h
  modified:   storage/connect/tabjdbc.cpp
2019-02-03 12:34:30 +01:00
Marko Mäkelä
213ece2f2e Merge 10.1 into 10.1
This is joint work with Oleksandr Byelkin.
2019-02-02 13:00:15 +02:00
Olivier Bertrand
0f388dd4d0 - Enable CONNECT tables to have triggers
Update version number
  modified:   storage/connect/ha_connect.cc
2019-01-27 15:10:03 +01:00
Olivier Bertrand
bece44be4f - Enable CONNECT tables to have triggers
Update version number
  modified:   storage/connect/ha_connect.cc
2019-01-27 14:21:39 +01:00
Olivier Bertrand
e0c147c2da - Fix MDEV-18192: CONNECT Engine JDBC not able to issue
simple UPDATE statement from trigger or stored procedure
  modified:   storage/connect/tabext.cpp
  modified:   storage/connect/tabext.h
  modified:   storage/connect/tabjdbc.cpp

- Enable CONNECT tables to have triggers
  Update version number
  modified:   storage/connect/ha_connect.cc

- Make user and password defined in CREATE TABLE have precedence on
  the ones specified in a Federated Server.
  modified:   storage/connect/tabjdbc.cpp

- JSONColumns: Copy locally constant strings to fix error in OEM modules
  modified:   storage/connect/tabjson.cpp
2019-01-27 12:22:44 +01:00
Olivier Bertrand
27fec12fae - Make user and password defined in CREATE TABLE have precedence on
the ones specified in a Federated Server.
  modified:   storage/connect/tabjdbc.cpp

- Typo
  modified:   storage/connect/tabext.cpp
  modified:   storage/connect/tabext.h
  modified:   storage/connect/tabjdbc.cpp
  modified:   storage/connect/tabjson.cpp
2019-01-26 18:11:45 +01:00
Olivier Bertrand
bcb8a52295 - Fix MDEV-18192: CONNECT Engine JDBC not able to issue
simple UPDATE statement from trigger or stored procedure
  modified:   storage/connect/tabext.cpp
  modified:   storage/connect/tabext.h
  modified:   storage/connect/tabjdbc.cpp

- Make user and password defined in CREATE TABLE have precedence on
  the ones specified in a Federated Server.
  modified:   storage/connect/tabjdbc.cpp

- JSONColumns: Copy locally constant strings to fix error in OEM modules
  modified:   storage/connect/tabjson.cpp
2019-01-25 13:02:40 +01:00
Olivier Bertrand
e6fcd72309 Squashed commit of connect/10.0:
commit 6a6a1f37798
Author: Olivier Bertrand <bertrandop@gmail.com>
Date:   Fri Jan 4 12:31:52 2019 +0100

    - Fix a few bug mainly concerning discovery and call from OEM
      (and prepare new table types)

      modified:   storage/connect/tabjson.cpp
      modified:   storage/connect/tabjson.h
      modified:   storage/connect/tabxml.cpp
      modified:   storage/connect/tabxml.h

    - Fix wrong line estimate
      modified:   storage/connect/mysql-test/connect/r/part_table.result
      modified:   storage/connect/mysql-test/connect/t/part_table.test

commit bd7d2e912d9
Author: Olivier Bertrand <bertrandop@gmail.com>
Date:   Tue Dec 4 23:35:09 2018 +0100

    Fix wrong version number

commit 4933680e7ab
Author: Olivier Bertrand <bertrandop@gmail.com>
Date:   Sun Dec 2 00:25:05 2018 +0100

    - Make PlugSubAlloc to be exportable
      Suppress unused parameter from PlugSubSet
      modified:   storage/connect/global.h
      modified:   storage/connect/plugutil.cpp
      modified:   storage/connect/jsonudf.cpp
      modified:   storage/connect/tabjson.cpp
      modified:   storage/connect/user_connect.cc

    - Fix a bug making column catalog XML tables fail
      modified:   storage/connect/tabxml.cpp

    - Comment out wrong message
      modified:   storage/connect/ha_connect.cc

    - Update error message when sorting an ODBC table fails
      modified:   storage/connect/tabodbc.cpp

    - Add error message when gettting an address
      from an OEM fails.
      modified:   storage/connect/reldef.cpp

    - Make some modifications useful for OEM module writting
      Export discovery functions for CSV, JDBC and XML
      Remove unuseful include from tabjson.h
      Move TDBXML::data_charset function from header file to source
      modified:   storage/connect/tabfmt.h
      modified:   storage/connect/tabjson.h
      modified:   storage/connect/tabxml.cpp
      modified:   storage/connect/tabxml.h

    - Update test result
      modified:   storage/connect/mysql-test/connect/r/jdbc_oracle.result
2019-01-25 10:06:16 +01:00
Olivier Bertrand
a4834755ec - Fix MDEV-18192: CONNECT Engine JDBC not able to issue
simple UPDATE statement from trigger or stored procedure
  modified:   storage/connect/tabext.cpp
  modified:   storage/connect/tabext.h
  modified:   storage/connect/tabjdbc.cpp

- JSONColumns: Copy locally constant strings to fix error in OEM modules
  modified:   storage/connect/tabjson.cpp
2019-01-24 23:49:57 +01:00
Michael Widenius
9990027f87 Fixed compiler warnings from optimized builds 2019-01-15 17:05:42 +02:00
Marko Mäkelä
734510a44d Merge 10.3 into 10.4 2019-01-06 17:43:02 +02:00
Olivier Bertrand
261e9a8a53 - Fix a few bug mainly concerning discovery and call from OEM
(and prepare new table types)

  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/tabxml.h

- Fix wrong line estimate
  modified:   storage/connect/mysql-test/connect/r/part_table.result
  modified:   storage/connect/mysql-test/connect/t/part_table.test
2019-01-03 18:19:36 +01:00
Sergei Golubchik
6bb11efa4a Merge branch '10.2' into 10.3 2019-01-03 13:09:41 +01:00
Olivier Bertrand
547ce1b22a - Fix a few bug mainly concerning discovery and call from OEM
(and prepare new table types)

  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/tabxml.h

- Fix wrong line estimate
  modified:   storage/connect/mysql-test/connect/r/part_table.result
  modified:   storage/connect/mysql-test/connect/t/part_table.test
2019-01-02 10:44:03 +01:00
Olivier Bertrand
720dedb333 Modified because different result on Windows and Linux 2019-01-01 16:57:23 +01:00
Olivier Bertrand
4b3b3bfe56 Modified because different result on Windows and Linux 2019-01-01 16:08:04 +01:00
Olivier Bertrand
4cdeee1e77 - Fix a few bug mainly concerning discovery and call from OEM
(and prepare new table types)

  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/tabjson.h
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/tabxml.h

- Fix wrong line estimate
  modified:   storage/connect/mysql-test/connect/r/part_table.result
  modified:   storage/connect/mysql-test/connect/t/part_table.test
2019-01-01 14:05:54 +01:00
Sergei Golubchik
dc2856ad60 Merge branch 'connect/10.2' into 10.2 2018-12-20 09:40:49 +01:00
Marko Mäkelä
b5763ecd01 Merge 10.3 into 10.4 2018-12-18 11:33:53 +02:00
Marko Mäkelä
45531949ae Merge 10.2 into 10.3 2018-12-18 09:15:41 +02:00
Alexey Botchkov
d1fb52afff MDEV-14576 Include full name of object in message about incorrect value for column.
connect.xml2 test result fixed.
2018-12-16 14:51:51 +04:00
Alexey Botchkov
c4ab352b67 MDEV-14576 Include full name of object in message about incorrect value for column.
The error message modified.
Then the TABLE_SHARE::error_table_name() implementation taken from 10.3,
          to be used as a name of the table in this message.
2018-12-16 02:21:41 +04:00
Olivier Bertrand
c2482c76dc Modified because different result on Windows and Linux 2018-12-05 19:01:37 +01:00
Olivier Bertrand
60525ad348 Modified to avoid make index error (AVG_ROW_LENGTH=5) 2018-12-05 16:36:25 +01:00
Olivier Bertrand
f25aab0ecf Fix wrong version number 2018-12-04 23:37:58 +01:00
Olivier Bertrand
0735423e19 Fix wrong version number 2018-12-04 23:30:16 +01:00
Olivier Bertrand
4a572631aa - Make PlugSubAlloc to be exportable
Suppress unused parameter from PlugSubSet
  modified:   storage/connect/global.h
  modified:   storage/connect/plugutil.cpp
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/user_connect.cc

- Fix a bug making column catalog XML tables fail
  modified:   storage/connect/tabxml.cpp

- Comment out wrong message
  modified:   storage/connect/ha_connect.cc

- Update error message when sorting an ODBC table fails
  modified:   storage/connect/tabodbc.cpp

- Add error message when gettting an address
  from an OEM fails.
  modified:   storage/connect/reldef.cpp

- Make some modifications useful for OEM module writting
  Export discovery functions for CSV, JDBC and XML
  Remove unuseful include from tabjson.h
  Move TDBXML::data_charset function from header file to source
  modified:   storage/connect/tabfmt.h
  modified:   storage/connect/tabjson.h
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/tabxml.h

- Update test result
  modified:   storage/connect/mysql-test/connect/r/jdbc_oracle.result
2018-12-04 23:26:47 +01:00
Olivier Bertrand
0fb92dddf9 - Make PlugSubAlloc to be exportable
Suppress unused parameter from PlugSubSet
  modified:   storage/connect/global.h
  modified:   storage/connect/plugutil.cpp
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/user_connect.cc

- Fix a bug making column catalog XML tables fail
  modified:   storage/connect/tabxml.cpp

- Comment out wrong message
  modified:   storage/connect/ha_connect.cc

- Update error message when sorting an ODBC table fails
  modified:   storage/connect/tabodbc.cpp

- Add error message when gettting an address
  from an OEM fails.
  modified:   storage/connect/reldef.cpp

- Make some modifications useful for OEM module writting
  Export discovery functions for CSV, JDBC and XML
  Remove unuseful include from tabjson.h
  Move TDBXML::data_charset function from header file to source
  modified:   storage/connect/tabfmt.h
  modified:   storage/connect/tabjson.h
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/tabxml.h

- Update test result
  modified:   storage/connect/mysql-test/connect/r/jdbc_oracle.result
2018-12-01 23:45:58 +01:00
Olivier Bertrand
048f814e7b - Make PlugSubAlloc to be exportable
Suppress unused parameter from PlugSubSet
  modified:   storage/connect/global.h
  modified:   storage/connect/plugutil.cpp
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/tabjson.cpp
  modified:   storage/connect/user_connect.cc

- Fix a bug making column catalog XML tables fail
  modified:   storage/connect/tabxml.cpp

- Comment out wrong message
  modified:   storage/connect/ha_connect.cc

- Update error message when sorting an ODBC table fails
  modified:   storage/connect/tabodbc.cpp

- Add error message when gettting an address
  from an OEM fails.
  modified:   storage/connect/reldef.cpp

- Make some modifications useful for OEM module writting
  Export discovery functions for CSV, JDBC and XML
  Remove unuseful include from tabjson.h
  Move TDBXML::data_charset function from header file to source
  modified:   storage/connect/tabfmt.h
  modified:   storage/connect/tabjson.h
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/tabxml.h

- Update test result
  modified:   storage/connect/mysql-test/connect/r/jdbc_oracle.result
2018-12-01 16:56:55 +01:00
Marko Mäkelä
dde2ca4aa1 Merge 10.3 into 10.4 2018-11-19 20:22:33 +02:00
Marko Mäkelä
fd58bb71e2 Merge 10.2 into 10.3 2018-11-19 18:45:53 +02:00
Oleksandr Byelkin
f5bcf788e7 Merge branch '10.2-connect' into 10.2 2018-11-09 10:32:10 +01:00
Marko Mäkelä
074c684099 Merge 10.3 into 10.4 2018-11-06 16:24:16 +02:00
Marko Mäkelä
df563e0c03 Merge 10.2 into 10.3
main.derived_cond_pushdown: Move all 10.3 tests to the end,
trim trailing white space, and add an "End of 10.3 tests" marker.
Add --sorted_result to tests where the ordering is not deterministic.

main.win_percentile: Add --sorted_result to tests where the
ordering is no longer deterministic.
2018-11-06 09:40:39 +02:00
Marko Mäkelä
32062cc61c Merge 10.1 into 10.2 2018-11-06 08:41:48 +02:00
Sergei Golubchik
44f6f44593 Merge branch '10.0' into 10.1 2018-10-30 15:10:01 +01:00
Sergei Golubchik
f30148a740 CONNECT: bintar compilation failure on Mac OS X 2018-10-29 20:00:59 +01:00
Sergei Golubchik
cd0734d6bd after-merge: enable tests 2018-10-28 10:55:46 +01:00
Olivier Bertrand
70e567f576 Squashed commit of connect/10.0:
commit 02d8c21380f
Author: Olivier Bertrand <bertrandop@gmail.com>
Date:   Sat Oct 6 16:27:13 2018 +0200

    - Fix truncating error messages on first unrecognized latin1 character
      modified:   storage/connect/ha_connect.cc

    - Fix MDEV-17343
      Reject multi-table UPDATE/DELETE commands that crash on some systems
      modified:   storage/connect/ha_connect.cc
      modified:   storage/connect/tabext.cpp

    - Try to fix failing tests (MariaDB version 10.0 only)
      modified:   storage/connect/mysql-test/connect/disabled.def

    - Typo
      modified:   storage/connect/global.h

commit f83caed8569
Author: Olivier Bertrand <bertrandop@gmail.com>
Date:   Tue Sep 25 15:49:26 2018 +0200

    - Try to fix failing tests (MariaDB version 10.0 only)
      modified:   storage/connect/mysql-test/connect/disabled.def
      modified:   storage/connect/mysql-test/connect/r/grant2.result
      modified:   storage/connect/mysql-test/connect/r/infoschema2-9739.result
      modified:   storage/connect/mysql-test/connect/r/mysql_exec.result

commit 9fd6f178846
Author: Olivier Bertrand <bertrandop@gmail.com>
Date:   Sun Sep 23 19:45:59 2018 +0200

    - Implement the CHECK TABLE statement and accept REPAIR and ANALYZE
      modified:   storage/connect/connect.cc
      modified:   storage/connect/ha_connect.cc
      modified:   storage/connect/ha_connect.h
      modified:   storage/connect/tabjdbc.cpp
      modified:   storage/connect/tabmysql.cpp
      modified:   storage/connect/tabodbc.cpp

    - MDEV-17212: Test if NumResultCols is implemented by the data source
      modified:   storage/connect/odbconn.cpp

    - Change error type in Optimize
      modified:   storage/connect/ha_connect.cc

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

    - Record new result from odbc_postgresql.test
      modified:   storage/connect/mysql-test/connect/r/odbc_postgresql.result

commit d8cf51319e1
Author: Olivier Bertrand <bertrandop@gmail.com>
Date:   Wed Aug 8 12:18:52 2018 +0200

    - Comment out failing Cyrillic test in xml2.test
      modified:   storage/connect/mysql-test/connect/r/xml2.result
      modified:   storage/connect/mysql-test/connect/t/xml2.test

commit 9df49e21f9e
Author: Olivier Bertrand <bertrandop@gmail.com>
Date:   Tue Aug 7 15:01:06 2018 +0200

    - Fix MDEV-16672 Connect: Warnings with 10.0
      filamtxt.cpp: DOSFAM::RenameTempFile: Change sprintf to snprintf.
      filamvct.cpp: VECFAM::RenameTempFile: Change sprintf to snprintf.
      javaconn.cpp:
        Add JAVAConn::GetUTFString function.
        Use it instead of env->GetStringUTFChars.
        Fix wrong identation.
      javaconn.h: Add GetUTFString declaration.
      jdbconn.cpp:
        Use GetUTFString function instead of env->GetStringUTFChars.
      jmgoconn.cpp:
        Use GetUTFString function instead of env->GetStringUTFChars.
        Fix wrong identation.
      jsonudf.cpp: change 139 to BMX line 4631.
      tabjmg.cpp:
        Add ReleaseStringUTF.
        Fix wrong identation.
      tabpivot.cpp: Fix wrong identation.
      tabutil.cpp: TDBPRX::GetSubTable: Change sprintf to snprintf.
      modified:   storage/connect/filamtxt.cpp
      modified:   storage/connect/filamvct.cpp
      modified:   storage/connect/javaconn.cpp
      modified:   storage/connect/javaconn.h
      modified:   storage/connect/jdbconn.cpp
      modified:   storage/connect/jmgoconn.cpp
      modified:   storage/connect/jsonudf.cpp
      modified:   storage/connect/tabjmg.cpp
      modified:   storage/connect/tabpivot.cpp
      modified:   storage/connect/tabutil.cpp

    - Fix MDEV-16895 CONNECT engine's get_error_message can cause buffer
                     overflow and server crash with long queries
      ha_connect_cc: Update version.
        get_error_message: Remove charset conversion.
      modified:   storage/connect/ha_connect.cc

    - Fix a server crash on inserting bigint to a JDBC table
      JDBConn::SetUUID:
        Suppress check on ctyp that causes a server crash because ctyp
        can be negative and this triggers an DEBUG_ASSERT on return.
      modified:   storage/connect/jdbconn.cpp

    - Delete an assert(qrp) from JCATPARM *AllocCatInfo that is called with
      qrp=NULL from JDBConn::SetUUID. Also delete a clone of this function
      that was duplicated in javaconn.cpp.
      modified:   storage/connect/javaconn.cpp
      modified:   storage/connect/jdbconn.cpp

    - Update some disabled tests and results to avoid failure
      modified:   storage/connect/mysql-test/connect/r/jdbc.result
      modified:   storage/connect/mysql-test/connect/r/json_java_2.result
      modified:   storage/connect/mysql-test/connect/r/json_java_3.result
      modified:   storage/connect/mysql-test/connect/r/mongo_java_2.result
      modified:   storage/connect/mysql-test/connect/r/mongo_java_3.result
      modified:   storage/connect/mysql-test/connect/t/json_java_2.test
      modified:   storage/connect/mysql-test/connect/t/json_java_3.test
      modified:   storage/connect/mysql-test/connect/t/mongo_java_2.test
      modified:   storage/connect/mysql-test/connect/t/mongo_java_3.test

commit 415273eb193
Author: Olivier Bertrand <bertrandop@gmail.com>
Date:   Thu Jun 28 19:37:49 2018 +0200

    - Fix MDEV-16167 Cannot insert unsigned values into a VEC table
      modified:   storage/connect/filamvct.cpp
      modified:   storage/connect/tabvct.cpp

commit 9ffcb68a9f2
Author: Olivier Bertrand <bertrandop@gmail.com>
Date:   Mon May 7 22:43:43 2018 +0200

    - Fix MDEV-15735 CONNECT [filamtxt.cpp:429]: Suspicious condition
      modified:   storage/connect/filamtxt.cpp

    - Fix compiler warnings
      modified:   storage/connect/domdoc.cpp
      modified:   storage/connect/ha_connect.cc
      modified:   storage/connect/json.h
      modified:   storage/connect/jsonudf.cpp
      modified:   storage/connect/tabext.cpp
      modified:   storage/connect/tabjson.cpp
      modified:   storage/connect/tabjson.h

    - Miscelleanous from 10.3
      modified:   storage/connect/ha_connect.cc
      modified:   storage/connect/mycat.cc
      modified:   storage/connect/user_connect.cc
2018-10-28 10:41:31 +01:00
Sergei Golubchik
411a2540ee CONNECT: don't mix bundled zlib and system libxml2
System libxml2 uses system zlib, it might conflicts with the bundled.

In particular, on centos5 old system zlib conflicts with the newer
(after c54271723c) bundled zlib which causes CONNECT to crash
on xml tests.
2018-10-28 10:09:58 +01:00
Olivier Bertrand
28000d8141 Restore mysql_exec.result 2018-10-14 19:39:21 +02:00
Olivier Bertrand
ad09ea0df0 - Implement the CHECK TABLE statement and accept REPAIR and ANALYZE
modified:   storage/connect/connect.cc
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/ha_connect.h
  modified:   storage/connect/tabjdbc.cpp
  modified:   storage/connect/tabmysql.cpp
  modified:   storage/connect/tabodbc.cpp

- MDEV-17212: Test if NumResultCols is implemented by the data source
  modified:   storage/connect/odbconn.cpp

- Change error type in Optimize
  modified:   storage/connect/ha_connect.cc

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

- Fix truncating error messages on first unrecognized latin1 character
  modified:   storage/connect/ha_connect.cc

- Fix MDEV-17343
  Reject multi-table UPDATE/DELETE commands that crash on some systems
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/tabext.cpp

- Try fix some failing tests
  modified:   storage/connect/mysql-test/connect/r/jdbc_postgresql.result
  modified:   storage/connect/mysql-test/connect/r/odbc_postgresql.result

- Typo
  modified:   storage/connect/global.h
2018-10-14 17:56:02 +02:00
Olivier Bertrand
67567f5c9a - Implement the CHECK TABLE statement and accept REPAIR and ANALYZE
modified:   storage/connect/connect.cc
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/ha_connect.h
  modified:   storage/connect/tabjdbc.cpp
  modified:   storage/connect/tabmysql.cpp
  modified:   storage/connect/tabodbc.cpp

- MDEV-17212: Test if NumResultCols is implemented by the data source
  modified:   storage/connect/odbconn.cpp

- Change error type in Optimize
  modified:   storage/connect/ha_connect.cc

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

- Fix truncating error messages on first unrecognized latin1 character
  modified:   storage/connect/ha_connect.cc

- Fix MDEV-17343
  Reject multi-table UPDATE/DELETE commands that crash on some systems
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/tabext.cpp

- Try fix some failing tests
  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/mysql_exec.result
  modified:   storage/connect/mysql-test/connect/r/odbc_postgresql.result

- Typo
  modified:   storage/connect/global.h
2018-10-14 12:28:46 +02:00
Olivier Bertrand
5d6daa6f15 - Implement the CHECK TABLE statement and accept REPAIR and ANALYZE
modified:   storage/connect/connect.cc
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/ha_connect.h
  modified:   storage/connect/tabjdbc.cpp
  modified:   storage/connect/tabmysql.cpp
  modified:   storage/connect/tabodbc.cpp

- MDEV-17212: Test if NumResultCols is implemented by the data source
  modified:   storage/connect/odbconn.cpp

- Change error type in Optimize
  modified:   storage/connect/ha_connect.cc

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

- Fix truncating error messages on first unrecognized latin1 character
  modified:   storage/connect/ha_connect.cc

- Fix MDEV-17343
  Reject multi-table UPDATE/DELETE commands that crash on some systems
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/tabext.cpp

- Try fix some failing tests
  modified:   storage/connect/mysql-test/connect/disabled.def
  modified:   storage/connect/mysql-test/connect/r/vcol.result
  modified:   storage/connect/mysql-test/connect/t/vcol.test
  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/mysql_exec.result
  modified:   storage/connect/mysql-test/connect/r/odbc_postgresql.result

- Typo
  modified:   storage/connect/global.h
2018-10-11 18:47:59 +02:00
Marko Mäkelä
2a955c7a83 Merge 10.3 into 10.4 2018-10-10 10:36:51 +03:00
Marko Mäkelä
43ee6915fa Merge 10.2 into 10.3 2018-10-09 09:11:30 +03:00
Vladislav Vaintroub
acca321af3 CMake, Windows - reduce amount of noisy, irrelevant MESSAGE()s 2018-10-05 16:48:51 +01:00
Marko Mäkelä
444c380ceb Merge 10.3 into 10.4 2018-10-05 08:09:49 +03:00
Sergei Golubchik
57e0da50bb Merge branch '10.2' into 10.3 2018-09-28 16:37:06 +02:00
Oleksandr Byelkin
28f08d3753 Merge branch '10.1' into 10.2 2018-09-14 08:47:22 +02:00
Oleksandr Byelkin
2b46dca5d7 Merge remote-tracking branch 'connect/10.2' into 10.2 2018-09-13 10:09:28 +02:00
Oleksandr Byelkin
31081593aa Merge branch '11.0' into 10.1 2018-09-06 22:45:19 +02:00
Sergei Golubchik
8bee7c16c8 compiler warnings (clang 4.0.1 on i386)
extra/mariabackup/fil_cur.cc:361:42: warning: format specifies type 'unsigned long' but the argument has type 'ib_int64_t' (aka 'long long') [-Wformat]
extra/mariabackup/fil_cur.cc:376:9: warning: format specifies type 'unsigned long' but the argument has type 'ib_int64_t' (aka 'long long') [-Wformat]
sql/handler.cc:6196:45: warning: format specifies type 'unsigned long' but the argument has type 'wsrep_trx_id_t' (aka 'unsigned long long') [-Wformat]
sql/log.cc:1681:16: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
sql/log.cc:1687:16: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
sql/wsrep_sst.cc:1388:86: warning: format specifies type 'long' but the argument has type 'wsrep_seqno_t' (aka 'long long') [-Wformat]
sql/wsrep_sst.cc:232:86: warning: format specifies type 'long' but the argument has type 'wsrep_seqno_t' (aka 'long long') [-Wformat]
storage/connect/filamdbf.cpp:450:47: warning: format specifies type 'short' but the argument has type 'int' [-Wformat]
storage/connect/filamdbf.cpp:970:47: warning: format specifies type 'short' but the argument has type 'int' [-Wformat]
storage/connect/inihandl.cpp:197:16: warning: address of array 'key->name' will always evaluate to 'true' [-Wpointer-bool-conversion]
storage/innobase/btr/btr0scrub.cc:151:17: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
storage/innobase/buf/buf0buf.cc:5085:8: warning: nonnull parameter 'bpage' will evaluate to 'true' on first encounter [-Wpointer-bool-conversion]
storage/innobase/fil/fil0crypt.cc:2454:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
storage/innobase/handler/ha_innodb.cc:18685:7: warning: format specifies type 'unsigned long' but the argument has type 'wsrep_trx_id_t' (aka 'unsigned long long') [-Wformat]
storage/innobase/row/row0mysql.cc:3319:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
storage/innobase/row/row0mysql.cc:3327:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
storage/maria/ma_norec.c:35:10: warning: implicit conversion from 'int' to 'my_bool' (aka 'char') changes value from 131 to -125 [-Wconstant-conversion]
storage/maria/ma_norec.c:42:10: warning: implicit conversion from 'int' to 'my_bool' (aka 'char') changes value from 131 to -125 [-Wconstant-conversion]
storage/maria/ma_test2.c:1009:12: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
storage/maria/ma_test2.c:1010:12: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat]
storage/mroonga/ha_mroonga.cpp:9189:44: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
storage/mroonga/vendor/groonga/lib/expr.c:4987:22: warning: comparison of constant -1 with expression of type 'grn_operator' is always false [-Wtautological-constant-out-of-range-compare]
storage/xtradb/btr/btr0scrub.cc:151:17: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
storage/xtradb/buf/buf0buf.cc:5047:8: warning: nonnull parameter 'bpage' will evaluate to 'true' on first encounter [-Wpointer-bool-conversion]
storage/xtradb/fil/fil0crypt.cc:2454:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
storage/xtradb/row/row0mysql.cc:3324:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
storage/xtradb/row/row0mysql.cc:3332:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat]
unittest/sql/mf_iocache-t.cc:120:35: warning: format specifies type 'unsigned long' but the argument has type 'int' [-Wformat]
unittest/sql/mf_iocache-t.cc:96:35: note: expanded from macro 'INFO_TAIL'
2018-09-04 09:19:48 +02:00
Vicențiu Ciorbaru
51fb163b6d Fix clang warning of mismatched new[] and delete[]
Warning:
'delete' applied to a pointer that was allocated with 'new[]';
did you mean 'delete[]'?
2018-08-25 18:27:57 +03:00
Daniel Black
6b22cc4ae0 connect engine: GetStringUTFChars takes pointer arg
Avoids compile errors of the form:

/storage/connect/jdbconn.cpp:1473:41: error: cannot initialize a parameter of type 'jboolean *' (aka 'unsigned char *') with an rvalue of type 'jboolean' (aka 'unsigned char')
   name = env->GetStringUTFChars(label, (jboolean)false);
                                        ^~~~~~~~~~~~~~~
/usr/lib/jvm/java-8-oracle/include/jni.h:1616:58: note: passing argument to parameter 'isCopy' here
    const char* GetStringUTFChars(jstring str, jboolean *isCopy) {
2018-08-25 18:27:14 +03:00
Marko Mäkelä
734db318ac Merge 10.3 into 10.4 2018-08-16 10:08:30 +03:00
Sergei Golubchik
0aa9b03393 Merge branch '10.2' into 10.3 2018-08-12 12:02:23 +02:00
Sergei Golubchik
6b53f9d781 MDEV-16662 CMake warnings: CMP0026 2018-08-12 11:37:42 +02:00
Sergei Golubchik
a39337415d MDEV-14900 Upstream 10.3 debian patches
applied (at least partially):
* armhf_mroonga_storage_fail.patch (unaligned write)
* mysqld_multi.server_lsb-header.patch (add LSB header)
* fix-spelling-errors.patch (tabxml.cpp)
* hurd_socket.patch (in Platform.pm)
* remove-systemd-obsolete-target.patch
2018-08-12 11:37:42 +02:00
Olivier Bertrand
dbf25197c1 - Comment out failing Cyrillic test in xml2.test
modified:   storage/connect/mysql-test/connect/r/xml2.result
  modified:   storage/connect/mysql-test/connect/t/xml2.test
2018-08-08 12:20:26 +02:00
Olivier Bertrand
31dda7e9fd - Comment out failing Cyrillic test in xml2.test
modified:   storage/connect/mysql-test/connect/r/xml2.result
  modified:   storage/connect/mysql-test/connect/t/xml2.test
2018-08-08 12:16:56 +02:00
Olivier Bertrand
15194de2c2 - Fix MDEV-16672 Connect: Warnings with 10.0
filamtxt.cpp: DOSFAM::RenameTempFile: Change sprintf to snprintf.
  filamvct.cpp: VECFAM::RenameTempFile: Change sprintf to snprintf.
  javaconn.cpp:
    Add JAVAConn::GetUTFString function.
    Use it instead of env->GetStringUTFChars.
    Fix wrong identation.
  javaconn.h: Add GetUTFString declaration.
  jdbconn.cpp:
    Use GetUTFString function instead of env->GetStringUTFChars.
  jmgoconn.cpp:
    Use GetUTFString function instead of env->GetStringUTFChars.
    Fix wrong identation.
  jsonudf.cpp: change 139 to BMX line 4631.
  tabjmg.cpp:
    Add ReleaseStringUTF.
    Fix wrong identation.
  tabpivot.cpp: Fix wrong identation.
  tabutil.cpp: TDBPRX::GetSubTable: Change sprintf to snprintf.
  modified:   storage/connect/filamtxt.cpp
  modified:   storage/connect/filamvct.cpp
  modified:   storage/connect/javaconn.cpp
  modified:   storage/connect/javaconn.h
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/jmgoconn.cpp
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/tabjmg.cpp
  modified:   storage/connect/tabpivot.cpp
  modified:   storage/connect/tabutil.cpp

- Fix MDEV-16895 CONNECT engine's get_error_message can cause buffer
                 overflow and server crash with long queries
  ha_connect_cc: Update version.
    get_error_message: Remove charset conversion.
  modified:   storage/connect/ha_connect.cc

- Fix a server crash on inserting bigint to a JDBC table
  JDBConn::SetUUID:
    Suppress check on ctyp that causes a server crash because ctyp
    can be negative and this triggers an DEBUG_ASSERT on return.
  modified:   storage/connect/jdbconn.cpp

- Delete an assert(qrp) from JCATPARM *AllocCatInfo that is called with
  qrp=NULL from JDBConn::SetUUID. Also delete a clone of this function
  that was duplicated in javaconn.cpp.
  modified:   storage/connect/javaconn.cpp
  modified:   storage/connect/jdbconn.cpp

- Update some (disabled) tests and results to avoid failure
  modified:   storage/connect/mysql-test/connect/r/jdbc.result
  modified:   storage/connect/mysql-test/connect/r/json_java_2.result
  modified:   storage/connect/mysql-test/connect/r/json_java_3.result
  modified:   storage/connect/mysql-test/connect/r/mongo_java_2.result
  modified:   storage/connect/mysql-test/connect/r/mongo_java_3.result
  modified:   storage/connect/mysql-test/connect/r/xml2.result
  modified:   storage/connect/mysql-test/connect/t/json_java_2.test
  modified:   storage/connect/mysql-test/connect/t/json_java_3.test
  modified:   storage/connect/mysql-test/connect/t/mongo_java_2.test
  modified:   storage/connect/mysql-test/connect/t/mongo_java_3.test
  modified:   storage/connect/mysql-test/connect/t/xml2.test
2018-08-08 12:10:30 +02:00
Olivier Bertrand
b291daaccd - Delete an assert(qrp) from JCATPARM *AllocCatInfo that is called with
qrp=NULL from JDBConn::SetUUID. Also delete a clone of this function
  that was duplicated in javaconn.cpp.
  modified:   storage/connect/javaconn.cpp
  modified:   storage/connect/jdbconn.cpp

- Update some disabled tests and results to avoid failure
  modified:   storage/connect/mysql-test/connect/r/jdbc.result
  modified:   storage/connect/mysql-test/connect/r/json_java_2.result
  modified:   storage/connect/mysql-test/connect/r/json_java_3.result
  modified:   storage/connect/mysql-test/connect/r/mongo_java_2.result
  modified:   storage/connect/mysql-test/connect/r/mongo_java_3.result
  modified:   storage/connect/mysql-test/connect/t/json_java_2.test
  modified:   storage/connect/mysql-test/connect/t/json_java_3.test
  modified:   storage/connect/mysql-test/connect/t/mongo_java_2.test
  modified:   storage/connect/mysql-test/connect/t/mongo_java_3.test
2018-08-07 19:46:11 +02:00
Olivier Bertrand
040e7de6de - Fix MDEV-16672 Connect: Warnings with 10.0
filamtxt.cpp: DOSFAM::RenameTempFile: Change sprintf to snprintf.
  filamvct.cpp: VECFAM::RenameTempFile: Change sprintf to snprintf.
  javaconn.cpp:
    Add JAVAConn::GetUTFString function.
    Use it instead of env->GetStringUTFChars.
    Fix wrong identation.
  javaconn.h: Add GetUTFString declaration.
  jdbconn.cpp:
    Use GetUTFString function instead of env->GetStringUTFChars.
  jmgoconn.cpp:
    Use GetUTFString function instead of env->GetStringUTFChars.
    Fix wrong identation.
  jsonudf.cpp: change 139 to BMX line 4631.
  tabjmg.cpp:
    Add ReleaseStringUTF.
    Fix wrong identation.
  tabpivot.cpp: Fix wrong identation.
  tabutil.cpp: TDBPRX::GetSubTable: Change sprintf to snprintf.
  modified:   storage/connect/filamtxt.cpp
  modified:   storage/connect/filamvct.cpp
  modified:   storage/connect/javaconn.cpp
  modified:   storage/connect/javaconn.h
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/jmgoconn.cpp
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/tabjmg.cpp
  modified:   storage/connect/tabpivot.cpp
  modified:   storage/connect/tabutil.cpp

- Fix MDEV-16895 CONNECT engine's get_error_message can cause buffer
                 overflow and server crash with long queries
  ha_connect_cc: Update version.
    get_error_message: Remove charset conversion.
  modified:   storage/connect/ha_connect.cc

- Fix a server crash on inserting bigint to a JDBC table
  JDBConn::SetUUID:
    Suppress check on ctyp that causes a server crash because ctyp
    can be negative and this triggers an DEBUG_ASSERT on return.
  modified:   storage/connect/jdbconn.cpp

- Delete an assert(qrp) from JCATPARM *AllocCatInfo that is called with
  qrp=NULL from JDBConn::SetUUID. Also delete a clone of this function
  that was duplicated in javaconn.cpp.
  modified:   storage/connect/javaconn.cpp
  modified:   storage/connect/jdbconn.cpp

- Update some disabled tests and results to avoid failure
  modified:   storage/connect/mysql-test/connect/r/jdbc.result
  modified:   storage/connect/mysql-test/connect/r/json_java_2.result
  modified:   storage/connect/mysql-test/connect/r/json_java_3.result
  modified:   storage/connect/mysql-test/connect/r/mongo_java_2.result
  modified:   storage/connect/mysql-test/connect/r/mongo_java_3.result
  modified:   storage/connect/mysql-test/connect/t/json_java_2.test
  modified:   storage/connect/mysql-test/connect/t/json_java_3.test
  modified:   storage/connect/mysql-test/connect/t/mongo_java_2.test
  modified:   storage/connect/mysql-test/connect/t/mongo_java_3.test
2018-08-07 19:42:54 +02:00
Sergei Golubchik
26e2dd39c5 Merge branch 'connect/10.2' into 10.2 2018-08-07 16:54:53 +02:00
Monty
9da706fac3 Fixed compiler warning about MongoEnabled() in Connect 2018-08-07 11:04:56 +03:00
Alexander Barkov
cb7b5fbf1c MDEV-16910 Add class VDec
Adding classes VDec and VDec2_lazy, according to the task description.
This patch removes around 250 duplicate code lines.
2018-08-07 10:48:42 +04:00
Olivier Bertrand
9644415fa9 - Fix MDEV-16672 Connect: Warnings with 10.0
filamtxt.cpp: DOSFAM::RenameTempFile: Change sprintf to snprintf.
  filamvct.cpp: VECFAM::RenameTempFile: Change sprintf to snprintf.
  javaconn.cpp:
    Add JAVAConn::GetUTFString function.
    Use it instead of env->GetStringUTFChars.
    Fix wrong identation.
  javaconn.h: Add GetUTFString declaration.
  jdbconn.cpp:
    Use GetUTFString function instead of env->GetStringUTFChars.
  jmgoconn.cpp:
    Use GetUTFString function instead of env->GetStringUTFChars.
    Fix wrong identation.
  jsonudf.cpp: change 139 to BMX line 4631.
  tabjmg.cpp:
    Add ReleaseStringUTF.
    Fix wrong identation.
  tabpivot.cpp: Fix wrong identation.
  tabutil.cpp: TDBPRX::GetSubTable: Change sprintf to snprintf.
  modified:   storage/connect/filamtxt.cpp
  modified:   storage/connect/filamvct.cpp
  modified:   storage/connect/javaconn.cpp
  modified:   storage/connect/javaconn.h
  modified:   storage/connect/jdbconn.cpp
  modified:   storage/connect/jmgoconn.cpp
  modified:   storage/connect/jsonudf.cpp
  modified:   storage/connect/tabjmg.cpp
  modified:   storage/connect/tabpivot.cpp
  modified:   storage/connect/tabutil.cpp

- Fix MDEV-16895 CONNECT engine's get_error_message can cause buffer
                 overflow and server crash with long queries
  ha_connect_cc: Update version.
    get_error_message: Remove charset conversion.
  modified:   storage/connect/ha_connect.cc

- Fix a server crash on inserting bigint to a JDBC table
  JDBConn::SetUUID:
    Suppress check on ctyp that causes a server crash because ctyp
    can be negative and this triggers an DEBUG_ASSERT on return.
  modified:   storage/connect/jdbconn.cpp

- Update jdbc.result
  mysql-test/connect/r/jdbc.result: Recorded to reflect a message change.
  modified:   storage/connect/mysql-test/connect/r/jdbc.result
2018-08-06 19:42:00 +02:00
Marko Mäkelä
05459706f2 Merge 10.2 into 10.3 2018-08-03 15:57:23 +03:00
Alexander Barkov
c7115428ed MDEV-16881 Remove Item::get_temporal_with_sql_mode() and val_xxx_from_date() 2018-08-02 15:36:13 +04:00
Marko Mäkelä
ef3070e997 Merge 10.1 into 10.2 2018-08-02 08:19:57 +03:00
Oleksandr Byelkin
cb5952b506 Merge branch '10.0' into bb-10.1-merge-sanja 2018-07-25 22:24:40 +02:00
Sergei Golubchik
0b3e28a4cd MDEV-8941 Compile on Solaris (SPARC) fails with errors in filamvct.cpp
remove unnecessary declaration
2018-07-19 11:35:38 +02:00
Alexander Barkov
e61568ee93 Merge remote-tracking branch 'origin/10.3' into 10.4 2018-07-03 14:02:05 +04:00
Sergei Golubchik
36e59752e7 Merge branch '10.2' into 10.3 2018-06-30 16:39:20 +02:00
Olivier Bertrand
c0fd3be272 - Fix MDEV-16167 Cannot insert unsigned values into a VEC table
modified:   storage/connect/filamvct.cpp
  modified:   storage/connect/tabvct.cpp
2018-06-28 23:33:02 +02:00