Commit graph

1258 commits

Author SHA1 Message Date
unknown
fbbb60ce2f Merge moonbone.local:/work/27219-5.0-opt-mysql
into  moonbone.local:/work/27219-bug-5.1


sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/group_by.result:
  SCCS merged
mysql-test/t/group_by.test:
  SCCS merged
sql/item.cc:
  SCCS merged
sql/sql_lex.h:
  SCCS merged
2008-03-28 18:09:14 +03:00
unknown
7c156537cc Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-bugteam
into  moonbone.local:/work/27219-5.0-opt-mysql


sql/item.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2008-03-28 14:31:52 +03:00
unknown
9d661efd7f Bug#27219: Aggregate functions in ORDER BY.
Mixing aggregate functions and non-grouping columns is not allowed in the
ONLY_FULL_GROUP_BY mode. However in some cases the error wasn't thrown because
of insufficient check.

In order to check more thoroughly the new algorithm employs a list of outer
fields used in a sum function and a SELECT_LEX::full_group_by_flag.
Each non-outer field checked to find out whether it's aggregated or not and
the current select is marked accordingly.
All outer fields that are used under an aggregate function are added to the
Item_sum::outer_fields list and later checked by the Item_sum::check_sum_func
function.


mysql-test/t/group_by.test:
  Added a test case for the bug#27219: Aggregate functions in ORDER BY.
mysql-test/r/group_by.result:
  Added a test case for the bug#27219: Aggregate functions in ORDER BY.
sql/sql_select.cc:
  Bug#27219: Aggregate functions in ORDER BY.
  Implementation of new check for mixing non aggregated fields and aggregation
  function in the ONLY_FULL_GROUP_BY mode.
sql/sql_lex.cc:
  Bug#27219: Aggregate functions in ORDER BY.
  Initialization of the full_group_by_flag bitmap.
  SELECT_LEX::test_limit function doesn't reset ORDER BY
  clause anymore.
sql/sql_lex.h:
  Bug#27219: Aggregate functions in ORDER BY.
  The full_group_by_flag is added to the SELECT_LEX class.
sql/item_sum.h:
  Bug#27219: Aggregate functions in ORDER BY.
  The outer_fields list is added to the Item_sum class.
sql/mysql_priv.h:
  Bug#27219: Aggregate functions in ORDER BY.
  Defined a set of constants used in the new check for mixing non aggregated
  fields and sum functions in the ONLY_FULL_GROUP_BY_MODE.
sql/item_subselect.cc:
  Bug#27219: Aggregate functions in ORDER BY.
  The Item_in_subselect::select_in_like_transformer function now drops
  ORDER BY clause in all selects in a subquery.
sql/item_sum.cc:
  Bug#27219: Aggregate functions in ORDER BY.
  Now the Item_sum::check_sum_func function now checks whether fields in the
  outer_fields list are aggregated or not and marks selects accordingly.
sql/item.cc:
  Bug#27219: Aggregate functions in ORDER BY.
  Now the Item_field::fix_fields function checks whether the field is aggregated
  or not and marks its select_lex accordingly.
2008-03-27 19:49:32 +03:00
unknown
8e473edd48 Merge host.loc:/home/uchum/work/mysql-5.0
into  host.loc:/home/uchum/work/5.0-opt


configure.in:
  Auto merged
sql/item.cc:
  Auto merged
2008-03-27 20:05:51 +04:00
unknown
a451de2f59 Merge host.loc:/home/uchum/work/mysql-5.1
into  host.loc:/home/uchum/work/5.1-opt


client/mysqltest.c:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
2008-03-27 15:54:45 +04:00
unknown
eb2260dff0 Merge host.loc:/home/uchum/work/PA/5.0-opt-34763
into  host.loc:/home/uchum/work/5.1-opt


mysql-test/r/subselect3.result:
  Auto merged
