Commit graph

1055 commits

Author SHA1 Message Date
unknown
d4ba395aa6 Merge mysql.com:/home/ram/work/b29928.new/b29928.new.5.0
into  mysql.com:/home/ram/work/b29928.new/b29928.new.5.1


mysql-test/r/mysqlbinlog.result:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
mysql-test/t/mysqlbinlog.test:
  manual merge
2007-08-01 15:31:20 +05:00
unknown
f87acb594a Fix for bug #29928: INSERT ... VALUES(connection_id(), ...) incorrect
restores from mysqlbinlog out

Problem: using "mysqlbinlog | mysql" for recoveries the connection_id() 
result may differ from what was used when issuing the statement.

Fix: if there is a connection_id() in a statement, write to binlog
SET pseudo_thread_id= XXX; before it and use the value later on.


mysql-test/r/mysqlbinlog.result:
  Fix for bug #29928: INSERT ... VALUES(connection_id(), ...) incorrect 
  restores from mysqlbinlog out
    - test result.
mysql-test/t/mysqlbinlog.test:
  Fix for bug #29928: INSERT ... VALUES(connection_id(), ...) incorrect 
  restores from mysqlbinlog out
    - test case.
sql/item_create.cc:
  Fix for bug #29928: INSERT ... VALUES(connection_id(), ...) incorrect 
  restores from mysqlbinlog out
    - set thread_specific_used flag for the connection_id() function.
sql/item_func.cc:
  Fix for bug #29928: INSERT ... VALUES(connection_id(), ...) incorrect 
  restores from mysqlbinlog out
    - always return thd->variables.pseudo_thread_id as a connection_id() 
  result, as it contains a proper value for both master and slave.
sql/log_event.cc:
  Fix for bug #29928: INSERT ... VALUES(connection_id(), ...) incorrect 
  restores from mysqlbinlog out
    - set LOG_EVENT_THREAD_SPECIFIC_F event flag if thread_specific_used
  is set.
sql/sql_class.cc:
  Fix for bug #29928: INSERT ... VALUES(connection_id(), ...) incorrect 
  restores from mysqlbinlog out
    - thd->thread_specific_used introduced, which is set if thread specific 
  value(s) used in a statement.
sql/sql_class.h:
  Fix for bug #29928: INSERT ... VALUES(connection_id(), ...) incorrect 
  restores from mysqlbinlog out
    - thd->thread_specific_used introduced, which is set if thread specific 
  value(s) used in a statement.
2007-08-01 15:27:03 +05:00
unknown
5ad9525672 Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt


sql/item_func.h:
  Auto merged
mysql-test/r/sp.result:
  Merge with 5.0-opt.
mysql-test/t/sp.test:
  Merge with 5.0-opt.
sql/item_func.cc:
  Merge with 5.0-opt.
2007-07-22 00:53:01 +05:00
unknown
36f1e4848c Fixed bug #29338.
Optimization of queries with DETERMINISTIC functions in the
WHERE clause was not effective: sequential scan was always
used.
Now a SF with the DETERMINISTIC flags is treated as constant
when it's arguments are constants (or a SF doesn't has arguments).


sql/item_func.h:
  Fixed bug #29338.
  The Item_func_sp::used_tables has been removed
  (virtual Item_func::used_tables function is enough).
  The virtual Item_func_sp::update_used_tables function
  has been added.
sql/item_func.cc:
  Fixed bug #29338.
  The Item_func_sp::update_used_tables and the
  Item_func_sp::fix_field functions have been modified
  to take into account the DETERMINISTIC flag of SF definition.
mysql-test/r/sp.result:
  Updated test case for bug #29338.
mysql-test/t/sp.test:
  Updated test case for bug #29338.
2007-07-19 18:39:01 +05: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
b1dc106bf0 Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.0-opt-28625


sql/item_func.cc:
  Auto merged
2007-06-16 13:49:26 +05:00
unknown
1b9f594f4a Fixed bug #28625:
DECIMAL column was used instead of BIGINT for the minimal possible
BIGINT (-9223372036854775808).

