Commit graph

1220 commits

Author SHA1 Message Date
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
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
unknown
295732b580 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1


configure.in:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/field.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_geofunc.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/key.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/net_serv.cc:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/protocol.h:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  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/table.h:
  Auto merged
storage/archive/ha_archive.cc:
  Auto merged
storage/innobase/buf/buf0buf.c:
  Auto merged
storage/innobase/buf/buf0flu.c:
  Auto merged
storage/innobase/buf/buf0lru.c:
  Auto merged
storage/innobase/include/buf0buf.h:
  Auto merged
storage/innobase/include/buf0buf.ic:
  Auto merged
storage/innobase/include/sync0arr.h:
  Auto merged
storage/innobase/include/sync0rw.h:
  Auto merged
storage/innobase/include/sync0rw.ic:
  Auto merged
storage/innobase/include/sync0sync.h:
  Auto merged
storage/innobase/os/os0sync.c:
  Auto merged
storage/innobase/sync/sync0arr.c:
  Auto merged
storage/innobase/sync/sync0rw.c:
  Auto merged
storage/innobase/sync/sync0sync.c:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisammrg/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  merged
sql/item_cmpfunc.cc:
  merged
sql/protocol.cc:
  merged
sql/slave.cc:
  merged
sql/sql_class.h:
  merged
sql/sql_parse.cc:
  merged
2007-12-20 22:11:37 +01:00
unknown
fbb25b7cec Merge linux-st28.site:/home/martin/mysql/src/bug32848/my50-bug32848-gca
into  linux-st28.site:/home/martin/mysql/src/bug32848/my51-bug32848-gca


mysql-test/r/union.result:
  Auto merged
mysql-test/t/union.test:
  Auto merged
sql/field.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/field.cc:
  Bug#32848: Manual merge
sql/item.cc:
  Bug#32848: Manual merge
2007-12-20 14:19:52 +01:00
unknown
5480cbd69e Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  linux-st28.site:/home/martin/mysql/src/bug32848/my50-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-19 15:59:05 +01:00
unknown
18f5e87ed9 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint


sql/field.cc:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_create.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_geofunc.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/net_serv.cc:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/protocol.h:
  Auto merged
sql/records.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.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_prepare.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/structs.h:
  Auto merged
sql/unireg.h:
  Auto merged
sql/item.cc:
  manual merge
sql/log_event.cc:
  manual merge
sql/protocol.cc:
  manual merge
sql/sp_head.cc:
  manual merge
sql/sql_base.cc:
  manual merge
sql/sql_parse.cc:
  manual merge
sql/sql_select.cc:
  manual merge
2007-12-14 10:52:10 -05:00
unknown
214ea2063a Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


client/mysql.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
mysql-test/r/delayed.result:
  Auto merged
mysql-test/r/func_misc.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/range.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/type_datetime.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
mysql-test/include/mix1.inc:
  manual merge
mysql-test/r/innodb_mysql.result:
  manual merge
mysql-test/r/range.result:
  manual merge
sql/item_cmpfunc.cc:
  manual merge
2007-12-13 16:10:57 +04:00
unknown
9a10c20ba9 Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


BitKeeper/etc/ignore:
  auto-union
client/mysql.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/r/archive.result:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/delayed.result:
  Auto merged
mysql-test/r/func_misc.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/r/type_date.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_innodb_bug28430.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/type_date.test:
  Auto merged
mysql-test/t/type_datetime.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
mysys/queues.c:
  Auto merged
sql/events.cc:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.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_parse.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_string.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/lib/mtr_report.pl:
  manual merge
mysql-test/r/myisam.result:
  manual merge
mysql-test/r/partition.result:
  manual merge
mysql-test/r/user_var.result:
  manual merge
mysql-test/t/myisam.test:
  manual merge
mysql-test/t/partition.test:
  manual merge
mysql-test/t/user_var.test:
  manual merge
sql/item.h:
  manual merge
sql/item_func.cc:
  manual merge
