Commit graph

173 commits

Author SHA1 Message Date
unknown
c98b7fe5b7 Merge mysql.com:/home/hf/work/31758/my50-31758
into  mysql.com:/home/hf/work/31758/my51-31758


mysql-test/t/func_str.test:
  Auto merged
sql/item_strfunc.h:
  Auto merged
mysql-test/r/func_str.result:
  merging
2007-11-05 18:27:17 +04:00
unknown
62617b09c3 Merge mysql.com:/home/hf/work/31758/my41-31758
into  mysql.com:/home/hf/work/31758/my50-31758


mysql-test/t/func_str.test:
  Auto merged
mysql-test/r/func_str.result:
  merging
sql/item_strfunc.h:
  merging
2007-11-05 18:12:42 +04:00
unknown
e722393f51 Bug #31758 inet_ntoa, oct crashes server with null+filesort
Item_func_inet_ntoa and Item_func_conv inherit 'maybe_null' flag from an
argument, which is wrong.
Both can be NULL with notnull arguments, so that's fixed.


mysql-test/r/func_str.result:
  Bug #31758 inet_ntoa, oct crashes server with null+filesort
  
  test case
mysql-test/t/func_str.test:
  Bug #31758 inet_ntoa, oct crashes server with null+filesort
  
  test result
sql/item_strfunc.h:
  Bug #31758 inet_ntoa, oct crashes server with null+filesort
  
  missing maybe_null flags set for Item_func_inet_ntoa and Item_func_conv
2007-10-30 12:35:03 +04:00
unknown
e259d46103 Merge polly.(none):/home/kaa/src/opt/bug28550/my50-bug28550
into  polly.(none):/home/kaa/src/opt/bug28550/my51-bug28550


mysql-test/t/func_str.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_strfunc.h:
  Auto merged
mysql-test/r/func_str.result:
  Manual merge.
2007-10-21 21:49:30 +04:00
unknown
04311fabaa Bug #28550 "Potential bugs related to the return type of the CHAR function".
Since, as of MySQL 5.0.15, CHAR() arguments larger than 255 are converted into multiple result bytes, a single CHAR() argument can now take up to 4 bytes. This patch fixes Item_func_char::fix_length_and_dec() to take this into account.
  
This patch also fixes a regression introduced by the patch for bug21513. As now we do not always have the 'name' member of Item set for Item_hex_string and Item_bin_string, an own print() method has been added to Item_hex_string so that it could correctly be printed by Item_func::print_args().


mysql-test/r/func_str.result:
  Import patch bug288550.patch
mysql-test/t/func_str.test:
  Import patch bug288550.patch
sql/item.cc:
  Import patch bug288550.patch
sql/item.h:
  Import patch bug288550.patch
sql/item_strfunc.h:
  Import patch bug288550.patch
2007-10-21 21:45:31 +04:00
unknown
751e32072f Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt


mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
2007-06-18 17:08:56 +05:00
unknown
145696de54 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug27130


mysql-test/r/func_str.result:
  Manual merge
mysql-test/t/func_str.test:
  Manual merge
2007-06-17 11:35:14 -07:00
unknown
a07b055b9a 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.


mysql-test/r/func_str.result:
  Added a test case for bug #27130.
mysql-test/t/func_str.test:
  Added a test case for bug #27130.
2007-06-17 11:23:19 -07:00
unknown
200c69e3e6 Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt


mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
mysql-test/r/bigint.result:
  Merge with 5.0-opt.
mysql-test/t/bigint.test:
  Merge with 5.0-opt.
sql/item_func.cc:
  Merge with 5.0-opt.
2007-06-16 22:40:25 +05:00
unknown
36f8bfb22e Fixed bug #27932: the function LOCATE returned NULL if any
of its arguments was evaluated to NULL, while the predicate
LOCATE(str,NULL) IS NULL erroneously was evaluated to FALSE.

This happened because the Item_func_locate::fix_length_and_dec
method by mistake set the value of the maybe_null flag for 
the function item to 0. In consequence of this the function 
was considered as the one that could not ever return NULL.


mysql-test/r/func_str.result:
  Added a test case for bug #27932.
mysql-test/t/func_str.test:
  Added a test case for bug #27932.
2007-06-14 18:55:07 -07:00
unknown
efe42b3857 Merge moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.1-opt


mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/key.result:
  Auto merged
mysql-test/r/row.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/subselect3.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
mysql-test/t/key.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
mysql-test/t/view.test:
  Manually merged
sql/sql_lex.h:
  Manually merged