The Item_func_neg::fix_length_and_dec has been adjusted to
to inherit the type of the argument in the case when it's an 
Item_int object whose value is equal to LONGLONG_MIN.


sql/item_func.cc:
  Fixed bug #28625.
  The Item_func_neg::fix_length_and_dec has been adjusted to
  to inherit the type of the argument in the case when it's an 
  Item_int object whose value is equal to LONGLONG_MIN.
mysql-test/t/bigint.test:
  Added test result for bug #28625.
mysql-test/r/bigint.result:
  Added test case for bug #28625.
2007-06-16 13:05:07 +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
167751b3f0 Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt
into  mysql.com:/d2/hf/mrg/mysql-5.1-opt


mysql-test/r/type_decimal.result:
  Auto merged
sql/item_func.cc:
  Auto merged
2007-06-14 16:35:20 +05:00
unknown
c0ebdff9c7 Fixed bug #28980: the result of ROUND(<decimal expr>,<int column>)
was erroneously converted to double, while the result of
ROUND(<decimal expr>, <int literal>) was preserved as decimal.
As a result of such a conversion the value of ROUND(D,A) could
differ from the value of ROUND(D,val(A)) if D was a decimal expression.

Now the result of the ROUND function is never converted to 
double if the first argument is decimal.  


mysql-test/r/type_decimal.result:
  Added a test case for bug #28980.
mysql-test/t/type_decimal.test:
  Added a test case for bug #28980.
2007-06-13 09:32:36 -07:00
unknown
95ef943b9e 5.0-opt -> 5.1-opt merge 2007-06-12 18:41:56 +03:00
unknown
e53dfc6df4 Merge bk-internal:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/merge-5.1-opt


mysql-test/r/insert_update.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/t/insert_update.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/item_func.cc:
  merge of 5.0-opt -> 5.1-opt
sql/sql_insert.cc:
  merge of 5.0-opt -> 5.1-opt
sql/structs.h:
  merge of 5.0-opt -> 5.1-opt
tests/mysql_client_test.c:
  merge of 5.0-opt -> 5.1-opt
2007-06-12 16:34:54 +03:00
unknown
030bb02b69 Bug #28992: trigger fails in pushbuild
- fixed wrong test case for bug 20903
 - closed the dangling connections in trigger.test
 - GET_LOCK() and RELEASE_LOCK() now produce more detailed log
 - fixed an omission in GET_LOCK() : assign the thread_id when
    acquiring the lock.


mysql-test/r/trigger.result:
  Bug #28992: test case updated
mysql-test/t/trigger.test:
  Bug #28992: test case updated. dangling connections closed.
sql/item_func.cc:
  Bug #28992: 
   - GET_LOCK() and RELEASE_LOCK() now produce more detailed log
   - fixed an omission in GET_LOCK() : assign the thread_id when
      acquiring the lock.
2007-06-12 14:35:36 +03:00
unknown
f4caa3025a Merge olga.mysql.com:/home/igor/mysql-5.1
into  olga.mysql.com:/home/igor/mysql-5.1-opt-merge


mysql-test/r/alter_table.result:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/user_var.result:
  Auto merged
mysql-test/t/alter_table.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/strict.test:
  Auto merged
mysql-test/t/subselect3.test:
  Auto merged
sql/field.h:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Manual merge.
mysql-test/r/ps_3innodb.result:
  Manual merge.
mysql-test/r/ps_4heap.result:
  Manual merge.
mysql-test/r/ps_5merge.result:
  Manual merge.
mysql-test/r/ps_7ndb.result:
  Manual merge.
sql/sql_table.cc:
  Manual merge.
sql/sql_view.cc:
  Manual merge.
2007-06-03 22:52:02 -07:00
unknown
92fb5da372 item_func.h, item_func.cc:
Post merge fix for the bug#28494.


sql/item_func.h:
  Post merge fix for the bug#28494.
sql/item_func.cc:
  Post merge fix for the bug#28494.
2007-06-03 21:52:00 +04:00
unknown
687191a078 Merge moonbone.local:/mnt/gentoo64/work/test-5.0-opt-mysql
into  moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql


mysql-test/r/user_var.result:
  Auto merged
mysql-test/t/user_var.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
2007-06-03 16:06:55 +04:00
unknown
e19dcfa91f user_var.result:
Corrected test case result for the bug#28494.
item_func.h, item_func.cc:
  Corrected function names after fix for the bug#28494.


mysql-test/r/user_var.result:
  Corrected test case result for the bug#28494.
sql/item_func.h:
  Corrected function names after fix for the bug#28494.
sql/item_func.cc:
  Corrected function names after fix for the bug#28494.
2007-06-03 15:56:48 +04:00
unknown
8b0afa63fb Merge moonbone.local:/mnt/gentoo64/work/test-5.0-opt-mysql
into  moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql


sql/item_func.cc:
  Manually merged
2007-06-03 09:17:31 +04:00
unknown
684653b89e item_func.cc:
Post fix for bug#28494.
  The Item_func_set_user_var::check method now silently doesn't use result_field
  if it isn't defined.


sql/item_func.cc:
  Post fix for bug#28494.
  The Item_func_set_user_var::check method now silently doesn't use result_field
  if it isn't defined.
2007-06-03 01:24:56 +04:00
unknown
45714d35ad Merge moonbone.local:/mnt/gentoo64/work/test-5.0-opt-mysql
into  moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql


sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
mysql-test/r/user_var.result:
  Manual merge
mysql-test/t/user_var.test:
  Manual merge
2007-06-02 23:49:52 +04:00
unknown
8ab1830f9a Bug#28494: Grouping by Item_func_set_user_var produces incorrect result.
This is an additional fix.
Item::val_xxx methods are supposed to use original data source and
Item::val_xxx_result methods to use the item's result field. But for the
Item_func_set_user_var class val_xxx_result methods were mapped to val_xxx
methods. This leads, in particular, to producing bad sort keys and thus
wrong order of the result set of queries with group by/order by clauses.

The set of val_xxx_result methods is added to the Item_func_set_user_var
class. It's the same as the val_xxx set of method but uses the result_field
to return a value.


mysql-test/t/user_var.test:
  Corrected test case for hte bug#28494.
mysql-test/r/user_var.result:
  Corrected test case for hte bug#28494.
sql/item_func.cc:
  Bug#28494: Grouping by Item_func_set_user_var produces incorrect result.
  The set of val_xxx_result methods is added to the Item_func_set_user_var
  class. It's the same as the val_xxx set of method but uses the result_field
  to return a value.
sql/item_func.h:
  Bug#28494: Grouping by Item_func_set_user_var produces incorrect result.
  The set of val_xxx_result methods is added to the Item_func_set_user_var
  class.
2007-06-02 23:17:46 +04:00
unknown
63791f4cc4 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime


client/mysqlbinlog.cc:
  Auto merged
include/config-win.h:
  Auto merged
include/my_global.h:
  Auto merged
include/my_pthread.h:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
sql/event_data_objects.cc:
  Auto merged
sql/event_queue.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_xmlfunc.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_list.h:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_test.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/heap/hp_hash.c:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
sql/item_func.cc:
  Manual merge.
sql/sp.cc:
  Manual merge.
sql/sql_cache.cc:
  Manual merge.
sql/sql_table.cc:
  Manual merge.
strings/my_vsnprintf.c:
  Manual merge.
2007-06-01 12:12:06 +04:00
unknown
81ffede7fc Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-opt


client/mysqldump.c:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/field_conv.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/my_decimal.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
strings/decimal.c:
  Auto merged
sql/sql_update.cc:
  Manual merge
2007-06-01 06:33:37 +02:00
unknown
5d5c66fb66 Merge gleb.loc:/home/uchum/work/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/mysql-5.1-opt


mysql-test/r/user_var.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/user_var.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
mysql-test/t/view.test:
  Merge with 5.0-opt.