storage/myisammrg/ha_myisammrg.cc:
  manual merge
2007-12-13 15:56:04 +04:00
unknown
33f82b1789 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


client/mysql.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
myisam/mi_check.c:
  Auto merged
mysql-test/r/delayed.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
mysql-test/t/type_datetime.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_myisam.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/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/func_misc.result:
  manual merge
mysql-test/r/innodb_mysql.result:
  manual merge
mysql-test/t/func_misc.test:
  manual merge
mysql-test/t/innodb_mysql.test:
  manual merge
sql/sql_insert.cc:
  manual merge
2007-12-13 14:52:49 +04:00
unknown
94f75ffcce Bug#32848: Data type conversion bug in union subselects in MySQL 5.0.38
There were two problems when inferring the correct field types resulting from
UNION queries.
- If the type is NULL for all corresponding fields in the UNION, the resulting 
  type would be NULL, while the type is BINARY(0) if there is just a single 
  SELECT NULL.
- If one SELECT in the UNION uses a subselect, a temporary table is created
  to represent the subselect, and the result type defaults to a STRING type,
  hiding the fact that the type was unknown(just a NULL value).
Fixed by remembering whenever a field was created from a NULL value and pass
type NULL to the type coercion if that is the case, and creating a string field
as result of UNION only if the type would otherwise be NULL.


mysql-test/r/union.result:
  Bug#32848: Test result
mysql-test/t/union.test:
  Bug#32848: Test case
sql/field.cc:
  Bug#32848: Initialization of new field
sql/field.h:
  Bug#32848: New member to record when a field was created from a NULL value.
sql/item.cc:
  Bug#32848: 
  A field created from a NULL value will submit NULL as type to the 
  type coercion procedure.
  If Item_type_holder has not inferred the correct type after processing all
  SELECTs in a UNION, a string field is created.
sql/sql_select.cc:
  Bug#32848: Recording when a field is created from a NULL value.
2007-12-11 20:15:03 +01:00
unknown
b1b2e0d053 Fixed bug #27545.
Both arguments of the function NAME_CONST must be constant expressions.
This constraint is checked in the Item_name_const::fix_fields method. 
Yet if the argument of the function was not a constant expression no
error message was reported. As a result the client hanged waiting for a
response.
Now the function Item_name_const::fix_fields reports an error message
when any of the additional context conditions imposed on the function
NAME_CONST is not satisfied. 


mysql-test/r/func_misc.result:
  Added a test case for bug #26545.
mysql-test/t/func_misc.test:
  Added a test case for bug #26545.
2007-12-07 23:36:58 -08:00
unknown
b9c4817058 Merge mysql.com:/home/ram/work/b32559/b32559.5.0
into  mysql.com:/home/ram/work/b32559/b32559.5.1


mysql-test/r/func_misc.result:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
mysql-test/t/func_misc.test:
  manual merge.
2007-11-29 10:23:30 +04:00
unknown
ba974f8371 Fix for bug #32559: connection hangs on query with name_const
Problem: passing a non-constant name to the NAME_CONST function results in a crash.

Fix: check the NAME_CONST name argument; return fake item type if we got
non-constant argument(s).


mysql-test/r/func_misc.result:
  Fix for bug #32559: connection hangs on query with name_const
    - test result.
mysql-test/t/func_misc.test:
  Fix for bug #32559: connection hangs on query with name_const
    - test case.
sql/item.cc:
  Fix for bug #32559: connection hangs on query with name_const
    - Item_name_const::type() now returns NULL_ITEM if non-constant arguments 
      were used to create the item to avoid wrong type casting.
sql/item.h:
  Fix for bug #32559: connection hangs on query with name_const
    - NAME_CONST name argument checked for invariability.
2007-11-27 09:36:43 +04:00
unknown
042a58e049 Merge magare.gmz:/home/kgeorge/mysql/work/B32400-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B32400-5.1-opt


BitKeeper/deleted/.del-ps_6bdb.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/suite/ndb/r/ps_7ndb.result:
  Auto merged
