Commit graph

1651 commits

Author SHA1 Message Date
Oleksandr Byelkin
48e35b8cf6 Merge branch '10.3' into 10.4 2022-08-02 14:15:39 +02:00
Oleksandr Byelkin
5ac528a91f Merge remote-tracking branch 'connect/10.3' into 10.3 2022-08-02 10:23:53 +02:00
Oleksandr Byelkin
3bb36e9495 Merge branch '10.3' into 10.4 2022-07-27 11:02:57 +02:00
Mikhail Chalov
19af1890b5 Use memory safe snprintf() in Connect Engine
This commit replaces sprintf(buf, ...) with
snprintf(buf, sizeof(buf), ...),
specifically in the "easy" cases where buf is allocated with a size
known at compile time.

The changes make sure we are not write outside array/string bounds which
will lead to undefined behaviour. In case the code is trying to write
outside bounds - safe version of functions simply cut the string
messages so we process this gracefully.

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the BSD-new
license.  I am contributing on behalf of my employer Amazon Web Services,
Inc.

bsonudf.cpp warnings cleanup by Daniel Black

Reviewer: Daniel Black
2022-07-26 16:28:59 +10:00
Brad Smith
e55c3dc33f Fix building Connect storage engine ioapi code on OpenBSD / NetBSD / DragonFly 2022-07-25 15:06:32 +10:00
Marko Mäkelä
01d757036f Merge 10.3 into 10.4 2022-06-27 10:14:37 +03:00
Mathew Heard
b59bc629c8 MDEV-27766: connect engine; INSERT ignore option, was ignored
Test prior to this change:

CURRENT_TEST: connect.mysql
mysqltest: At line 485: query 'INSERT IGNORE INTO t3 VALUES (5),(10),(30)' failed: ER_GET_ERRMSG (1296): Got error 122 '(1062) Duplicate entry '10' for key 'PRIMARY' [INSERT INTO `t1` (`a`) VALUES (10)]' from CONNECT

So the ignore table option wasn't getting passed to the remove server.
Closes #2008
2022-06-10 11:36:59 +10:00
Marko Mäkelä
96f4b4a55b Merge 10.3 into 10.4 2022-06-02 16:34:17 +03:00
Mathew Heard
c4e87cb22c MDEV-9020: Connect issues ALTER TABLE DISABLE KEYS when inserting data
If the connecting user doesn't have alter table privilege this isn't
allowed.

This patch removes enable / disable key commands that should never have been here

Closes #2002
2022-05-27 11:15:07 +10:00
Sergei Golubchik
a70a1cf3f4 Merge branch '10.3' into 10.4 2022-05-08 23:03:08 +02:00
Oleksandr Byelkin
9614fde1aa Merge branch '10.2' into 10.3 2022-05-03 10:59:54 +02:00
Dmitry Shulga
bc7ba7afee MDEV-27758: Errors when building Connect engine on os x 11.6.2
Added checking for support of vfork by a platform where
building being done. Set HAVE_VFORK macros in case vfork()
system call is supported. Use vfork() system call if the
macros HAVE_VFORK is set, else use fork().
2022-04-22 18:47:19 +07:00
Anel Husakovic
1118b66a22 MDEV-23626: CONNECT VIR tables return inconsistent error for UPDATE
- Before the patch UPDATE error message for VIR tables was different from TRUNCATE,UPDATE,DELETE
Reviewed by: <Olivier Bertrand>, vicentiu@mariadb.org
2022-04-01 06:40:28 -07:00
Oleksandr Byelkin
a576a1cea5 Merge branch '10.3' into 10.4 2022-01-30 09:46:52 +01:00
Oleksandr Byelkin
41a163ac5c Merge branch '10.2' into 10.3 2022-01-29 15:41:05 +01:00
Sergei Golubchik
8afcda9309 ASAN/valgrind errors in connect.misc test
accessing freed memory.
Before XMLCOL::WriteColumn() Tdbp->Clist gets assigned
a nodelist in

      Clist = RowNode->SelectNodes(g, Colname, Clist);

which is RowNode->Doc->Xop->nodesetval.

In XMLCOL::WriteColumn()

        ValNode = ColNode->SelectSingleNode(g, Xname, Vxnp);

calls LIBXMLDOC::GetNodeList() again, which frees the previous
XPath object Xop and replaces it with a new one.

In this case RowNode->Doc == ColNode->Doc, so Clist->Listp
points to a freed memory now.
2022-01-29 13:42:38 +01:00
Vladislav Vaintroub
2925d0f2ee MDEV-27612 Connect : check buffer sizes, fix string format errors 2022-01-26 09:38:22 +01:00
Oleksandr Byelkin
ebc77c6d17 Merge remote-tracking branch 'connect/10.2' into 10.2 2022-01-24 17:28:34 +01:00
Olivier Bertrand
e3b9efb330 Fix incompatibility SRCDEF && MEMORY=2 for ODBC JDBC tables 2022-01-06 18:14:21 +01:00
Marko Mäkelä
4da2273876 Merge 10.3 into 10.4 2021-11-29 10:59:22 +02:00
Marko Mäkelä
289721de9a Merge 10.2 into 10.3 2021-11-29 10:33:06 +02:00
Olivier Bertrand
c819a7a71e Fix MDEV-27055 (regression of MDEV-24493) 2021-11-26 12:07:23 +01:00
Alexey Bychko
fe065f8d90 MDEV-22522 RPM packages have meaningless summary/description
this patch moves cpack summury and description for optional packages
to the appropriate CMakeLists.txt files
2021-11-23 11:29:24 +07:00
Oleksandr Byelkin
89f69c62cf Merge branch '10.3' into 10.4 2021-10-28 13:57:15 +02:00
Oleksandr Byelkin
2ddea602ce Merge branch '10.2' into 10.3 2021-10-28 12:41:27 +02:00
Oleksandr Byelkin
99c893586c Merge remote-tracking branch 'connect/10.2' into 10.2 2021-10-28 10:30:36 +02:00
Marko Mäkelä
489ef007be Merge 10.3 into 10.4 2021-10-21 14:57:00 +03:00
Vicențiu Ciorbaru
a33c1082da Fix MIPS build failure: Handle unaligned buffers in connect's TYPBLK class
On MIPS platforms (and probably others) unaligned memory access results in a
bus error. In the connect storage engine, block data for some data formats is
stored packed in memory and the TYPBLK class is used to read values from it.
Since TYPBLK does not have special handling for this packed memory, it can
quite easily result in unaligned memory accesses.