2007-06-01 03:05:25 +05:00
unknown
b4a35cd76e Bug#28494: Grouping by Item_func_set_user_var produces incorrect result.
The end_update() function uses the Item::save_org_in_field() function to
save original values of items into the group buffer. But for the 
Item_func_set_user_var this method was mapped to the save_in_field method.
The latter function wrongly decides to use the result_field. This leads to
saving incorrect value in the grouping buffer and wrong result of the whole
query.

The can_use_result_field argument of the bool type is added to the
Item_func_set_user_var::save_in_field() function. If it is set to FALSE
then the item's result field won't be used. Otherwise it will be detected
whether the result field will be used (old behaviour).
Two wrapping functions for the function above are added to the 
Item_func_set_user_var class:
the save_in_field(Field *field, bool no_conversions) - it calls the above
function with the can_use_result_field set to TRUE.
the save_org_in_field(Field *field) - same, but the can_use_result_field
is set to FALSE.


mysql-test/t/user_var.test:
  Added a test case for the bug#28494: Grouping by Item_func_set_user_var
  produces incorrect result.
mysql-test/r/user_var.result:
  Added a test case for the bug#28494: Grouping by Item_func_set_user_var
  produces incorrect result.
sql/item_func.cc:
  Bug#28494: Grouping by Item_func_set_user_var produces incorrect result.
  The can_use_result_field argument of the bool type is added to the
  Item_func_set_user_var::save_in_field() function. If it is set to FALSE
  then the item's result field won't be used. Otherwise it will be detected
  whether the result field will be used (old behaviour).
sql/item_func.h:
  Bug#28494: Grouping by Item_func_set_user_var produces incorrect result.
  The can_use_result_field argument of the bool type is added to the
  Item_func_set_user_var::save_in_field() function.
  Two wrapping functions for the function above are added to the 
  Item_func_set_user_var class:
  the save_in_field(Field *field, bool no_conversions) - it calls the above
  function with the can_use_result_field set to TRUE.
  the save_org_in_field(Field *field) - same, but the can_use_result_field
  is set to FALSE.
2007-06-01 01:17:14 +04:00
unknown
937d5f8966 Merge moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql


mysql-test/r/olap.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/field.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/analyse.result:
  Manual merge
mysql-test/r/sp.result:
  Manual merge
sql/item_timefunc.cc:
  Manual merge
2007-05-30 19:35:35 +04:00
unknown
b79b490993 Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/users/mhansson/mysql/autopush/my50-bug28250


sql/item_func.cc:
  Auto merged
2007-05-30 14:43:59 +02:00
unknown
d9426a89e4 Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  dl145s.mysql.com:/users/mhansson/mysql/autopush/my51-bug28250


sql/item_func.cc:
  Auto merged
2007-05-30 10:31:41 +02:00
unknown
9e06efb45c Bug #28605: SHOW CREATE VIEW with views using stored_procedures no
longer showing SP names.
SHOW CREATE VIEW uses Item::print() methods to reconstruct the 
statement text from the parse tree.
The print() method for stored procedure calls needs allocate 
space to print the function's quoted name.
It was incorrectly calculating the length of the buffer needed 
(was too short).
Fixed to reflect the actual space needed.


mysql-test/r/sp.result:
  Bug #28605: test case
mysql-test/t/sp.test:
  Bug #28605: test case
sql/item_func.cc:
  Bug #28605: fixed the string length calculation
2007-05-29 14:45:30 +03:00
unknown
7782446197 Merge dl145s.mysql.com:/users/mhansson/mysql/push/bug28250/my50-bug28250
into  dl145s.mysql.com:/users/mhansson/mysql/push/bug28250/my51-bug28250


mysql-test/t/cast.test:
  Auto merged
sql/item_func.cc:
  Auto merged
2007-05-29 11:16:30 +02:00
unknown
7c5aa30f04 Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-opt


BitKeeper/deleted/.del-ps_6bdb.result:
  Auto merged
client/mysqldump.c:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
sql/field.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/my_decimal.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
2007-05-28 06:25:03 +02:00
unknown
11dd353e12 Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-opt