mysql-test/t/subselect3.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
2008-03-20 00:30:37 +04:00
unknown
070a233415 Merge host.loc:/home/uchum/work/PA/5.0-opt-34763
into  host.loc:/home/uchum/work/5.0-opt


sql/item.cc:
  Auto merged
2008-03-20 00:29:50 +04:00
unknown
9699767c95 Fixed bug #34763.
Queries like:

  SELECT ROW(1, 2) IN (SELECT t1.a, 2)
    FROM t1 GROUP BY t1.a

or 

  SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2)
    FROM t1 GROUP BY t1.a

lead to assertion failure in the
Item_in_subselect::row_value_transformer method in debugging
build, or to unexpected error message in release build:

  ERROR 1247 (42S22): Reference '<list ref>' not supported (forward
                      reference in item list)

Unexpected error message and assertion failure have been
eliminated.


mysql-test/r/subselect3.result:
  Added test case for bug #34763.
mysql-test/t/subselect3.test:
  Added test case for bug #34763.
sql/item.cc:
  Fixed bug #34763.
  The Item_ref::fix_fields method has been modified to silently
  ignore not fixed outer references: by the definition, those
  references should be fixed later by the call to the
  fix_inner_refs function.
sql/item_subselect.cc:
  Fixed bug #34763.
  The Item_in_subselect::row_value_transformer method has been
  modified to eliminate assertion failure on not fixed outer
  references: by the definition those references are allowed in
  this context and should be fixed later by the call to the
  fix_inner_refs function.
2008-03-14 23:11:59 +04:00
unknown
e79249f81b Manual merge
configure.in:
  Auto merged
mysql-test/r/func_misc.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/partition.result:
  Auto merged
mysql-test/r/partition_symlink.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
mysql-test/t/partition.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/partition_info.cc:
  Auto merged
sql/partition_info.h:
  Auto merged
sql/rpl_rli.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_parse.cc:
  Manual merge. Needs later fix. New code in create table was not
  accepted. Needs to be added to mysql_create_table_no_lock().
2008-03-14 12:02:11 +01:00
unknown
ce86b14625 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
2008-03-14 09:48:57 +01:00
unknown
d6df18dd33 Merge kaamos.(none):/data/src/mysql-5.1
into  kaamos.(none):/data/src/opt/mysql-5.1-opt


client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
configure.in:
  Auto merged
include/my_global.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/include/mix1.inc:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/handler.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/item_sum.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/ndb/src/kernel/blocks/backup/Backup.hpp:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/func_time.result:
  Manual merge.
mysql-test/r/view.result:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
scripts/mysql_config.sh:
  Manual merge.
sql-common/client.c:
  Manual merge.
sql/sql_parse.cc:
  Manual merge.
2008-03-12 11:19:46 +03:00
unknown
09f8a4af63 Merge kaamos.(none):/data/src/mysql-5.0
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


client/mysql.cc:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/view.result:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
scripts/mysql_config.sh:
  Manual merge.
2008-03-12 10:59:15 +03:00
unknown
ccf7f74e52 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  mysql.com:/misc/mysql/34749/51-34749


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.h:
  Auto merged
2008-03-10 07:39:04 +01:00
unknown
0abcb8ca5e Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/34749/50-34749


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
2008-03-10 07:11:12 +01:00
unknown
111de516ab Merge mysql.com:/misc/mysql/34749/50-34749
into  mysql.com:/misc/mysql/34749/51-34749


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
sql/ha_ndbcluster_cond.cc:
  Auto merged
sql/ha_ndbcluster_cond.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.h:
  Auto merged
2008-03-10 07:07:56 +01:00
unknown
7b5da0aa77 Merge pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.1-engines
into  pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.1


configure.in:
  Auto merged
include/mysql/plugin.h:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/partition_innodb.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/partition_innodb.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
storage/myisam/mi_dynrec.c:
  Auto merged