2007-04-21 00:33:56 +04:00
unknown
8fe487beba Bug #27530:
The function CRC32() returns unsigned integer.
But the metadata (the unsigned flag) for the 
function was set incorrectly.
As a result type arithmetics based on the 
function's metadata (like finding the concise
type of an temporary table column to hold the result)
returned incorrect results.
Fixed by returning correct type information.

This fix is based on code contributed by Martin Friebe
(martin@hybyte.com) on 2007-03-30.  


mysql-test/r/func_str.result:
  Bug #27530: test case
mysql-test/t/func_str.test:
  Bug #27530: test case
sql/item_strfunc.h:
  Bug #27530: Marked CRC32() as returning unsigned
2007-04-11 13:58:16 +03:00
unknown
55883e9628 Merge pilot.blaudden:/home/msvensson/mysql/bug25197/my51-bug25197
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint


mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
2007-03-28 09:35:03 +02:00
unknown
2473c35960 Merge pilot.blaudden:/home/msvensson/mysql/bug25197/my50-bug25197
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint


mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
2007-03-28 09:34:04 +02:00
unknown
cce2cb5733 Merge pilot.blaudden:/home/msvensson/mysql/bug25197/my50-bug25197
into  pilot.blaudden:/home/msvensson/mysql/bug25197/my51-bug25197


mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
2007-03-28 09:33:16 +02:00
unknown
e9b606bf3e 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


mysql-test/r/func_str.result:
  Add test case from bug#27073
mysql-test/t/func_str.test:
  Add test case from bug#27073
sql/item_strfunc.cc:
  Change the if statemnet to be optimized for the normal case where count > 0
2007-03-28 09:32:49 +02:00
unknown
8a140cb72e Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.1-opt


mysql-test/r/explain.result:
  Auto merged
mysql-test/r/func_default.result:
  Auto merged
mysql-test/r/func_regexp.result:
  Auto merged
mysql-test/r/func_test.result:
  Auto merged
mysql-test/r/having.result:
  Auto merged
mysql-test/r/olap.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/union.result:
  Auto merged
mysql-test/r/varbinary.result:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
mysql-test/r/func_str.result:
  Manually merged
mysql-test/t/func_str.test:
  Manually merged
2007-03-11 00:26:45 +03:00
unknown
2f774b479b Merge moonbone.local:/mnt/gentoo64/work/15757-bug-5.0-opt-mysql
into  moonbone.local:/mnt/gentoo64/work/25373-bug-5.0-opt-mysql


sql/item_strfunc.cc:
  Auto merged
mysql-test/r/func_str.result:
  SCCS merged
mysql-test/t/func_str.test:
  SCCS merged
2007-03-10 19:57:18 +03:00
unknown
816ea8a379 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.


mysql-test/t/func_str.test:
  Added a test case for the bug#15757: Wrong SUBSTRING() result when a tmp table was employed.
mysql-test/r/func_str.result:
  Added a test case for the bug#15757: Wrong SUBSTRING() result when a tmp table was employed.
sql/item_strfunc.cc:
  Bug#15757: Wrong SUBSTRING() result when a tmp table was employed.
  Now the Item_func_substr::fix_length_and_dec() function correctly calculates
  the max_length parameter.
2007-03-10 19:55:34 +03:00
unknown
c7de22a1c7 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B26281-5.0-opt


sql/item_strfunc.cc:
  Auto merged
mysql-test/r/func_str.result:
  resolved test merge conflicts
mysql-test/t/func_str.test:
  resolved test merge conflicts
2007-03-09 13:05:41 +02:00
unknown
29b6d55402 Bug #26281:
Fixed boundry checks in the INSERT() function:
 were one off.


mysql-test/r/func_str.result:
  Bug #26281: test case
mysql-test/t/func_str.test:
  Bug #26281: test case
sql/item_strfunc.cc:
  Bug #26281: fixed boundry checks
2007-03-09 12:47:12 +02:00
unknown
3d52be1584 Merge bk@192.168.21.1:mysql-5.1
into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt


mysql-test/r/order_by.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/order_by.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
mysql-test/r/func_str.result:
  merging
mysql-test/r/sp.result:
  merging
mysql-test/r/view.result:
  merging
mysql-test/t/func_str.test:
  merging
mysql-test/t/view.test:
  merging
2007-03-08 22:04:17 +04:00
unknown
12af658570 Merge bk@192.168.21.1:mysql-5.0
into  mysql.com:/home/hf/work/mrg/mysql-5.0-opt


mysql-test/r/order_by.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/order_by.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
mysql-test/r/func_str.result:
  merging
mysql-test/r/sp.result:
  merging
mysql-test/r/view.result:
  merging
mysql-test/t/func_str.test:
  merging
mysql-test/t/view.test:
  merging