The simple way to fix this is to perform all accesses to the main buffer
through memcpy. With GCC and optimizations turned on, this call to memcpy is
completely optimized away on architectures where unaligned accesses are ok
(like x86).

Contributors:
James Cowgill <jcowgill@debian.org>
2021-10-19 16:08:51 +03:00
Olivier Bertrand
94fb9d9377 Fix MDEV-24493 2021-10-15 12:20:33 +02:00
Marko Mäkelä
a736a3174a Merge 10.3 into 10.4 2021-10-13 12:03:32 +03:00
Marko Mäkelä
4a7dfda373 Merge 10.2 into 10.3 2021-10-13 11:38:21 +03:00
Sergei Krivonos
6f32b28be5 Xcode compatibility update 2021-10-12 18:10:56 -04:00
Marko Mäkelä
9024498e88 Merge 10.3 into 10.4 2021-09-22 18:26:54 +03:00
Vladislav Vaintroub
b112c9dfaa Fix Connect build with MSVC+Ninja 2021-09-11 18:32:07 +02:00
Oleksandr Byelkin
7841a7eb09 Merge branch '10.3' into 10.4 2021-07-31 22:59:58 +02:00
Olivier Bertrand
46fed496b6 Fix bson crash and mongo test 2021-07-31 11:20:09 +02:00
Olivier Bertrand
1d468ee040 Fix slow processing of pretty json files by BSON tables 2021-07-30 10:45:26 +02:00
Oleksandr Byelkin
83d7e4faf6 Merge branch '10.2' into 10.3 2021-07-29 13:51:02 +02:00
Sergei Golubchik
a32373b65a Merge remote-tracking branch 'connect/10.2' into 10.2 2021-07-27 18:25:42 +02:00
Olivier Bertrand
fc98a6d54a Fix compile error for centos 74 Modified taboccur.cpp 2021-07-24 18:31:59 +02:00
Olivier Bertrand
5049887c8d Replace Mongo2.jar and Mongo3.jar with ne versions 2021-07-24 18:24:20 +02:00
Olivier Bertrand
0f18135ec8 - Make user variable prefix recognized by IsArgJson and IsJson
modified:   storage/connect/bsonudf.cpp
  modified:   storage/connect/jsonudf.cpp

- Stringify option is now a ; separated list of columns
  modified:   storage/connect/json.cpp
  modified:   storage/connect/json.h
  modified:   storage/connect/mongo.h
  modified:   storage/connect/tabbson.cpp
  modified:   storage/connect/tabcmg.cpp
  modified:   storage/connect/tabcmg.h
  modified:   storage/connect/tabjmg.cpp
  modified:   storage/connect/tabjmg.h
  modified:   storage/connect/tabjson.cpp

- PrepareColist not a static function anymore (+ typo)
  modified:   storage/connect/taboccur.cpp

- JDVC: Recognize schema (database) from a wrapper server
  modified:   storage/connect/tabjdbc.cpp
2021-07-24 16:28:57 +02:00
Marko Mäkelä
b50ea90063 Merge 10.2 into 10.3 2021-07-22 18:57:54 +03:00
Heinz Wiesinger
751ebe44fd Add feature summary at the end of cmake.
This gives a short overview over found/missing dependencies as well
as enabled/disabled features.

Initial author Heinz Wiesinger <heinz@m2mobi.com>
Additions by Vicențiu Ciorbaru <vicentiu@mariadb.org>
* Report all plugins enabled via MYSQL_ADD_PLUGIN
* Simplify code. Eliminate duplication by making use of WITH_xxx
  variable values to set feature "ON" / "OFF" state.

Reviewed by: wlad@mariadb.com (code details) serg@mariadb.com (the idea)
2021-07-21 10:22:56 +03:00
Olivier Bertrand
1c4b917f0e Fix clang compile error in value.cpp 2021-06-25 18:35:26 +02:00
Olivier Bertrand
7863554e42 Fix clang compile error in tabjson and typo in tabbson.cpp 2021-06-25 12:54:34 +02:00
Olivier Bertrand
af7a0895ac Fix clang compile error in tabjson.cpp and tabbson.cpp 2021-06-25 12:30:10 +02:00
Olivier Bertrand
6239e2a4ec Fix clang compile error in tabjson.cpp and tabbson.cpp 2021-06-25 11:38:16 +02:00
Olivier Bertrand
5c5d60b897 Fix compile error in value.h and remove unused variables in ha_connect.cc 2021-06-25 01:15:51 +02:00
Olivier Bertrand
330b32ebd9 Fix clang compile error 2021-06-24 23:56:13 +02:00