summaryrefslogtreecommitdiff
path: root/unittest/strings
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.9 into 10.10Marko 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-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)
* | 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-26669 Add MY_COLLATION_HANDLER functions min_str() and max_str()bb-10.6-bar-MDEV-26669Alexander Barkov2021-09-271-1/+258
| | |
* | | Change CHARSET_INFO character set and collaction names to LEX_CSTRINGMonty2021-05-191-3/+4
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | MDEV-21581 Helper functions and methods for CHARSET_INFOAlexander Barkov2020-01-281-8/+9
| |
* | MDEV-19897 Rename source code variable names from utf8 to utf8mb3Alexander Barkov2019-06-281-7/+7
|/
* Merge branch '10.3' into 10.4Oleksandr Byelkin2019-05-191-1/+1
|\
| * Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
| |\
| | * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| | |\
| | | * Update FSF AddressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | | | | | | | | | * Update wrong zip-code
* | | | stricter json unit testsSergei Golubchik2019-02-041-56/+77
| | | |
* | | | MDEV-5313 Improving audit API.Alexey Botchkov2019-01-181-2/+26
| | | | | | | | | | | | | | | | | | | | json_locate_key() implemented. get rid of 'key_len' argument in functions.
* | | | MDEV-5313 Improving audit api.Alexey Botchkov2019-01-171-0/+58
| | | | | | | | | | | | | | | | json_t unittest added.
* | | | MDEV-5313 Improving audit api.Alexey Botchkov2019-01-171-1/+1
|/ / / | | | | | | | | | | | | JSON api implementations and tests pushed. sql_acl.cc fixed with the new function names.
* | | MDEV-7769 MY_CHARSET_INFO refactoring# On branch 10.2Alexander Barkov2016-10-101-6/+6
| | | | | | | | | | | | Part 3 (final): removing MY_CHARSET_HANDLER::well_formed_len().
* | | MDEV-8360 Clean-up CHARSET_INFO: strnncollsp: diff_if_only_endspace_differenceAlexander Barkov2016-03-311-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removing the "diff_if_only_endspace_difference" argument from MY_COLLATION_HANDLER::strnncollsp(), my_strnncollsp_simple(), as well as in the function template MY_FUNCTION_NAME(strnncollsp) in strcoll.ic - Removing the "diff_if_only_space_different" from ha_compare_text(), hp_rec_key_cmp(). - Adding a new function my_strnncollsp_padspace_bin() and reusing it instead of duplicate code pieces in my_strnncollsp_8bit_bin(), my_strnncollsp_latin1_de(), my_strnncollsp_tis620(), my_strnncollsp_utf8_cs(). - Adding more tests for better coverage of the trailing space handling. - Removing the unused definition of HA_END_SPACE_ARE_EQUAL
* | Merge branch '10.0' into 10.1Sergei Golubchik2016-02-231-1/+1
|\ \ | |/
| * compilation errors on sparc sun studio 10Sergei Golubchik2016-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 1. unused static inline functions are only removed at -xO4, otherwise test binaries will depend on various mysys symbols that they don't use. Link test with libmysys. 2. Sphinx - don't instantiate (explicitly) templates before they're defined. Or, rather, don't instantiate them explicitly at all. 3. GIS - don't use anonymous unions and structs.
* | MDEV-8419 utf32: compare broken bytes as "greater than any non-broken character"Alexander Barkov2015-07-071-0/+54
| |
* | Fixing a bug in MDEV-8418 (utf16, utf16le) and MDEV-8417 (utf8mb4).Alexander Barkov2015-07-061-2/+39
| | | | | | | | | | Fixing non-BMP characters to have the same weight, as it was before MDEV-8418 and MDEV-8417.
* | MDEV-8416 ucs2: compare broken bytes as "greater than any non-broken character"Alexander Barkov2015-07-061-8/+124
| | | | | | | | MDEV-8418 utf16: compare broken bytes as "greater than any non-broken character"
* | MDEV-8417 utf8mb4: compare broken bytes as "greater than any non-broken ↵Alexander Barkov2015-07-061-0/+49
| | | | | | | | character"
* | MDEV-8415 utf8: compare broken bytes as "greater than any non-broken character"Alexander Barkov2015-07-031-0/+27
| |
* | MDEV-8215 Asian MB3 charsets: compare broken bytes as "greater than any ↵Alexander Barkov2015-07-031-0/+30
| | | | | | | | non-broken character"
* | MDEV-8214 Asian MB2 charsets: compare broken bytes as "greater than any ↵Alexander Barkov2015-06-261-1/+356
|/ | | | non-broken character"
* MDEV-419 ensure that all HAVE_XXX constants can be set by cmakeSergei Golubchik2012-07-311-1/+1
| | | | | add missing checks to configure.cmake remove dead code and unused HAVE_xxx constants from the sources
* 5.3 mergeSergei Golubchik2012-01-131-1/+1
|\
| * Initail merge with MySQL 5.1 (XtraDB still needs to be merged)Michael Widenius2011-11-212-2/+2
| |\ | | | | | | | | | Fixed up copyright messages.
| * | Fixed compiler and gmake warningsMichael Widenius2010-11-291-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removed SCCS rule from Makefile.am - Made dummy rule in sql_yacc.yy to get rid of compiler warning about not used label. Don't use maintainer mode with valgrind (as we don't want to initialize all variables) config/ac-macros/maintainer.m4: Don't use maintainer mode with valgrind (as we don't want to initialize all variables) Force initialization of variables when using -Werror (To get rid of compiler warnings) configure.in: Don't use maintainer mode with valgrind (as we don't want to initialize all variables) sql/sql_yacc.yy: Made dummy rule in sql_yacc.yy to get rid of compiler warning about not used label.
* | | mysql-5.5.18 mergeSergei Golubchik2011-11-031-1/+1
|\ \ \
| * \ \ Updated/added copyright headersKent Boortz2011-06-301-1/+1
| |\ \ \ | | | |/ | | |/|
| | * | Updated/added copyright headersKent Boortz2011-06-302-2/+2
| | | |
* | | | unit test fixes for ctestSergei Golubchik2011-07-161-0/+3
| | | |
* | | | 5.5-mergeSergei Golubchik2011-07-021-27/+0
|\ \ \ \ | |/ / / | | | / | |_|/ |/| |
| * | WL#5665: Removal of the autotools-based build systemDavi Arnaut2010-11-201-27/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The autotools-based build system has been superseded and is being removed in order to ease the maintenance burden on developers tweaking and maintaining the build system. In order to support tools that need to extract the server version, a new file that (only) contains the server version, called VERSION, is introduced. The file contents are human and machine-readable. The format is: MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MINOR=5 MYSQL_VERSION_PATCH=8 MYSQL_VERSION_EXTRA=-rc The CMake based version extraction in cmake/mysql_version.cmake is changed to extract the version from this file. The configure to CMake wrapper is retained for backwards compatibility and to support the BUILD/ scripts. Also, a new a makefile target show-dist-name that prints the server version is introduced. VERSION: Add top-level version file. cmake/mysql_version.cmake: Get version information from the top-level VERSION file. Do not cache the version components (MAJOR_VERSION, etc). Add MYSQL_RPM_VERSION as a replacement for MYSQL_U_SCORE_VERSION.
* | Fixed build & test failures in buildbotMichael Widenius2010-08-281-0/+2
|/ | | | | | | | | | | | | | | | | | | | | mysql-test/t/bug46080-master.opt: Lower limits to be able to run tests regex/main.c: Fixed compiler warnings storage/maria/ma_key_recover.c: Fixed compiler warnings storage/maria/ma_recovery.c: Fixed compiler warnings storage/maria/ma_unique.c: Fixed compiler warnings strings/ctype-uca.c: Added comment strings/xml.c: Fixed compiler warnings support-files/compiler_warnings.supp: Added suppressions for windows unittest/strings/strings-t.c: Added ifdef to fix compilation failure when compiling without UCA
* Postfix for BUG#45012.Alexander Barkov2010-07-291-3/+3
| | | | | | | | Problem: The original patch didn't compile on debug_werror due to wrong format in printf("%d") for size_t variables. Fix: Adding cast to (int).
* Bug#45012 my_like_range_cp932 generates invalid stringAlexander Barkov2010-07-262-0/+141
Problem: The functions my_like_range_xxx() returned badly formed maximum strings for Asian character sets, which made problems for storage engines. Fix: - Removed a number my_like_range_xxx() implementations, which were in fact dumplicate code pieces. - Using generic my_like_range_mb() instead. - Setting max_sort_char member properly for Asian character sets - Adding unittest/strings/strings-t.c, to test that my_like_range_xxx() return well-formed min and max strings. Notes: - No additional tests in mysql/t/ available. Old tests cover the affected code well enough.