summaryrefslogtreecommitdiff
path: root/unittest
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.9 into 10.10Marko Mäkelä2022-12-071-0/+1
|\
| * Merge 10.8 into 10.9Marko Mäkelä2022-12-071-0/+1
| |\
| | * Merge 10.7 into 10.8Marko Mäkelä2022-12-071-0/+1
| | |\
| | | * Merge 10.6 into 10.7Marko Mäkelä2022-12-071-0/+1
| | | |\
| | | | * Merge 10.5 into 10.6Marko Mäkelä2022-12-051-0/+1
| | | | |\
| | | | | * Merge 10.4 into 10.5Jan Lindström2022-11-301-0/+1
| | | | | |
| | | | | * MDEV-25785 Add support for OpenSSL 3.0Vladislav Vaintroub2022-07-041-31/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary of changes - MD_CTX_SIZE is increased - EVP_CIPHER_CTX_buf_noconst(ctx) does not work anymore, points to nobody knows where. The assumption made previously was that (since the function does not seem to be documented) was that it points to the last partial source block. Add own partial block buffer for NOPAD encryption instead - SECLEVEL in CipherString in openssl.cnf had been downgraded to 0, from 1, to make TLSv1.0 and TLSv1.1 possible (according to https://github.com/openssl/openssl/blob/openssl-3.0.0/NEWS.md even though the manual for SSL_CTX_get_security_level claims that it should not be necessary) - Workaround Ssl_cipher_list issue, it now returns TLSv1.3 ciphers, in addition to what was set in --ssl-cipher - ctx_buf buffer now must be aligned to 16 bytes with openssl( previously with WolfSSL only), ot crashes will happen - updated aes-t , to be better debuggable using function, rather than a huge multiline macro added test that does "nopad" encryption piece-wise, to test replacement of EVP_CIPHER_CTX_buf_noconst part of MDEV-29000
| | | * | | Merge 10.6 into 10.7Marko Mäkelä2022-05-241-31/+90
| | | |\ \ \ | | | | |/ /
| | | | * | MDEV-25785 Add support for OpenSSL 3.0Vladislav Vaintroub2022-05-231-31/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary of changes - MD_CTX_SIZE is increased - EVP_CIPHER_CTX_buf_noconst(ctx) does not work anymore, points to nobody knows where. The assumption made previously was that (since the function does not seem to be documented) was that it points to the last partial source block. Add own partial block buffer for NOPAD encryption instead - SECLEVEL in CipherString in openssl.cnf had been downgraded to 0, from 1, to make TLSv1.0 and TLSv1.1 possible (according to https://github.com/openssl/openssl/blob/openssl-3.0.0/NEWS.md even though the manual for SSL_CTX_get_security_level claims that it should not be necessary) - Workaround Ssl_cipher_list issue, it now returns TLSv1.3 ciphers, in addition to what was set in --ssl-cipher - ctx_buf buffer now must be aligned to 16 bytes with openssl( previously with WolfSSL only), ot crashes will happen - updated aes-t , to be better debuggable using function, rather than a huge multiline macro added test that does "nopad" encryption piece-wise, to test replacement of EVP_CIPHER_CTX_buf_noconst part of MDEV-28133
* | | | | | MDEV-27266 Improve UCA collation performance for utf8mb3 and utf8mb4Alexander Barkov2022-08-101-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding two levels of optimization: 1. For every bytes pair [00..FF][00..FF] which: a. consists of two ASCII characters or makes a well-formed two-byte character b. whose total weight string fits into 4 weights (concatenated weight string in case of two ASCII characters, or a single weight string in case of a two-byte character) c. whose weight is context independent (i.e. does not depend on contractions or previous context pairs) store weights in a separate array of MY_UCA_2BYTES_ITEM, so during scanner_next() we can scan two bytes at a time. Byte pairs that do not match the conditions a-c are marked in this array as not applicable for optimization and scanned as before. 2. For every byte pair which is applicable for optimization in #1, and which produces only one or two weights, store weights in one more array of MY_UCA_WEIGHT2. So in the beginning of strnncoll*() we can skip equal prefixes using an even more efficient loop. This loop consumes two bytes at a time. The loop scans while the two bytes on both sides produce weight strings of equal length (i.e. one weight on both sides, or two weight on both sides). This allows to compare efficiently: - Context independent sequences consisting of two ASCII characters - Context independent 2-byte characters - Contractions consisting of two ASCII characters, e.g. Czech "ch". - Some tricky cases: "ss" vs "SHARP S" ("ss" produces two weights, 0xC39F also produces two weights)
* | | | | MDEV-22224: Support JSON Path negative indexRucha Deodhar2022-04-131-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch can be viewed as combination of two parts: 1) Enabling '-' in the path so that the parser does not give out a warning. 2) Setting the negative index to a correct value and returning the appropriate value. 1) To enable using the negative index in the path: To make the parser not return warning when negative index is used in path '-' needs to be allowed in json path characters. P_NEG is added to enable this and is made recognizable by setting the 45th index of json_path_chr_map[] to P_NEG (instead of previous P_ETC) because 45 corresponds to '-' in unicode. When the path is being parsed and '-' is encountered, the parser should recognize it as parsing '-' sign, so a new json state PS_NEG is required. When the state is PS_NEG, it means that a negative integer is going to be parsed so set is_negative_index of current step to 1 and n_item is set accordingly when integer is encountered after '-'. Next proceed with parsing rest of the path and get the correct path. Next thing is parsing the json and returning correct value. 2) Setting the negative index to a correct value and returning the value: While parsing json if we encounter array and the path step for the array is a negative index (n_item < 0), then we can count the number of elements in the array and set n_item to correct corresponding value. This is done in json_skip_array_and_count.
* | | | Merge branch '10.7' into 10.8Oleksandr Byelkin2022-02-041-3/+505
|\ \ \ \ | |/ / /
| * | | Merge branch '10.6' into 10.7Oleksandr Byelkin2022-02-041-3/+505
| |\ \ \ | | |/ /
| | * | Merge branch '10.5' into 10.6Oleksandr Byelkin2022-02-031-3/+505
| | |\ \ | | | |/
| | | * Merge branch '10.4' into 10.5Oleksandr Byelkin2022-02-011-3/+505
| | | |\
| | | | * MDEV-25904 New collation functions to compare InnoDB style trimmed NO PAD ↵bb-10.4-bar-MDEV-25904Alexander Barkov2022-01-211-3/+505
| | | | | | | | | | | | | | | | | | | | strings
* | | | | MDEV-25785 Add support for OpenSSL 3.0Vladislav Vaintroub2022-01-201-31/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary of changes - MD_CTX_SIZE is increased - EVP_CIPHER_CTX_buf_noconst(ctx) does not work anymore, points to nobody knows where. The assumption made previously was that (since the function does not seem to be documented) was that it points to the last partial source block. Add own partial block buffer for NOPAD encryption instead - SECLEVEL in CipherString in openssl.cnf had been downgraded to 0, from 1, to make TLSv1.0 and TLSv1.1 possible (according to https://github.com/openssl/openssl/blob/openssl-3.0.0/NEWS.md even though the manual for SSL_CTX_get_security_level claims that it should not be necessary) - Workaround Ssl_cipher_list issue, it now returns TLSv1.3 ciphers, in addition to what was set in --ssl-cipher - ctx_buf buffer now must be aligned to 16 bytes with openssl( previously with WolfSSL only), ot crashes will happen - updated aes-t , to be better debuggable using function, rather than a huge multiline macro added test that does "nopad" encryption piece-wise, to test replacement of EVP_CIPHER_CTX_buf_noconst
* | | | | MDEV-27036: re-enable my_json_writer-t unit testbb-10.8-MDEV-27036-enable-unittestSergei Krivonos2021-12-152-8/+8
| | | | |
* | | | | Merge 10.7 into 10.8Marko Mäkelä2021-12-101-1/+1
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.6' into 10.7Sergei Golubchik2021-12-081-1/+1
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.5' into 10.6Sergei Golubchik2021-12-071-1/+1
| | |\ \ \ | | | |/ /
| | | * | Merge branch '10.4' into 10.5Sergei Golubchik2021-12-071-1/+1
| | | |\ \ | | | | |/
| | | | * Merge branch '10.3' into 10.4Sergei Golubchik2021-12-071-1/+1
| | | | |\
| | | | | * Merge branch '10.2' into 10.3Sergei Golubchik2021-12-061-1/+1
| | | | | |\
| | | | | | * MDEV-27088: lf unit tests - cycles insufficientMartin Beck2021-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per bug report, cycles was woefully insufficient to detect any implementation error.
* | | | | | | Revert "MDEV-27036: re-enable my_json_writer-t unit test"Sergei Golubchik2021-12-072-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2d21917e7db2db0900671aac2e29f49e4ff2acd7. No explainations, lots of code moved, wrong cmake changes
* | | | | | | MDEV-27036: re-enable my_json_writer-t unit testSergei Krivonos2021-12-042-11/+9
| | | | | | |
* | | | | | | MDEV-27036: unittest JSON object member name collisionSergei Krivonos2021-11-261-0/+18
| | | | | | |
* | | | | | | MDEV-27036: temporarily disable my_json_writer-t testSergei Krivonos2021-11-261-3/+3
|/ / / / / /
* | | | | | Merge 10.6 into 10.7Marko Mäkelä2021-11-192-0/+133
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge 10.5 into 10.6Marko Mäkelä2021-11-162-0/+133
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge 10.4 into 10.5Marko Mäkelä2021-11-162-0/+133
| | |\ \ \ \ | | | |/ / /
| | | * | | MDEV-23766: Re-add Json_writer unit test.Sergei Petrunia2021-11-092-2/+4
| | | | | |
| | | * | | improve build, allow sql library to be built in parallel with builtinsVladislav Vaintroub2021-11-092-3/+31
| | | | | |
| | | * | | Revert "improve build, allow sql library to be built in parallel with builtins"Sergei Krivonos2021-11-092-31/+3
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1a3570dec35733e725cc6000a06ec666facf4235.
| | | * | | MDEV-23766: buildfix: postpone new unittest until its dependency resolutionSergei Krivonos2021-11-091-4/+0
| | | | | |
| | | * | | MDEV-23766: fix by my_json_writer testSergei Krivonos2021-11-091-2/+2
| | | | | |
| | | * | | MDEV-23766: Make Json_writer assert when one tries to author invalid JSONSergei Petrunia2021-11-092-0/+135
| | | | | | | | | | | | | | | | | | | | | | | | - Add unit test.
| | | * | | improve build, allow sql library to be built in parallel with builtinsVladislav Vaintroub2021-11-092-3/+31
| | | | | |
* | | | | | Merge 10.6 into 10.7Marko Mäkelä2021-09-301-1/+258
|\ \ \ \ \ \ | |/ / / / /
| * | | | | MDEV-26669 Add MY_COLLATION_HANDLER functions min_str() and max_str()bb-10.6-bar-MDEV-26669Alexander Barkov2021-09-271-1/+258
| | | | | |
* | | | | | cleanup: MY_BITMAP mutexSergei Golubchik2021-08-261-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in about a hundred of users of MY_BITMAP, only two were using its built-in mutex, and only one of those two was actually needing it. Remove the mutex from MY_BITMAP, remove all associated conditions and checks in bitmap functions. Use an external LOCK_temp_pool mutex and temp_pool_set_next/temp_pool_clear_bit acccessors. Remove bitmap_init/bitmap_free, always use my_* versions.
* | | | | | Add json_normalize function to json_libEric Herman2021-07-212-1/+281
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements a library for normalizing json documents. The algorithm is: * Recursively sort json keys according to utf8mb4_bin collation. * Normalize numbers to be of the form [-]<digit>.<frac>E<exponent> * All unneeded whitespace and line endings are removed. * Arrays are not sorted. Co-authored-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>
* | | | | 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