client/mysqldump.c:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/ps_6bdb.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
sql/field.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/my_decimal.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
2007-05-28 00:05:38 +02:00
unknown
4f9d984572 Merge gleb.loc:/home/uchum/work/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/mysql-5.1-opt


client/mysqldump.c:
  Auto merged
mysql-test/r/join_outer.result:
  Auto merged
mysql-test/r/kill.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/join_outer.test:
  Auto merged
mysql-test/t/kill.test:
  Auto merged
sql/field.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
mysql-test/r/mysqldump.result:
  Merge with 5.0-opt
mysql-test/t/mysqldump.test:
  Merge with 5.0-opt
mysql-test/t/view.test:
  Merge with 5.0-opt
sql/sql_select.cc:
  Merge with 5.0-opt
2007-05-28 00:22:44 +05:00
unknown
ee7088e730 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  vajra.(none):/opt/local/work/mysql-5.1-runtime


include/my_global.h:
  Auto merged
mysql-test/include/mix1.inc:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysql-test/r/type_date.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/type_date.test:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
2007-05-24 19:34:14 +04:00
unknown
6e84990797 Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel


BitKeeper/etc/ignore:
  auto-union
client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
extra/comp_err.c:
  Auto merged
include/decimal.h:
  Auto merged
include/my_getopt.h:
  Auto merged
include/my_global.h:
  Auto merged
include/my_sys.h:
  Auto merged
include/mysql.h:
  Auto merged
mysys/array.c:
  Auto merged
mysys/hash.c:
  Auto merged
mysys/typelib.c:
  Auto merged
sql/derror.cc:
  Auto merged
sql/event_data_objects.cc:
  Auto merged
sql/event_queue.cc:
  Auto merged
sql/field.cc:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/ha_partition.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  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_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/my_decimal.cc:
  Auto merged
sql/my_decimal.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/protocol.h:
  Auto merged
sql/rpl_utility.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_connect.cc:
  Auto merged
sql/sql_delete.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_partition.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/structs.h:
  Auto merged
sql/table.h:
  Auto merged
sql/tztime.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/example/ha_example.cc:
  Auto merged
storage/federated/ha_federated.cc:
  Auto merged
storage/heap/ha_heap.cc:
  Auto merged
storage/innobase/handler/ha_innodb.h:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/sort.c:
  Auto merged
storage/myisammrg/ha_myisammrg.cc:
  Auto merged
storage/ndb/tools/restore/consumer_restore.cpp:
  Auto merged
strings/decimal.c:
  Auto merged
strings/strtod.c:
  Auto merged
include/hash.h:
  Manual merge with 5.1 main tree.
mysys/my_getopt.c:
  Manual merge with 5.1 main tree.
sql/field.h:
  Manual merge with 5.1 main tree.
sql/ha_ndbcluster.cc:
  Manual merge with 5.1 main tree.
sql/item_cmpfunc.h:
  Manual merge with 5.1 main tree.
sql/item_create.cc:
  Manual merge with 5.1 main tree.
sql/item_func.h:
  Manual merge with 5.1 main tree.
sql/key.cc:
  Manual merge with 5.1 main tree.
sql/lock.cc:
  Manual merge with 5.1 main tree.
sql/mysqld.cc:
  Manual merge with 5.1 main tree.
sql/set_var.cc:
  Manual merge with 5.1 main tree.
sql/set_var.h:
  Manual merge with 5.1 main tree.
sql/sql_base.cc:
  Manual merge with 5.1 main tree.
sql/sql_handler.cc:
  Manual merge with 5.1 main tree.
sql/sql_insert.cc:
  Manual merge with 5.1 main tree.
sql/sql_plugin.cc:
  Manual merge with 5.1 main tree.
sql/sql_table.cc:
  Manual merge with 5.1 main tree.
sql/sql_yacc.yy:
  Manual merge with 5.1 main tree.
sql/table.cc:
  Manual merge with 5.1 main tree.
storage/innobase/handler/ha_innodb.cc:
  Manual merge with 5.1 main tree.
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp:
  Manual merge with 5.1 main tree.
storage/ndb/tools/restore/restore_main.cpp:
  Manual merge with 5.1 main tree.
