Commit graph

138 commits

Author SHA1 Message Date
kostja@bodhi.local
5fea0724bc Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime
2006-11-29 02:44:12 +03:00
monty@mysql.com/nosik.monty.fi
e825879800 Remove compiler warnings
(Mostly in DBUG_PRINT() and unused arguments)
Fixed bug in query cache when used with traceing (--with-debug)
Fixed memory leak in mysqldump
Removed warnings from mysqltest scripts (replaced -- with #)
2006-11-20 22:42:06 +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
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
igor@rurik.mysql.com
9c15b7e0e8 Post-pushbuild corrections for fix of bug #21698. 2006-09-09 09:43:09 -07:00
igor@rurik.mysql.com
34206c6f80 Fixed bug #21698: erroneously a field could be replaced by an
equal constant under any circumstances.
In fact this substitution can be allowed if the field is
not of a type string or if the field reference serves as 
an argument of a comparison predicate.
2006-09-07 11:06:37 -07:00
timour/tkatchaounov@lamia.home
bcf822841b Merge tkatchaounov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  lamia.home:/home/tkatchaounov/autopush/5.0-bug-21007
2006-07-21 13:04:40 +03:00
igor@olga.mysql.com
d1c109ef12 Merge olga.mysql.com:/home/igor/mysql-4.1-opt
into  olga.mysql.com:/home/igor/mysql-5.0-opt
2006-07-19 13:44:37 -07:00
igor@olga.mysql.com
f201828dd8 Fixed bug #17526: incorrect print method
for class Item_func_trim. 
For 4.1 it caused wrong output for EXPLAIN EXTENDED commands
if expressions with the TRIM function of two arguments were used.
For 5.0 it caused an error message when trying to select
from a view with the TRIM function of two arguments.
This unexpected error message was due to the fact that the
print method for the class Item_func_trim was inherited from
the class Item_func. Yet the TRIM function does not take a list
of its arguments. Rather it takes the arguments in the form:
  [{BOTH | LEADING | TRAILING} [remstr] FROM] str) |
  [remstr FROM] str
2006-07-19 12:36:55 -07:00
bar@myoffice.izhnet.ru
eec0355de2 func_str.result, func_str.test:
Adding test case.
item_strfunc.cc:
  bug#11728 string function LEFT, strange undocumented behaviour
  Fixing LEFT and RIGHT return NULL if the second
  argument is NULL.
2006-07-07 17:06:30 +05:00
igor@olga.mysql.com
f6d6ac1e0f Merge olga.mysql.com:/home/igor/mysql-4.1-opt
into  olga.mysql.com:/home/igor/mysql-5.0-opt
2006-07-06 13:40:08 -07:00
igor@olga.mysql.com
0e3d2dafd6 Fixed bug #18243.
The implementation of the method Item_func_reverse::val_str
for the REVERSE function modified the argument of the function.
This led to wrong results for expressions that contained
REVERSE(ref) if ref occurred somewhere else in the expressions.
2006-07-06 11:11:49 -07:00
evgen@moonbone.local
592e080643 Merge moonbone.local:/home/evgen/bk-trees/mysql-4.1-opt
into moonbone.local:/work/tmp_merge-5.0-opt-mysql
2006-06-17 01:57:25 +04:00
evgen@moonbone.local
766b4a8c7f Fixed bug#15351: Wrong collation used for comparison of md5() and sha()
argument can lead to a wrong result.

md5() and sha() functions treat their arguments as case sensitive strings.
But when they are compared their arguments were compared as a case
insensitive strings which leads to two functions with different arguments
and thus different results to being identical. This can lead to a wrong
decision made in the range optimizer and thus lead to a wrong result set.

Item_func_md5::fix_length_and_dec() and Item_func_sha::fix_length_and_dec()
functions now set binary collation on their arguments.
2006-05-28 22:01:38 +04:00
jimw@mysql.com
7d54b004a2 Bug #13975: "same string" + 0 has 2 different results
The 'decimals' member of Item_func was being improperly initialized,
  which resulted in improper results when handling large numeric values.
