summaryrefslogtreecommitdiff
path: root/storage/connect
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.8 into 10.9Marko Mäkelä2023-02-1627-40/+40
|\
| * Merge 10.6 into 10.8Marko Mäkelä2023-02-1027-40/+40
| |\
| | * Merge 10.5 into 10.6Marko Mäkelä2023-02-1026-38/+38
| | |\
| | | * Merge 10.4 into 10.5Marko Mäkelä2023-02-1026-38/+38
| | | |\
| | | | * Apply clang-tidy to remove empty constructors / destructorsVicențiu Ciorbaru2023-02-0926-38/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is the result of running run-clang-tidy -fix -header-filter=.* -checks='-*,modernize-use-equals-default' . Code style changes have been done on top. The result of this change leads to the following improvements: 1. Binary size reduction. * For a -DBUILD_CONFIG=mysql_release build, the binary size is reduced by ~400kb. * A raw -DCMAKE_BUILD_TYPE=Release reduces the binary size by ~1.4kb. 2. Compiler can better understand the intent of the code, thus it leads to more optimization possibilities. Additionally it enabled detecting unused variables that had an empty default constructor but not marked so explicitly. Particular change required following this patch in sql/opt_range.cc result_keys, an unused template class Bitmap now correctly issues unused variable warnings. Setting Bitmap template class constructor to default allows the compiler to identify that there are no side-effects when instantiating the class. Previously the compiler could not issue the warning as it assumed Bitmap class (being a template) would not be performing a NO-OP for its default constructor. This prevented the "unused variable warning".
| | | | * Merge branch '10.3' into 10.4Oleksandr Byelkin2023-01-2813-91/+110
| | | | |\
| | * | | \ Merge branch '10.6.12' into 10.6Oleksandr Byelkin2023-02-061-2/+2
| | |\ \ \ \
| | | * | | | Silence gcc-11 warningsVicențiu Ciorbaru2023-02-031-2/+2
| | | | | | |
* | | | | | | Merge branch '10.8' into 10.9Oleksandr Byelkin2023-01-3113-90/+109
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge branch '10.7' into 10.8Oleksandr Byelkin2023-01-3113-90/+109
| |\ \ \ \ \ \
| | * \ \ \ \ \ Merge branch '10.6' into 10.7Oleksandr Byelkin2023-01-3113-90/+109
| | |\ \ \ \ \ \ | | | |/ / / / /
| | | * | | | | Merge branch '10.5' into 10.6Oleksandr Byelkin2023-01-3113-90/+109
| | | |\ \ \ \ \ | | | | |/ / / / | | | |/| / / / | | | | |/ / /
| | | | * | | Merge branch '10.4' into 10.5Oleksandr Byelkin2023-01-2713-90/+109
| | | | |\ \ \
| | | | | * \ \ Merge branch '10.3' into 10.4Oleksandr Byelkin2023-01-2613-91/+110
| | | | | |\ \ \ | | | | | | |/ / | | | | | |/| / | | | | | | |/
| | | | | | * Fix connect bson.cpp warningVicențiu Ciorbaru2023-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The ptyp variable is unused.
| | | | | | * Minimize unsafe C functions usage - replace strcat() and strcpy() (and ↵Mikhail Chalov2023-01-2013-90/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strncat() and strncpy()) with custom safe_strcat() and safe_strcpy() functions The MariaDB code base uses strcat() and strcpy() in several places. These are known to have memory safety issues and their usage is discouraged. Common security scanners like Flawfinder flags them. In MariaDB we should start using modern and safer variants on these functions. This is similar to memory issues fixes in 19af1890b56c6c147c296479bb6a4ad00fa59dbb and 9de9f105b5cb88249acc39af73d32af337d6fd5f but now replace use of strcat() and strcpy() with safer options strncat() and strncpy(). However, add '\0' forcefully to make sure the result string is correct since for these two functions it is not guaranteed what new string will be null-terminated. Example: size_t dest_len = sizeof(g->Message); strncpy(g->Message, "Null json tree", dest_len); strncat(g->Message, ":", sizeof(g->Message) - strlen(g->Message)); size_t wrote_sz = strlen(g->Message); size_t cur_len = wrote_sz >= dest_len ? dest_len - 1 : wrote_sz; g->Message[cur_len] = '\0'; 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 -- Reviewer and co-author Vicențiu Ciorbaru <vicentiu@mariadb.org> -- Reviewer additions: * The initial function implementation was flawed. Replaced with a simpler and also correct version. * Simplified code by making use of snprintf instead of chaining strcat. * Simplified code by removing dynamic string construction in the first place and using static strings if possible. See connect storage engine changes.
* | | | | | | Merge 10.8 into 10.9Marko Mäkelä2023-01-135-14/+6
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge 10.7 into 10.8Marko Mäkelä2023-01-135-14/+6
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | Merge 10.6 into 10.7Marko Mäkelä2023-01-135-14/+6
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | Merge 10.5 into 10.6Marko Mäkelä2023-01-135-14/+6
| | | |\ \ \ \ | | | | |/ / /
| | | | * | | Merge 10.4 into 10.5Marko Mäkelä2023-01-135-14/+6
| | | | |\ \ \ | | | | | |/ /
| | | | | * | Merge branch '10.3' into 10.4Sergei Golubchik2023-01-105-14/+6
| | | | | |\ \ | | | | | | |/
| | | | | | * clang15 warnings - unused vars and old prototypesDaniel Black2023-01-104-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang15 finally errors on old prototype definations. Its also a lot fussier about variables that aren't used as is the case a number of time with loop counters that aren't examined. RocksDB was complaining that its get_range function was declared without the array length in ha_rocksdb.h. While a constant is used rather than trying to import the Rdb_key_def::INDEX_NUMBER_SIZE header (was causing a lot of errors on the defination of other orders). If the constant does change can be assured that the same compile warnings will tell us of the error. The ha_rocksdb::index_read_map_impl DBUG_EXECUTE_IF was similar to the existing endless functions used in replication tests. Its rather moot point as the rocksdb.force_shutdown test that uses myrocks_busy_loop_on_row_read is currently disabled.
| | | | | | * fix typoslilinjie2023-01-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: lilinjie <lilinjie@uniontech.com>
* | | | | | | Merge 10.8 into 10.9Marko Mäkelä2023-01-101-4/+4
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge 10.7 into 10.8Marko Mäkelä2023-01-101-4/+4
| |\ \ \ \ \ \ | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MDEV-25004 test innodb_fts.versioning is omitted because ever since commit 685d958e38b825ad9829be311f26729cccf37c46 InnoDB would not allow writes to a database where the redo log file ib_logfile0 is missing.
| | * | | | | Merge 10.6 into 10.7Marko Mäkelä2023-01-041-4/+4
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | Merge 10.5 into 10.6Marko Mäkelä2023-01-031-4/+4
| | | |\ \ \ \ | | | | |/ / /
| | | | * | | Merge 10.4 into 10.5Marko Mäkelä2023-01-031-4/+4
| | | | |\ \ \ | | | | | |/ /
| | | | | * | Merge 10.3 into 10.4Marko Mäkelä2023-01-031-4/+4
| | | | | |\ \ | | | | | | |/
| | | | | | * typosmusvaage2022-12-211-4/+4
| | | | | | |
* | | | | | | Merge 10.8 into 10.9Marko Mäkelä2022-12-136-8/+137
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge 10.7 into 10.8Marko Mäkelä2022-12-136-8/+137
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | Merge 10.6 into 10.7Marko Mäkelä2022-12-136-8/+137
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | Merge 10.5 into 10.6Marko Mäkelä2022-12-136-8/+137
| | | |\ \ \ \ | | | | |/ / /
| | | | * | | Merge 10.4 into 10.5Marko Mäkelä2022-12-136-7/+136
| | | | |\ \ \ | | | | | |/ /
| | | | | * | Merge 10.3 into 10.4Marko Mäkelä2022-12-136-7/+136
| | | | | |\ \ | | | | | | |/
| | | | | | * MDEV-28299: Server crashes in XINDXS::Range/CntIndexRange (Connect engine)Anel Husakovic2022-11-293-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Bug happens only in case when the range function on empty key single column index (XINDEXS) is used. - Solution is to return with empty result in this scenario. Reviewed by: <>
| | | | | | * MDEV-28489 CONNECT used incorrect CHAR lengthAndrew Hutchings2022-11-113-7/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CONNECT engine was using dividing UTF8 columns by 3 to get the length, but in reality it did need the byte length. This fixes MDEV-26722 too.
* | | | | | | Merge 10.8 into 10.9Marko Mäkelä2022-11-104-3/+21
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge 10.7 into 10.8Marko Mäkelä2022-11-094-3/+21
| |\ \ \ \ \ \ | | |/ / / / /
| | * | | | | Merge 10.6 into 10.7Marko Mäkelä2022-11-094-3/+21
| | |\ \ \ \ \ | | | |/ / / /
| | | * | | | Merge 10.5 into 10.6Marko Mäkelä2022-11-094-3/+21
| | | |\ \ \ \ | | | | |/ / /
| | | | * | | Merge 10.4 into 10.5Marko Mäkelä2022-11-094-3/+21
| | | | |\ \ \ | | | | | |/ /
| | | | | * | Merge 10.3 into 10.4Marko Mäkelä2022-11-094-3/+21
| | | | | |\ \ | | | | | | |/
| | | | | | * MDEV-29397 CONNECT engine: Fix note turning into error (#2325)Andrew Hutchings2022-11-084-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * MDEV-29397 Fix note turning into error ODBC Rewind triggered an error with no SQL, but this is sometimes a valid condition (as can be seen with other classes). Setting this to a 0 return stops errors firing when they shouldn't. Also fixes ASAN hits from in MDEV-29687 tabext.cpp.
| | * | | | | Merge branch '10.6' into 10.7Oleksandr Byelkin2022-11-022-5/+5
| | |\ \ \ \ \ | | | |/ / / /
* | | | | | | Merge branch '10.8' into 10.9Oleksandr Byelkin2022-11-022-5/+5
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | Merge branch '10.7' into 10.8Oleksandr Byelkin2022-11-022-5/+5
| |\ \ \ \ \ \
| | * \ \ \ \ \ Merge branch '10.6' into 10.7Oleksandr Byelkin2022-11-022-5/+5
| | |\ \ \ \ \ \ | | | |/ / / / / | | |/| / / / / | | | |/ / / /