sql/item.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/t/subselect.test:
  merge of bug 32400 to 5.1-opt
2007-11-23 14:41:47 +02:00
unknown
870d46819e Bug #32400: Complex SELECT query returns correct result
only on some occasions

Referencing an element from the SELECT list in a WHERE 
clause is not permitted. The namespace of the WHERE
clause is the table columns only. This was not enforced
correctly when resolving outer references in sub-queries.

Fixed by not allowing references to aliases in a 
sub-query in WHERE.


mysql-test/include/ps_query.inc:
  Bug #32400: fixed old test queries
mysql-test/r/ps_2myisam.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_3innodb.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_4heap.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_5merge.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_6bdb.result:
  Bug #32400: fixed old test queries
mysql-test/r/ps_7ndb.result:
  Bug #32400: fixed old test queries
mysql-test/r/subselect.result:
  Bug #32400: test case
mysql-test/t/subselect.test:
  Bug #32400: test case
sql/item.cc:
  Bug #32400: don't allow references to aliases in WHERE
tests/mysql_client_test.c:
  Bug #32400: fixed old test queries
2007-11-20 19:18:21 +02:00
unknown
ad3e5aa856 Merge magare.gmz:/home/kgeorge/mysql/autopush/B31562-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B31562-5.1-opt


sql/item.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/lowercase_view.result:
  merge bug 31562 5.0->5.1: changed explain format
2007-11-13 19:15:49 +02:00
unknown
4bc635e2f1 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31562-5.0-opt


sql/item.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2007-11-13 19:00:45 +02:00
unknown
170ae2d252 Bug #31562: HAVING and lower case
The columns in HAVING can reference the GROUP BY and 
SELECT columns. There can be "table" prefixes when
referencing these columns. And these "table" prefixes
in HAVING use the table alias if available.
This means that table aliases are subject to the same
storage rules as table names and are dependent on 
lower_case_table_names in the same way as the table 
names are.
Fixed by :
1. Treating table aliases as table names
and make them lowercase when printing out the SQL
statement for view persistence.
2. Using case insensitive comparison for table 
aliases when requested by lower_case_table_names


mysql-test/r/lowercase_view.result:
  Bug #31562: test case
mysql-test/t/lowercase_view.test:
  Bug #31562: test case
sql/item.cc:
  Bug #31562: lower_case_table_name contious comparison
  when searching in GROUP BY
sql/sql_base.cc:
  Bug #31562: lower_case_table_name contious comparison
  when searching in SELECT
sql/sql_select.cc:
  Bug #31562: treat table aliases as table names
  and make them lowercase when printing
2007-11-13 11:39:52 +02:00
unknown
2892d3a2ab Merge gleb.loc:/home/uchum/5.0-opt
into  gleb.loc:/home/uchum/5.1-opt


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/sp_rcontext.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
mysql-test/r/subselect.result:
  Merge with 5.0-opt.
mysql-test/t/subselect.test:
  Merge with 5.0-opt.
2007-11-11 06:07:38 +04:00
unknown
e7c6a81f25 Fixed bug #28076: inconsistent binary/varbinary comparison.
After adding an index the <VARBINARY> IN (SELECT <BINARY> ...)
clause returned a wrong result: the VARBINARY value was illegally padded
with zero bytes to the length of the BINARY column for the index search.
(<VARBINARY>, ...) IN (SELECT <BINARY>, ... ) clauses are affected too.


sql/item.cc:
  Fixed bug #28076.
  The Item_cache_str::save_in_field method has been overloaded
  to check cached values for an illegal padding before the saving
  into a field.
sql/item.h:
  Fixed bug #28076.
  The Item_cache_str::is_varbinary flag has been added and the
  Item_cache_str::save_in_field method has been overloaded to prevent
  cached values from an illegal padding when saving in fields.
  The signature of the Item_cache::get_cache method has been
  changed to accept pointers to Item instead of Item_result
  values.