2008-03-07 13:46:29 -08:00
unknown
1e8b11c656 Merge pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.0-engines
into  pcg5ppc.xiphis.org:/Network/Servers/anubis.xiphis.org/home/antony/work/merge.20080307/mysql-5.0


sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
2008-03-07 13:41:11 -08:00
unknown
05480a8863 Merge buzz.(none):/home/davi/mysql-5.0-runtime
into  buzz.(none):/home/davi/mysql-5.1-runtime


mysql-test/r/ps.result:
  Auto merged
mysql-test/t/limit.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/item.cc:
  Auto merged
mysql-test/suite/rpl/r/rpl_user_variables.result:
  Manual merge
mysql-test/suite/rpl/t/rpl_user_variables.test:
  Manual merge
sql/sql_yacc.yy:
  Manual merge
2008-02-28 20:22:50 -03:00
unknown
8b77945615 Post-merge fix for Bug 33851. The initialization order of members
must match the order which they were declared in the class definition. 


sql/item.cc:
  Fix initialization order, parameter was the last one declared.
2008-02-28 20:22:11 -03:00
unknown
1164e2bc7a Bug#33851 Passing UNSIGNED param to EXECUTE returns ERROR 1210
The problem is that passing anything other than a integer to a limit
clause in a prepared statement would fail. This limitation was introduced
to avoid replication problems (e.g: replicating the statement with a
string argument would cause a parse failure in the slave).

The solution is to convert arguments to the limit clause to a integer
value and use this converted value when persisting the query to the log.


mysql-test/r/limit.result:
  Update test case result.
mysql-test/r/ps.result:
  Add test case result for Bug#33851
mysql-test/r/rpl_user_variables.result:
  Test case result for replication of prepared statement with
  limit clause.
mysql-test/t/limit.test:
  Test parameters to limit clause.
mysql-test/t/ps.test:
  Add test case for Bug#33851
mysql-test/t/rpl_user_variables.test:
  Test replication of a parameter which value is converted.
sql/item.cc:
  Convert value to integer if it's a parameter to a limit clause.
sql/item.h:
  Flag signal that item is a parameter to a limit clause.
sql/item_func.cc:
  Const member functions, object is not mutated.
sql/sql_class.h:
  Const member functions, object is not mutated.
sql/sql_yacc.yy:
  Flag that item is a parameter to a limit clause.
2008-02-28 11:34:08 -03:00
unknown
a0eec8abbb Bug#34749: Server crash when using NAME_CONST() with an aggregate function
NAME_CONST('whatever', -1) * MAX(whatever) bombed since -1 was
not seen as constant, but as FUNCTION_UNARY_MINUS(constant)
while we are at the same time pretending it was a basic const
item. This confused the aggregate handlers in exciting ways.
We now make NAME_CONST() behave more consistently.


mysql-test/r/func_misc.result:
  show that a combination of NAME_CONST('x', -y) and an aggregate
  no longer crashes the server.
mysql-test/t/func_misc.test:
  show that a combination of NAME_CONST('x', -y) and an aggregate
  no longer crashes the server.
