summaryrefslogtreecommitdiff
path: root/strings
Commit message (Collapse)AuthorAgeFilesLines
* 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. mysql-test/r/connect.result: Show that user-names that are too long get clipped now. mysql-test/t/connect.test: Show that user-names that are too long get clipped now. sql/sql_connect.cc: Clip user-name to 16 characters (not bytes). strings/CHARSET_INFO.txt: Clarify in docs.
* | | 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). include/config-netware.h: Adding FN_DIRSEP ****** Adding FN_DIRSEP include/config-win.h: Adding FN_DIRSEP ****** Adding FN_DIRSEP include/m_ctype.h: Adding my_strspn() and my_strcspn(). ****** Adding my_strspn() and my_strcspn(). include/my_global.h: Adding FN_DIRSEP ****** Adding FN_DIRSEP mysql-test/t/plugin_not_embedded.test: Adding test that file names containing / is disallowed on *all* platforms. ****** Adding test that file names containing / is disallowed on *all* platforms. sql/sql_plugin.cc: Introducing check_if_path() function for checking if filename is a path to include / on Windows. ****** Introducing check_if_path() function for checking if filename is a path to include / on Windows. sql/sql_udf.cc: Switching to use check_if_path() function. ****** Switching to use check_if_path() function. strings/my_strchr.c: Adding my_strspn() and my_strcspn(). ****** Adding my_strspn() and my_strcspn().
* | 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. client/mysql.cc: Meaningless pointer dereferences. client/mysql_upgrade.c: Check whether reading from the file succeeded. extra/comp_err.c: Unused. extra/yassl/src/yassl_imp.cpp: Skip instead of reading data that is discarded. include/my_pthread.h: Variable is only used in debug builds. include/mysys_err.h: Add new error messages. mysys/errors.c: Add new error message for permission related functions. mysys/mf_iocache.c: Variable is only checked under THREAD. mysys/my_copy.c: Raise a error if chmod or chown fails. mysys/my_redel.c: Raise a error if chmod or chown fails. regex/engine.c: Use a equivalent variable for the assert. server-tools/instance-manager/instance_options.cc: Unused. sql/field.cc: Unused. sql/item.cc: Unused. sql/log.cc: Do not ignore the return value of freopen: only set buffer if reopening succeeds. Adjust doxygen comment to the right function. Pass message lenght to log function. sql/mysqld.cc: Do not ignore the return value of freopen: only set buffer if reopening succeeds. sql/partition_info.cc: Unused. sql/slave.cc: No need to set pointer to the address of '\0'. sql/spatial.cc: Unused. Left for historical purposes. sql/sql_acl.cc: Unused. sql/sql_base.cc: Pointers are always set to the same variables. sql/sql_parse.cc: End statement if reading fails. Store the buffer after it has actually been updated. sql/sql_repl.cc: No need to set pointer to the address of '\0'. sql/sql_show.cc: Put variable under the same ifdef block. sql/udf_example.c: Set null pointer flag appropriately. storage/csv/ha_tina.cc: Meaningless dereferences. storage/example/ha_example.cc: Return the error since it's available. storage/myisam/mi_locking.c: Remove unused and dead code.
* | 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. BUILD/SETUP.sh: Remove flags that are implied by -Wall and -Wextra. Do not warn about unused parameters in C++. BUILD/check-cpu: Print only the compiler version instead of verbose banner. Although the option is gcc specific, the check was only being used for GCC specific checks anyway. client/mysql.cc: bcmp is no longer defined. client/mysqltest.cc: Pass a string to function expecting a format string. Replace use of bcmp with memcmp. cmd-line-utils/readline/Makefile.am: Always define _GNU_SOURCE when compiling GNU readline. Required to make certain prototypes visible. cmd-line-utils/readline/input.c: Condition for the code to be meaningful. configure.in: Remove check for bcmp. extra/comp_err.c: Use appropriate type. extra/replace.c: Replace use of bcmp with memcmp. extra/yassl/src/crypto_wrapper.cpp: Do not ignore the return value of fgets. Retrieve the file position if fgets succeed -- if it fails, the function will bail out and return a error. extra/yassl/taocrypt/include/blowfish.hpp: Use a single array instead of accessing positions of the sbox_ through a subscript to pbox_. extra/yassl/taocrypt/include/runtime.hpp: One definition of such functions is enough. extra/yassl/taocrypt/src/aes.cpp: Avoid potentially ambiguous conditions. extra/yassl/taocrypt/src/algebra.cpp: Rename arguments to avoid shadowing related warnings. extra/yassl/taocrypt/src/blowfish.cpp: Avoid potentially ambiguous conditions. extra/yassl/taocrypt/src/integer.cpp: Do not define type within a anonymous union. Use a variable to return a value instead of leaving the result in a register -- compiler does not know the logic inside the asm. extra/yassl/taocrypt/src/misc.cpp: Define handler for pure virtual functions. Remove unused code. extra/yassl/taocrypt/src/twofish.cpp: Avoid potentially ambiguous conditions. extra/yassl/testsuite/test.hpp: Function must have C language linkage. include/m_string.h: Remove check which relied on bcmp being defined -- they weren't being used as bcmp is only visible when _BSD_SOURCE is defined. include/my_bitmap.h: Remove bogus helpers which were used only in a few files and were causing warnings about dead code. include/my_global.h: Due to G++ bug, always silence false-positive uninitialized variables warnings when compiling C++ code with G++. Remove bogus helper. libmysql/Makefile.shared: Remove built-in implementation of bcmp. mysql-test/lib/My/SafeProcess/safe_process.cc: Cast pid to largest possible type for a process identifier. mysys/mf_loadpath.c: Leave space of the ending nul. mysys/mf_pack.c: Replace bcmp with memcmp. mysys/my_bitmap.c: Dead code removal. mysys/my_gethwaddr.c: Remove unused variable. mysys/my_getopt.c: Silence bogus uninitialized variable warning. Do not cast away the constant qualifier. mysys/safemalloc.c: Cast to expected type. mysys/thr_lock.c: Silence bogus uninitialized variable warning. sql/field.cc: Replace bogus helper with a more appropriate logic which is used throughout the code. sql/item.cc: Remove bogus logical condition which always evaluates to TRUE. sql/item_create.cc: Simplify code to avoid signedness related warnings. sql/log_event.cc: Replace use of bcmp with memcmp. No need to use helpers for simple bit operations. sql/log_event_old.cc: Replace bmove_align with memcpy. sql/mysqld.cc: Move use declaration of variable to the ifdef block where it is used. Remove now-unnecessary casts and arguments. sql/set_var.cc: Replace bogus helpers with simple and classic bit operations. sql/slave.cc: Cast to expected type and silence bogus warning. sql/sql_class.h: Don't use enum values as bit flags, the supposed type safety is bogus as the combined bit flags are not a value in the enumeration. sql/udf_example.c: Only declare variable when necessary. sql/unireg.h: Replace use of bmove_align with memcpy. storage/innobase/os/os0file.c: Silence bogus warning. storage/myisam/mi_open.c: Remove bogus cast, DBUG_DUMP expects a pointer to unsigned char. storage/myisam/mi_page.c: Remove bogus cast, DBUG_DUMP expects a pointer to unsigned char. strings/bcmp.c: Remove built-in bcmp. strings/ctype-ucs2.c: Silence bogus warning. tests/mysql_client_test.c: Use a appropriate type as expected by simple_command().
* | 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. client/mysql.cc: Remove now-unnecessary casts. Break up large strings. client/mysql_upgrade.c: Remove now-unnecessary casts. client/mysqladmin.cc: Remove now-unnecessary casts. Break up large strings. client/mysqlbinlog.cc: Remove now-unnecessary casts. client/mysqlcheck.c: Remove now-unnecessary casts. client/mysqldump.c: Remove now-unnecessary casts. client/mysqlimport.c: Remove now-unnecessary casts. client/mysqlshow.c: Remove now-unnecessary casts. client/mysqlslap.c: Remove now-unnecessary casts. client/mysqltest.cc: Remove now-unnecessary casts. extra/comp_err.c: Remove now-unnecessary casts. extra/my_print_defaults.c: Remove now-unnecessary casts. Break up large strings. extra/mysql_waitpid.c: Remove now-unnecessary casts. extra/perror.c: Remove now-unnecessary casts. extra/resolve_stack_dump.c: Remove now-unnecessary casts. extra/resolveip.c: Remove now-unnecessary casts. include/my_getopt.h: Use a void pointer type as the opaque type to avoid problems with type incompatibility -- GCC issues warnings when the type name is not type compatible with a operand. As a side bonus, a explicit cast won't be necessary anymore. include/sslopt-longopts.h: Remove now-unnecessary casts. Break up large strings. mysys/my_getopt.c: Update opaque type and introduce a type definition for the argument to my_getopt_register_get_addr. server-tools/instance-manager/options.cc: Remove now-unnecessary casts. sql/mysqld.cc: Remove now-unnecessary casts. Break up large strings. Update mysql_getopt_value prototype (the old prototype was different from the definition anyway). sql/sql_plugin.cc: The type of a pointer to a function must be compatible with the pointed-to function type, otherwise the behavior is undefined. sql/table.cc: The variable buf pointer to pointer to pointer to constant char could improperly alias a incompatible type in call to fix_type_ pointers. Since this was actually dead code, it is simply removed. sql/unireg.cc: Remove call to get_form_pos. The code creates a new FRM file which is always truncated and writes the form position as 0. Hence, no need to retrieve it, we now for sure it is 0. storage/archive/archive_reader.c: Remove now-unnecessary casts. storage/myisam/ft_nlq_search.c: Read weight directly from the buffer. storage/myisam/fulltext.h: Add explanation about the type duality of a key buffer. Add accessor macro to retrieve a FT float value. storage/myisam/mi_test1.c: Remove now-unnecessary casts. storage/myisam/myisam_ftdump.c: Read weight directly from the buffer. storage/myisam/myisamchk.c: Remove now-unnecessary casts. storage/myisam/myisamlog.c: A pointer to char was used to alias a pointer to pointer to unsigned char, thus violating strict aliasing rules. storage/myisam/myisampack.c: Remove now-unnecessary casts. strings/decimal.c: Remove aliasing violation, printing the value is enough for debugging purposes. tests/mysql_client_test.c: Remove now-unnecessary casts.
* | 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. strings/Makefile.am: Bug #49955: ld error message: undefined reference to `strmov_overlapp' 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. mysql-test/r/ctype_ldml.result: Bug#46448 trailing spaces are not ignored when user collation maps space != 0x20 Result file for test case. mysql-test/std_data/Index.xml: Bug#46448 trailing spaces are not ignored when user collation maps space != 0x20 Added entry for new test collation in the index file. mysql-test/std_data/latin1.xml: Bug#46448 trailing spaces are not ignored when user collation maps space != 0x20 Added support for new collation for test. mysql-test/t/ctype_ldml.test: Bug#46448 trailing spaces are not ignored when user collation maps space != 0x20 Added test case to ensure trailing spaces are not ignored. strings/ctype-simple.c: Bug#46448 trailing spaces are not ignored when user collation maps space != 0x20 change my_strnncollsp_simple to compare collated values when checking for trailing spaces. Currently the comparison happens between a collated value and the ascii value.
* | 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. client/mysqlmanager-pwgen.c: A fix for warn_unused_result, adding fallback to use of srand()/rand() if /dev/random cannot be used. Also actually adds calls to rand() in the second branch so that it actually creates a random password.
| * 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. client/mysqldump.c: Bug #45286: typecasts cmd-line-utils/readline/bind.c: Bug #45286: use variable of right type cmd-line-utils/readline/display.c: Bug #45286: use variable of right type dbug/user.r: Bug #45286: no warnings in generating man pages strings/ctype.c: Bug #45286: typecasts
* | 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. strings/Makefile.am: modify EXTRA_DIST to include the CHARSET_INFO file.
* | | 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
|\ \
| * | Changes of copyright output from "--version" and similar.unknown2008-11-141-1/+1
| | | | | | | | | | | | | | | Changes of copyright in RPM spec file.
* | | 5.0-bugteam->5.1-bugteam mergeSergey Glukhov2008-12-231-0/+10
|\ \ \ | | |/ | |/|
| * | Bug#37575 UCASE fails on monthnameSergey Glukhov2008-12-231-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MONTHNAME/DAYNAME functions returns binary string, so the LOWER/UPPER functions are not effective on the result of MONTHNAME/DAYNAME call. Character set of the MONTHNAME/DAYNAME function result has been changed to connection character set. include/m_ctype.h: added my_charset_repertoire function mysql-test/r/ctype_ucs.result: test result mysql-test/r/func_time.result: test result mysql-test/t/ctype_ucs.test: test case mysql-test/t/func_time.test: test case sql/item_timefunc.cc: Item_func_monthname::fix_length_and_dec and Item_func_dayname::fix_length_and_dec methods have been modified to use connection character set sql/item_timefunc.h: Item_func_monthname::fix_length_and_dec and Item_func_dayname::fix_length_and_dec methods have been modified to use connection character set sql/mysql_priv.h: added max_month_name_length, max_day_name_length fields into MY_LOCALE struct sql/mysqld.cc: The test_lc_time_sz function controls modifications of the locale database in debugging mode. sql/sql_locale.cc: initialization of max_month_name_length, max_day_name_length fields strings/ctype.c: added my_charset_repertoire function
* | | Bug#38227 EXTRACTVALUE doesn't work with DTD declarationsAlexander Barkov2008-12-101-2/+11
| |/ |/| | | | | | | | | | | | | | | | | | | | | Problem: XML syntax parser allowed to use quoted strings as attribute names, and tried to put them into parser state stack instead of identifiers. After that parser failed, if quoted string contained some slash characters. Fix: - Disallowing quoted strings in regular tags. - Allowing quoted string in DOCTYPE declararion, but don't push it into parse state stack (just skip it).
* | Merge from 5.0-bugteam.Chad MILLER2008-08-151-7/+15
|\ \ | |/
| * Bug#36270: incorrect calculation result - works in 4.1 but not in 5.0 or 5.1Chad MILLER2008-08-151-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the fractional part in a multiplication of DECIMALs overflowed, we truncated the first operand rather than the longest. Now truncating least significant places instead for more precise multiplications. (Queuing at demand of Trudy/Davi.) mysql-test/r/type_newdecimal.result: show that if we need to truncate the scale of an operand, we pick the right one (that is, we discard the least significant decimal places) mysql-test/t/type_newdecimal.test: show that if we need to truncate the scale of an operand, we pick the right one (that is, we discard the least significant decimal places) strings/decimal.c: when needing to disregard fractional parts, pick the least significant ones
* | merged 5.0-bugteam to 5.1-bugteamGeorgi Kodinov2008-05-281-46/+92
|\ \ | |/ | | | | | | | | | | sql/share/charsets/README: merged bug 36676 to 5.1-bugteam strings/CHARSET_INFO.txt: merged bug 36676 to 5.1-bugteam
| * Updating charset doc files.Alexander Barkov2008-05-281-48/+94
| | | | | | | | | | | | Thanks to Paul for preparing the up-to-date files reflecting 4.1 changes.
* | Merge host.loc:/home/uchum/work/5.0-bugteamunknown2008-04-232-4/+8
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into host.loc:/home/uchum/work/5.1-bugteam mysql-test/r/ctype_gbk.result: Auto merged mysql-test/r/subselect3.result: Auto merged mysql-test/t/subselect3.test: Auto merged sql/sql_select.cc: Auto merged strings/ctype-big5.c: Merge with 5.0-bugteam (bug#35993). strings/ctype-gbk.c: Merge with 5.0-bugteam (bug#35993).