2006-05-18 10:34:01 -07:00
tnurnberg@mysql.com
ab69fac55d Merge mysql.com:/home/mysql-4.1-10418
into  mysql.com:/home/mysql-5.0-10418
2006-05-12 10:27:20 +02:00
tnurnberg@mysql.com
21f4e8aadb Bug#10418: LOAD_FILE does not behave like in manual if file does not exist
load_file() string-function should return NULL rather than throw an error if
the file doesn't exist, as per the manual.
2006-05-08 04:37:58 +02:00
jimw@mysql.com
80aafdd398 Bug #17043: Casting trimmed string to decimal loses precision
Results of string functions were being converted to decimals by first
  being converted to integers, resulting in a loss of precision.
2006-03-14 02:04:43 -08:00
jimw@mysql.com
69cf72710d Fix possible corruption of results from SUBSTRING_INDEX(). (Bug #14676) 2005-11-23 16:49:07 -08:00
monty@mysql.com
f5fdf3e87a Reviewing new pushed code
- CHAR() now returns binary string as default
- CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
- Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
  (Some old systems returns ETIME and it's safer to test for both values
   than to try to write a wrapper for each old system)
- Fixed new introduced bug in NOT BETWEEN X and X
- Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
- Use octet2hex() for all conversion of string to hex
- Simplify and optimize code
2005-10-12 00:58:22 +03:00
monty@mysql.com
17d7ba931d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2005-10-08 03:37:23 +03:00
monty@mysql.com
78e828d32f Review of code pushed since last 5.0 pull:
Ensure that ccache is also used for C programs
mysql: Ensure that 'delimiter' works the same way in batch mode as in normal mode
mysqldump: Change to use ;; (instead of //) as a stored procedure/trigger delimiter
Fixed test cases by adding missing DROP's and rename views to be of type 'v#'
Removed MY_UNIX_PATH from fn_format()
Removed current_db_used from TABLE_LIST
Removed usage of 'current_thd' in Item_splocal
Removed some compiler warnings
A bit faster longlong2str code
2005-10-06 17:54:43 +03:00
jimw@mysql.com
90d6195f04 Fix handling of NULL values in decimal fields in FORMAT(). (Bug #13361) 2005-09-22 11:40:22 -07:00
acurtis@xiphis.org
b9476f7d50 Merge xiphis.org:/usr/home/antony/work2/mysql-4.1
into  xiphis.org:/usr/home/antony/work2/merge-5.0
2005-08-11 12:18:53 +01:00
patg@krsna.patg.net
6128521b5b item_strfunc.cc:
BUG #11104 
      Took out the offset-=delimiter_length-1 out of the for loop. It was causing
      basically this: 
      select substring_index('the king of the the hill', 'the', -2) to not work.
      The first iteration, offset would be initialised to 24, then strstr would 
      point at 'the king of the the* hill' ('*'means right before the 
      character following), returning a offset of 16. The for loop would then 
      decrement offset by two (3 - 1), to 14, now pointing at 
      "the king of th*e the hill", _skipping_ past the 'e' in the second to last
      'the', and therefore strstr would never have a chance of matching the 
      second to last 'the', then moving on to the 'the' at the begginning of the 
      string!
      In a nutshell, offset was being decremented by too great a value, preventing
      the second to last 'the' from being ever found, hence the result of 
      'king of the the hill' from the query that is reported in the bug report
func_str.test:
  BUG #11104
  Added tests to make sure fix addresses issues in original bug report
func_str.result:
  BUG #11104 
  New results for new tests
2005-08-08 13:46:13 -07:00
monty@mysql.com
15d48525af Merge mysql.com:/home/my/mysql-4.1
into  mysql.com:/home/my/mysql-5.0
2005-07-28 17:09:54 +03:00
monty@mysql.com
3c12d0ae54 Added end marker for tests to make future merges easier 2005-07-28 03:22:47 +03:00
jimw@mysql.com
49e5636410 Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-07-22 12:35:15 -07:00
jimw@mysql.com
e26a344d19 Fix calculation for length of LPAD() and RPAD() reported to
client via mysql_fetch_fields(). (Bug #11311)
2005-07-22 11:46:29 -07:00
gluh@mysql.com
b0ec1cd84e Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into mysql.com:/home/gluh/MySQL/Merge/5.0
2005-07-13 16:08:13 +05:00
gluh@eagle.intranet.mysql.r18.ru
672e1f20cb Bug #9854 hex() and out of range handling
added out of range handling
2005-07-13 14:23:09 +05:00
bell@sanja.is.com.ua
8b71793766 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug4-5.0
2005-07-06 16:59:56 +03:00
bell@sanja.is.com.ua
c41c8accd7 Merge 2005-07-06 11:36:27 +03:00
monty@mysql.com
86d7b02199 Merge with 4.1 2005-07-03 14:17:52 +03:00
igor@rurik.mysql.com
4b8f2e9bb4 func_str.test:
Added test cases for bug #11469.
item_strfunc.h:
  Fixed bug #11469: wrong implementation of the not_null_tables
  method for CONCAT_WS.
2005-06-29 02:40:25 -07:00
bell@sanja.is.com.ua
0e30eea141 fixed substring() length calculation in case of constant negative argument (BUG#10269) 2005-06-28 21:45:11 +03:00
msvensson@neptunus.(none)
88c96026af Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/bug10466
2005-06-27 13:12:10 +02:00
igor@rurik.mysql.com
268110b34b Manual merge 2005-06-23 11:22:30 -07:00
igor@rurik.mysql.com
c73c2af614 func_str.result, func_str.test:
Added a test case for bug #10124.
sql_select.h, item_subselect.cc, sql_select.cc:
  Fixed bug #10124.
  The copy method of the store_key classes can return
  STORE_KEY_OK=0, STORE_KEY_FATAL=1, STORE_KEY_CONV=2 now.
field.cc:
  Fixed bug #10124.
  When ussuing a warning the store methods return 2 instead of 1 now.
2005-06-23 06:15:50 -07:00
msvensson@neptunus.(none)
6282d89b0a bug#10466: Datatype "timestamp" displays "YYYYMMDDHHMMSS" irrespective of display sizes.
- Print warning that says display width is not supported for datatype TIMESTAMP, if user tries to create a TIMESTAMP column with display width.
 - Use display width for TIMESTAMP only in type_timestamp test to make sure warning is displayed correctly.
2005-06-20 12:09:00 +02:00
jimw@mysql.com
5a271e2c12 Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-06-01 16:13:24 -07:00
jimw@mysql.com
7ac7bfc3c8 Fix handling of NULL fields in FIELD(). (Bug #10944) 2005-06-01 09:48:25 -07:00
monty@mysql.com
201ee3eb78 Invalid DEFAULT values for CREATE TABLE now generates errors. (Bug #5902)
CAST() now produces warnings when casting a wrong INTEGER or CHAR values. This also applies to implicite string to number casts. (Bug #5912)
ALTER TABLE now fails in STRICT mode if it generates warnings.
Inserting a zero date in a DATE, DATETIME or TIMESTAMP column during TRADITIONAL mode now produces an error. (Bug #5933)
2005-04-01 15:04:50 +03:00
bar@eagle.intranet.mysql.r18.ru
2a1ad57732 Merge 2005-03-25 10:43:35 +04:00
bar@mysql.com
29ffcad226 Fixed that LEFT OUTER JOIN was replaced with a regulat join
in some cases, because "charset(x) = 'string'" was considered
as "x is not null" due to incorrect not_null_tables().
2005-03-24 18:10:46 +04:00
gluh@gluh.mysql.r18.ru
b435d6e862 Merge 4.1 -> 5.0 2005-03-17 16:51:07 +03:00
bar@mysql.com
a7b877df78 Bugs#9129: CHARSET(), COLLATION(), COERCIBILITY()
not always correct for NULL values.
Now they always result a non NULL value even
the argument is NULL. It is more usefull for 
debugging purposes.
2005-03-16 17:44:29 +04:00
igor@rurik.mysql.com
db4ca33f52 Merge rurik.mysql.com:/home/igor/dev/mysql-4.1-0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2005-03-09 16:53:20 -08:00
igor@rurik.mysql.com
af5d21357e Manual merge 2005-03-09 10:58:52 -08:00