sql/ha_ndbcluster_cond.cc:
  tell cluster about "new" function type NEG_FUNC.
  (this was previous identified as UNKNOWN_FUNC,
  so we just handle it the same way, that's all.)
sql/ha_ndbcluster_cond.h:
  tell cluster about "new" function type NEG_FUNC.
  (this was previous identified as UNKNOWN_FUNC,
  so we just handle it the same way, that's all.)
sql/item.cc:
  make NAME_CONST() transparent in that type() of
  -constant is that of constant, not that of unary
  minus (id est, FUNC_ITEM).
sql/item.h:
  Move constructor to item.cc
sql/item_func.h:
  Revert Bug#30832; we can apply the magic more narrowly
  (just for NAME_CONST() rather than all Item_func_neg).
  
  Introduce new function type "NEG_FUNC."
2008-02-28 14:23:22 +01:00
unknown
a3e83048a3 Fix for Bug#30217: Views: changes in metadata behaviour
between 5.0 and 5.1.
  
The problem was that in the patch for Bug#11986 it was decided
to store original query in UTF8 encoding for the INFORMATION_SCHEMA.
This approach however turned out to be quite difficult to implement
properly. The main problem is to preserve the same IS-output after
dump/restore.
  
So, the fix is to rollback to the previous functionality, but also
to fix it to support multi-character-set-queries properly. The idea
is to generate INFORMATION_SCHEMA-query from the item-tree after
parsing view declaration. The IS-query should:
  - be completely in UTF8;
  - not contain character set introducers.
  
For more information, see WL4052.


mysql-test/include/ddl_i18n.check_views.inc:
  Add a test case for Bug#30217.
mysql-test/r/ddl_i18n_koi8r.result:
  Update result file.
mysql-test/r/ddl_i18n_utf8.result:
  Update result file.
mysql-test/r/information_schema.result:
  Update result file.
mysql-test/r/information_schema_db.result:
  Update result file.
mysql-test/r/mysqldump.result:
  Update result file.
mysql-test/r/show_check.result:
  Update result file.
mysql-test/t/ddl_i18n_koi8r.test:
  Add a test case for Bug#30217.
mysql-test/t/ddl_i18n_utf8.test:
  Add a test case for Bug#30217.
mysql-test/t/mysqldump.test:
  Add a test case for Bug#30217.
sql/ha_ndbcluster.cc:
  Add a parameter to print().
sql/item.cc:
  1. Add a parameter to print().
  2. Item_string::print():
        - Do not append character set introducer to the text literal
          if we're building a query for INFORMATION_SCHEMA;
        - Convert text literal to UTF8 if we're building a query
          for INFORMATION_SCHEMA.
sql/item.h:
  Add a parameter to print().
sql/item_cmpfunc.cc:
  Add a parameter to print().
sql/item_cmpfunc.h:
  Add a parameter to print().
sql/item_func.cc:
  Add a parameter to print().
sql/item_func.h:
  Add a parameter to print().
sql/item_geofunc.h:
  Add a parameter to print().
sql/item_row.cc:
  Add a parameter to print().
sql/item_row.h:
  Add a parameter to print().
sql/item_strfunc.cc:
  Add a parameter to print().
sql/item_strfunc.h:
  Add a parameter to print().
sql/item_subselect.cc:
  Add a parameter to print().
sql/item_subselect.h:
  Add a parameter to print().
sql/item_sum.cc:
  Add a parameter to print().
sql/item_sum.h:
  Add a parameter to print().
sql/item_timefunc.cc:
  Add a parameter to print().
sql/item_timefunc.h:
  Add a parameter to print().
sql/mysql_priv.h:
  Add a parameter to print().
sql/sp_head.cc:
  Add a parameter to print().
sql/sql_lex.cc:
  Add a parameter to print().
sql/sql_lex.h:
  Add a parameter to print().
sql/sql_parse.cc:
  Add a parameter to print().
sql/sql_select.cc:
  Add a parameter to print().
sql/sql_show.cc:
  Add a parameter to print().
sql/sql_test.cc:
  Add a parameter to print().
sql/sql_view.cc:
  Build INFORMATION_SCHEMA query from Item-tree.
sql/sql_yacc.yy:
  Build INFORMATION_SCHEMA query from Item-tree.
sql/table.h:
  Add a parameter to print().
2008-02-22 13:30:33 +03:00
unknown
f7c575e43c Merge mysql.com:/home/svoj/devel/mysql/BUG34289/mysql-5.0-engines
into  mysql.com:/home/svoj/devel/mysql/BUG34289/mysql-5.1-engines


mysql-test/r/func_misc.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
sql/item.cc:
  Auto merged
2008-02-20 21:22:21 +04:00
unknown
f802cd5123 BUG#34289 - Incorrect NAME_CONST substitution in stored procedures
breaks replication

NAME_CONST() didn't replicate constant character set and collation
correctly.

With this fix NAME_CONST() inherits collation from the value argument.


mysql-test/r/func_misc.result:
  A test case for BUG#34289.
mysql-test/t/func_misc.test:
  A test case for BUG#34289.
sql/item.cc:
  Inherit collation from value argument.
2008-02-19 18:16:17 +04:00
unknown
0ef346047d Fixed duplicate defition warning for bug 31887 2008-02-18 18:21:14 +02:00
unknown
02e7537f1c Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.1-opt
into  kaamos.(none):/data/src/opt/mysql-5.1-opt


sql/mysql_priv.h:
  Auto merged
sql/item.cc:
  SCCS merged
2008-02-17 16:59:26 +03:00
unknown
787dbacab2 Merge ssh://bk-internal.mysql.com//home/bk/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


sql/item.cc:
  Auto merged
2008-02-17 16:57:07 +03:00
unknown
695865fee9 Merge kaamos.(none):/data/src/mysql-5.1
into  kaamos.(none):/data/src/opt/mysql-5.1-opt


libmysqld/lib_sql.cc:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
BitKeeper/deleted/.del-rpl_ndb_charset.result:
  Auto merged
BitKeeper/deleted/.del-rpl_row_charset.result:
  Auto merged
BitKeeper/deleted/.del-rpl_row_charset.test:
  Auto merged
BitKeeper/deleted/.del-rpl_row_charset_innodb.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Manual merge.
mysql-test/r/sp.result:
  Manual merge.
2008-02-17 14:57:01 +03:00
unknown
4a834b4b12 Merge kaamos.(none):/data/src/mysql-5.0
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/sp.result:
  Manual merge.
mysql-test/t/sp.test:
  Manual merge.
2008-02-17 14:37:39 +03:00
unknown
e95c7b8a03 Merge magare.gmz:/home/kgeorge/mysql/work/B31887-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B31887-5.1-opt


sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
2008-02-16 10:48:33 +02:00
unknown
0529125af1 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31887-5.0-opt


sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
2008-02-15 18:34:03 +02:00
unknown
cc2e929ac4 Bug #31887: DML Select statement not returning same results
when executed in version 5

Zero fill is a field attribute only. So we can't always 
propagate  constants for zerofill fields : the values and 
expression results don't have that flag.

Fixed by converting the const value to a string and 
using that in const propagation when the context allows it. 
Disable const propagation for fields with ZEROFILL flag in
all the other cases.


mysql-test/r/compare.result:
  Bug #31887: test case
mysql-test/t/compare.test:
  Bug #31887: test case
sql/item.cc:
  Bug #31887: If the context allows conversion
  of an int constant to a zero-filled string constant
  put the string constant instead of the int constant
  when doing const propagation
sql/mysql_priv.h:
  Bug #31887: a macro to get all the Field_num
  descendant fields.
2008-02-15 15:47:32 +02:00
unknown
9112390314 Merge kaamos.(none):/data/src/opt/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.1-opt


mysql-test/r/heap.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
BitKeeper/deleted/.del-bdb.result:
  Auto merged
mysql-test/r/strict.result:
  Auto merged
mysql-test/r/type_binary.result:
  Auto merged
mysql-test/r/type_set.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/r/warnings.result:
  Auto merged
mysql-test/t/range.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
mysql-test/t/warnings.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_func.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/mysqld.cc:
  Null merge.
mysql-test/include/mix1.inc:
  Manual merge.
mysql-test/r/innodb_mysql.result:
  Manual merge.
mysql-test/r/range.result:
  Manual merge.
mysql-test/r/sp.result:
  Manual merge.
mysql-test/t/sp.test:
  Manual merge.
sql/handler.cc:
  Manual merge.
2008-02-13 12:12:00 +03:00
unknown
c6610b5791 Merge mbp:src/opt/bug33389/my50-bug25162
into  kaamos.(none):/data/src/opt/mysql-5.0-opt


sql/item.cc:
  Auto merged
2008-02-12 22:51:01 +03:00
unknown
9b483c31f9 Merge mbp.:/Users/kaa/src/opt/bug33389/my50-bug25162
into  mbp.:/Users/kaa/src/opt/bug33389/my51-bug25162


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Manual merge.
sql/item.cc:
  Manual merge.
2008-02-12 22:21:33 +03:00
unknown
c1d0dd94bb Fix for Bug#32538: View definition picks up character set,
but not collation.

The problem here was that text literals in a view were always
dumped with character set introducer. That lead to loosing
collation information.

The fix is to dump character set introducer only if it was
in the original query. That is now possible because there 
is no problem any more of loss of character set of string
literals in views -- after WL#4052 the view is dumped 
in the original character set.


mysql-test/r/case.result:
  Update result file.
mysql-test/r/compress.result:
  Update result file.
mysql-test/r/ctype_collate.result:
  Update result file.
mysql-test/r/date_formats.result:
  Update result file.
mysql-test/r/ddl_i18n_koi8r.result:
  Update result file.
mysql-test/r/ddl_i18n_utf8.result:
  Update result file.
mysql-test/r/fulltext.result:
  Update result file.
mysql-test/r/func_crypt.result:
  Update result file.
mysql-test/r/func_encrypt.result:
  Update result file.
mysql-test/r/func_if.result:
  Update result file.
mysql-test/r/func_in.result:
  Update result file.
mysql-test/r/func_like.result:
  Update result file.
mysql-test/r/func_regexp.result:
  Update result file.
mysql-test/r/func_set.result:
  Update result file.
mysql-test/r/func_str.result:
  Update result file.
mysql-test/r/func_time.result:
  Update result file.
mysql-test/r/gis.result:
  Update result file.
mysql-test/r/group_min_max.result:
  Update result file.
mysql-test/r/mysqldump.result:
  Update result file.
mysql-test/r/negation_elimination.result:
  Update result file.
mysql-test/r/null.result:
  Update result file.
mysql-test/r/select.result:
  Update result file.
mysql-test/r/show_check.result:
  Update result file.
mysql-test/r/sp-code.result:
  Update result file.
mysql-test/r/ssl.result:
  Update result file.
mysql-test/r/ssl_compress.result:
  Update result file.
mysql-test/r/subselect.result:
  Update result file.
mysql-test/r/temp_table.result:
  Update result file.
mysql-test/r/type_blob.result:
  Update result file.
mysql-test/r/view.result:
  Update result file.
mysql-test/suite/binlog/r/binlog_stm_blackhole.result:
  Update result file.
mysql-test/suite/rpl/r/rpl_get_lock.result:
  Update result file.
mysql-test/suite/rpl/r/rpl_master_pos_wait.result:
  Update result file.
mysql-test/t/view.test:
  Add a test case for Bug#32538.
sql/item.cc:
  Do not dump character set introducer if it was not specified
  explicitly in the original query.
sql/item.h:
  Add 'cs_specified' property to Item_string.
sql/sql_yacc.yy:
  Set Item_string::cs_specified property to TRUE
  when character set introducer is explicitly specified.
2008-02-12 22:09:16 +03:00
unknown
d5092fa9ca Fix for bug #33389: Selecting from a view into a table from within SP
or trigger crashes server

Under some circumstances a combination of VIEWs, subselects with outer
references and PS/SP/triggers could lead to use of uninitialized memory
and server crash as a result.

Fixed by changing the code in Item_field::fix_fields() so that in cases
when the field is a VIEW reference, we first check whether the field
is also an outer reference, and mark it appropriately before returning.


mysql-test/r/view.result:
  Added a test case for bug #33389.
mysql-test/t/view.test:
  Added a test case for bug #33389.
sql/item.cc:
  In cases when in Item_field::fix_fields() from_field is a view reference,
  do not return too early, i.e. before marking the reference as an outer
  one when needed.
2008-02-12 12:43:55 +03:00
unknown
0c551b72de Manual merge of Bug 33798
mysql-test/extra/binlog_tests/binlog.test:
  Manual merge of binlog test case for Bug#33798
mysql-test/suite/binlog/r/binlog_row_binlog.result:
  Add test case result for Bug#33798
mysql-test/suite/binlog/r/binlog_stm_binlog.result:
  Add test case result for Bug#33798
sql/item.cc:
  Use new method which accepts a unsigned flag.
2008-02-08 10:47:25 -02:00
unknown
57c180c103 Merge mysql.com:/Users/davi/mysql/mysql-5.0-runtime
into  mysql.com:/Users/davi/mysql/mysql-5.1-runtime


mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/item.cc:
  Auto merged
mysql-test/extra/binlog_tests/binlog.test:
  Manual merge.
mysql-test/suite/binlog/r/binlog_stm_binlog.result:
  Manual merge.
2008-02-08 10:21:58 -02:00
unknown
7d98c21cdf Bug#33798 prepared statements improperly handle large unsigned ints
The unsignedness of large integer user variables was not being
properly preserved when feeded to prepared statements. This was
happening because the unsigned flags wasn't being updated when
converting the user variable is converted to a parameter.

The solution is to copy the unsigned flag when converting the
user variable to a parameter and take the unsigned flag into
account when converting the integer to a string.


mysql-test/r/binlog.result:
  Add test case result for Bug#33798
mysql-test/r/ps.result:
  Add test case result for Bug#33798
mysql-test/t/binlog.test:
  Add test case for Bug#33798
mysql-test/t/ps.test:
  Add test case for Bug#33798
sql/item.cc:
  Take the unsigned flag into account when converting the
  user variable.
2008-02-08 08:55:55 -02:00
unknown
e30a0dda8f Fixed bug #33833.
Two disjuncts containing equalities of the form key=const1 and key=const2 can
be merged into one if const1 is equal to const2. To check it the common 
collation of the constants were used rather than the collation of the field key.
For example when the default collation of the constants was cases insensitive
while the collation of the field was case sensitive, then two or-ed equality 
predicates key='b' and key='B' incorrectly were merged into one f='b'. As a 
result ref access was used instead of range access and wrong result sets were 
returned in many cases. 
Fixed the problem by comparing constant in the or-ed predicate with collation of
the key field.


mysql-test/r/range.result:
  Added a test case for bug #33833.
mysql-test/t/range.test:
  Added a test case for bug #33833.
sql/item.cc:
  Fixed bug #33833.
  Added the method eq_by_collation that compares two items almost as 
  the method Item::eq, but it rather enforces a given collation for
  the comparison.
sql/item.h:
  Fixed bug #33833.
  Added the method eq_by_collation that compares two items almost as 
  the method Item::eq, but it rather enforces a given collation for
  the comparison.
2008-01-26 21:45:35 -08:00
unknown
bf541d14f2 Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51


client/mysqldump.c:
  Auto merged
configure.in:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/handler.cc:
  Manual merge
sql/item.cc:
  Manual merge
2008-01-25 10:37:29 -07:00
unknown
6c26935035 Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51


client/mysqldump.c:
  Auto merged
configure.in:
  Auto merged
sql/field.cc:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/item_sum.cc:
  Manual merge.
2008-01-22 15:56:15 -07:00
unknown
c37689f181 Merge mhansson@bk-internal:/home/bk/mysql-5.1-opt
into  linux-st28.site:/home/martin/mysql/src/bug31797/my51-bug31797-pushee


mysql-test/r/group_by.result:
  Auto merged
mysql-test/t/group_by.test:
  Auto merged
sql/item.cc:
  Auto merged
2008-01-11 19:39:28 +01:00
unknown
ab0f3e4661 Merge linux-st28.site:/home/martin/mysql/src/bug31797/my50-bug31797
into  linux-st28.site:/home/martin/mysql/src/bug31797/my51-bug31797


sql/item.cc:
  Auto merged
mysql-test/r/group_by.result:
  Bug#31797: Manual merge
mysql-test/t/group_by.test:
  Bug#31797: Manual merge
2008-01-11 19:13:07 +01:00
unknown
7bd7e98812 Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  linux-st28.site:/home/martin/mysql/src/bug31797/my50-bug31797-pushee


sql/item.cc:
  Auto merged
mysql-test/r/group_by.result:
  Bug#31797: Manual merge
mysql-test/t/group_by.test:
  Bug#31797: Manual merge
2008-01-11 19:00:26 +01:00
unknown
df8e9fc234 Bug#31797: error while parsing subqueries -- WHERE is parsed as HAVING
The name resolution for correlated subqueries and HAVING clauses
failed to distinguish which of two was being performed when there 
was a reference to an outer aliased field.
Fixed by adding the condition that HAVING clause name resulotion
is being performed.


mysql-test/r/group_by.result:
  Bug#31797: Test result
mysql-test/t/group_by.test:
  Bug#31797: Test case
sql/item.cc:
  Bug#31797: 
  Corrected function comment.
  The fix, raising the error is restricted to HAVING name resolution.
2008-01-11 18:50:54 +01:00
unknown
c82a7b9497 Merge macbook.gmz:/Users/kgeorge/mysql/work/B33256-5.0-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B33256-5.1-opt


mysql-test/r/union.result:
  Auto merged
sql/field.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/type_decimal.result:
  merge of bug 33256 5.0-opt -> 5.1-opt
mysql-test/t/union.test:
  merge of bug 33256 5.0-opt -> 5.1-opt
sql/field.h:
  merge of bug 33256 5.0-opt -> 5.1-opt
sql/item.cc:
  merge of bug 33256 5.0-opt -> 5.1-opt
sql/item_sum.cc:
  merge of bug 33256 5.0-opt -> 5.1-opt
sql/item_timefunc.cc:
  merge of bug 33256 5.0-opt -> 5.1-opt
sql/item_timefunc.h:
  merge of bug 33256 5.0-opt -> 5.1-opt
2008-01-08 11:49:40 +02:00
unknown
baf5c2c132 Merge mhansson@bk-internal:/home/bk/mysql-5.1-opt
into  linux-st28.site:/home/martin/mysql/src/bug32848/my51-bug32848


sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/union.result:
  Bug#32848: Manual merge
mysql-test/t/union.test:
  Bug#32848: Manual merge
2007-12-21 14:52:39 +01:00
unknown
2ae4b047a3 Bug #33256: CREATE ... SELECT creates obsolete table
w/ Field_date instead of Field_newdate
  
Field_date was still used in temp table creation.
Fixed by using Field_newdate consistently throughout the server
except when reading tables defined with older MySQL version.
No test suite is possible because both Field_date and Field_newdate
return the same values in all the metadata calls. 


mysql-test/r/type_decimal.result:
  Bug #33256: removed redundant warnings
sql/field.h:
  Bug #33256: Add a constructor similar to Field_date::Field_date()
sql/item.cc:
  Bug #33256: Use Field_newdate instead of Field_date 
  for all temp tables and CREATE .. SELECT
sql/item_sum.cc:
  Bug #33256: Use Field_newdate instead of Field_date 
  for all temp tables and CREATE .. SELECT
sql/item_timefunc.cc:
  Bug #33256: Use Field_newdate instead of Field_date 
  for all temp tables and CREATE .. SELECT
sql/item_timefunc.h:
  Bug #33256: Use Field_newdate instead of Field_date 
  for all temp tables and CREATE .. SELECT
2007-12-21 12:44:24 +02:00