2007-05-24 13:24:36 +03:00
unknown
c57d6f729d Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/27563-bug-5.0-opt-mysql


sql/item_func.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
2007-05-23 23:31:33 +04:00
unknown
1734b4e990 Bug#27563: Stored functions and triggers wasn't throwing an error when killed.
If a stored function or a trigger was killed it had aborted but no error
was thrown. This allows the caller statement to continue without a notice.
This may lead to a wrong data being inserted/updated to/deleted as in such
cases the correct result of a stored function isn't guaranteed. In the case
of triggers it allows the caller statement to ignore kill signal and to
waste time because of re-evaluation of triggers that always will fail
because thd->killed flag is still on.

Now the Item_func_sp::execute() and the sp_head::execute_trigger() functions
check whether a function or a trigger were killed during execution and
throws an appropriate error if so.
Now the fill_record() function stops filling record if an error was reported
through thd->net.report_error.


sql/item_func.cc:
  Bug#27563: Stored functions and triggers wasn't throwing an error when killed.
  Now the Item_func_sp::execute() function checks whether a trigger was killed
  during execution and throws an appropriate error if so.
sql/sp_head.cc:
  Bug#27563: Stored functions and triggers wasn't throwing an error when killed.
  Now the sp_head::execute_trigger() function checks whether a function was
  killed during execution and throws an appropriate error if so.
sql/sql_base.cc:
  Bug#27563: Stored functions and triggers wasn't throwing an error when killed.
  Now the fill_record() function stops filling record if an error was reported
  through thd->net.report_error.
mysql-test/r/kill.result:
  Added a test case for the bug#27563: Stored functions and triggers wasn't
  throwing an error when killed.
mysql-test/t/kill.test:
  Added a test case for the bug#27563: Stored functions and triggers wasn't
  throwing an error when killed.
2007-05-23 23:24:16 +04:00
unknown
8998080a37 Bug #28250: Run-Time Check Failure #3 - The variable 'value' is
being used without being def

Inside method Item_func_unsigned::val_int, the variable value 
can be returned without being initialized when the CAST argument
is of type DECIMAL and has a NULL value. This gives a run-time 
error when building debug binaries using Visual C++ 2005.

Solution: Initialize value to 0


mysql-test/t/cast.test:
  bug#28250: There is no need for an extra test case, but we
  recognize that this one catches the bug.
sql/item_func.cc:
  bug#28250: initialization of value.
2007-05-23 14:43:06 +02:00
unknown
ad4da53510 Merge adventure.(none):/home/thek/Development/cpp/bug26277/my51-bug26277
into  adventure.(none):/home/thek/Development/cpp/mysql-5.1-runtime


mysql-test/t/sp-vars.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
mysql-test/r/sp-vars.result:
  manual merge
2007-05-18 14:29:24 +02:00
unknown
755ae21b82 Bug#26277 User variable returns one type in SELECT @v and other for CREATE as SELECT @v
- Adding variable m_cached_result_type to keep the variable type consistent
  during the execution of a statement.
- Before each result set is returned to the client the description of each
  column is sent as meta data.
  Previously the result type for a column could change if the hash variable
  entry changed between statements. This caused the result set of the query
  to alternate column types in certain cases which is not supported by MySQL
  client-server protocol. Example:
  Previously this sequence:
    SET @a:=1;
    SELECT @a:="text", @a;
  would return "text", "text";
 
  After the change the SELECT returns "text", 0
  The reson for this is that previously the result set from 'SELECT @a;'
  would always be of the type STRING, whereas now the type of the variable
  is taken from the last SET statement. However, 'SELECT @a:="text"' will
  return type of STRING since the right side of the assignment is used.


mysql-test/r/ps_2myisam.result:
  Changed test result because SQL type of a user variable now
  more accurately represents its Item type: since Item type of a variable
  can be either STRING, INT, DECIMAL or DOUBLE, SQL type of the
  result set metadata now can be either MYSQL_TYPE_VARCHAR,
  MYSQL_TYPE_LONGLONG, MYSQL_TYPE_NEWDECIMAL or MYSQL_TYPE_DOUBLE.
  
  Previously it was always MYSQL_TYPE_VARCHAR.
  
  In particular, integer variables now have changed from
  MYSQL_TYPE_VARCHAR to MYSQL_TYPE_LONGLONG.
