summaryrefslogtreecommitdiff
path: root/strings
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '10.0' into 10.1Sergei Golubchik2016-03-211-1/+1
|\
| * Fix spelling: occurred, execute, which etcOtto Kekäläinen2016-03-041-1/+1
| |
* | MDEV-7231 Field ROUTINE_DEFINITION in INFORMATION_SCHEMA.`ROUTINES`Alexander Barkov2016-02-241-12/+16
| | | | | | | | contains broken procedure body when used shielding quotes inside.
* | Fixes needed to compile with musl C libraryMonty2016-02-071-1/+1
| | | | | | | | Patch originally by Codarren Velvindron
* | Merge branch '10.0' into 10.1Sergei Golubchik2015-12-212-1/+2
|\ \ | |/
| * MDEV-9265 SuSE patches: Suspicious implicit sign extensionAlexander Barkov2015-12-151-1/+1
| |
| * Merge branch '5.5' into 10.0Sergei Golubchik2015-12-132-1/+2
| |\
| | * MDEV-8407 Numeric errors, server crash with COLUMN_JSON() on DECIMAL with ↵Oleksandr Byelkin2015-12-101-1/+2
| | | | | | | | | | | | | | | | | | precision > 40 In fact it was error in decimal library (incorrect processing of buffer overflow) invisible from other server parts because of buffer allocation and precision tests.
| | * Correct length check in my_wc_mb_filename()Jan Lindström2015-12-071-1/+1
| | |
* | | MDEV-9265 SuSE patches: Suspicious implicit sign extensionAlexander Barkov2015-12-151-1/+2
| | |
* | | MDEV-9178 Wrong result for CAST(CONVERT('1IJ3' USING ucs2) AS SIGNED)Alexander Barkov2015-11-242-5/+20
| | | | | | | | | | | | Also, fixing compilation warnings in ctype-mb.ic (Windows).
* | | Merge branch '10.0' into 10.1Sergei Golubchik2015-10-122-2/+2
|\ \ \ | |/ /
| * | MDEV-8450: PATCH] Wrong macro expansion in Query_cache::send_result_to_client()Oleksandr Byelkin2015-09-062-2/+2
| | | | | | | | | | | | Expression in macro protected by ()
* | | MDEV-8466 CAST works differently for DECIMAL/INT vs DOUBLE for empty stringsAlexander Barkov2015-09-171-0/+5
| | | | | | | | | | | | MDEV-8468 CAST and INSERT work differently for DECIMAL/INT vs DOUBLE for a string with trailing spaces
* | | MDEV-8694 Wrong result for SELECT..WHERE a NOT LIKE 'a ' AND a='a'Alexander Barkov2015-08-286-36/+42
| | | | | | | | | | | | | | | | | | Note, the patch for MDEV-8661 unintentionally fixed MDEV-8694 as well, as a side effect. Adding a real clear fix: implementing Item_func_like::propagate_equal_fields() with comments.
* | | Adding MY_CHARSET_HANDLER::native_to_mb().Alexander Barkov2015-08-1416-23/+87
| | | | | | | | | | | | | | | | | | | | | This is a pre-requisite patch for: - MDEV-8433 Make field<'broken-string' use indexes - MDEV-8625 Bad result set with ignorable characters when using a prefix key - MDEV-8626 Bad result set with contractions when using a prefix key
* | | MDEV-8362 dash '-' is not recognized in charset armscii8 on select where queryAlexander Barkov2015-07-141-1/+22
| | |
* | | MDEV-8419 utf32: compare broken bytes as "greater than any non-broken character"Alexander Barkov2015-07-071-232/+31
| | |
* | | Fixing a bug in MDEV-8418 (utf16, utf16le) and MDEV-8417 (utf8mb4).Alexander Barkov2015-07-062-5/+4
| | | | | | | | | | | | | | | 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-062-454/+125
| | | | | | | | | | | | 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-062-145/+43
| | | | | | | | | | | | character"
* | | Fixing a typo in the previous commit.Alexander Barkov2015-07-031-1/+1
| | |
* | | Adding UTF8 related macros to reduce duplicate code.Alexander Barkov2015-07-031-81/+73
| | |
* | | Removing unused code in ctype-utf8.cAlexander Barkov2015-07-031-112/+0
| | |
* | | MDEV-8415 utf8: compare broken bytes as "greater than any non-broken character"Alexander Barkov2015-07-032-170/+136
| | |
* | | MDEV-8215 Asian MB3 charsets: compare broken bytes as "greater than any ↵Alexander Barkov2015-07-034-26/+92
| | | | | | | | | | | | non-broken character"
* | | Merge tag 'mariadb-10.0.20' into 10.1Sergei Golubchik2015-06-271-1/+1
|\ \ \ | |/ /
| * | MDEV-8285 compile fails under Mac OS X 10.6.8 due to use of strnlenSergei Golubchik2015-06-141-1/+1
| | | | | | | | | | | | #include <m_string.h> where strnlen() is used
* | | MDEV-8214 Asian MB2 charsets: compare broken bytes as "greater than any ↵Alexander Barkov2015-06-268-372/+474
| | | | | | | | | | | | non-broken character"
* | | Merge tag 'mariadb-10.0.19' into 10.1Sergei Golubchik2015-06-012-2/+24
|\ \ \ | |/ /
| * | Merge branch '5.5' into 10.0Sergei Golubchik2015-05-041-2/+20
| |\ \ | | |/
| | * MDEV-7649 wrong result when comparing utf8 column with an invalid literalAlexander Barkov2015-04-241-1/+19
| | |
| * | MDEV-7973 bigint fail with gcc 5.0Sergei Golubchik2015-05-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -LONGLONG_MIN is the undefined behavior in C. longlong2decimal() used to do this: int longlong2decimal(longlong from, decimal_t *to) { if ((to->sign= from < 0)) return ull2dec(-from, to); return ull2dec(from, to); and later in ull2dec() (DIG_BASE is 1000000000): static int ull2dec(ulonglong from, decimal_t *to) { for (intg1=1; from >= DIG_BASE; intg1++, from/=DIG_BASE) {} this breaks in gcc-5 at -O3. Here ull2dec is inlined into longlong2decimal. And gcc-5 believes that 'from' in the inlined ull2dec is always a positive integer (indeed, if it was negative, then -from was used instead). So gcc-5 uses *signed* comparison with DIG_BASE. Fix: make a special case for LONGLONG_MIN, don't negate it
* | | MDEV-7677 my_charset_handler_filename has a wrong "ismbchar" memberAlexander Barkov2015-03-231-2/+11
| | |
* | | MDEV-6650 - LINT_INIT emits code in non-debug buildsSergey Vojtovich2015-03-161-10/+4
| | | | | | | | | | | | | | | Replaced all references to LINT_INIT with UNINIT_VAR and LINT_INIT_STRUCT. Removed LINT_INIT macro.
* | | Moving the conversion code from String::well_formed_copy()Alexander Barkov2015-03-161-0/+73
| | | | | | | | | | | | to my_convert_fix() - a new function in /strings.
* | | MDEV-6566 Different INSERT behaviour on bad bytes with and without character ↵Alexander Barkov2015-03-1316-103/+569
| | | | | | | | | | | | set conversion
* | | Adding a shared include file ctype-mb.ic and removing a numberAlexander Barkov2015-03-049-353/+184
| | | | | | | | | | | | | | | of very similar copies of my_well_formed_len_xxx(), implemented for big5, cp932, euckr, eucjpms, gb2312m gbk, sjis, ujis.
* | | A preparatory patch for MDEV-6566.Alexander Barkov2015-03-0215-19/+139
| | | | | | | | | | | | | | | | | | Adding a new virtual function MY_CHARSET_HANDLER::copy_abort(). Moving character set specific code into the correspoding implementations (for simple, multi-byte and mbmaxlen>1 character sets).
* | | cleanup: s/const CHARSET_INFO/CHARSET_INFO/Sergei Golubchik2014-12-046-8/+8
|/ / | | | | | | | | as CHARSET_INFO is already const, using const on it is redundant and results in compiler warnings (on Windows)
* | MDEV-7086 main.ctype_cp932 fails in buildbot on a valgrind buildAlexander Barkov2014-11-183-5/+16
| | | | | | | | | | | | Removing a redundant and wrong condition which could access beyond the pattern string range.
* | 5.5.40+ mergeSergei Golubchik2014-10-092-6/+10
|\ \ | |/
| * decimal: *correct* implementation of ROUND_UP at lastSergei Golubchik2014-10-081-1/+1
| |
| * fixes for decimal typeSergei Golubchik2014-10-071-1/+5
| |
| * mysql-5.5.40Sergei Golubchik2014-10-062-5/+5
| |\
| | * Bug #11755818 : LIKE DOESN'T MATCH WHEN CP932_BIN/SJIS_BINmithun2014-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | COLLATIONS ARE USED. ISSUE : ------- Code points of HALF WIDTH KATAKANA in SJIS/CP932 range from A1 to DF. In function my_wildcmp_mb_bin_impl while comparing such single byte code points, there is a code which compares signed character with unsigned character. Because of this, comparisons of two same code points representing a HALF WIDTH KATAKANA character always fails. Solution: --------- A code point of HALF WIDTH KATAKANA at-least need 8 bits. Promoting the variable from uchar to int will fix the issue. mysql-test/t/ctype_cp932.test: Tests which have conditions LIKE 'STRING PATTERN WITH HALF WIDTH KATAKANA'. strings/ctype-mb.c: A code point of HALF WIDTH KATAKANA at-least need 8 bits. Promoting the variable from uchar to int will fix the issue.
| | * Bug#18469276: MOD FOR SMALL DECIMALS FAILSChaithra Reddy2014-07-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: If leading zeroes of fractional part of a decimal number exceeds 45, mod operation on the same fails. Analysis: Currently there is a miscalcultion of fractional part for very small decimals in do_div_mod. For ex: For 0.000(45 times).....3 length of the integer part becomes -5 (for a length of one, buffer can hold 9 digits. Since number of zeroes are 45, integer part becomes 5) and it is negative because of the leading zeroes present in the fractional part. Fractional part is the number of digits present after the point which is 46 and therefore rounded off to the nearest 9 multiple which is 54. So the length of the resulting fractional part becomes 6. Because of this, the combined length of integer part and fractional part exceeds the max length allocated which is 9 and thereby failing. Solution: In case of negative integer value, it indicates there are leading zeroes in fractional part. As a result stop1 pointer should be set not just based on frac0 but also intg0. This is because the detination buffer will be filled with 0's for the length of intg0. strings/decimal.c: Calculate stop1 pointer based on the length of intg0 and frac0.
* | | MDEV-6776 ujis and eucjmps erroneously accept 0x8EA0 as a valid byte sequenceAlexander Barkov2014-09-242-18/+16
| | |
* | | MDEV-6752 Trailing incomplete characters are not replaced to question marks ↵Alexander Barkov2014-09-181-1/+8
| | | | | | | | | | | | on conversion
* | | Cleanup of my_hash_sort patchMichael Widenius2014-09-122-9/+11
| | | | | | | | | | | | | | | strings/ctype-uca.c: HASH needs to be done in opposite order to preserve partitioned tables