2007-03-08 21:42:41 +04:00
unknown
52ce1b7358 Merge mysql.com:/home/hf/work/mrg/mysql-5.0-opt
into  mysql.com:/home/hf/work/mrg/mysql-5.1-opt


BUILD/check-cpu:
  Auto merged
mysql-test/r/explain.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/func_test.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/update.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/explain.test:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_update.cc:
  Auto merged
mysql-test/r/func_in.result:
  SCCS merged
mysql-test/r/order_by.result:
  SCCS merged
mysql-test/r/sp.result:
  merging
mysql-test/t/func_in.test:
  SCCS merged
mysql-test/t/order_by.test:
  SCCS merged
mysql-test/t/view.test:
  merging
sql/item_cmpfunc.h:
  merging
sql/mysql_priv.h:
  merging
sql/sql_select.cc:
  SCCS merged
2007-03-08 19:08:28 +04:00
unknown
399bf23c1d Bug #26537: item_unhex() was not expected
to return NULL for non-NULL arguments.
This is not the case as it can return NULL
for invalid hexidecimal strings.
Fixed by setting the maybe_null flag.


mysql-test/r/func_str.result:
  Bug #26537: test case
mysql-test/t/func_str.test:
  Bug #26537: test case
sql/item_strfunc.h:
  Bug #26537: item_unhex() can return NULLs
  even for guaranteed non-null arguments.
2007-03-02 12:14:50 +02:00
unknown
031e62ecee Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint


mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
2007-02-28 11:21:54 +01:00
unknown
d79f0973ce 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


mysql-test/r/func_str.result:
  Update test result
mysql-test/t/func_str.test:
  Add test case for using an unsigned value as count parameter
  for REPEAT
sql/item_strfunc.cc:
  The repeat function should return the emptystring if
  count is unsigned and equal to zero or
  count is signed and less than or equal to zero
2007-02-23 10:28:50 +01:00
unknown
276f0d4c5e Merge macbook.gmz:/Users/kgeorge/mysql/work/mysql-5.0-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/merge-5.1-opt


mysql-test/r/func_in.result:
  Auto merged
mysql-test/r/range.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/r/sp-code.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/udf.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/func_in.test:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
mysql-test/t/range.test:
  Auto merged
mysql-test/t/select.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
mysql-test/t/udf.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
mysql-test/r/func_str.result:
  merge 5.0-opt -> 5.1-opt
mysql-test/r/group_by.result:
  merge 5.0-opt -> 5.1-opt
mysql-test/r/insert.result:
  merge 5.0-opt -> 5.1-opt
mysql-test/r/subselect.result:
  merge 5.0-opt -> 5.1-opt
mysql-test/t/group_by.test:
  merge 5.0-opt -> 5.1-opt
mysql-test/t/insert.test:
  merge 5.0-opt -> 5.1-opt
mysql-test/t/subselect.test:
  merge 5.0-opt -> 5.1-opt
mysql-test/t/view.test:
  merge 5.0-opt -> 5.1-opt
sql/item_cmpfunc.h:
  merge 5.0-opt -> 5.1-opt
sql/item_strfunc.h:
  merge 5.0-opt -> 5.1-opt
2007-01-23 12:34:50 +02:00
unknown
cb96e8bcd8 Merge moonbone.local:/work/latest-4.1-opt-mysql
into  moonbone.local:/work/latest-5.0-opt-mysql


mysql-test/t/func_str.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
mysql-test/r/delete.result:
  Manual merge
mysql-test/r/func_str.result:
  Manual merge
mysql-test/t/delete.test:
  Manual merge
2007-01-12 16:43:52 +03:00
unknown
52c100ae0c 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.


mysql-test/t/func_str.test:
  Added a test case for bug#23409: Arguments of the ENCODE() and the
  > DECODE() functionswere not printed correctly.
mysql-test/r/func_str.result:
  Added a test case for bug#23409: Arguments of the ENCODE() and the DECODE() functions were not printed correctly.
sql/item_strfunc.h:
  Bug#23409: Arguments of the ENCODE() and the DECODE() functions were not printed correctly.
  The print() method is added to the Item_func_encode class.
sql/item_strfunc.cc:
  Bug#23409: Arguments of the ENCODE() and the DECODE() functions were not printed correctly.
  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
unknown
9639b35ab5 Merge siva.hindu.god:/usr/home/tim/m/bk/50-build
into  siva.hindu.god:/usr/home/tim/m/bk/51-build


cmd-line-utils/readline/histfile.c:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/udf_example.c:
  Auto merged
storage/innobase/include/row0mysql.h:
  Auto merged
strings/decimal.c:
  Auto merged
mysql-test/include/mix1.inc:
  Manual merge
