summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.cc
Commit message (Collapse)AuthorAgeFilesLines
* Bug#30981 CHAR(0x41 USING ucs2) doesn't add leading zerogluh@mysql.com/eagle.(none)2007-10-111-32/+3
| | | | | | | | | Bug#30982 CHAR(..USING..) can return a not-well-formed string Bug#30986 Character set introducer followed by a HEX string can return bad result check_well_formed_result moved to Item from Item_str_func fixed Item_func_char::val_str for proper ucs symbols converting added check for well formed strings for correct conversion of constants with underscore charset
* Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b28875bar@bar.myoffice.izhnet.ru2007-08-031-1/+2
|\ | | | | | | into mysql.com:/home/bar/mysql-work/mysql-5.0-rpl
| * Bug#28875 Conversion between ASCII and LATIN1 charsets does not functionbar@mysql.com/bar.myoffice.izhnet.ru2007-08-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | (Regression, caused by a patch for the bug 22646). Problem: when result type of date_format() was changed from binary string to character string, mixing date_format() with a ascii column in CONCAT() stopped to work. Fix: - adding "repertoire" flag into DTCollation class, to mark items which can return only pure ASCII strings. - allow character set conversion from pure ASCII to other character sets.
* | Avoid the name conflict between the system-provided "md5.h" and the MySQL onejoerg@trift-lap.none2007-07-191-1/+1
| | | | | | | | | | | | by renaming "include/md5.h" to "include/my_md5.h". Fixes bug#14151.
* | Fixed bug #27130. If the third argument of the function SUBSTR wasigor@olga.mysql.com2007-06-171-2/+3
| | | | | | | | | | | | | | | | | | | | | | represented by an expression of the type UNSIGNED INT and this expression was evaluated to 0 then the function erroneously returned the value of the first argument instead of an empty string. This problem was introduced by the patch for bug 10963. The problem has been resolved by a proper modification of the code of Item_func_substr::val_str.
* | compiler warning fixgluh@mysql.com/eagle.(none)2007-06-091-1/+1
|/
* Merge polly.local:/home/kaa/src/maint/bug24912/my50-bug24912kaa@polly.local2007-04-281-1/+1
|\ | | | | | | into polly.local:/home/kaa/src/maint/mysql-5.0-maint
| * Fix for bug #24912 "problems with bigint in abs() ceiling() round() ↵kaa@polly.local2007-04-281-1/+1
| | | | | | | | | | | | | | | | | | truncate() mod()" and a number of related problems: - unsigned flag was not handled correctly for a number of mathematical funcions, which led to incorrect results - passing large values as the number of decimals to ROUND() resulted in incorrect results and even server crashes in some cases - reverted the fix and the testcase for bug #10083 as it violates the manual - fixed some testcases which relied on broken ROUND() behavior
* | Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0msvensson@pilot.blaudden2007-04-021-1/+1
|\ \ | | | | | | | | | into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
| * \ Merge pilot.blaudden:/home/msvensson/mysql/bug25197/my50-bug25197msvensson@pilot.blaudden2007-03-281-1/+1
| |\ \ | | |/ | |/| | | | into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
| | * Bug#25197 repeat function returns null when using table field directly as countmsvensson@pilot.blaudden2007-03-281-1/+1
| | | | | | | | | | | | | | | - Add extra test case from bug#27073 - Change "if" to be optimized for count > 0
* | | Bug#22638 SOUNDEX broken for international charactersbar@mysql.com2007-03-281-29/+106
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Problem: SOUNDEX returned an invalid string for international characters in multi-byte character sets. For example: for a Chinese/Japanese 3-byte long character _utf8 0xE99885 it took only the very first byte 0xE9, put it into the outout string and then appended with three DIGIT ZERO characters, so the result was 0xE9303030 - which is an invalide utf8 string. Fix: make SOUNDEX() multi-byte aware and - put only complete characters into result, thus return only valid strings. This patch also makes SOUNDEX() compatible with UCS2.
* | Merge moonbone.local:/mnt/gentoo64/work/15757-bug-5.0-opt-mysqlevgen@moonbone.local2007-03-101-4/+3
|\ \ | | | | | | | | | into moonbone.local:/mnt/gentoo64/work/25373-bug-5.0-opt-mysql
| * | Bug#15757: Wrong SUBSTRING() result when a tmp table was employed.evgen@moonbone.local2007-03-101-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the SUBSTRING() function was used over a LONGTEXT field the max_length of the SUBSTRING() result was wrongly calculated and set to 0. As the max_length parameter is used while tmp field creation it limits the length of the result field and leads to printing an empty string instead of the correct result. Now the Item_func_substr::fix_length_and_dec() function correctly calculates the max_length parameter.
* | | Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-optgkodinov/kgeorge@magare.gmz2007-03-091-5/+5
|\ \ \ | | | | | | | | | | | | into magare.gmz:/home/kgeorge/mysql/autopush/B26281-5.0-opt
| * | | Bug #26281:gkodinov/kgeorge@magare.gmz2007-03-091-5/+5
| |/ / | | | | | | | | | | | | Fixed boundry checks in the INSERT() function: were one off.
* | | Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0msvensson@pilot.blaudden2007-03-011-11/+4
|\ \ \ | |/ / | | | | | | into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
| * | Merge bk-internal.mysql.com:/home/bk/mysql-5.0monty@mysql.com/narttu.mysql.fi2007-02-211-11/+4
| |\ \ | | | | | | | | | | | | into mysql.com:/home/my/mysql-5.0
| | * \ Merge bk-internal.mysql.com:/home/bk/mysql-5.0monty@mysql.com/narttu.mysql.fi2007-01-221-11/+4
| | |\ \ | | | | | | | | | | | | | | | into mysql.com:/home/my/mysql-5.0
| | | * \ Merge bk-internal.mysql.com:/home/bk/mysql-5.0monty@mysql.com/narttu.mysql.fi2006-12-151-11/+4
| | | |\ \ | | | | | | | | | | | | | | | | | | into mysql.com:/home/my/mysql-5.0
| | | | * | Fixed compiler warnings detected by option -Wshadow and -Wunused:monty@mysql.com/narttu.mysql.fi2006-12-151-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removed not used variables and functions - Added #ifdef around code that is not used - Renamed variables and functions to avoid conflicts - Removed some not used arguments Fixed some class/struct warnings in ndb Added define IS_LONGDATA() to simplify code in libmysql.c I did run gcov on the changes and added 'purecov' comments on almost all lines that was not just variable name changes
* | | | | | Merge pilot.blaudden:/home/msvensson/mysql/bug25197/my50-bug25197msvensson@pilot.blaudden2007-02-281-1/+3
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
| * | | | | Bug#25197 repeat function returns null when using table field directly as countmsvensson@pilot.blaudden2007-02-231-1/+3
| |/ / / / | | | | | | | | | | | | | | | - Return empty string also if count is unsigned and value is 0
* | | | | Merge pilot.mysql.com:/home/msvensson/mysql/bug18628/my50-bug18628msvensson@pilot.mysql.com2007-02-141-0/+5
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | into pilot.mysql.com:/home/msvensson/mysql/mysql-5.0-maint
| * | | | Bug#18628 mysql-test-run: security problem(part1)msvensson@pilot.mysql.com2007-02-141-0/+5
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | - Implement --secure-file-priv=<dir> option that limits "load_file", "LOAD DATA" and "SELECT .. INTO OUTFILE" to work with files in specified dir. - Use above option for mysqld in mysql-test-run.pl
* | | | Merge moonbone.local:/work/latest-4.1-opt-mysqlevgen@moonbone.local2007-01-121-0/+13
|\ \ \ \ | |/ / / |/| | | | | | | into moonbone.local:/work/latest-5.0-opt-mysql
| * | | Bug#23409: Arguments of the ENCODE() and the DECODE() functions were not printedevgen@moonbone.local2007-01-111-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | correctly. The Item_func::print method was used to print the Item_func_encode and the Item_func_decode objects. The last argument to ENCODE and DECODE functions is a plain C string and thus Item_func::print wasn't able to print it. The print() method is added to the Item_func_encode class. It correctly prints the Item_func_encode and the Item_func_decode objects.
* | | | Merge mysql.com:/d2/hf/clean/my50-cleanholyfoot/hf@mysql.com/hfmain.(none)2006-12-311-1/+6
|\ \ \ \ | | | | | | | | | | | | | | | into mysql.com:/d2/hf/common/my50-common
| * \ \ \ Merge bk@192.168.21.1:mysql-5.0-optholyfoot/hf@mysql.com/deer.(none)2006-12-081-1/+6
| |\ \ \ \ | | |_|/ / | |/| | | | | | | | into mysql.com:/home/hf/work/embt/my50-embt
| | * | | several fixes to make tests pass in embedded-server modeholyfoot/hf@mysql.com/deer.(none)2006-11-131-1/+6
| | | | |
* | | | | my_strtoll10-x86.s:kent@mysql.com/kent-amd64.(none)2006-12-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Corrected spelling in copyright text Makefile.am: Don't update the files from BitKeeper Many files: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header Many files: Added GPL copyright text Removed files: Docs/Support/colspec-fix.pl Docs/Support/docbook-fixup.pl Docs/Support/docbook-prefix.pl Docs/Support/docbook-split Docs/Support/make-docbook Docs/Support/make-makefile Docs/Support/test-make-manual Docs/Support/test-make-manual-de Docs/Support/xwf
* | | | | Many files:kent@mysql.com/kent-amd64.(none)2006-12-231-2/+1
| | | | | | | | | | | | | | | | | | | | Changed header to GPL version 2 only
* | | | | Bug #24947: REPEAT function returns NULL when passed a field as the count ↵tsmith/tim@siva.hindu.god2006-12-191-20/+19
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | parameter Handling of large signed/unsigned values was not consistent, so some string functions could return bogus results. The current fix is to simply patch up the val_str() methods for those string items. It would be good clean this code up in general, to make similar problems much harder to make. This is left as an exercise for the reader.
* | | | Merge dfischer@bk-internal.mysql.com:/home/bk/mysql-5.0-marveldf@kahlann.erinye.com2006-12-011-20/+20
|\ \ \ \ | | |_|/ | |/| | | | | | into kahlann.erinye.com:/home/df/mysql/build/mysql-5.0-build
| * | | Fixed portability issue in my_thr_init.c (was added in my last push)monty@mysql.com/narttu.mysql.fi2006-11-301-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed compiler warnings (detected by VC++): - Removed not used variables - Added casts - Fixed wrong assignments to bool - Fixed wrong calls with bool arguments - Added missing argument to store(longlong), which caused wrong store method to be called.
* | | | Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0kroki/tomash@moonlight.intranet2006-11-161-0/+14
|\ \ \ \ | |/ / / |/| | | | | | | into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17047
| * | | Add 5.0 part of fix for bug 17047.kroki/tomash@moonlight.intranet2006-11-161-0/+14
| |/ /
* | | Bug#10963: LEFT/RIGHT/SUBSTR/.. string functions returns wrong result \cmiller@zippy.cornsilk.net2006-11-081-48/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on large length Problem: Most (all) of the numeric inputs were being coerced into int (32 bit) sized variables. Works OK for sane inputs; any input larger than 2^32 (or 2^31 for signed vars) exihibited predictable wrapping behavior (up to about 10^18) and then started having really strange behaviour past that point (since the conversion to 64 bit int from the DECIMAL type can do weird things on out of range numbers). Solution: 1) Add many tests. 2) Convert input from (u)long type to (u)longlong. 3) Do (sometimes multiple) sanity checks on input, keeping in mind that sometimes a negative longlong is not a negative longlong (if the unsigned_flag is set). 4) Emulate existing behavior w/rt negative and "small" out-of-bounds values.
* | | Merge mysql.com:/usr/home/ram/work/bug23254/my41-bug23254ramil/ram@mysql.com/myoffice.izhnet.ru2006-10-131-0/+1
|\ \ \ | |/ / |/| / | |/ into mysql.com:/usr/home/ram/work/bug23254/my50-bug23254
| * Fix for bug #23254: COMPRESS(NULL) makes all futher COMPRESS() calls on same ↵ramil/ram@mysql.com/myoffice.izhnet.ru2006-10-131-0/+1
| | | | | | | | | | | | | | Item return NULL We don't set null_value to 0 in the Item_func_compress::val_str() for not-NULL results.
* | Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maintcmiller@zippy.cornsilk.net2006-09-281-1/+2
|\ \ | |/ | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
| * Fix for bug #20204: "order by" changes the results returnedramil/ram@mysql.com/myoffice.izhnet.ru2006-09-211-1/+2
| | | | | | | | | | | | Item_substr's results are improperly stored in a temporary table due to wrongly calculated max_length value for multi-byte charsets if two arguments specified.
| * Merge siva.hindu.god:/usr/home/tim/m/bk/b21531-41tsmith/tim@siva.hindu.god2006-08-231-2/+2
| |\ | | | | | | | | | into siva.hindu.god:/usr/home/tim/m/bk/41
| | * Bug #21531: EXPORT_SET() doesn't accept args with coercible character setstsmith/tim@siva.hindu.god2006-08-231-2/+2
| | | | | | | | | | | | | | | - Fix typo in Item_func_export_set::fix_length_and_dec() which caused character set aggregation to fail - Remove default argument from last arg of agg_arg_charsets() function, to reduce potential errors
| * | Merge siva.hindu.god:/usr/home/tim/m/bk/b20536-41tsmith/tim@siva.hindu.god2006-08-231-4/+10
| |\ \ | | |/ | | | | | | into siva.hindu.god:/usr/home/tim/m/bk/41
* | | Merge maint1.mysql.com:/data/localhome/cmiller/bug15583/my50-bug15583cmiller@maint1.mysql.com2006-09-131-8/+24
|\ \ \ | | | | | | | | | | | | into maint1.mysql.com:/data/localhome/cmiller/mysql-5.0-maint
| * | | Bug#15583: BIN()/OCT()/CONV() do not work with BIT valuescmiller@maint1.mysql.com2006-08-221-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Converting BIT to a string (an intermediate step in conversion) does not yield an ASCII numeric string, so we skip that step for BIT and get the integer value directly from the item. This site in sql/item_strfunc.cc may be ripe for refactoring for other types as well, where converting to a string is a waste of time.
* | | | Merge shellback.(none):/home/msvensson/mysql/mysql-5.0msvensson@shellback.(none)2006-08-311-0/+20
|\ \ \ \ | | | | | | | | | | | | | | | into shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
| * \ \ \ Merge bk-internal.mysql.com:/home/bk/mysql-5.0kostja@bodhi.local2006-08-301-0/+20
| |\ \ \ \ | | | | | | | | | | | | | | | | | | into bodhi.local:/opt/local/work/mysql-5.0-14897
| | * | | | BUG#21166: Prepared statement causes signal 11 on second executionkroki/tomash@moonlight.intranet2006-08-241-0/+20
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | Changes in an item tree done by optimizer weren't properly registered and went unnoticed, which resulted in preliminary freeing of used memory.