sql/item_cmpfunc.cc:
  Fixed bug #28076.
  The Item_in_optimizer::fix_left method has been modified to
  to call Item_cache::get_cache in a new manner.
sql/item_subselect.cc:
  Fixed bug #28076.
  The subselect_indexsubquery_engine::exec method has been
  modified to take into account field conversion errors
  (copy&paste from subselect_uniquesubquery_engine::exec).
sql/sp_rcontext.cc:
  Fixed bug #28076.
  The sp_rcontext::create_case_expr_holder method has been
  modified to call Item_cache::get_cache in a new manner.
sql/sp_rcontext.h:
  Fixed bug #28076.
  The sp_rcontext::create_case_expr_holder method signature
  has been modified to pass Item pointers to the
  Item_cache::get_cache method.
sql/sql_class.cc:
  Fixed bug #28076.
  The select_max_min_finder_subselect::send_data method has been
  modified to call Item_cache::get_cache in a new manner.
mysql-test/t/subselect.test:
  Added test case for bug #28076.
mysql-test/r/subselect.result:
  Added test case for bug #28076.
2007-11-10 23:44:48 +04:00
unknown
ee8ab6d9e6 Merge magare.gmz:/home/kgeorge/mysql/work/B30715-merged-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B30715-merged-5.1-opt


mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/type_decimal.result:
  Auto merged
mysql-test/t/func_group.test:
  Auto merged
mysql-test/t/type_decimal.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/opt_sum.cc:
  merge bug 30715 to 5.1-opt
2007-10-24 11:50:09 +03:00
unknown
4ea9a3d5cd Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/psergey/mysql-5.0-bug31450


sql/item.cc:
  Auto merged
mysql-test/r/type_decimal.result:
  Post-merge fixes
mysql-test/t/type_decimal.test:
  Post-merge fixes
2007-10-23 20:03:06 +04:00
unknown
53dac1ee1a BUG#31450: Query causes error 1048
- Let Item::save_in_field() call set_field_to_null_with_conversions() 
  for decimal type, like this is done for the other item result types.


mysql-test/r/type_decimal.result:
  BUG#31450: Query causes error 1048: testcase
mysql-test/t/type_decimal.test:
  BUG#31450: Query causes error 1048: testcase
2007-10-23 19:24:59 +04:00
unknown
95a8bb20fb Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


client/client_priv.h:
  Auto merged
client/mysqldump.c:
  Auto merged
include/config-win.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
storage/innobase/handler/ha_innodb.cc:
  Auto merged
storage/myisam/sort.c:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/query_cache.result:
  manual merge
mysql-test/include/mix1.inc:
  manual merge
mysql-test/r/innodb_mysql.result:
  manual merge
mysql-test/r/type_datetime.result:
  manual merge
mysql-test/r/type_decimal.result:
  manual merge
mysql-test/t/query_cache.test:
  manual merge
mysql-test/t/type_datetime.test:
  manual merge
mysql-test/t/type_decimal.test:
  manual merge
sql/item.cc:
  manual merge
2007-10-23 19:08:21 +05:00
unknown
8479eb1db7 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


client/mysqldump.c:
  Auto merged
include/config-win.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
myisam/sort.c:
  Auto merged
mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/type_datetime.result:
  manual merge
mysql-test/r/type_decimal.result:
  manual merge
mysql-test/t/type_datetime.test:
  manual merge
mysql-test/t/type_decimal.test:
  manual merge
sql/item.cc:
  manual merge
2007-10-23 18:51:43 +05:00
unknown
e7acb3ac71 Merge magare.gmz:/home/kgeorge/mysql/work/B28687-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B28687-5.1-opt


mysql-test/t/type_date.test:
  Auto merged
mysql-test/r/type_date.result:
  merge 5.0-opt -> 5.1-opt
sql/item.cc:
  merge 5.0-opt -> 5.1-opt
