Commit graph

556 commits

Author SHA1 Message Date
bar@bar.myoffice.izhnet.ru
c01ce7b1e3 Merge mysql.com:/home/bar/mysql-work/mysql-5.0.b28875
into  mysql.com:/home/bar/mysql-work/mysql-5.0-rpl
2007-08-03 15:30:31 +05:00
bar@mysql.com/bar.myoffice.izhnet.ru
4eebfd09c2 Bug#28875 Conversion between ASCII and LATIN1 charsets does not function
(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.
2007-08-03 15:25:23 +05:00
joerg@trift-lap.none
af3c675bc1 Avoid the name conflict between the system-provided "md5.h" and the MySQL one
by renaming "include/md5.h" to "include/my_md5.h".

Fixes bug#14151.
2007-07-19 14:14:03 +02:00
igor@olga.mysql.com
63ab91090d Fixed bug #27130. If the third argument of the function SUBSTR was
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.
2007-06-17 11:23:19 -07:00
gluh@mysql.com/eagle.(none)
c25c178112 compiler warning fix 2007-06-09 18:18:34 +05:00
kaa@polly.local
561bd78654 Merge polly.local:/home/kaa/src/maint/bug24912/my50-bug24912
into  polly.local:/home/kaa/src/maint/mysql-5.0-maint
2007-04-28 20:26:14 +04:00
kaa@polly.local
050c6723e8 Fix for bug #24912 "problems with bigint in abs() ceiling() round() 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
2007-04-28 20:01:01 +04:00
msvensson@pilot.blaudden
bb9a601829 Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-04-02 10:50:39 +02:00
bar@mysql.com
4b3826ba8c Bug#22638 SOUNDEX broken for international characters
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.
2007-03-28 18:57:30 +05:00
msvensson@pilot.blaudden
8c5be6a220 Merge pilot.blaudden:/home/msvensson/mysql/bug25197/my50-bug25197
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-03-28 09:34:04 +02:00
msvensson@pilot.blaudden
171e91f17d Bug#25197 repeat function returns null when using table field directly as count
- Add extra test case from bug#27073
 - Change "if" to be optimized for count > 0
2007-03-28 09:32:49 +02:00
evgen@moonbone.local
f3e56b5adb Merge moonbone.local:/mnt/gentoo64/work/15757-bug-5.0-opt-mysql
into  moonbone.local:/mnt/gentoo64/work/25373-bug-5.0-opt-mysql
2007-03-10 19:57:18 +03:00
evgen@moonbone.local
6f6b9ae3ad Bug#15757: Wrong SUBSTRING() result when a tmp table was employed.
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.
2007-03-10 19:55:34 +03:00
gkodinov/kgeorge@magare.gmz
86cba48b8f Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B26281-5.0-opt
2007-03-09 13:05:41 +02:00
gkodinov/kgeorge@magare.gmz
740a5fd7fe Bug #26281:
Fixed boundry checks in the INSERT() function:
 were one off.
2007-03-09 12:47:12 +02:00
msvensson@pilot.blaudden
f5778fc73e Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-03-01 18:12:56 +01:00
msvensson@pilot.blaudden
44c56e35b6 Merge pilot.blaudden:/home/msvensson/mysql/bug25197/my50-bug25197
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-02-28 11:21:29 +01:00
msvensson@pilot.blaudden
ba3c96f507 Bug#25197 repeat function returns null when using table field directly as count
- Return empty string also if count is unsigned and value is 0
2007-02-23 10:28:50 +01:00
monty@mysql.com/narttu.mysql.fi
26aa385bc5 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2007-02-21 14:07:08 +02:00
msvensson@pilot.mysql.com
24a242bee1 Merge pilot.mysql.com:/home/msvensson/mysql/bug18628/my50-bug18628
into  pilot.mysql.com:/home/msvensson/mysql/mysql-5.0-maint
2007-02-14 14:45:15 +01:00
msvensson@pilot.mysql.com
45fe5879f4 Bug#18628 mysql-test-run: security problem(part1)
- 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
2007-02-14 14:44:34 +01:00
monty@mysql.com/narttu.mysql.fi
a04157fbb3 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2007-01-22 14:04:40 +02:00
evgen@moonbone.local
8bb16e1e9c Merge moonbone.local:/work/latest-4.1-opt-mysql
into  moonbone.local:/work/latest-5.0-opt-mysql
2007-01-12 16:43:52 +03:00
evgen@moonbone.local
fc0e206cb5 Bug#23409: Arguments of the ENCODE() and the DECODE() functions were not printed
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.
2007-01-11 16:45:38 +03:00
holyfoot/hf@mysql.com/hfmain.(none)
874d366500 Merge mysql.com:/d2/hf/clean/my50-clean
into  mysql.com:/d2/hf/common/my50-common
2006-12-31 12:39:20 +04:00
kent@mysql.com/kent-amd64.(none)
6523aca729 my_strtoll10-x86.s:
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
2006-12-31 01:02:27 +01:00
kent@mysql.com/kent-amd64.(none)
226a5c833f Many files:
Changed header to GPL version 2 only
2006-12-23 20:17:15 +01:00
tsmith/tim@siva.hindu.god
2bc45899c0 Bug #24947: REPEAT function returns NULL when passed a field as the count 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.
2006-12-19 15:54:12 -07:00
monty@mysql.com/narttu.mysql.fi
a6481aa4c7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2006-12-15 01:01:52 +02:00
monty@mysql.com/narttu.mysql.fi
88dd873de0 Fixed compiler warnings detected by option -Wshadow and -Wunused:
- 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
2006-12-15 00:51:37 +02:00
holyfoot/hf@mysql.com/deer.(none)
4091806268 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/embt/my50-embt
2006-12-08 15:22:46 +04:00
df@kahlann.erinye.com
da7820c37d Merge dfischer@bk-internal.mysql.com:/home/bk/mysql-5.0-marvel
into  kahlann.erinye.com:/home/df/mysql/build/mysql-5.0-build
2006-12-01 13:02:54 +01:00
monty@mysql.com/narttu.mysql.fi
3d40956039 Fixed portability issue in my_thr_init.c (was added in my last push)
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.
2006-11-30 18:25:05 +02:00
kroki/tomash@moonlight.intranet
2b9bcb2c3c Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17047
2006-11-16 14:19:37 +03:00
kroki/tomash@moonlight.intranet
9e7f682116 Add 5.0 part of fix for bug 17047. 2006-11-16 14:06:51 +03:00
holyfoot/hf@mysql.com/deer.(none)
7ece4caad3 several fixes to make tests pass in embedded-server mode 2006-11-13 20:06:45 +04:00
cmiller@zippy.cornsilk.net
6260e12b99 Bug#10963: LEFT/RIGHT/SUBSTR/.. string functions returns wrong result \
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.
2006-11-08 10:11:02 -05:00
ramil/ram@mysql.com/myoffice.izhnet.ru
84048dc763 Merge mysql.com:/usr/home/ram/work/bug23254/my41-bug23254
into  mysql.com:/usr/home/ram/work/bug23254/my50-bug23254
2006-10-13 19:09:22 +05:00
ramil/ram@mysql.com/myoffice.izhnet.ru
31402835d4 Fix for bug #23254: COMPRESS(NULL) makes all futher COMPRESS() calls on same Item return NULL
We don't set null_value to 0 in the Item_func_compress::val_str() for 
not-NULL results.
2006-10-13 19:05:54 +05:00
cmiller@zippy.cornsilk.net
ca7ade8825 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
2006-09-28 07:30:24 -04:00
ramil/ram@mysql.com/myoffice.izhnet.ru
d3f503a0bd Fix for bug #20204: "order by" changes the results returned
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.
2006-09-21 16:05:01 +05:00
cmiller@maint1.mysql.com
459f9fdc6d Merge maint1.mysql.com:/data/localhome/cmiller/bug15583/my50-bug15583
into  maint1.mysql.com:/data/localhome/cmiller/mysql-5.0-maint
2006-09-13 15:07:06 +02:00
msvensson@shellback.(none)
d463972da7 Merge shellback.(none):/home/msvensson/mysql/mysql-5.0
into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-08-31 11:57:36 +02:00
kostja@bodhi.local
f8d34e1030 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-14897
2006-08-30 00:45:33 +04:00
kroki/tomash@moonlight.intranet
b6bee0a394 BUG#21166: Prepared statement causes signal 11 on second execution
Changes in an item tree done by optimizer weren't properly
registered and went unnoticed, which resulted in preliminary freeing
of used memory.
2006-08-24 15:49:12 +04:00
tsmith/tim@siva.hindu.god
e8cbda2c27 Merge siva.hindu.god:/usr/home/tim/m/bk/b21531-41
into  siva.hindu.god:/usr/home/tim/m/bk/41
2006-08-23 18:06:07 -06:00
tsmith/tim@siva.hindu.god
45460bd0af Bug #21531: EXPORT_SET() doesn't accept args with coercible character sets
- 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
2006-08-23 18:02:31 -06:00
tsmith/tim@siva.hindu.god
b8521714af Merge siva.hindu.god:/usr/home/tim/m/bk/b20536-41
into  siva.hindu.god:/usr/home/tim/m/bk/41
2006-08-23 16:30:05 -06:00
tsmith/tim@siva.hindu.god
bf8fc6e82a Merge siva.hindu.god:/usr/home/tim/m/bk/b20536-50
into  siva.hindu.god:/usr/home/tim/m/bk/50
2006-08-23 13:43:28 -06:00
cmiller@maint1.mysql.com
60a88a573a Bug#15583: BIN()/OCT()/CONV() do not work with BIT values
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.
2006-08-22 17:51:00 +02:00