summaryrefslogtreecommitdiff
path: root/strings
Commit message (Collapse)AuthorAgeFilesLines
* Bug#11752408 - 43593: DUMP/BACKUP/RESTORE/UPGRADE TOOLS FAILS BECAUSE OF ↵Alexander Barkov2012-01-232-0/+244
| | | | | | | | | | | | | | | | | | | | | | | | | UTF8_GENERAL_CI Introducing new collations: utf8_general_mysql500_ci and ucs2_general_mysql500_ci, to reproduce behaviour of utf8_general_ci and ucs2_general_ci from mysql-5.1.23 (and earlier). The collations are added to simplify upgrade from mysql-5.1.23 and earlier. Note: The patch does not make new server start over old data automatically. Some manual upgrade procedures are assumed. Paul: please get in touch with me to discuss upgrade procedures when documenting this bug. modified: include/m_ctype.h mysql-test/r/ctype_utf8.result mysql-test/t/ctype_utf8.test mysys/charset-def.c strings/ctype-ucs2.c strings/ctype-utf8.c
* merge 5.0-security => 5.1 securityTor Didriksen2011-10-141-8/+13
|\
| * Bug#12563865 ROUNDED,TMP_BUF,DECIMAL_VALUE STACK CORRUPTION IN ALL VERSIONS ↵Tor Didriksen2011-10-141-8/+13
| | | | | | | | | | | | | | | | >=5.0 Buffer over-run on all platforms, crash on windows, wrong result on other platforms, when rounding numbers which start with 999999999 and have precision = 9 or 18 or 27 or 36 ...
* | BUG#12911710 - VALGRIND FAILURE IN ↵Tor Didriksen2011-08-291-1/+8
| | | | | | | | | | | | | | | | ROW-DEBUG:PERFSCHEMA.SOCKET_SUMMARY_BY_INSTANCE_FUNC Converting the number zero to binary and back yielded the number zero, but with no digits, i.e. zero precision. This made the multiply algorithm go haywire in various ways.
* | Updated/added copyright headersKent Boortz2011-07-032-3/+9
|\ \
| * \ auto-merge Bug#11762799/Bug#55436Tatjana Azundris Nuernberg2011-05-121-2/+3
| |\ \
| | * \ auto-merge conservative fix for Bug#55436/Bug#11762799Tatiana Azundris Nurnberg2011-05-051-2/+3
| | |\ \
| | | * | Bug#55436: buffer overflow in debug binary of dbug_buff in ↵Tatiana A. Nurnberg2010-11-111-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Field_new_decimal::store_value There were some misunderstandings about parameters pertaining to buffer-size. Patches fixes the reported off by one and clarifies the documentation.
| * | | | Bug#11766725 (Bug#59901) EXTRACTVALUE STILL BROKEN AFTER FIX FOR BUG #44332Alexander Barkov2011-03-011-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: a byte behind the end of input string was read in case of a broken XML not having a quote or doublequote character closing a string value. Fix: changing condition not to read behind the end of input string @ mysql-test/r/xml.result @ mysql-test/t/xml.test Adding tests @ strings/xml.c When checking if the closing quote/doublequote was found, using p->cur[0] us unsafe, as p->cur can point to the byte after the value. Comparing p->cur to p->beg instead.
* | | | | Updated/added copyright headersKent Boortz2011-06-3076-163/+295
|\ \ \ \ \ | |/ / / / |/| | | / | | |_|/ | |/| |
| * | | Updated/added copyright headersKent Boortz2011-06-3011-24/+35
| | | |
* | | | Updating Copyright informationAlexander Barkov2011-01-1974-75/+75
| | | |
* | | | Bug#44332 my_xml_scan reads behind the end of bufferAlexander Barkov2011-01-181-6/+17
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: the scanner function tested for strings "<![CDATA[" and "-->" without checking input string boundaries, which led to valgrind's "Conditional jump or move depends on uninitialised value(s)" error. Fix: Adding boundary checking. @ mysql-test/r/xml.result @ mysql-test/t/xml.test Adding test @ strings/xml.c Adding a helper function my_xml_parser_prefix_cmp(), with input string boundary check.
* | | MergeKent Boortz2010-12-291-0/+22
|\ \ \ | |/ /
| * | - Added/updated copyright headersKent Boortz2010-12-281-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removed files specific to compiling on OS/2 - Removed files specific to SCO Unix packaging - Removed "libmysqld/copyright", text is included in documentation - Removed LaTeX headers for NDB Doxygen documentation - Removed obsolete NDB files - Removed "mkisofs" binaries - Removed the "cvs2cl.pl" script - Changed a few GPL texts to use "program" instead of "library"
* | | Merging patch for BUG#58246 with mysql-5.1-bugteam.Mats Kindahl2010-12-012-12/+9
|\ \ \
| * | | Bug#56639 Character Euro (0x88) not converted from cp1251 to utf8Alexander Barkov2010-11-261-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: MySQL cp1251 did not support 'U+20AC EURO SIGN' which was assigned a few years ago to 0x88. Fix: adding mapping: 0x88 <-> U+20AC @ mysql-test/include/ctype_8bit.inc New shared file to test 8bit character sets. @ mysql-test/r/ctype_cp1251.result @ mysql-test/t/ctype_cp1251.test Adding tests @ sql/share/charsets/cp1251.xml Adding mapping @ strings/ctype-extra.c Regenerating ctype-extra.c using strings/conf_to_src according to new cp1251.xml
| * | | Bug #49752: 2469.126.2 unintentionally breaks authentication againstTatiana A. Nurnberg2010-11-111-7/+4
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | MySQL 5.1 server Server used to clip overly long user-names. This was presumably lost when code was made UTF8-clean. Now we emulate the behaviour for backward compatibility, but UTF8-ly correct.
* | | BUG#58246: INSTALL PLUGIN not secure & crashableMats Kindahl2010-12-011-5/+62
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When installing plugins, there is a missing check for slash (/) in the path on Windows. Note that on Windows, both / and \ can be used to separate directories. This patch fixes the issue by: - Adding a FN_DIRSEP symbol for all platforms consisting of a string of legal directory separators. - Adding a charset-aware version of strcspn(). - Adding a check_valid_path() function that uses my_strcspn() to check if any FN_DIRSEP character is in the supplied string. - Using the check_valid_path() function in sql_plugin.cc and sql_udf.cc (which means replacing the existing test there).
* | Bug#45012 my_like_range_cp932 generates invalid stringAlexander Barkov2010-07-269-335/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Bug#45288: pb2 returns a lot of compilation warnings on linuxDavi Arnaut2010-07-201-2/+1
| | | | | | | | | | | | Fix warnings flagged by the new warning option -Wunused-but-set-variable that was added to GCC 4.6 and that is enabled by -Wunused and -Wall. The option causes a warning whenever a local variable is assigned to but is later unused. It also warns about meaningless pointer dereferences.
* | Bug#45288: pb2 returns a lot of compilation warnings on linuxDavi Arnaut2010-07-091-1/+1
| | | | | | | | | | | | | | | | Although the C standard mandates that sprintf return the number of bytes written, some very ancient systems (i.e. SunOS 4) returned a pointer to the buffer instead. Since these systems are not supported anymore and are hopefully long dead by now, simply remove the portability wrapper that dealt with this discrepancy. The autoconf check was causing trouble with GCC.
* | Bug#53445: Build with -Wall and fix warnings that it generatesDavi Arnaut2010-07-021-82/+0
| | | | | | | | If bzero is not available, resort to memset. Also, remove dead bzero.c
* | Bug#53445: Build with -Wall and fix warnings that it generatesDavi Arnaut2010-07-027-84/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apart strict-aliasing warnings, fix the remaining warnings generated by GCC 4.4.4 -Wall and -Wextra flags. One major source of warnings was the in-house function my_bcmp which (unconventionally) took pointers to unsigned characters as the byte sequences to be compared. Since my_bcmp and bcmp are deprecated functions whose only difference with memcmp is the return value, every use of the function is replaced with memcmp as the special return value wasn't actually being used by any caller. There were also various other warnings, mostly due to type mismatches, missing return values, missing prototypes, dead code (unreachable) and ignored return values.
* | Bug#42733: Type-punning warnings when compiling MySQL --Davi Arnaut2010-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | strict aliasing violations. Essentially, the problem is that large parts of the server were developed in simpler times (last decades, pre C99 standard) when strict aliasing and compilers supporting such optimizations were rare to non-existent. Thus, when compiling the server with a modern compiler that uses strict aliasing rules to perform optimizations, there are several places in the code that might trigger undefined behavior. As evinced by some recent bugs, GCC does a somewhat good of job misoptimizing such code, but on the other hand also gives warnings about suspicious code. One problem is that the warnings aren't always accurate, yet we can't afford to just shut them off as we might miss real cases. False-positive cases are aggravated mostly by casts that are likely to trigger undefined behavior. The solution is to start a cleanup process focused on fixing and reducing the amount of strict-aliasing related warnings produced by GCC and others compilers. A good deal of noise reduction can be achieved by just removing useless casts that are product of historical cruft and are likely to trigger undefined behavior if dereferenced.
* | manual merge 5.0-bugteam --> 5.1-bugteam (bug 49955)Gleb Shchepa2010-01-111-2/+2
|\ \ | |/
| * Bug #49955: ld error message: undefined reference to `strmov_overlapp'Gleb Shchepa2010-01-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 32bit builds with the --enable-assembler flag (enabled by default) fail with an error message: undefined reference to `strmov_overlapp'. Since the fix for bug 48866 we use a home-grown strmov function instead of the ctpcpy function, but the source file for this function was missed in the Makefile.am. The strings/Makefile.am file has been modified to include strmov.c file into ASSEMBLER_x86 and ASSEMBLER_sparc32 sections.
* | mergeGeorgi Kodinov2009-12-241-5/+1
|\ \ | |/
| * Bug #48866: mysql.test fails under Fedora 12Georgi Kodinov2009-12-161-5/+1
| | | | | | | | | | | | | | | | strmov() is not guaranteed to work correctly on overlapping source and destination buffers. On some OSes it may work, but Fedora 12 has a stpcpy() that's not working correctly on overlapping buffers. Fixed to use the overlap-safe version of strmov instead. Re-vitalized the overlap-safe version of strmov.
* | Recommit of patch for bug#49028 for 5.1.Mattias Jonsson2009-12-141-10/+0
| | | | | | | | | | Includes both patch from bug#48737 (without test, which should go to next-mr) and test for bug#49028.
* | A post fix for BUG#45645 Mysql server close all connection and restart using ↵Alexander Barkov2009-10-201-1/+2
| | | | | | | | | | | | lower function - Initialized caseinfo only if it is NULL
* | Bug#45645 Mysql server close all connection and restart using lower functionAlexander Barkov2009-10-191-0/+2
| | | | | | | | | | | | | | Problem: the "caseinfo" member of CHARSET_INFO structure was not initialized for user-defined Unicode collations, which made the server crash. Fix: initializing caseinfo properly.
* | Bug#46448 trailing spaces are not ignored when user collation maps space != 0x20V Narayanan2009-10-121-2/+2
| | | | | | | | | | | | | | | | | | | | In MySQL when the mapping for space is changed to something other than 0x20 by defining a different collation, then space is not ignored when comparing two strings. This was happening because the function that performs the comparison of two strings while ignoring ending spaces, was comparing the collation value of a space with the ascii value of the ' ' character. This should be changed to do comparison between the collated values.
* | Merge from 5.0 for 43414Staale Smedseng2009-08-283-23/+9
|\ \ | |/
| * Bug #43414 Parenthesis (and other) warnings compiling MySQLStaale Smedseng2009-08-283-19/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with gcc 4.3.2 This patch fixes a number of GCC warnings about variables used before initialized. A new macro UNINIT_VAR() is introduced for use in the variable declaration, and LINT_INIT() usage will be gradually deprecated. (A workaround is used for g++, pending a patch for a g++ bug.) GCC warnings for unused results (attribute warn_unused_result) for a number of system calls (present at least in later Ubuntus, where the usual void cast trick doesn't work) are also fixed.
| * Bug #46042: backported the fix for the valgrind warning from 5.1Georgi Kodinov2009-07-161-3/+3
| |
* | Backporting "WL#3332 Korean Enhancements" andAlexander Barkov2009-07-241-5/+5
| | | | | | | | | | "WL#4584 New euckr characters" from 5.4. (as agreed on ServerPT meeting on July 8).
* | Merge from 5.0Staale Smedseng2009-06-291-3/+3
|\ \ | |/
| * Merge from 5.0-btStaale Smedseng2009-06-291-3/+3
| |
* | Addendum to Bug #45286: backport macro name form other treeTatiana A. Nurnberg2009-06-061-3/+2
| | | | | | | | use same (slightly unwieldy) name in all trees; fix before this version goes "public". bless ctype to avoid upmerge conflict, le sigh.
* | automergeGeorgi Kodinov2009-06-051-1/+4
|\ \ | |/
| * Bug #45286: compilation warnings on mysql-5.0-bugteam on MacOSXGeorgi Kodinov2009-06-051-1/+4
| | | | | | Fixed the 5.0-bugteam MacOSX warnings.
* | Bug#43827 Server closes connections and restartsAlexander Barkov2009-06-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Crash happened with a user-defined utf8 collation, on attempt to insert a value longer than the column to store. Reason: The "ctype" member was not initialized (NULL) when allocating a user-defined utf8 collation, so an attempt to call my_ctype(cs, *str) to check if we loose any important data when truncating the value made the server crash. Fix: Initializing tge "ctype" member to a proper value. mysql-test/r/ctype_ldml.result Adding tests mysql-test/t/ctype_ldml.test Adding tests strings/ctype-uca.c Adding initialization of "ctype" member. modified: mysql-test/r/ctype_ldml.result mysql-test/t/ctype_ldml.test strings/ctype-uca.c
* | Bug#44352 UPPER/LOWER function doesn't work correctlyAlexander Barkov2009-05-052-8/+8
| | | | | | | | | | | | | | | | on cp932 and sjis environment. Problem: case conversion erroneously changes the second bytes of multi-byte sequences because single-byte functions were called in a mistake. Fix: call multi-byte aware functions instead.
* | merged 5.0-bugteam -> 5.1-bugteamGeorgi Kodinov2009-03-241-1/+2
|\ \ | |/
| * merging with mysql-5.0-bugteamNarayanan V2009-03-201-1/+1
| |\
| | * Bug#42937 strings/CHARSET_INFO.txt not included in source distributionsNarayanan V2009-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | The reference manual has instructions for adding new character sets, and refers to the string/CHARSET_INFO.txt file. This file is currently not present in the distribution. Modify the build to include this file in the distribution.
* | | Bug#29125 Windows Server X64: so many compiler warningsIgnacio Galarza2009-02-132-4/+4
|\ \ \ | |/ / | | | | | | | | | | | | - Remove bothersome warning messages. This change focuses on the warnings that are covered by the ignore file: support-files/compiler_warnings.supp. - Strings are guaranteed to be max uint in length
| * | Bug#29125 Windows Server X64: so many compiler warningsIgnacio Galarza2009-02-105-11/+11
| |/ | | | | | | | | - Remove bothersome warning messages. This change focuses on the warnings that are covered by the ignore file: support-files/compiler_warnings.supp. - Strings are guaranteed to be max uint in length
* | merged 5.1-main -> 5.1-bugteamGeorgi Kodinov2009-01-051-1/+1
|\ \