summaryrefslogtreecommitdiff
path: root/unittest
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-25602 get rid of __WIN__ in favor of standard _WIN32Vladislav Vaintroub2021-06-061-2/+2
| | | | | | | | | | This fixed the MySQL bug# 20338 about misuse of double underscore prefix __WIN__, which was old MySQL's idea of identifying Windows Replace it by _WIN32 standard symbol for targeting Windows OS (both 32 and 64 bit) Not that connect storage engine is not fixed in this patch (must be fixed in "upstream" branch)
* Change CHARSET_INFO character set and collaction names to LEX_CSTRINGMonty2021-05-192-4/+5
| | | | | | | | | | | | | | | | | | | | | | This change removed 68 explict strlen() calls from the code. The following renames was done to ensure we don't use the old names when merging code from earlier releases, as using the new variables for print function could result in crashes: - charset->csname renamed to charset->cs_name - charset->name renamed to charset->coll_name Almost everything where mechanical changes except: - Changed to use the new Protocol::store(LEX_CSTRING..) when possible - Changed to use field->store(LEX_CSTRING*, CHARSET_INFO*) when possible - Changed to use String->append(LEX_CSTRING&) when possible Other things: - There where compiler issues with ensuring that all character set names points to the same string: gcc doesn't allow one to use integer constants when defining global structures (constant char * pointers works fine). To get around this, I declared defines for each character set name length.
* Add support for minimum field width for strings to my_vsnprintf()Monty2021-05-191-3/+6
| | | | | | | | This patch adds support for right aligned strings and numbers. Left alignment is left as an exercise for anyone needing it. MDEV-25612 "Assertion `to <= end' failed in process_args" fixed. (Was caused by the original version of this patch)
* unittest: my_getopt-t errors on -ve ul{l,}bb-10.6-danielblack-MDEV-22219-negative-unsignedDaniel Black2021-04-071-7/+2
|
* Merge 10.5 into 10.6Marko Mäkelä2021-02-171-0/+2
|\
| * Merge branch 'bb-10.4-release' into bb-10.5-releaseSergei Golubchik2021-02-151-0/+2
| |\
| | * Merge branch 'bb-10.3-release' into bb-10.4-releaseSergei Golubchik2021-02-121-0/+2
| | |\ | | | | | | | | | | | | | | | | Note, the fix for "MDEV-23328 Server hang due to Galera lock conflict resolution" was null-merged. 10.4 version of the fix is coming up separately
| | | * Merge branch '10.2' into 10.3Sergei Golubchik2021-02-011-0/+2
| | | |\
| | | | * MDEV-24131: unittest stacktrace-t fails to compile (OpenBSD)Mingli Yu2021-01-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was because OpenBSD (and others) can be missing HAVE_BACKTRACE / HAVE_BACKTRACE_FD which is the condition for my_safe_print_str to be defined. Fixes: /prj/tmp/work/cortexa57-poky-linux-musl/mariadb/10.5.8-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux-musl/../../libexec/aarch64-poky-linux-musl/gcc/aarch64-poky-linux-musl/10.2.0/ld.bfd: /usr/src/debug/mariadb/10.5.8-r0/mariadb-10.5.8/unittest/mysys/stacktrace-t.c:36: undefined reference to `my_safe_print_str' Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
* | | | | Merge 10.5 into 10.6Marko Mäkelä2021-02-111-2/+2
|\ \ \ \ \ | |/ / / /
| * | | | Added 'const' to arguments in get_one_option and find_typeset()Monty2021-02-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One should not change the program arguments! This change also reduces warnings from the icc compiler. Almost all changes are just syntax changes (adding const to 'get_one_option function' declarations). Other changes: - Added a few cast of 'argument' from 'const char*' to 'char *'. This was mainly in calls to 'external' functions we don't have control of. - Ensure that all reset of 'password command line argument' are similar. (In almost all cases it was just adding a comment and a cast) - In mysqlbinlog.cc and mysqld.cc there was a few cases that changed the command line argument. These places where changed to instead allocate the option in a MEM_ROOT to avoid changing the argument. Some of this code was changed to ensure that different programs did parsing the same way. Added a test case for the changes in mysqlbinlog.cc - Changed a few variables that took their value from command line options from 'char *' to 'const char *'.
* | | | | Merge branch '10.5' into 10.6Oleksandr Byelkin2020-11-141-1/+1
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.4' into 10.5Oleksandr Byelkin2020-11-141-1/+1
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.3' into 10.4Oleksandr Byelkin2020-11-141-1/+1
| | |\ \ \ | | | |/ /
| | | * | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-11-141-1/+1
| | | |\ \ | | | | |/
| | | | * Fix to make it compiling on new ubuntu.Oleksandr Byelkin2020-11-141-1/+1
| | | | |
* | | | | Merge 10.5 into 10.6Marko Mäkelä2020-09-241-2/+2
|\ \ \ \ \ | |/ / / /
| * | | | Fix GCC warning: this decimal constant is unsigned only in ISO C90Vladislav Vaintroub2020-09-241-2/+2
| | | | |
* | | | | Merge 10.5 into 10.6Marko Mäkelä2020-09-242-2/+71
|\ \ \ \ \ | |/ / / /
| * | | | MDEV-19935 Create unified CRC-32 interfaceVladislav Vaintroub2020-09-172-2/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add CRC32C code to mysys. The x86-64 implementation uses PCMULQDQ in addition to CRC32 instruction after Intel whitepaper, and is ported from rocksdb code. Optimized ARM and POWER CRC32 were already present in mysys.
* | | | | Merge branch '10.5' into 10.6Oleksandr Byelkin2020-09-022-1/+68
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.4 into 10.5Marko Mäkelä2020-08-202-1/+68
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.3 into 10.4Marko Mäkelä2020-08-202-1/+68
| | |\ \ \ | | | |/ /
| | | * | Merge 10.2 into 10.3Marko Mäkelä2020-08-202-1/+68
| | | |\ \ | | | | |/
| | | | * Merge 10.1 into 10.2Marko Mäkelä2020-08-202-1/+68
| | | | |\
| | | | | * MDEV-23491: __bss_start breaks compilation of various platformsOleksandr Byelkin2020-08-182-1/+68
| | | | | | | | | | | | | | | | | | | | | | | | Remove __bss_start & Co, because systen call "write" check buffer address and return EFAULT if it is wrong.
* | | | | | MDEV-23043 Refactor Windows service handlingVladislav Vaintroub2020-07-041-8/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed the existing nt_service classes - they provide little abstraction, and only obscure a relatively simple service handling. This replaces by similar code inspired by MS docs samples. Service handling is now moved into winmain.cc, which contains the main() function for Windows. winmain provides reporting callbacks, which should be used by external code ,to report transitions from starting to running to shutting down to stopped. Removed a do-nothing ServiceMain thread, and the non-working service "pause/continue". Removed a lot of #ifdef __WIN__ code from mysqld.cc
* | | | | Merge 10.4 into 10.5Marko Mäkelä2020-07-021-1/+1
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.3 into 10.4Marko Mäkelä2020-07-021-1/+1
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.2 into 10.3Marko Mäkelä2020-07-021-1/+1
| | |\ \ \ | | | |/ /
| | | * | Merge 10.1 into 10.2bb-10.2-mergeMarko Mäkelä2020-07-011-1/+1
| | | |\ \ | | | | |/
| | | | * mtr: use env for perlDaniel Black2020-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On FreeBSD, perl isn't in /usr/bin, its in /usr/local/bin or elsewhere in the path. Like storage/{maria/unittest/,}ma_test_* , we use /usr/bin/env to find perl and run it.
* | | | | Merge 10.4 into 10.5Marko Mäkelä2020-05-311-9/+21
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.3 into 10.4Marko Mäkelä2020-05-261-9/+21
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.2 into 10.3Marko Mäkelä2020-05-251-9/+21
| | |\ \ \ | | | |/ /
| | | * | MDEV-22545: my_vsnprintf behaves not as in C standardOleksandr Byelkin2020-05-241-9/+21
| | | | | | | | | | | | | | | | | | | | Added parameter %T for string which should be visibly truncated.
* | | | | Merge 10.4 into 10.5Marko Mäkelä2020-05-052-1/+140
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.3 into 10.4Marko Mäkelä2020-05-052-1/+140
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-05-042-1/+140
| | |\ \ \ | | | |/ /
| | | * | Merge branch '10.1' into 10.2Oleksandr Byelkin2020-05-022-1/+140
| | | |\ \ | | | | |/
| | | | * Merge branch '5.5' into 10.1Oleksandr Byelkin2020-04-302-1/+140
| | | | |\
| | | | | * BUG#30301356 - SOME EVENTS ARE DELAYED AFTER DROPPING EVENTSergei Golubchik2020-04-302-1/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | queues.c cleanup and refactoring. Restore old version of _downhead() (from before cd483c55209) that works well in an average case. Use it for queue_fix(). Move existing specialized version of _downhead() to queue_replace() where it'll be handling the case it was specifically optimized for (moving the element to the end of the queue). And correct it to fix the heap not only down, but also up (this fixes BUG#30301356). Add unit tests. Collateral cosmetic fixes.
* | | | | | Merge 10.4 into 10.5Marko Mäkelä2020-04-252-11/+28
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | 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-11/+27
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-11/+27
| | |\ \ \ \ | | | |/ / /
| | | * | | MDEV-20604: Duplicate key value is silently truncated to 64 characters in ↵Oleksandr Byelkin2020-04-011-11/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | print_keydup_error Added indication of truncated string for "s" and "M" formats
| * | | | | Shrink my_atomic.h and my_cpu.h scopeSergey Vojtovich2020-04-151-0/+1
| | | | | |
* | | | | | Merge 10.4 into 10.5Marko Mäkelä2020-03-231-1/+0
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Cleanup my_atomic.h includesSergey Vojtovich2020-03-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | my_atomic.h is included indirectly anyways.
* | | | | | perfschema memory related instrumentation changesSergei Golubchik2020-03-101-3/+3
| | | | | |