summaryrefslogtreecommitdiff
path: root/strings
Commit message (Collapse)AuthorAgeFilesLines
* fix compiler error on clang-clVladislav Vaintroub2020-09-011-2/+2
|
* Merge 10.4 into 10.5Marko Mäkelä2020-08-141-1/+1
|\
| * Merge 10.3 into 10.4, except MDEV-22543Marko Mäkelä2020-08-131-1/+1
| |\ | | | | | | | | | Also, fix GCC -Og -Wmaybe-uninitialized in run_backup_stage()
| | * 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.4 into 10.5Marko Mäkelä2020-08-101-0/+18
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2020-08-101-0/+18
| |\ \ \ | | |/ /
| | * | 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.3 into 10.4Marko Mäkelä2020-07-021-1/+7
| |\ \ \ \ | | |/ / /
| | * | | 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.
* | | | | MDEV-7947 strcmp() takes 0.37% in OLTP ROMonty2020-07-2318-222/+252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch ensures that all identical character sets shares the same cs->csname. This allows us to replace strcmp() in my_charset_same() with comparisons of pointers. This fixes a long standing performance issue that could cause as strcmp() for every item sent trough the protocol class to the end user. One consequence of this patch is that we don't allow one to add a character definition in the Index.xml file that changes the csname of an existing character set. This is by design as changing character set names of existing ones is extremely dangerous, especially as some storage engines just records character set numbers. As we now have a hash over character set's csname, we can in the future use that for faster access to a specific character set. This could be done by changing the hash to non unique and use the hash to find the next character set with same csname.
* | | | | Created a workaround for a bug in MSAN for va_arg(,double)Monty2020-06-142-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-22691 MSAN use-of-uninitialized-value in test maria.maria-recovery2 This caused all my_vsnprintf() using doubles to fail. Thanks to the workaround, I was able to remove the disabling of MSAN in dtoa().
* | | | | Merge 10.4 into 10.5Marko Mäkelä2020-06-141-6/+2
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.3 into 10.4Marko Mäkelä2020-06-131-15/+11
| |\ \ \ \ | | |/ / /
| | * | | 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.4 into 10.5Marko Mäkelä2020-05-311-20/+35
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.3 into 10.4Marko Mäkelä2020-05-261-20/+35
| |\ \ \ \ | | |/ / /
| | * | | 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.
* | | | | MDEV-22043 Special character leads to assertion in ↵Alexander Barkov2020-05-0916-12/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | my_wc_to_printable_generic on 10.5.2 (debug) The code did not take into account that: - U+005C (backslash) can occupy more than mbminlen characters (e.g. in sjis) - Some character sets do not have a code for U+005C (e.g. swe7) Adding a new function my_wc_to_printable into MY_CHARSET_HANDLER to cover all special cases easier.
* | | | | MDEV-22454 Allow -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ONVladislav Vaintroub2020-05-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable IPO (interprocedural optimization, aka /GL) on Windows on libraries, from which server.dll exports symbols - exporting symbols does not work for objects compiled with /GL.
* | | | | Merge 10.4 into 10.5Marko Mäkelä2020-04-251-5/+61
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | The functional changes of commit 5836191c8f0658d5d75484766fdcc3d838b0a5c1 (MDEV-21168) are omitted due to MDEV-742 having addressed the issue.
| * | | | Merge 10.3 into 10.4Marko Mäkelä2020-04-161-5/+61
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | In main.index_merge_myisam we remove the test that was added in commit a2d24def8cc42d27c72d833abfb39ef24a2b96ba because it duplicates the test case that was added in commit 5af12e463549e4bbc2ce6ab720d78937d5e5db4e.
| | * | | 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
* | | | | MDEV-20377: Make WITH_MSAN more usableMarko Mäkelä2020-03-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MemorySanitizer (clang -fsanitize=memory) requires that all code be compiled with instrumentation enabled. The C runtime library is an exception. 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. The following cmake options were tested: -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 in the future, __msan_unpoison(). For now, neither MEM_MAKE_DEFINED() nor MEM_UNDEFINED() perform any action under MSAN. Enabling them will catch more bugs, but will also require some more fixes or work-arounds. Json_writer::add_double(): Work around a frequently occurring failure in optimizer tests, related to EXPLAIN FORMAT=JSON. dtoa(): Disable MSAN altogether. For some reason, this function is triggering a lot of trouble, especially when invoked for DBUG functions. The MDL default timeout is dd=86400 seconds, and for some reason it is claimed to be uninitialized. InnoDB: Define UNIV_DEBUG_VALGRIND also WITH_MSAN. 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.4 into 10.5Marko Mäkelä2020-03-171-1/+9
|\ \ \ \ \ | |/ / / /
| * | | | MDEV-5313: Fix GCC 10 -Wenum-conversionMarko Mäkelä2020-03-161-1/+9
| | | | |
* | | | | perfschema memory related instrumentation changesSergei Golubchik2020-03-103-5/+5
| | | | |
* | | | | Merge 10.4 into 10.5Marko Mäkelä2020-02-074-8/+12
|\ \ \ \ \ | |/ / / /
| * | | | Fixed compiler warnings from gcc 7.4.1Monty2020-01-294-8/+12
| | | | | | | | | | | | | | | | | | | | - Fixed possible error in rocksdb/rdb_datadic.cc
* | | | | MDEV-21581 Helper functions and methods for CHARSET_INFOAlexander Barkov2020-01-2812-89/+93
| | | | |
* | | | | Merge 10.4 into 10.5Marko Mäkelä2019-12-272-6/+14
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.3 into 10.4Marko Mäkelä2019-12-272-6/+14
| |\ \ \ \ | | |/ / /
| | * | | 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
* | | | | | A cleanup for MDEV-8844: Fixing compilation failure on WindowsAlexander Barkov2019-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixing lossy type conversions: - from int64 to int - from size_t to uint
* | | | | | MDEV-8844 Unreadable control characters printed as is in warningsAlexander Barkov2019-12-061-0/+94
| | | | | |
* | | | | | Merge 10.4 into 10.5Oleksandr Byelkin2019-11-071-4/+14
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge 10.3 into 10.4Marko Mäkelä2019-11-011-4/+14
| |\ \ \ \ \ | | |/ / / /
| | * | | | 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