summaryrefslogtreecommitdiff
path: root/strings
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.2 into 10.3Marko Mäkelä2022-03-291-9/+23
|\
| * MDEV-22742 UBSAN: Many overflow issues in strings/decimal.c - runtime error: ↵Alexey Botchkov2022-03-211-9/+23
| | | | | | | | | | | | signed integer overflow: x * y cannot be represented in type 'long long int' (on optimized builds). Avoid integer overflow, do the check before the calculation.
* | Merge branch '10.2' into 10.3mariadb-10.3.33Oleksandr Byelkin2022-01-2912-72/+72
|\ \ | |/
| * MDEV-27494 Rename .ic files to .inlVladislav Vaintroub2022-01-1712-72/+72
| |
* | Merge 10.2 into 10.3Marko Mäkelä2021-11-092-6/+6
|\ \ | |/
| * MDEV-24335 Unexpected question mark in the end of a TINYTEXT columnAlexander Barkov2021-11-021-2/+2
| | | | | | | | | | | | | | | | | | | | my_copy_fix_mb() passed MIN(src_length,dst_length) to my_append_fix_badly_formed_tail(). It could break a multi-byte character in the middle, which put the question mark to the destination. Fixing the code to pass the true src_length to my_append_fix_badly_formed_tail().
| * MDEV-24901 SIGSEGV in fts_get_table_name, SIGSEGV in ib_vector_size, SIGSEGV ↵bb-10.2-bar-MDEV-24901Alexander Barkov2021-10-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in row_merge_fts_doc_tokenize, stack smashing strmake() puts one extra 0x00 byte at the end of the string. The code in my_strnxfrm_tis620[_nopad] did not take this into account, so in the reported scenario the 0x00 byte was put outside of a stack variable, which made ASAN crash. This problem is already fixed in in MySQL: commit 19bd66fe43c41f0bde5f36bc6b455a46693069fb Author: bin.x.su@oracle.com <> Date: Fri Apr 4 11:35:27 2014 +0800 But the fix does not seem to be correct, as it breaks when finds a zero byte in the source string. Using memcpy() instead of strmake(). - Unlike strmake(), memcpy() it does not write beyond the destination size passed. - Unlike the MySQL fix, memcpy() does not break on the first 0x00 byte found in the source string.
* | Merge branch '10.2' into 10.3Sergei Golubchik2021-02-221-4/+59
|\ \ | |/
| * MDEV-24790 CAST('0e1111111111' AS DECIMAL(38,0)) returns a wrong resultAlexander Barkov2021-02-081-4/+59
| |
* | Merge branch '10.2' into 10.3Sergei Golubchik2021-02-011-2/+8
|\ \ | |/
| * ucs2: cppcheck - add va_endbb-10.2-danielblack-cppcheckDaniel Black2021-01-211-2/+8
| |
* | Merge 10.2 into 10.3Marko Mäkelä2020-11-022-4/+6
|\ \ | |/
| * MDEV-22387: Do not violate __attribute__((nonnull))Marko Mäkelä2020-11-022-4/+6
| | | | | | | | | | | | | | | | | | | | | | This follows up commit commit 94a520ddbe39ae97de1135d98699cf2674e6b77e and commit 7c5519c12d46ead947d341cbdcbb6fbbe4d4fe1b. After these changes, the default test suites on a cmake -DWITH_UBSAN=ON build no longer fail due to passing null pointers as parameters that are declared to never be null, but plenty of other runtime errors remain.
* | Merge 10.2 into 10.3Marko Mäkelä2020-10-281-1/+1
|\ \ | |/
| * MDEV-23941: strings/json_lib.c:893:12: style: Suspicious conditionVicențiu Ciorbaru2020-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | The characters parsed are always ascii characters, hence one byte. This means that the code did not have "incorrect" logic because the boolean condition, if true, would also evaluate to the value of 1. The condition however is semantically wrong, assuming a length is equal to the condition outcome. Change paranthesis to make it also read according to the intent.
* | Merge branch '10.2' into 10.3Sujatha2020-09-281-2/+4
|\ \ | |/
| * MDEV-22387: Do not violate __attribute__((nonnull))Marko Mäkelä2020-09-231-2/+4
| | | | | | | | | | | | | | Passing a null pointer to a nonnull argument is not only undefined behaviour, but it also grants the compiler the permission to optimize away further checks whether the pointer is null. GCC -O2 at least starting with version 8 may do that, potentially causing SIGSEGV.
* | Merge 10.2 into 10.3Marko Mäkelä2020-08-131-1/+1
|\ \ | |/
| * Fix GCC 10.2.0 -Og -Wmaybe-uninitializedMarko Mäkelä2020-08-111-1/+1
| | | | | | | | | | | | For some reason, GCC emits more -Wmaybe-uninitialized warnings when using the flag -Og than when using -O2. Many of the warnings look genuine.
* | Merge 10.2 into 10.3Marko Mäkelä2020-08-101-0/+18
|\ \ | |/
| * Merge 10.1 into 10.2Marko Mäkelä2020-08-101-0/+18
| |\
| | * MDEV-23105 Cast number string with many leading zeros to decimal gives ↵Alexander Barkov2020-08-051-0/+18
| | | | | | | | | | | | | | | | | | unexpected result Skip leading zeros when converting a string to decimal_t.
* | | Merge 10.2 into 10.3Marko Mäkelä2020-07-021-1/+7
|\ \ \ | |/ /
| * | MDEV-20377: Make WITH_MSAN more usableMarko Mäkelä2020-07-011-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MemorySanitizer (clang -fsanitize=memory) requires that all code be compiled with instrumentation enabled. The only exception is the C runtime library. Failure to use instrumented libraries will cause bogus messages about memory being uninitialized. In WITH_MSAN builds, we must avoid calling getservbyname(), because even though it is a standard library function, it is not instrumented, not even in clang 10. Note: Before MariaDB Server 10.5, ./mtr will typically fail due to the old PCRE library, which was updated in MDEV-14024. The following cmake options were tested on 10.5 in commit 94d0bb4dbeb28a94d1f87fdd55f4297ff3df0157: cmake \ -DCMAKE_C_FLAGS='-march=native -O2' \ -DCMAKE_CXX_FLAGS='-stdlib=libc++ -march=native -O2' \ -DWITH_EMBEDDED_SERVER=OFF -DWITH_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=Debug \ -DWITH_INNODB_{BZIP2,LZ4,LZMA,LZO,SNAPPY}=OFF \ -DPLUGIN_{ARCHIVE,TOKUDB,MROONGA,OQGRAPH,ROCKSDB,CONNECT,SPIDER}=NO \ -DWITH_SAFEMALLOC=OFF \ -DWITH_{ZLIB,SSL,PCRE}=bundled \ -DHAVE_LIBAIO_H=0 \ -DWITH_MSAN=ON MEM_MAKE_DEFINED(): An alias for VALGRIND_MAKE_MEM_DEFINED() and __msan_unpoison(). MEM_GET_VBITS(), MEM_SET_VBITS(): Aliases for VALGRIND_GET_VBITS(), VALGRIND_SET_VBITS(), __msan_copy_shadow(). InnoDB: Replace the UNIV_MEM_ macros with corresponding MEM_ macros. ut_crc32_8_hw(), ut_crc32_64_low_hw(): Use the compiler built-in functions instead of inline assembler when building WITH_MSAN. This will require at least -msse4.2 when building for IA-32 or AMD64. The inline assembler would not be instrumented, and would thus cause bogus failures.
* | | Merge 10.2 into 10.3Marko Mäkelä2020-06-131-15/+11
|\ \ \ | |/ /
| * | MDEV-22849 Reuse skip_trailing_space() in my_hash_sort_utf8mbXAlexander Barkov2020-06-101-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replacing the slow loop in my_hash_sort_utf8mbX() to the fast skip_trailing_spaces(), which consumes 8 bytes in one iteration, and is around 8 times faster on long data. Also, renaming: - my_hash_sort_utf8() to my_hash_sort_utf8mb3() - my_hash_sort_utf8_nopad() to my_hash_sort_utf8mb3_nopad() to merge to 10.5 easier (automatically?).
* | | Merge 10.2 into 10.3Marko Mäkelä2020-05-251-20/+35
|\ \ \ | |/ /
| * | MDEV-22545: my_vsnprintf behaves not as in C standardOleksandr Byelkin2020-05-241-20/+35
| | | | | | | | | | | | Added parameter %T for string which should be visibly truncated.
* | | Merge 10.2 into 10.3Marko Mäkelä2020-04-151-5/+61
|\ \ \ | |/ /
| * | MDEV-20604: Duplicate key value is silently truncated to 64 characters in ↵Oleksandr Byelkin2020-04-011-5/+61
| | | | | | | | | | | | | | | | | | print_keydup_error Added indication of truncated string for "s" and "M" formats
* | | Merge 10.2 into 10.3Marko Mäkelä2019-12-272-6/+14
|\ \ \ | |/ /
| * | Merge 10.1 into 10.2Marko Mäkelä2019-12-232-6/+14
| |\ \ | | |/
| | * Merge remote-tracking branch 'origin/5.5' into 10.1Alexander Barkov2019-12-162-6/+14
| | |\
| | | * MDEV-21065 UNIQUE constraint causes a query with string comparison to omit a ↵Alexander Barkov2019-12-162-6/+14
| | | | | | | | | | | | | | | | row in the result set
* | | | Merge branch '10.2' into 10.3Oleksandr Byelkin2019-10-311-4/+14
|\ \ \ \ | |/ / /
| * | | Merge 10.1 into 10.2Marko Mäkelä2019-10-251-4/+14
| |\ \ \ | | |/ /
| | * | Merge branch 'github/5.5' into 10.1Sergei Golubchik2019-10-231-4/+14
| | |\ \ | | | |/
| | | * crash in string-to-int conversionSergei Golubchik2019-10-191-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | using a specially crafted strings one could overflow `shift` variable and cause a crash by dereferencing d10[-2147483648] (on a sufficiently old gcc). This is a correct fix and a test case for Bug #29723340: MYSQL SERVER CRASH AFTER SQL QUERY WITH DATA ?AST
* | | | MDEV-19628 JSON with starting double quotes key is not valid.Alexey Botchkov2019-09-301-1/+4
| | | | | | | | | | | | | | | | Make the skip_key a bit faster.
* | | | MDEV-19628 JSON with starting double quotes key is not valid.Alexey Botchkov2019-09-301-0/+2
| | | | | | | | | | | | | | | | | | | | First character of the key name is just skipped, so the escapement wasn't handled properly.
* | | | MDEV-19670 json escaped unicode parse error.Alexey Botchkov2019-09-121-1/+3
| | | | | | | | | | | | | | | | Fixed 4-byte length characters handled incorrectly.
* | | | Merge 10.2 into 10.3Marko Mäkelä2019-05-1437-38/+38
|\ \ \ \ | |/ / /
| * | | Merge 10.1 into 10.2Marko Mäkelä2019-05-1337-38/+38
| |\ \ \ | | |/ /
| | * | Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-1135-36/+36
| | |\ \ | | | |/
| | | * Update FSF AddressVicențiu Ciorbaru2019-05-1134-35/+35
| | | | | | | | | | | | | | | | * Update wrong zip-code
| | * | Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-112-2/+2
| | |\ \ | | | |/
| | | * Update FSF addressMichal Schorm2019-05-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is based on the work of Michal Schorm, rebased on the earliest MariaDB version. Th command line used to generate this diff was: find ./ -type f \ -exec sed -i -e 's/Foundation, Inc., 59 Temple Place, Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/Foundation, Inc. 59 Temple Place.* Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/MA.*.....-1307.*USA/MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/Foundation, Inc., 59 Temple/Foundation, Inc., 51 Franklin/g' {} \; \ -exec sed -i -e 's/Place, Suite 330, Boston, MA.*02111-1307.*USA/Street, Fifth Floor, Boston, MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/MA.*.....-1307/MA 02110-1335/g' {} \;
| | * | Remove unused declarationsMarko Mäkelä2019-04-031-30/+1
| | | |
* | | | Merge branch '10.2' into 10.3Sergei Golubchik2019-03-291-3/+2
|\ \ \ \ | |/ / /
| * | | post-merge: -Werror fixes in 10.2Sergei Golubchik2019-03-291-2/+2
| | | |