mysql-test/r/ps_3innodb.result:
  Changed test result because SQL type of a user variable now
  more accurately represents its Item type: since Item type of a variable
  can be either STRING, INT, DECIMAL or DOUBLE, SQL type of the
  result set metadata now can be either MYSQL_TYPE_VARCHAR,
  MYSQL_TYPE_LONGLONG, MYSQL_TYPE_NEWDECIMAL or MYSQL_TYPE_DOUBLE.
  
  Previously it was always MYSQL_TYPE_VARCHAR.
  
  In particular, integer variables now have changed from
  MYSQL_TYPE_VARCHAR to MYSQL_TYPE_LONGLONG.
mysql-test/r/ps_4heap.result:
  Changed test result because SQL type of a user variable now
  more accurately represents its Item type: since Item type of a variable
  can be either STRING, INT, DECIMAL or DOUBLE, SQL type of the
  result set metadata now can be either MYSQL_TYPE_VARCHAR,
  MYSQL_TYPE_LONGLONG, MYSQL_TYPE_NEWDECIMAL or MYSQL_TYPE_DOUBLE.
  
  Previously it was always MYSQL_TYPE_VARCHAR.
  
  In particular, integer variables now have changed from
  MYSQL_TYPE_VARCHAR to MYSQL_TYPE_LONGLONG.
mysql-test/r/ps_5merge.result:
  Changed test result because SQL type of a user variable now
  more accurately represents its Item type: since Item type of a variable
  can be either STRING, INT, DECIMAL or DOUBLE, SQL type of the
  result set metadata now can be either MYSQL_TYPE_VARCHAR,
  MYSQL_TYPE_LONGLONG, MYSQL_TYPE_NEWDECIMAL or MYSQL_TYPE_DOUBLE.
  
  Previously it was always MYSQL_TYPE_VARCHAR.
  
  In particular, integer variables now have changed from
  MYSQL_TYPE_VARCHAR to MYSQL_TYPE_LONGLONG.
mysql-test/r/ps_7ndb.result:
  Changed test result because SQL type of a user variable now
  more accurately represents its Item type: since Item type of a variable
  can be either STRING, INT, DECIMAL or DOUBLE, SQL type of the
  result set metadata now can be either MYSQL_TYPE_VARCHAR,
  MYSQL_TYPE_LONGLONG, MYSQL_TYPE_NEWDECIMAL or MYSQL_TYPE_DOUBLE.
  
  Previously it was always MYSQL_TYPE_VARCHAR.
  
  In particular, integer variables now have changed from
  MYSQL_TYPE_VARCHAR to MYSQL_TYPE_LONGLONG.
mysql-test/r/sp-vars.result:
  Added test case. Previously variables could change their variable type during 
  the execution of a statement.
  Which variable type to use in the statement is specified in
  any previous statement.
mysql-test/r/type_date.result:
  This test case result is changed because it is no longer allowed for user
  variables to change their variable type during the execution of a statement.
  The determination of which variable type to use in the statement is specified in
  any previous statement.
mysql-test/r/user_var.result:
  This test case result is changed because it is no longer allowed for user
  variables to change their variable type during the execution of a statement.
  The determination of which variable type to use in the statement is specified in
  any previous statement.
mysql-test/t/sp-vars.test:
  Added test case. Previously variables could change their variable type during 
  the execution of a statement.
  Which variable type to use in the statement is specified in
  any previous statement.
mysql-test/t/type_date.test:
  This test case result is changed because it is no longer allowed for user
  variables to change their variable type during the execution of a statement.
  The determination of which variable type to use in the statement is specified in
  any previous statement.
sql/item_func.cc:
  Adding variable m_cached_result_type to keep the variable type consistent
  during the execution of a statement.
  Previously the result type could change if the hash variable entry changed
  between statements. This caused the result set of the query to alternate
  column types in certain cases.