2007-10-23 11:22:59 +03:00
unknown
849bcf941f Bug #28687: Search fails on '0000-00-00' date after sql_mode change
When doing indexed search the server constructs a key image for 
faster comparison to the stored keys. While doing that it must not
perform (and stop if they fail) the additional date checks that can 
be turned on by the SQL mode because there already may be values in 
the table that don't comply with the error checks.
Fixed by ignoring these SQL mode bits while making the key image.


mysql-test/r/type_date.result:
  Bug #28687: test case
mysql-test/t/type_date.test:
  Bug #28687: test case
sql/item.cc:
  Bug #28687: no invalid date warnings
2007-10-22 19:32:18 +03: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
bf5bcb849f Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-base
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.1-rt-merge


client/mysqlcheck.c:
  Auto merged
client/mysqltest.c:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/include/mix1.inc:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/udf.result:
  Auto merged
mysql-test/t/udf.test:
  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_class.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2007-10-18 16:57:51 -06:00
unknown
d927461052 Merge lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-base
into  lambda.hsd1.co.comcast.net.:/home/malff/TREE/mysql-5.0-rt-merge


mysql-test/r/udf.result:
  Auto merged
mysql-test/t/udf.test:
  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/udf_example.c:
  Auto merged
sql/udf_example.def:
  Auto merged
2007-10-18 16:39:55 -06:00
unknown
6f8fd0a797 Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2007-10-16 14:10:07 +05:00
unknown
55a3a64eb1 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


sql/item.cc:
  Auto merged
sql/item.h:
  manual merge
2007-10-16 13:19:01 +05:00
unknown
048006e2f9 Bug#30986 Character set introducer followed by a HEX string can return bad result(addon)
issue an error if string has illegal characters


mysql-test/r/ctype_utf8.result:
  issue an error if string has illegal characters
mysql-test/t/ctype_utf8.test:
  issue an error if string has illegal characters
sql/item.cc:
  issue an error if string has illegal characters
sql/item.h:
  issue an error if string has illegal characters
sql/sql_yacc.yy:
  issue an error if string has illegal characters
2007-10-15 18:40:58 +05:00
unknown
147eef3eba Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/31155/my51-31155


sql/item.cc:
  Auto merged
sql/item.h:
  merging
2007-10-12 15:36:51 +05:00
unknown
1ccf107a5e Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/31155/my50-31155


sql/item.cc:
  Auto merged
2007-10-12 15:35:16 +05:00
unknown
9908eceb2a Merge mysql.com:/home/hf/work/31155/my50-31155
into  mysql.com:/home/hf/work/31155/my51-31155


sql/item.h:
  Auto merged
sql/item_geofunc.h:
  Auto merged
sql/item.cc:
  merging
sql/item_geofunc.cc:
  merging
2007-10-12 15:33:26 +05:00
unknown
d43c15b0de Doxygenization of comments. 2007-10-11 13:29:09 -04:00
unknown
937504e7a0 Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/sql_yacc.yy:
  manual merge
2007-10-11 16:13:14 +05:00
unknown
f30eacb223 Bug#30981 CHAR(0x41 USING ucs2) doesn't add leading zero
Bug#30982 CHAR(..USING..) can return a not-well-formed string
Bug#30986 Character set introducer followed by a HEX string can return bad result
check_well_formed_result moved to Item from Item_str_func
fixed Item_func_char::val_str for proper ucs symbols converting
added check for well formed strings for correct conversion of constants with underscore
charset


mysql-test/r/ctype_ucs.result:
  test result
mysql-test/r/ctype_utf8.result:
  test result
mysql-test/t/ctype_ucs.test:
  test case
mysql-test/t/ctype_utf8.test:
  test case
sql/item.cc:
  check_well_formed_result() moved from Item_str_func
sql/item.h:
  check_well_formed_result() moved from Item_str_func
sql/item_strfunc.cc:
  check_well_formed_result moved to Item
  fixed Item_func_char::val_str for proper ucs symbols converting
sql/item_strfunc.h:
  check_well_formed_result moved to Item
sql/sql_yacc.yy:
  added check for well formed string
2007-10-11 16:07:10 +05:00