mysql-test/r/func_str.result:
  Manual merge
mysql-test/r/innodb_mysql.result:
  Manual merge
mysql-test/t/disabled.def:
  Manual merge
mysql-test/t/func_str.test:
  Manual merge
sql/mysqld.cc:
  Manual merge
storage/innobase/handler/ha_innodb.cc:
  Manual merge
storage/innobase/handler/ha_innodb.h:
  Manual merge
storage/innobase/row/row0mysql.c:
  Manual merge
2006-12-20 15:46:36 -07:00
unknown
f8920dd59f 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.


mysql-test/r/func_str.result:
  Update test results for bug #24947
mysql-test/t/func_str.test:
  Add test case for bug #24947
sql/item_strfunc.cc:
  Adjust some string function Items' val_str() methods to handle large signed/unsigned arguments properly
2006-12-19 15:54:12 -07:00
unknown
126375b16a Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge


libmysql/libmysql.c:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/lib/mtr_io.pl:
  Auto merged
mysql-test/r/im_daemon_life_cycle.result:
  Auto merged
mysql-test/r/im_life_cycle.result:
  Auto merged
mysql-test/r/rpl_trigger.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
  Auto merged
mysql-test/t/im_life_cycle.imtest:
  Auto merged
mysql-test/t/im_utils.imtest:
  Auto merged
mysql-test/t/rpl_trigger.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/lib/mtr_process.pl:
  Use local.
mysql-test/r/func_str.result:
  SCCS merged
mysql-test/t/func_str.test:
  Manual merge.
sql/sql_trigger.cc:
  Manual merge.
sql/sql_yacc.yy:
  Manual merge.
2006-11-30 02:36:18 +03:00
unknown
0e978328ae Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge


libmysql/libmysql.c:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
server-tools/instance-manager/mysql_connection.cc:
  Rollback Monty's removals of explicit casts
tests/mysql_client_test.c:
  SCCS merged
2006-11-29 11:44:37 +03:00
unknown
15584161e2 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime


libmysql/libmysql.c:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/t/wait_for_socket.sh:
  Manual merge.
sql/sql_cache.cc:
  Manual merge.
2006-11-29 02:44:12 +03:00
unknown
14decc4fbc 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 #)