sql/item_func.h:
  Adding variable m_cached_result_type to keep the variable type consistent
  during the execution of a statement.
  Previously the result type could change if the hash variable entry changed
  between statements. This caused the result set of the query to alternate
  column types in certain cases.
2007-05-18 12:44:03 +02:00
unknown
5ad7fdfa95 Merge siva.hindu.god:/home/tsmith/m/bk/51
into  siva.hindu.god:/home/tsmith/m/bk/maint/51


client/mysqltest.c:
  Auto merged
configure.in:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/type_datetime.result:
  Auto merged
mysql-test/t/outfile.test:
  Auto merged
mysql-test/t/type_datetime.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  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_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/my_decimal.cc:
  Auto merged
sql/my_decimal.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/structs.h:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
2007-05-17 14:21:35 -06:00
unknown
ce5f0d1bc3 Merge siva.hindu.god:/home/tsmith/m/bk/50
into  siva.hindu.god:/home/tsmith/m/bk/maint/50


mysql-test/r/type_datetime.result:
  Auto merged
mysql-test/t/outfile.test:
  Auto merged
mysql-test/t/type_datetime.test:
  Auto merged
sql/field.cc:
  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_func.h:
  Auto merged
sql/my_decimal.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
2007-05-17 14:17:50 -06:00
unknown
9e1585ab8f Fix for bug #28240: "isinf()" cannot be used in C++ for lack of prototype
- Since isinf() portability across various platforms and
  compilers is a complicated question, we should not use
  it directly. Instead, the my_isinf() macro should be used,
  which is defined as an alias to the system-defined isinf()
  if it is safe to use, or a workaround implementation otherwise


configure.in:
  Added a check to define HAVE_ISINF only if it can be used
  in C++ code as well.
include/my_global.h:
  Define my_isinf() as an alias to isinf(), if it is available
  in both C and C++ code. Otherwise, define it to a workaround
  implementation.
sql/item_func.cc:
  Replaced isinf() with my_isinf().
strings/strtod.c:
  Replaced isinf() with my_isinf().
2007-05-16 10:10:02 +02:00
unknown
fc7ef4be71 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  vajra.(none):/opt/local/work/mysql-5.1-runtime


mysql-test/include/mix1.inc:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/ps_1general.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/ps_1general.test:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
sql/sql_insert.cc:
  SCCS merged
2007-05-15 17:54:11 +04:00
unknown
655efae884 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  vajra.(none):/opt/local/work/mysql-5.0-runtime


sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2007-05-15 13:56:09 +04:00
unknown
e7c2cbe9df Merge mysql.com:/home/hf/work/27957/my50-27957
into  mysql.com:/home/hf/work/27957/my51-27957


sql/item_func.cc:
  Auto merged
mysql-test/r/type_datetime.result:
  merging
mysql-test/t/type_datetime.test:
  merging
sql/my_decimal.h:
  merging
2007-05-11 20:58:25 +05:00
unknown
8bbe6f23db merging fixes
mysql-test/r/type_datetime.result:
  result fixed
mysql-test/t/type_datetime.test:
  testcase fixed
sql/item_func.cc:
  my_decimal_length_to_precision used
sql/my_decimal.h:
  merging fix
2007-05-11 20:56:22 +05:00
unknown
3f28924e03 Merge mysql.com:/home/hf/work/27921/my51-27921
into  mysql.com:/home/hf/work/27957/my51-27957


mysql-test/r/cast.result:
  Auto merged
sql/item_create.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/my_decimal.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2007-05-11 18:14:04 +05:00
unknown
78ed69c339 Merge mysql.com:/home/hf/work/27921/my50-27921
into  mysql.com:/home/hf/work/27957/my50-27957


mysql-test/r/cast.result:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/my_decimal.h:
  merging
2007-05-11 18:13:06 +05:00
unknown
563b1297bb Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/27957/my50-27957


sql/item_func.cc:
  Auto merged
2007-05-11 17:42:50 +05:00