BitKeeper/etc/ignore:
  added mysql-test/r/*.warnings
BUILD/SETUP.sh:
  Don't build with BDB as default
client/client_priv.h:
  Added OPT_DEBUG_INFO
client/mysqlbinlog.cc:
  Fixed compiler warning
client/mysqldump.c:
  Removed compiler warnings
  Added option --debug-info to detect memory leaks
  Fixed memory leak
  Don't backup cluster replication tables (if used with 5.1)
cmd-line-utils/readline/bind.c:
  Fixed compiler warning
cmd-line-utils/readline/chardefs.h:
  Fixed compiler warning
cmd-line-utils/readline/complete.c:
  Fixed compiler warning
cmd-line-utils/readline/display.c:
  Fixed compiler warning
cmd-line-utils/readline/histexpand.c:
  Fixed compiler warning
cmd-line-utils/readline/input.c:
  Fixed compiler warning
cmd-line-utils/readline/isearch.c:
  Fixed compiler warning
cmd-line-utils/readline/kill.c:
  Fixed compiler warning
cmd-line-utils/readline/macro.c:
  Fixed compiler warning
cmd-line-utils/readline/misc.c:
  Fixed compiler warning
cmd-line-utils/readline/nls.c:
  Fixed compiler warning
cmd-line-utils/readline/readline.c:
  Fixed compiler warning
cmd-line-utils/readline/rltty.c:
  Fixed compiler warning
cmd-line-utils/readline/search.c:
  Fixed compiler warning
cmd-line-utils/readline/terminal.c:
  Fixed compiler warning
cmd-line-utils/readline/text.c:
  Fixed compiler warning
cmd-line-utils/readline/tilde.c:
  Fixed compiler warning
cmd-line-utils/readline/undo.c:
  Fixed compiler warning
cmd-line-utils/readline/util.c:
  Fixed compiler warning
cmd-line-utils/readline/vi_mode.c:
  Fixed compiler warning
dbug/dbug_analyze.c:
  Fixed compiler warning
extra/yassl/src/ssl.cpp:
  Fixed compiler warning
extra/yassl/testsuite/testsuite.cpp:
  Fixed compiler warning
heap/_check.c:
  Fixed compiler warning
heap/hp_delete.c:
  Fixed compiler warning
heap/hp_hash.c:
  Fixed compiler warning
heap/hp_open.c:
  Fixed compiler warning
heap/hp_rkey.c:
  Fixed compiler warning
heap/hp_rrnd.c:
  Fixed compiler warning
heap/hp_write.c:
  Fixed compiler warning
libmysql/libmysql.c:
  Fixed compiler warning
libmysqld/libmysqld.c:
  Fixed compiler warning
myisam/mi_close.c:
  Fixed compiler warning
myisam/mi_delete.c:
  Fixed compiler warning
myisam/mi_dynrec.c:
  Fixed compiler warning
myisam/mi_keycache.c:
  Fixed compiler warning
myisam/mi_page.c:
  Fixed compiler warning
myisam/mi_statrec.c:
  Fixed compiler warning
myisam/mi_test2.c:
  Fixed compiler warning
myisam/mi_write.c:
  Fixed compiler warning
myisam/myisampack.c:
  Fixed compiler warning
myisammrg/myrg_extra.c:
  Fixed compiler warning
mysql-test/mysql-test-run.pl:
  Remove .reject, .progress, .log and .warnings flag at start
  cluster -> mysql database (for 5.1)
mysql-test/include/federated.inc:
  Remove mysqltest warnings
mysql-test/include/sp-vars.inc:
  Remove mysqltest warnings
mysql-test/mysql-test-run.sh:
  Fix so that 'make test' works again
  Remove .reject, .progress .log and .warnings files at startup
mysql-test/r/ctype_cp1250_ch.result:
  Drop used tables at startup
mysql-test/t/create.test:
  Remove mysqltest warnings
mysql-test/t/csv.test:
  Remove mysqltest warnings
mysql-test/t/ctype_collate.test:
  Remove mysqltest warnings
mysql-test/t/ctype_cp1250_ch.test:
  Drop used tables at startup
mysql-test/t/ctype_ucs.test:
  Remove mysqltest warnings
mysql-test/t/func_sapdb.test:
  Remove mysqltest warnings
mysql-test/t/func_str.test:
  Remove mysqltest warnings
mysql-test/t/grant.test:
  Remove mysqltest warnings
mysql-test/t/greedy_optimizer.test:
  Remove mysqltest warnings
mysql-test/t/group_min_max.test:
  Remove mysqltest warnings
mysql-test/t/innodb.test:
  Remove mysqltest warnings
mysql-test/t/join.test:
  Remove mysqltest warnings
mysql-test/t/limit.test:
  Remove mysqltest warnings
mysql-test/t/null.test:
  Remove mysqltest warnings
mysql-test/t/select.test:
  Remove mysqltest warnings
mysql-test/t/sp-prelocking.test:
  Remove mysqltest warnings
mysql-test/t/strict.test:
  Remove mysqltest warnings
mysql-test/t/subselect.test:
  Remove mysqltest warnings
mysql-test/t/type_newdecimal.test:
  Remove mysqltest warnings
mysql-test/t/view_grant.test:
  Remove mysqltest warnings
mysys/default.c:
  Fixed compiler warning
mysys/hash.c:
  Fixed compiler warning
mysys/list.c:
  Fixed compiler warning
mysys/mf_iocache.c:
  Fixed compiler warning
mysys/mf_keycache.c:
  Fixed compiler warning
mysys/mf_keycaches.c:
  Fixed compiler warning
mysys/my_alloc.c:
  Fixed compiler warning
mysys/my_dup.c:
  Fixed compiler warning
mysys/my_fopen.c:
  Fixed compiler warning
mysys/my_fstream.c:
  Fixed compiler warning
mysys/my_getwd.c:
  Fixed compiler warning
mysys/my_handler.c:
  Fixed compiler warning
  Added missing enums in switch
mysys/my_lib.c:
  Fixed compiler warning
mysys/my_lread.c:
  Fixed compiler warning
mysys/my_lwrite.c:
  Fixed compiler warning
mysys/my_malloc.c:
  Fixed compiler warning
mysys/my_pread.c:
  Fixed compiler warning
mysys/my_read.c:
  Fixed compiler warning
mysys/my_realloc.c:
  Fixed compiler warning
mysys/my_seek.c:
  Fixed compiler warning
mysys/my_write.c:
  Fixed compiler warning
mysys/safemalloc.c:
  Fixed compiler warning
mysys/thr_lock.c:
  Fixed compiler warning
mysys/tree.c:
  Fixed compiler warning
mysys/typelib.c:
  Fixed compiler warning
ndb/include/logger/LogHandler.hpp:
  Changed SetErrorStr() to take const char* to remove compiler warnings (as many arguments to this are const strings)
ndb/include/ndb_global.h.in:
  Added LINT_SET_PTR macro to be able to remove some compiler warnings
ndb/include/util/InputStream.hpp:
  Fixed compiler warning
ndb/include/util/OutputStream.hpp:
  Fixed compiler warning
ndb/include/util/SimpleProperties.hpp:
  Fixed compiler warning
ndb/src/common/debugger/EventLogger.cpp:
  remove if on 'signal' as this is a function pointer and is always true
ndb/src/common/debugger/signaldata/BackupSignalData.cpp:
  Add missing enums
ndb/src/common/logger/LogHandler.cpp:
  Changed SetErrorStr() to take const char* to remove compiler warnings (as many arguments to this are const strings)
ndb/src/common/portlib/NdbMutex.c:
  Fixed compiler warning
ndb/src/common/portlib/NdbThread.c:
  Fixed compiler warning
ndb/src/common/transporter/Transporter.cpp:
  Swapped arguments to remove compiler warnings
ndb/src/cw/cpcd/CPCD.hpp:
  Fixed compiler warning
ndb/src/kernel/blocks/backup/Backup.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp:
  Fixed compiler warning
ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
  Added missing enums
ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Fixed compiler warning
ndb/src/kernel/error/ErrorReporter.cpp:
  Fixed compiler warning
ndb/src/kernel/error/ErrorReporter.hpp:
  Fixed compiler warning
ndb/src/kernel/error/ndbd_exit_codes.c:
  Fixed compiler warning
ndb/src/kernel/vm/TransporterCallback.cpp:
  Fixed compiler warning
ndb/src/mgmapi/mgmapi.cpp:
  Fixed compiler warning
ndb/src/mgmclient/CommandInterpreter.cpp:
  Fixed compiler warning
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Fixed compiler warning
ndb/src/mgmsrv/Services.cpp:
  Fixed compiler warning
ndb/src/ndbapi/ClusterMgr.cpp:
  Fixed compiler warning
ndb/src/ndbapi/DictCache.cpp:
  Fixed compiler warning
ndb/src/ndbapi/Ndb.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationDefine.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationExec.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationInt.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbOperationSearch.cpp:
  Fixed compiler warning
ndb/src/ndbapi/NdbTransaction.cpp:
  Fixed compiler warning
ndb/src/ndbapi/Ndbif.cpp:
  Fixed compiler warning
ndb/src/ndbapi/Ndbinit.cpp:
  Fixed compiler warning
ndb/src/ndbapi/ndb_cluster_connection.cpp:
  Fixed compiler warning
ndb/tools/drop_index.cpp:
  Fixed compiler warning
ndb/tools/drop_tab.cpp:
  Fixed compiler warning
ndb/tools/ndb_config.cpp:
  Fixed compiler warning
regex/regexec.c:
  Fixed compiler warning
server-tools/instance-manager/mysql_connection.cc:
  Fixed compiler warning
sql/Makefile.am:
  Fix for bison 1.875, which adds an attribute statement that gcc 4.1.0 can't parse
sql/filesort.cc:
  Fixed compiler warning
sql/ha_archive.cc:
  Fixed compiler warning
sql/ha_federated.cc:
  Fixed compiler warning
sql/ha_federated.h:
  Fixed compiler warning
sql/ha_innodb.cc:
  Fixed compiler warning
sql/ha_myisam.cc:
  Fixed compiler warning
sql/ha_myisammrg.cc:
  Fixed compiler warning
sql/ha_ndbcluster.cc:
  Fixed compiler warning
sql/handler.cc:
  Fixed compiler warning
sql/item_cmpfunc.cc:
  Fixed compiler warning
sql/item_subselect.cc:
  Fixed compiler warning
sql/item_timefunc.cc:
  Fixed compiler warning
sql/log_event.cc:
  Fixed compiler warning
sql/mysqld.cc:
  Fixed compiler warning
sql/net_serv.cc:
  Fixed compiler warning
sql/opt_range.cc:
  Fixed compiler warning
  Formated DBUG statements to be as rest of code
sql/slave.cc:
  Fixed compiler warning
sql/sql_acl.cc:
  Fixed compiler warning
sql/sql_cache.cc:
  Fixed compiler warning
  Fixed bug in query cache when used with DBUG traceing
sql/sql_class.cc:
  Fixed compiler warning
sql/sql_class.h:
  Fixed compiler warning
sql/sql_delete.cc:
  Fixed compiler warning
sql/sql_parse.cc:
  Fixed compiler warning
  Hack to fix my_sprintf() strings with %b
sql/sql_prepare.cc:
  Fixed compiler warning
  Hack to fix my_sprintf() strings with %b
sql/sql_repl.cc:
  Fixed compiler warning
sql/sql_select.cc:
  Fixed compiler warning
sql/sql_update.cc:
  Fixed compiler warning
sql/sql_view.cc:
  Fixed compiler warning
sql/strfunc.cc:
  Fixed compiler warning
sql-common/client.c:
  Fixed compiler warning
sql-common/my_time.c:
  Fixed compiler warning
sql/table.cc:
  Fixed compiler warning
sql/tztime.cc:
  Fixed compiler warning
sql/unireg.cc:
  Fixed compiler warning
strings/decimal.c:
  Fixed compiler warning
tests/mysql_client_test.c:
  Fixed compiler warning
vio/viosocket.c:
  Fixed compiler warning
vio/viossl.c:
  Fixed compiler warning
vio/viosslfactories.c:
  Fixed compiler warning
2006-11-20 22:42:06 +02:00
unknown
2975d65cd8 Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
Before this change, the functions BENCHMARK, ENCODE, DECODE and FORMAT could
only accept a constant for some parameters.

After this change, this restriction has been removed. An implication is that
these functions can also be used in prepared statements.

The change consist of changing the following classes:
- Item_func_benchmark
- Item_func_encode
- Item_func_decode
- Item_func_format
to:
- only accept Item* in the constructor,
- and evaluate arguments during calls to val_xxx()
which fits the general design of all the other functions.

The 'TODO' items identified in item_create.cc during the work done for
Bug 21114 are addressed by this fix, as a natural consequence of aligning
the design.

In the 'func_str' test, a single very long test line involving an explain
extended select with many functions has been rewritten into multiple
separate tests, to improve maintainability.
The result of explain extended select decode(encode(...)) has changed,
since the encode and decode functions now print all their parameters.


mysql-test/r/func_str.result:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/r/parser.result:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/r/ps.result:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/t/func_str.test:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/t/parser.test:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
mysql-test/t/ps.test:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_create.cc:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_func.cc:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_func.h:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_strfunc.cc:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
sql/item_strfunc.h:
  Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)
2006-11-16 09:03:47 -07:00
unknown
a4823607f9 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17047


sql/item_strfunc.cc:
  Auto merged
mysql-test/r/func_str.result:
  Manual merge.
mysql-test/t/func_str.test:
  Manual merge.
2006-11-16 14:19:37 +03:00
unknown
af22eb35e5 Add 5.0 part of fix for bug 17047.
mysql-test/r/func_str.result:
  Add result for bug#17047: CHAR() and IN() can return NULL without
  signaling NULL result.
mysql-test/t/func_str.test:
  Add test case for bug#17047: CHAR() and IN() can return NULL without
  signaling NULL result.
sql/item_strfunc.cc:
  Add Item_str_func::fix_fields() implementation, and set maybe_null to
  TRUE if we are in the SQL mode that requires some functions to return
  null even if they normally do not.
sql/item_strfunc.h:
  Add declaration of Item_str_func::fix_fields().
  Do not reset maybe_null in Item_func_char::fix_length_and_dec().
2006-11-16 14:06:51 +03:00
unknown
3a86738289 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.


mysql-test/r/func_str.result:
  Additional test results for #10963
mysql-test/t/func_str.test:
  Additional test results for #10963
sql/item_func.cc:
  Used larger type for counting, to avoid truncation.
sql/item_strfunc.cc:
  Fix for #10963, including comments and cleaned up logic
2006-11-08 10:11:02 -05:00
unknown
a65342f38d Post-pushbuild corrections for fix of bug #21698. 2006-09-09 09:43:09 -07:00
unknown
8716670229 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.  


mysql-test/r/func_str.result:
  Added test cases for bug #21698.
mysql-test/r/heap_hash.result:
  Adjusted results after the fix for bug #21198.
mysql-test/t/func_str.test:
  Added test cases for bug #21698.
sql/item.cc:
  Fixed bug #21198.
  Added a method to check whether a field reference can be 
  substituted for a constant equal to the field.
  This substitution is allowed if the field is not of a type string
  or if the field reference serves as an argument of a comparison
  predicate.
sql/item.h:
  Fixed bug #21698.
  Added a new virtual transformation method for a item 'compile'
  with two callback function parameters.
  Added a new virtual method 'subst_argument_checker' to be used
  as an amnalyzer method.
  This method is supposed to set its in/out argument to NULL for
  the nodes where substitution of a string field for a constant
  is not valid.
sql/item_cmpfunc.cc:
  Fixed bug #21698.
  Added an implementation of the compile method for class Item_cond.
  First it processes the Item_cond node with a callback function and if
  the latter returns TRUE it proceeds with a transformation performed by
  another callback function.
sql/item_cmpfunc.h:
  Fixed bug #21698.
  Added the implementations of 'subst_argument_checker'
  for the Item_func and Item_cond classes.
  This method is supposed to set its in/out argument to NULL for
  the nodes where substitution of a string field for a constant
  is not valid.
  Added the declaration of an implementation of the compile method for 
  class Item_cond.
  First it processes the Item_cond node with a callback function and if
  the latter returns TRUE it proceeds with a transformation performed by
  another callback function.
sql/item_func.cc:
  Fixed bug #21698.
  Added an implementation of the compile method for class Item_func.
  First it processes the Item_func node with a callback function and if
  the latter returns TRUE it proceeds with a transformation performed by
  another callback function.
sql/item_func.h:
  Fixed bug #21698.
  Added the declaration of the implementation of the compile method for
  class Item_func.
  First it processes the Item_func node with a callback function and if
  the latter returns TRUE it proceeds with a transformation performed by
  another callback function.
sql/sql_select.cc:
  Fixed bug #21698.
  Limited the conditions at which a field can be substituted 
  a for an equal constant in a formula. 
  This substitution is 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
unknown
f57bb34775 Merge tkatchaounov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  lamia.home:/home/tkatchaounov/autopush/5.0-bug-21007


client/mysql.cc:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/time.cc:
  Auto merged
2006-07-21 13:04:40 +03:00
unknown
ef9e634624 Merge olga.mysql.com:/home/igor/mysql-4.1-opt
into  olga.mysql.com:/home/igor/mysql-5.0-opt


mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
2006-07-19 13:44:37 -07:00
unknown
6ec7976df9 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


mysql-test/r/func_str.result:
  Added a test case for bug #17526: uncorrect print method
  for class Item_func_trim.
mysql-test/t/func_str.test:
  Added a test case for bug #17526: incorrect print method
  for class Item_func_trim.
sql/item_strfunc.cc:
  Fixed bug #17526: incorrect print method
  for class Item_func_trim.
      
  Added an implementation for the virtual function print
  in the class Item_func_trim.
  The implementation takes into account the fact the TRIM
  function takes the arguments in the following forms:
    [{BOTH | LEADING | TRAILING} [remstr] FROM] str) |
    [remstr FROM] str
sql/item_strfunc.h:
  Fixed bug #17526: incorrect print method
  for class Item_func_trim.
      
  Added an implementation for the virtual function print
  in the class Item_func_trim.
  Declared a virtual method to return the mode of the TRIM 
  function: LEADING, TRAILING or BOTH.
  Added implementations of this method for Item_func_trim and
  its descendants Item_func_ltrim and Item_func_rtrim.
2006-07-19 12:36:55 -07:00
unknown
613cbb621e 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.


sql/item_strfunc.cc:
  bug#11728 string function LEFT, strange undocumented behaviour
  Fixing LEFT and RIGHT return NULL if the second
  argument is NULL.
mysql-test/t/func_str.test:
  Adding test case.
mysql-test/r/func_str.result:
  Adding test case.
2006-07-07 17:06:30 +05:00
unknown
cba001b77a Merge olga.mysql.com:/home/igor/mysql-4.1-opt
into  olga.mysql.com:/home/igor/mysql-5.0-opt


mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
2006-07-06 13:40:08 -07:00
unknown
cf7627bce0 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.


mysql-test/r/func_str.result:
  Added a test case for bug #18243.
mysql-test/t/func_str.test:
  Added a test case for bug #18243.
sql/item_strfunc.cc:
  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.
  
  The implementation of Item_func_reverse::val_str has been changed
  to make the argument intact.
sql/item_strfunc.h:
  Fixed bug #18243.
  Added tmp_value to the Item_func_reverse class to store
  the result of the function. It erroneously replaced the 
  argument before this fix.
2006-07-06 11:11:49 -07:00
unknown
707de39a53 Merge moonbone.local:/home/evgen/bk-trees/mysql-4.1-opt
into moonbone.local:/work/tmp_merge-5.0-opt-mysql


mysql-test/r/cast.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
2006-06-17 01:57:25 +04:00
unknown
fd7d4d7429 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.


sql/item_strfunc.cc:
  Fixed bug#15351: Wrong collation used for comparison of md5() and sha()
  argument can lead to a wrong result.
  Item_func_md5::fix_length_and_dec() and Item_func_sha::fix_length_and_dec()
  functions now set binary collation on their arguments.
mysql-test/r/func_str.result:
   Added test case for the bug#15351: Wrong collation used for comparison of md5() and sha()
  argument can lead to a wrong result.
mysql-test/t/func_str.test:
  Added test case for the bug#15351: Wrong collation used for comparison of md5() and sha()
  argument can lead to a wrong result.
2006-05-28 22:01:38 +04:00