Commit graph

551 commits

Author SHA1 Message Date
unknown
443b16861b Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-bug-13410


sql/item.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/table.cc:
  Auto merged
2005-10-03 22:02:22 +03:00
unknown
58263844c7 Fix for BUG#13410 - qualified reference to a view column in the HAVING clause cannot be resolved.
The problem was then when a column reference was resolved to a view column, the new Item
created for this column contained the name of the view, and not the view alias.


mysql-test/r/view.result:
  Additional test for BUG#13410.
mysql-test/t/view.test:
  Additional test for BUG#13410.
sql/item.cc:
  Correctly cast 'cur_field' to Item_ident because if the original item is
  an Item_field, the cur_field is either an Item_field or an Item_ref.
  Thus we have to cast cur_field to a common super-class of both.
sql/item.h:
  - real_item() may be called before Item_ref::ref is set
    (i.e. the Item_ref object was resolved).
  - To avoid a crash and to return some meaningful value
    in such cases we return 'this'.
sql/sql_base.cc:
  - 'item' may be an Item_ref, so we test for the type of the actual
    referenced item.
  - Correctly cast 'cur_field' to Item_ident because if the original
    item is an Item_field, the cur_field is either an Item_field or an
    Item_ref. Thus we have to cast cur_field to a common super-class
    of both.
sql/table.cc:
  - When creating a new Item for a reference to a view column, use the view alias,
    and not the real view name.
  - Removed old code
2005-10-01 09:35:30 +03:00
unknown
c8e0432dbd Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0-icc


client/mysqltest.c:
  Auto merged
myisam/myisamchk.c:
  Auto merged
myisam/myisamdef.h:
  Auto merged
sql/item.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-09-30 12:36:23 +03:00
unknown
69bfcd9c40 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


client/mysql.cc:
  Auto merged
client/mysqltest.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/mysqltest.result:
  Auto merged
mysql-test/t/mysqltest.test:
  Auto merged
mysys/my_init.c:
  Auto merged
sql/sql_update.cc:
  Auto merged
Makefile.am:
  Manual merge
mysql-test/r/cast.result:
  Manual merge
mysql-test/t/cast.test:
  Manual merge
ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp:
  Manual merge
sql/ha_ndbcluster.cc:
  Manual merge
sql/item.h:
  Manual merge
sql/opt_sum.cc:
  Manual merge
sql/sql_delete.cc:
  Manual merge
sql/sql_lex.cc:
  Manual merge
sql/sql_load.cc:
  Manual merge
sql/sql_prepare.cc:
  Manual merge
2005-09-28 11:34:53 +02:00
unknown
ab0d7e2ace Some minor fixes revealed as warnings by
Intel compiler.


client/mysqltest.c:
  Fixed a warning from using reference to a memory area,
  which is outside an object. This is just a minor
  clean-up, not a bug fix.
server-tools/instance-manager/buffer.cc:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/buffer.h:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/command.cc:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/command.h:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/guardian.cc:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/guardian.h:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/instance.cc:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/instance.h:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/instance_map.cc:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/instance_map.h:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/instance_options.cc:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/instance_options.h:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/listener.cc:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/listener.h:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/mysql_connection.cc:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/mysql_connection.h:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/options.cc:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/options.h:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/parse_output.cc:
  Removed unused goto.
server-tools/instance-manager/thread_registry.cc:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/thread_registry.h:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/user_map.cc:
  Fixed pragma warning for those compilers that do
  not support it.
server-tools/instance-manager/user_map.h:
  Fixed pragma warning for those compilers that do
  not support it.
sql/field.cc:
  Fixed a warning about overflow.
sql/item.h:
  Fixed implicit function declaration warning.
sql/item_sum.cc:
  Fixed implicit function declaration warning.
2005-09-23 21:28:56 +03:00
unknown
1d16fa5d86 Ensure that hex strings are used as integers in cast(... signed/unsigned)
This fixes the new report for bug #7036


mysql-test/t/cast.test:
  Added test for cast(hex-value to signed/unsigned)
sql/item.h:
  Ensure that hex strings are used as integers in cast(... signed/unsigned)
2005-09-21 17:28:25 +03:00
unknown
1b15f430d6 fix for Bug #12849 Stored Procedure: Crash on procedure call with CHAR type 'INOUT' parameter
(recommit with the right Bug#)


mysql-test/r/sp.result:
  result file modified to reflect new test
mysql-test/t/sp.test:
  added test for the bug
sql/item.cc:
  protect Item_splocal value from modification by CONCAT() et al
sql/item.h:
  added a buffer to save Item_splocal string pointer
sql/sp_head.cc:
  don't employ reuse mechanism to save var into itself
2005-09-08 18:25:42 +02:00
unknown
792221e365 Fix bug #12922 if(sum(),...) with group from view returns wrong results
Fields of view represented by Item_direct_view_ref. When complex expression
such as if(sum()>...,...) is splited in simpler parts by refs was ignored.
Beside this direct ref doesn't use it's result_field and thus can't store
it's result in tmp table which is needed for sum() ... group.
All this results in reported bug.

Item::split_sum_func2() now converts Item_direct_view_ref to Item_ref to
make fields from view being storable in tmp table.


sql/item.h:
  Fix bug #12922 if(sum(),...) with group from view returns wrong results
  Added function ref_type() to distinguish Item_ref subclasses
sql/item.cc:
  Fix bug #12922 if(sum(),...) with group from view returns wrong results
   Item::split_sum_func2() now converts Item_direct_view_ref to Item_ref to make fields from view being storable in tmp table.
mysql-test/t/view.test:
  Test case for bug#12922 if(sum(),...) with group from view returns wrong results
mysql-test/r/view.result:
  Test case for bug#12922 if(sum(),...) with group from view returns wrong results
2005-09-07 22:38:36 +04:00
unknown
527a9cad7e Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b12371


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
2005-08-29 15:44:49 +05:00
unknown
9bc3976c79 Slightly amended Monty's SP replication code cleanup patch
sql/item.cc:
  Code cleanup
sql/item.h:
  Code cleanup
sql/log.cc:
  Added comments
sql/sp_head.cc:
  Code cleanup patch from Monty: 
  in subst_spvars()
  - Move local variables first in block
  - Use res|= instead of res |=
  - Use strmake() instead of alloc + memcpy
  Added:
  - Fail the query if we don't have enough memory to produce a binlog-suitable query string: 
    if we're so low on memory we're likely to fail the query anyway, and failing now removes
    the need for hack with THD::query_str_binlog_suitable.
sql/sql_class.cc:
  Remove THD::query_str_binlog_unsuitable
sql/sql_class.h:
  Remove THD::query_str_binlog_unsuitable
sql/sql_delete.cc:
  Remove THD::query_str_binlog_unsuitable
sql/sql_insert.cc:
  Remove THD::query_str_binlog_unsuitable
sql/sql_parse.cc:
  Code cleanup
sql/sql_update.cc:
  Remove THD::query_str_binlog_unsuitable
2005-08-27 02:33:06 +04:00
unknown
8a8070bbe7 Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/cps/mysql/devel/mysql-5.0-sp11333


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
2005-08-25 18:16:21 +04:00
unknown
8a5e527453 Fix for BUG#12335 (SP replication) : New binlogging strategy for stored PROCEDUREs/FUNCTIONs.
"Interleaved SPs execution is now binlogged properly, "SELECT spfunc()" is binlogged too.
The known remaining issue is binlogging/replication of "a routine is deleted while it is executed" scenario.


mysql-test/r/rpl_sp.result:
  Fix for BUG#12335: updated test cases/results
mysql-test/t/rpl_sp.test:
  Fix for BUG#12335: updated test cases/results
sql/item.cc:
  Fix for BUG#12335 (SP replication): 
   - Added Item_name_const 'function'
   - Addede 'delete reuse' to call dtor on item reuse
sql/item.h:
  Fix for BUG#12335 (SP replication) : Added Item_name_const 'function' + code cleanup
sql/item_create.cc:
   Fix for BUG#12335 (SP replication) : Added Item_name_const 'function'
sql/item_create.h:
   Fix for BUG#12335 (SP replication) : Added Item_name_const 'function'
sql/item_func.cc:
  Fix for BUG#12335 (SP replication) : binary log is now constrolled from within execute_function.
sql/lex.h:
  Fix for BUG#12335 (SP replication) : Added Item_name_const 'function'
sql/log.cc:
  Fix for BUG#12335 (SP replication) : Added MYSQL_LOG::{start|stop}_union_events to allow
  one to temporary disable binlogging but collect a 'union' information about binlog write
  calls.
sql/mysql_priv.h:
  Fix for BUG#12335 (SP replication)
sql/sp_head.cc:
  Fix for BUG#12335 (SP replication) : Now we use different SP binlogging strategy, grep for 
  StoredRoutinesBinlogging for details
sql/sp_head.h:
  Comments added
sql/sp_pcontext.h:
  Comments added
sql/sp_rcontext.h:
  Comments added
sql/sql_class.cc:
  Fix for BUG#12335 (SP replication) : Now we use different SP binlogging strategy, grep for 
  StoredRoutinesBinlogging for details
sql/sql_class.h:
  Fix for BUG#12335 (SP replication) : Added MYSQL_LOG::{start|stop}_union_events to allow
  one to temporary disable binlogging but collect a 'union' information about binlog write
  calls.
sql/sql_delete.cc:
  Fix for BUG#12335: check THD::query_str_binlog_unsuitable when writing to binlog.
sql/sql_insert.cc:
  Fix for BUG#12335: check THD::query_str_binlog_unsuitable when writing to binlog.
sql/sql_lex.cc:
  Fix for BUG#12335 (SP replication): Add ability to extract previous returned token from
  the tokenizer.
sql/sql_lex.h:
  Fix for BUG#12335 (SP replication): Add ability to extract previous returned token from
  the tokenizer.
sql/sql_parse.cc:
  Fix for BUG#12335 (SP replication) : Now we use different SP binlogging strategy, grep for 
  StoredRoutinesBinlogging for details
sql/sql_update.cc:
  Fix for BUG#12335: check THD::query_str_binlog_unsuitable when writing to binlog.
sql/sql_yacc.yy:
  Fix for BUG#12335 (SP replication) : When creating Item_splocal, remember where it is located
  in the query.
2005-08-25 17:34:34 +04:00
unknown
da7a46ad9f Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/cps/mysql/devel/mysql-5.0-sp11333


mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/sp_head.cc:
  manual merge
2005-08-25 16:06:49 +04:00
unknown
d29df5645b Fix Bug#11333 "Stored Procedure: Memory blow up on repeated SELECT ... INTO query"
mysql-test/r/sp.result:
  update result
mysql-test/t/sp.test:
  Add test for Bug #11333 "Stored Procedure: Memory blow up on repeated SELECT ... INTO query"
sql/item.cc:
  we should call destructors for Items before reuse
sql/item.h:
  Add new method and constructor for Item_string.
sql/sp_head.cc:
  String allocation should be done on the system heap for now.
2005-08-25 15:34:14 +04:00
unknown
e9c420ccf1 Merge mysql.com:/home/emurphy/src/bk-clean/mysql-4.1
into  mysql.com:/home/emurphy/src/work/mysql-5.0


BitKeeper/deleted/.del-ctype-cp932.c:
  Auto merged
BitKeeper/deleted/.del-ctype_cp932.result:
  Auto merged
BitKeeper/deleted/.del-ctype_cp932.test:
  Auto merged
include/m_ctype.h:
  Auto merged
include/my_sys.h:
  Auto merged
innobase/srv/srv0start.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysys/charset.c:
  Auto merged
netware/BUILD/nwbootstrap:
  Auto merged
sql/item.h:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
strings/ctype-big5.c:
  Auto merged
strings/ctype-bin.c:
  Auto merged
strings/ctype-czech.c:
  Auto merged
strings/ctype-euc_kr.c:
  Auto merged
strings/ctype-extra.c:
  Auto merged
strings/ctype-gb2312.c:
  Auto merged
strings/ctype-gbk.c:
  Auto merged
strings/ctype-latin1.c:
  Auto merged
strings/ctype-sjis.c:
  Auto merged
strings/ctype-tis620.c:
  Auto merged
strings/ctype-uca.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
strings/ctype-ujis.c:
  Auto merged
strings/ctype-utf8.c:
  Auto merged
strings/ctype-win1250ch.c:
  Auto merged
configure.in:
  Manual merge from 4.1
include/config-netware.h:
  Manual merge from 4.1
sql/item.cc:
  Manual merge from 4.1
sql/mysqld.cc:
  Manual merge from 4.1
2005-08-19 15:29:30 -04:00
unknown
1b970e94e0 Bug#11338 Fixes from review (identical functionality).
include/my_sys.h:
  Fixes from review (use version in log_event.cc instead)
mysql-test/r/ctype_cp932.result:
  Updated test for bug#11338 (logging of prepared statement w/ blob type)
mysql-test/t/ctype_cp932.test:
  udpated test for bug#11338 (logging of prepared statement w/ blob type)
mysys/charset.c:
  Fixes from review (use version in log_event.cc instead)
sql/item.cc:
  Fixes from review (store character_set_client differently so that
  fix can be merged forward to 5.0)
sql/item.h:
  Fixes from review
sql/log_event.cc:
  Fixes from review, str_to_hex is now used by item.cc
sql/log_event.h:
  Added prototype for str_to_hex (now used by item.cc)
sql/sql_prepare.cc:
  Fixes from review, store character_set_client differently so that 
  Item_param::query_val_str can use it.
2005-08-19 14:49:34 -04:00
unknown
1cb72d7eb9 WL#2486 - natural and using join according to SQL:2003
- Corrected problem with N-way nested natural joins in PS mode.
- Code cleanup
- More asserts to check consistency of name resolution contexts
- Fixed potential memory leak of name resolution contexts


mysql-test/r/join.result:
  - Corrected problem with N-way nested natural joins in PS mode.
mysql-test/t/join.test:
  - Corrected problem with N-way nested natural joins in PS mode.
sql/item.h:
  - Fixed potential memory leak.
sql/sql_base.cc:
  - the local context of Item_fields that participate in TABLE_LIST::on_cond for
    natural joins is correctly set to the tables where the corresponding fields
    originate from.
  - removed unused variables
  - correct allocation of contexts
sql/sql_parse.cc:
  - correct allocation of contexts for JOIN ON conditions.
sql/table.cc:
  - added asserts to check the consistency of name resolution contexts
sql/table.h:
  - added asserts to check the consistency of name resolution contexts
2005-08-19 15:22:30 +03:00
unknown
99cf8c38e0 Merge mysql.com:/Users/emurphy/src/bk-clean/mysql-4.1
into  mysql.com:/Users/emurphy/src/work/mysql-4.1-bug11338


sql/item.h:
  Auto merged
2005-08-17 04:32:29 -04:00
unknown
a29b1d7151 BUG#11338 (logging of prepared statement w/ blob type)
In cp932, '\' character can be the second byte in a 
multi-byte character stream. This makes it difficult to use
mysql_escape_string. Added flag to indicate which languages allow
'\' as second byte of multibyte sequence so that when putting a prepared
statement into the binlog we can decide at runtime whether hex encoding
is really needed.


include/m_ctype.h:
  Added bool to indicate character sets which allow '\' as the second
  byte of a multibyte character set (currently only cp932). For these
  character sets, escaping with '\' is dangerous and leads to corruption
  in replication.
include/my_sys.h:
  Add function to enocde a string as hex with no prefix (bare)
mysys/charset.c:
  Add function to encode string as hex with no prefix (bare).
sql/item.cc:
  Check the connection character set to see if escape_string_for_mysql
  is safe, or if character set requires unambiguous (hex) encoding
sql/item.h:
  Pass thd to query_val_str for access to charset()
sql/sql_prepare.cc:
  Pass thd to query_val_str.
strings/ctype-big5.c:
  Add escape_with_backslash_is_dangerous flag.
strings/ctype-bin.c:
  Add escape_with_backslash_is_dangerous flag
strings/ctype-cp932.c:
  Add escape_with_backslash_is_dangerous flag.
strings/ctype-czech.c:
  Add escape_with_backslash_is_dangerous flag.
strings/ctype-euc_kr.c:
  Add escape_with_backslash_is_dangerous flag.
strings/ctype-extra.c:
  Add escape_with_backslash_is_dangerous flag.
strings/ctype-gb2312.c:
  Add escape_with_backslash_is_dangerous flag.
strings/ctype-gbk.c:
  Added escape_with_backslash_is_dangerous flag.
strings/ctype-latin1.c:
  Added escape_with_backslash_is_dangerous flag.
strings/ctype-sjis.c:
  Added escape_with_backslash_is_dangerous flag.
strings/ctype-tis620.c:
  Added esacpe_with_backslash_character_is_dangerous flag.
strings/ctype-uca.c:
  Added escape_with_backslash_is_dangerous flag.
strings/ctype-ucs2.c:
  Added escape_with_backslash_is_dangerous.
strings/ctype-ujis.c:
  Added escape_with_backslash_is_dangerous flag.
strings/ctype-utf8.c:
  Added escape_with_backslash_is_dangerous.
strings/ctype-win1250ch.c:
  Added escape_with_backslash_is_dangerous.
2005-08-17 04:26:32 -04:00
unknown
ad888850c0 Merge abelkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  hasky.mysql.fi:/home/sanja/work-merge-5.0


mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/item_subselect.cc:
  merge
2005-08-13 08:19:34 +03:00
unknown
19b4760f19 fixed convertion and handling IN subqueries with rows (BUG#11867)
mysql-test/r/subselect.result:
  testst of IN subqueries with row
mysql-test/t/subselect.test:
  tests of ion subqueries with row
sql/item.h:
  add method to prevent of removing Item_ref_null_helper from HAVING
sql/item_cmpfunc.h:
  Prevented removing of Item_test_isnotnull from HAVING
sql/item_subselect.cc:
  fixed converting row IN subqueries
sql/sql_select.cc:
  fixed debug print
2005-08-13 07:45:14 +03:00
unknown
7517d7e112 Implementation of WL#2486 -
"Process NATURAL and USING joins according to SQL:2003".

* Some of the main problems fixed by the patch:
  - in "select *" queries the * expanded correctly according to
    ANSI for arbitrary natural/using joins
  - natural/using joins are correctly transformed into JOIN ... ON
    for any number/nesting of the joins.
  - column references are correctly resolved against natural joins
    of any nesting and combined with arbitrary other joins.

* This patch also contains a fix for name resolution of items
  inside the ON condition of JOIN ... ON - in this case items must
  be resolved only against the JOIN operands. To support such
  'local' name resolution, the patch introduces a stack of
  name resolution contexts used at parse time.

NOTICE:
- This patch is not complete in the sense that
  - there are 2 test cases that still do not pass -
    one in join.test, one in select.test. Both are marked
    with a comment "TODO: WL#2486".
  - it does not include a new test specific for the task


mysql-test/include/ps_query.inc:
  Adjusted according to standard NATURAL/USING join semantics.,
mysql-test/r/bdb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/derived.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/errors.result:
  The column as a whole cannot be resolved, so different error message.
mysql-test/r/fulltext.result:
  Adjusted according to standard JOIN ... ON semantics =>
  the ON condition can refer only to the join operands.
mysql-test/r/fulltext_order_by.result:
  More detailed error message.
mysql-test/r/innodb.result:
  Adjusted according to standard NATURAL/USING join semantics.
  This test doesn't pass completetly yet!
mysql-test/r/insert_select.result:
  More detailed error message.
mysql-test/r/join.result:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one test case that still fails, and it is
  commeted out and marked with WL#2486 in the test file.
mysql-test/r/join_crash.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/join_nested.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/join_outer.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/multi_update.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/null_key.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/order_by.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_2myisam.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_3innodb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_4heap.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_5merge.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_6bdb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/ps_7ndb.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/select.result:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one failing test case which is commented with
  WL#2486 in the test file.
mysql-test/r/subselect.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/type_ranges.result:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/r/union.result:
  More detailed error message.
mysql-test/t/bdb.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/errors.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/fulltext.test:
  Adjusted according to standard JOIN ... ON semantics =>
  the ON condition can refer only to the join operands.
mysql-test/t/fulltext_order_by.test:
  More detailed error message.
mysql-test/t/innodb.test:
  Adjusted according to standard NATURAL/USING join semantics.
  This test doesn't pass completetly yet!
mysql-test/t/insert_select.test:
  More detailed error message.
mysql-test/t/join.test:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one test case that still fails, and it is
  commeted out and marked with WL#2486 in the test file.
mysql-test/t/join_crash.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/join_nested.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/join_outer.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/null_key.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/order_by.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/select.test:
  Adjusted according to standard NATURAL/USING join semantics.
  
  NOTICE: there is one test case that still fails, and it is
  commeted out and marked with WL#2486 in the test file.
mysql-test/t/subselect.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/type_ranges.test:
  Adjusted according to standard NATURAL/USING join semantics.
mysql-test/t/union.test:
  More detailed error message.
sql/item.cc:
  - extra parameter to find_field_in_tables
  - find_field_in_real_table renamed to find_field_in_table
  - fixed comments/typos
sql/item.h:
  - added [first | last]_name_resolution_table to class
    Name_resolution_context
  - commented old code
  - standardized formatting
sql/mysql_priv.h:
  - refactored the find_field_in_XXX procedures,
  - added a new procedure for natural join table references,
  - renamed the find_field_in_XXX procedures to clearer names
sql/sp.cc:
  - pass the top-most list of the FROM clause to setup_tables
  - extra parameter to find_field_in_tables
sql/sql_acl.cc:
  - renamed find_field_in_table => find_field_in_table_ref
  - extra parameter to find_field_in_table_ref
  - commented old code
sql/sql_base.cc:
  This file contains the core of the implementation of the processing
  of NATURAL/USING joins (WL#2486).
  - added many comments to old code
  - refactored the group of find_field_in_XXX procedures, and added a
    new procedure for natural joins. There is one find_field_in_XXX procedure
    per each type of table reference (stored table, merge view, or natural
    join); one meta-procedure that selects the correct one depeneding on the
    table reference; and one procedure that goes over a list of table
    referenes.
  - NATURAL/USING joins are processed through the procedures:
      mark_common_columns, store_natural_using_join_columns,
      store_top_level_join_columns, setup_natural_join_row_types.
    The entry point to processing NATURAL/USING joins is the
    procedure 'setup_natural_join_row_types'.
  - Replaced the specialized Field_iterator_XXX iterators with one
    generic iterator over the fields of a table reference.
  - Simplified 'insert_fields' and 'setup_conds' due to encapsulation of
    the processing of natural joins in a separate set of procedures.
sql/sql_class.h:
  - Commented old code.
sql/sql_delete.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_help.cc:
  - pass the end name resolution table to find_field_in_tables
  - adjust the list of tables for name resolution
sql/sql_insert.cc:
  - Changed the code that saves and restores the current context to
    support the list of tables for name resolution -
    context->first_name_resolution_table, and
    table_list->next_name_resolution_table.
    Needed to support an ugly trick to resolve inserted columns only in
    the first table.
  - Added Name_resolution_context::[first | last]_name_resolution_table.
  - Commented old code
sql/sql_lex.cc:
  - set select_lex.parent_lex correctly
  - set correct state of the current name resolution context
sql/sql_lex.h:
  - Added a stack of name resolution contexts to support local
    contexts for JOIN ... ON conditions.
  - Commented old code.
sql/sql_load.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_olap.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_parse.cc:
  - correctly set SELECT_LEX::parent_lex
  - set the first table of the current name resoltion context
  - added support for NATURAL/USING joins
  - commented old code
sql/sql_select.cc:
  - Pass the FROM clause to setup_tables.
  - Pass the end table to find_field_in_tables
  - Improved comments
sql/sql_show.cc:
  - Set SELECT_LEX::parent_lex.
sql/sql_update.cc:
  - Pass the FROM clause to setup_tables.
sql/sql_yacc.yy:
  - Added support for a stack of name resolution contexts needed to
    implement name resolution for JOIN ... ON. A context is pushed
    for each new JOIN ... ON, and popped afterwards.
  - Added support for NATURAL/USING joins.
sql/table.cc:
  - Added new class Natural_join_column to hide the heterogeneous
    representation of column references for stored tables and for
    views.
  - Added a new list TABLE_LIST::next_name_resolution_table to
    support name resolution with NATURAL/USING joins. Also added
    other members to TABLE_LIST to support NATURAL/USING joins.
  - Added a generic iterator over the fields of table references
    of various types - class Field_iterator_table_ref
sql/table.h:
  - Added new class Natural_join_column to hide the heterogeneous
    representation of column references for stored tables and for
    views.
  - Added a new list TABLE_LIST::next_name_resolution_table to
    support name resolution with NATURAL/USING joins. Also added
    other members to TABLE_LIST to support NATURAL/USING joins.
  - Added a generic iterator over the fields of table references
    of various types - class Field_iterator_table_ref
tests/mysql_client_test.c:
  Adjusted according to standard NATURAL JOIN syntax.
2005-08-12 17:57:19 +03:00
unknown
c03d28b893 Bug#12371 executing prepared statement fails (illegal mix of collations)
item.cc:
item.h:
  Adding Item_param::safe_charset_converter,
  not to return collation mix error if
  parameter can be converted into operation
  character set.

ctype_utf8.result:
  adding test case
ctype_utf8.test:
  adding test case


sql/item.h:
  Bug #12371 executing prepared statement fails (illegal mix of collations)
  Adding Item_param::safe_charset_converter,
  not to returm collation mix error if
  parameter can be converted into operation
  character set.
sql/item.cc:
  Bug #12371 executing prepared statement fails (illegal mix of collations)
mysql-test/t/ctype_utf8.test:
  adding test case
mysql-test/r/ctype_utf8.result:
  adding
2005-08-06 16:58:36 +05:00
unknown
6b3478ec12 Fixes during review of new pushed code
Change bool in C code to my_bool
Added to mysqltest --enable_parsning and --disable_parsing to avoid to have to comment parts of tests
Added comparison of LEX_STRING's and use this to compare file types for view and trigger files.


client/client_priv.h:
  Added OPT_TRIGGERS (to get rid of compiler warning)
client/mysql.cc:
  Added cast to get rid of compiler warning
client/mysqldump.c:
  Added OPT_TRIGGERS (to get rid of compiler warning)
  Abort if we can't write to outfile (even if --ignore-errors is given)
client/mysqltest.c:
  Added --enable_parsning and --disable_parsing to avoid to have to comment parts of tests
include/my_sys.h:
  Make my_progname const
include/my_time.h:
  Avoid using 'bool' in C programs
mysql-test/lib/init_db.sql:
  Align with mysql_create_system_tables
  (Ideally this file should be auto-generated from the above script)
mysql-test/r/mysqltest.result:
  Test for --enable_parsing
mysql-test/r/variables.result:
  Update results after fix for overflow checking of max_heap_table_size
mysql-test/t/information_schema.test:
  USe --enable/disable parsing instead of comments
mysql-test/t/mysqltest.test:
  Test for --enable_parsing
mysql-test/t/sp.test:
  USe --enable/disable parsing instead of comments
mysql-test/t/variables.test:
  Portability fix for 64 bit systems
mysql-test/t/view.test:
  USe --enable/disable parsing instead of comments
mysys/my_init.c:
  May my_progname const
mysys/my_static.c:
  May my_progname const
mysys/thr_lock.c:
  Remove not needed casts
sql-common/my_time.c:
  Change bool -> my_bool as bool is not portable in C programs
sql/field.cc:
  Test number_to_datetime() for -1 instead of < 0 (Safety fix)
  New prototype for TIME_to_timestamp()
sql/item.h:
  Don't have prototypes for both uint32 and ulong as these 'may' be the same thing
sql/item_timefunc.cc:
  New prototype for TIME_to_timestamp()
sql/log.cc:
  Remove compiler warnings
sql/mysql_priv.h:
  New prototype for TIME_to_timestamp()
  Added function for comparing LEX_STRING
sql/set_var.cc:
  Added overflow checking when setting ulong variable
sql/sql_base.cc:
  Added function is_equal()
  Changed strncmp -> is_equal() as strncmp() to not match "V" (instead of "VIEW")
sql/sql_class.cc:
  Added comment
sql/sql_select.cc:
  Portability fixes
  After review fixes
sql/sql_trigger.cc:
  Use 'tables_alias_charset' for comparing database name
  Use 'is_equal()' to compare file type. (Old code didn't do the comparison correctly)
sql/sql_view.cc:
  Use 'is_equal()' to compare file type. (Old code didn't do the comparison correctly)
sql/time.cc:
  New prototype for TIME_to_timestamp() to allow easyer mapping to C function
sql/tztime.cc:
  bool -> my_bool (to allow calling C code from C++ code)
sql/tztime.h:
  bool -> my_bool (to allow calling C code from C++ code)
2005-07-31 12:49:55 +03:00
unknown
98c57c1a11 Merge mysql.com:/home/jimw/my/mysql-5.0-10351
into  mysql.com:/home/jimw/my/mysql-5.0-clean


sql/item.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
2005-07-28 10:40:44 -07:00
unknown
5cdd9463ed Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0


sql/item.h:
  Auto merged
2005-07-26 08:25:25 -07:00
unknown
4903707c34 item.h:
Post review change in Item_ref::get_tmp_table_field (bug #11412).


sql/item.h:
  Post review change in Item_ref::get_tmp_table_field (bug #11412).
2005-07-26 08:20:42 -07:00
unknown
5fa6e3c557 Merge mysql.com:/usr/home/bar/mysql-4.1.b10201
into  mysql.com:/usr/home/bar/mysql-5.0


mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
ndb/src/mgmsrv/ConfigInfo.hpp:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
include/config-netware.h:
  auto merge fix
libmysql/libmysql.def:
  after merge fix
sql/item_func.cc:
  SCCS merged
2005-07-26 13:25:18 +05:00
unknown
8624bcfdbe func_gconcat.result, func_gconcat.test:
Adding test
item_sum.cc:
  Adding a call for collation/charset aggregation,
      to collect attributes from the arguments. The actual bug fix.
item_func.h, item_func.cc, item.h, item.cc:
  - Removing collation aggrgation functions from Item_func class
      in item.cc, and adding it as non-class functions in item.cc
      to be able to reuse this code for group_concat.
      - Adding replacement for these functions into Item_func class
      as wrappers for moved functions, to minizize patch size,


sql/item.cc:
  - Removing collation aggrgation functions from Item_func class
      in item.cc, and adding it as non-class functions in item.cc
      to be able to reuse this code for group_concat.
      - Adding replacement for these functions into Item_func class
      as wrappers for moved functions, to minizize patch size,
sql/item.h:
  - Removing collation aggrgation functions from Item_func class
      in item.cc, and adding it as non-class functions in item.cc
      to be able to reuse this code for group_concat.
      - Adding replacement for these functions into Item_func class
      as wrappers for moved functions, to minizize patch size,
sql/item_func.cc:
  - Removing collation aggrgation functions from Item_func class
      in item.cc, and adding it as non-class functions in item.cc
      to be able to reuse this code for group_concat.
      - Adding replacement for these functions into Item_func class
      as wrappers for moved functions, to minizize patch size,
sql/item_func.h:
  - Removing collation aggrgation functions from Item_func class
      in item.cc, and adding it as non-class functions in item.cc
      to be able to reuse this code for group_concat.
      - Adding replacement for these functions into Item_func class
      as wrappers for moved functions, to minizize patch size,
sql/item_sum.cc:
  Adding a call for collation/charset aggregation,
      to collect attributes from the arguments. The actual bug fix.
mysql-test/t/func_gconcat.test:
  Adding test
mysql-test/r/func_gconcat.result:
  Adding test
2005-07-26 12:52:02 +05:00
unknown
1c3f8cc214 sql_select.cc:
Fixed bug #11412.
  Reversed the patch of cs 1.1934 for the function 
  create_tmp_table. Modified the function to support
  tem_ref objects created for view fields.
item_buff.cc:
  Fixed bug #11412.
  Modified implementation of new_Cached_item to support
  cacheing of view fields.
item.h:
  Fixed bug #11412.
  Changed implementation of Item_ref::get_tmp_table_field and
  added Item_ref::get_tmp_table_item to support Item_ref objects
  created for view fields.
view.test, view.result:
  Added a test case for bug #11412.


mysql-test/r/view.result:
  Added a test case for bug #11412.
mysql-test/t/view.test:
  Added a test case for bug #11412.
sql/item.h:
  Fixed bug #11412.
  Changed implementation of Item_ref::get_tmp_table_field and
  added Item_ref::get_tmp_table_item to support Item_ref objects
  created for view fields.
sql/item_buff.cc:
  Fixed bug #11412.
  Modified implementation of new_Cached_item to support
  cacheing of view fields.
sql/sql_select.cc:
  Fixed bug #11412.
  Reversed the patch of cs 1.1934 for the function 
  create_tmp_table. Modified the function to support
  tem_ref objects created for view fields.
2005-07-25 12:57:23 -07:00
unknown
c055edc631 Fix value returned from SELECT of unsigned long system
variables. (Bug #10351)


mysql-test/r/variables.result:
  Update results
mysql-test/t/variables.test:
  Add regression test
sql/item.h:
  Add Item_uint(ulong) constructor
sql/mysqld.cc:
  Fix default/max max_seeks_for_key to UINT_MAX32
sql/set_var.cc:
  Use correct Item_uint() constructors in sys_var::item()
2005-07-22 16:18:34 -07:00
unknown
a32bf7fb82 Fix for bugs #5892/6182/8751/8758/10994 (based on Antony's patch)
"Triggers have the wrong namespace"
  "Triggers: duplicate names allowed"
  "Triggers: CREATE TRIGGER does not accept fully qualified names"
  "SHOW TRIGGERS"


mysql-test/r/information_schema.result:
  Added tests for new INFORMATION_SCHEMA.TRIGGERS view and SHOW TRIGGERS command.
mysql-test/r/information_schema_db.result:
  INFORMATION_SCHEMA.TRIGGERS view was added.
mysql-test/r/rpl_sp.result:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
mysql-test/r/trigger.result:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
  Added test checking that triggers have database wide namespace.
  Added test for bug #8791 "Triggers: Allowed to create triggers on a subject
  table in a different DB".
mysql-test/r/view.result:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
mysql-test/t/information_schema.test:
  Added tests for new INFORMATION_SCHEMA.TRIGGERS view and SHOW TRIGGERS command.
mysql-test/t/rpl_sp.test:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
mysql-test/t/trigger.test:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
  Added test checking that triggers have database wide namespace.
  Added test for bug #8791 "Triggers: Allowed to create triggers on a subject
  table in a different DB".
mysql-test/t/view.test:
  Now DROP TRIGGER interprets first part of trigger identifier as database
  name and not as table name. Adjusted tests properly.
sql/handler.cc:
  Added .TRN tho the list of known file extensions assoicated with tables.
sql/item.h:
  trg_action_time_type/trg_event_type enums:
    Added TRG_ACTION_MAX/TRG_EVENT_MAX elements which should be used instead of
    magical values in various loops where we iterate through all types of trigger
    action times or/and trigger event types.
sql/lex.h:
  Added new symbol "TRIGGERS".
sql/mysql_priv.h:
  Added declaration of constant holding extension for trigger name (.TRN) files.
sql/mysqld.cc:
  Added statistical variable for SHOW TRIGGERS command.
sql/share/errmsg.txt:
  Added error message saying that one attempts to create trigger in wrong schema.
sql/sp.cc:
  Replaced magical values with TRG_EVENT_MAX/TRG_ACTION_MAX constants.
sql/sql_base.cc:
  open_unireg_entry():
    Now Table_triggers_list::check_n_load() has one more argument which
    controls whether we should prepare Table_triggers_list with fully functional
    triggers or load only their names.
sql/sql_lex.h:
  Added element for new SHOW TRIGGERS command to enum_sql_command enum.
sql/sql_parse.cc:
  prepare_schema_table():
    Added support for SHOW TRIGGERS statement.
sql/sql_show.cc:
  Added new INFORMATION_SCHEMA.TRIGGERS view and SHOW TRIGGERS command.
sql/sql_table.cc:
  mysql_rm_table_part2():
    Replaced simple deletion of .TRG file with call to
    Table_triggers_list::drop_all_triggers which will also delete .TRN files
    for all triggers associated with table.
sql/sql_trigger.cc:
  Now triggers have database wide namespace. To support it we create special .TRN
  file with same name as trigger for each trigger. This file contains name of
  trigger's table so one does not need to specify it explicitly in DROP TRIGGER.
  Moreover DROP TRIGGER treats first part of trigger identifier as database name
  now. Updated mysql_create_or_drop_trigger() routine and
  Table_triggers_list::create_trigger()/drop_trigger()/check_n_load() methods
  accordingly. Added add_table_for_trigger() routine and
  Table_triggers_list::drop_all_triggers() method.
  
  Added Table_triggers_list::get_trigger_info() for obtaining trigger metadata.
sql/sql_trigger.h:
  Table_triggers_list:
    Use TRG_EVENT_MAX, TRG_ACTION_MAX instead of magic values.
    Added get_trigger_info() method for obtaining trigger's meta-data.
    Added drop_all_triggers() method which drops all triggers for table.
    Added declarations of trg_action_time_type_names/trg_event_type_names
    arrays which hold names of triggers action time types  and event types.
sql/sql_yacc.yy:
  Changed grammar for CREATE/DROP TRIGGER to support database wide trigger
  namespace. Added new SHOW TRIGGERS statement.
sql/table.h:
  enum enum_schema_tables:
    Added constant for new INFORMATION_SCHEMA.TRIGGERS view.
2005-07-19 20:06:49 +04:00
unknown
8fb495d1c5 post merge changes: added safe_charset_converter to other static functions 2005-07-16 00:52:00 +03:00
unknown
213c05400a Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug6-5.0


BitKeeper/etc/config:
  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:
  Auto merged
mysql-test/r/sp-security.result:
  merge
mysql-test/r/view.result:
  merge
mysql-test/t/sp-security.test:
  merge
mysql-test/t/view.test:
  merge
sql/item_cmpfunc.cc:
  merge
sql/sql_class.h:
  merge
2005-07-16 00:17:05 +03:00
unknown
e84229b010 stop evaluation constant functions in WHERE (BUG#4663)
correct value of CURRENT_USER() in SP with "security definer" (BUG#7291)


BitKeeper/etc/config:
  switch off open logging
mysql-test/r/sp-security.result:
  correct value from current_user() in function run from "security definer"
mysql-test/r/view.result:
  evaluation constant functions in WHERE (BUG#4663)
mysql-test/t/sp-security.test:
  correct value from current_user() in function run from "security definer"
mysql-test/t/view.test:
  evaluation constant functions in WHERE (BUG#4663)
sql/item.cc:
  Item_static_string_func creation if it is need
sql/item.h:
  support of Item_static_string_func creation
sql/item_cmpfunc.cc:
  do not evaluate items during view creation
sql/item_create.cc:
  create Item_func_user
sql/item_strfunc.cc:
  Item_func_sysconst in case of converting value still have to correctly print itself
  => use Item_static_string_func instead of Item_string
      Item_func_user return USER() or CURRENT_USER()
sql/item_strfunc.h:
  support of correct charset conversion procedure in Item_func_sysconst
sql/sql_class.h:
  new method
sql/sql_yacc.yy:
  Item_func_user now support both USER() and CURRENT_USER(), so we have to pass parametr what it is
2005-07-16 00:01:44 +03:00
unknown
212345b400 Merge mysql.com:/usr/home/bar/mysql-4.1.num-conv
into  mysql.com:/usr/home/bar/mysql-5.0


mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/item.cc:
  After merge fix.
2005-07-14 16:11:55 +05:00
unknown
86cb32b7b0 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.num-conv


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_table.cc:
  Auto merged
2005-07-14 10:46:15 +05:00
unknown
91c97a76fc Merge mysql.com:/opt/local/work/mysql-4.1-11458
into  mysql.com:/opt/local/work/mysql-5.0-root


sql/mysql_priv.h:
  Auto merged
sql/sql_lex.h:
  Auto merged
mysql-test/r/ps.result:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
sql/item.cc:
  Manual merge.
sql/item.h:
  Manual merge.
sql/item_subselect.h:
  Manual merge.
sql/sql_parse.cc:
  Manual merge.
sql/sql_prepare.cc:
  Manual merge.
2005-07-13 18:05:57 +04:00
unknown
ece17ba3cf - a fix for Bug#11458 "Prepared statement with subselects return random
data": remove the fix for another bug (8807) that
added OUTER_REF_TABLE_BIT to all subqueries that used a placeholder
to prevent their evaluation at prepare. As this bit hanged in 
Item_subselect::used_tables_cache for ever, a constant subquery with
a placeholder was never evaluated as such, which caused wrong 
choice of the execution plan for the statement.
- to fix Bug#8807 backport a better fix from 5.0
- post-review fixes.


mysql-test/r/ps.result:
  Bug#11458: test results fixed
mysql-test/t/ps.test:
  - add a test case for Bug#11458 "Prepared statement with subselects return 
  random data"
sql/item.cc:
  - remove unnecessary Item_param::fix_fields
  - fix Item_param::set_null to set item_type accordingly (safety:
    Item_param should behave like a basic constant).
sql/item.h:
  Remove Item_param::fix_fields
sql/item_subselect.h:
  Remove no more existing friend.
sql/mysql_priv.h:
  Add UNCACHEABLE_PREPARE to mark all subqueries as uncacheable if
  in statement prepare (backport from 5.0).
sql/sql_lex.h:
  Comment fixed.
sql/sql_parse.cc:
  If in statement prepare, mark all subqueries as uncacheable (backport
  from 5.0)
sql/sql_prepare.cc:
  Switch off the uncacheable flag from all subqueries after statement
  prepare is done (backport from 5.0)
2005-07-13 17:38:55 +04:00
unknown
4a2af29fe7 ctype_utf8.result:
adding test case
sql_table.cc:
  sql_table.cc:
  - do not create a new item when charsets are the same
  - return ER_INVALID_DEFAULT if default value cannot
    be converted into the column character set.
item.cc:
  - Allow conversion not only to Unicode,
    but also to and from "binary".
  - Adding safe_charset_converter() for Item_num
    and Item_varbinary, returning a fixed const Item.


sql/item.cc:
  - Allow conversion not only to Unicode,
    but also to and from "binary".
  - Adding safe_charset_converter() for Item_num
    and Item_varbinary, returning a fixed const Item.
sql/sql_table.cc:
  sql_table.cc:
  - do not create a new item when charsets are the same
  - return ER_INVALID_DEFAULT if default value cannot
    be converted into the column character set.
mysql-test/r/ctype_utf8.result:
  adding test case
2005-07-13 13:00:17 +05:00
unknown
7744e7e700 Merge
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2005-07-12 23:24:35 +04:00
unknown
a578be339d Fix bug#11709 View was ordered by wrong column.
When searching column to sort on, item was compared to field under view
column, but not the column itself. Because names of view column and underlaid
field may differ, it leads to possibly choosing wrong column for sorting on.

This patch makes Item_direct_view_ref::eq(Item *item,...) compare
item's name with it's own name proir to comparing to *ref item.


sql/item.cc:
  Fix bug #11709 View was ordered by wrong column
sql/item.h:
  Fix bug #11709 View was ordered by wrong column
mysql-test/t/view.test:
  Test case for bug #11709 View was ordered by wrong column.
mysql-test/r/view.result:
  Test case for bug #11709 View was ordered by wrong column.
2005-07-12 23:22:08 +04:00
unknown
f36db3540a view.result, view.test:
Added a test case for bug #11771.
item.h:
  Fixed bug #11771.
  Added method reset_query_id_processor to be able to adjust
  query_id for fields generated from * in queries like this:
  SELECT * FROM <view> ...
sql_base.cc:
  Fixed bug #11771.
  Adjusted query_id for fields generated from * in queries
  like this: SELECT * FROM <view> ...


sql/sql_base.cc:
  Fixed bug #11771.
  Adjusted query_id for fields generated from * in queries
  like this: SELECT * FROM <view> ...
sql/item.h:
  Fixed bug #11771.
  Added method reset_query_id_processor to be able to adjust
  query_id for fields generated from * in queries like this:
  SELECT * FROM <view> ...
mysql-test/t/view.test:
  Added a test case for bug #11771.
mysql-test/r/view.result:
  Added a test case for bug #11771.
2005-07-12 05:18:05 -07:00
unknown
eeee5fb10b Merge with 4.1
Makefile.am:
  Auto merged
myisam/mi_create.c:
  Auto merged
myisam/mi_open.c:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysys/thr_alarm.c:
  Auto merged
VC++Files/sql/mysqld.dsp:
  Keep old
client/mysqldump.c:
  Manual merge
client/mysqltest.c:
  Automatic merge
configure.in:
  Manual merge
mysql-test/r/ctype_ucs.result:
  Auto merge
mysql-test/r/func_str.result:
  Auto merge
mysql-test/r/group_by.result:
  Auto merge
mysql-test/r/insert_select.result:
  Auto merge
mysql-test/r/insert_update.result:
  Auto merge
mysql-test/r/lowercase_table2.result:
  Auto merge
mysql-test/r/select.result:
  Manual merge
mysql-test/r/variables.result:
  Auto merge
mysql-test/t/ctype_ucs.test:
  Auto merge
mysql-test/t/func_str.test:
  Auto merge
mysql-test/t/group_by.test:
  Auto merge
mysql-test/t/insert_select.test:
  Auto merge
mysql-test/t/insert_update.test:
  Auto merge
mysql-test/t/ndb_alter_table.test:
  Auto merge
mysql-test/t/select.test:
  Auto merge
mysql-test/t/variables.test:
  Auto merge
mysys/my_access.c:
  Auto merge
scripts/make_win_src_distribution.sh:
  Auto merge
sql/field.cc:
  Manual merge
sql/ha_ndbcluster.cc:
  Auto merge
sql/handler.cc:
  Auto merge
sql/item.cc:
  Auto merge
sql/item.h:
  Manual merge
sql/item_cmpfunc.h:
  Auto merge
sql/item_strfunc.cc:
  Auto merge
sql/item_strfunc.h:
  Auto merge
sql/mysql_priv.h:
  manual merge
sql/mysqld.cc:
  manual merge
sql/opt_range.cc:
  manual merge
sql/set_var.cc:
  Auto merge
sql/sql_base.cc:
  manual merge
  Restore processing of ON DUPLICATE KEY UPDATE
sql/sql_insert.cc:
  manual merge
  Restore processing of ON DUPLICATE KEY UPDATE
  Simplify mysql_prepare_insert by using local variable for select_lex and save old values just before they are changed
sql/sql_parse.cc:
  Restore processing of ON DUPLICATE KEY UPDATE
sql/sql_prepare.cc:
  New ON DUPLICATE KEY UPDATE handling
sql/sql_select.cc:
  manual merge
sql/sql_table.cc:
  auto merge
sql/sql_yacc.yy:
  auto merge
strings/ctype-ucs2.c:
  auto merge
strings/ctype-utf8.c:
  auto merge
2005-07-03 14:17:52 +03:00
unknown
7dad490f36 Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0


mysql-test/r/view.result:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-07-01 03:50:48 -07:00
unknown
66b4354a84 view.result:
Fixed the results of a test for group_concat.
  After the fix foor bug #11639 the results became
  correct.
olap.result, olap.test:
  Added a test case for bug #11639.
sql_select.cc:
  Fixed bug #11639: a wrong result set when using a view
  instead of the underlying table in a rollup query 
  executed through filesort.
  The old code did not take into account that we always
  use an Item_ref object when referring to a view column.
item.h:
  Fixed bug #11639.
  Now if two Item_ref items ref1 and ref2 refer to the same field
  then ref1->eq(ref2) returns 1.


sql/item.h:
  Fixed bug #11639.
  Now if two Item_ref items ref1 and ref2 refer to the same field
  then ref1->eq(ref2) returns 1.
sql/sql_select.cc:
  Fixed bug #11639: a wrong result set when using a view
  instead of the underlying table in a rollup query 
  executed through filesort.
  The old code did not take into account that we always
  use an Item_ref object when referring to a view column.
mysql-test/t/olap.test:
  Added a test case for bug #11639.
mysql-test/r/olap.result:
  Added a test case for bug #11639.
mysql-test/r/view.result:
  Fixed the results of a test for group_concat.
  After the fix foor bug #11639 the results became
  correct.
2005-07-01 03:46:08 -07:00
unknown
b4f595b95f Name resolution context added (BUG#6443)
include/my_bitmap.h:
  new bitmap operation
mysql-test/r/view.result:
  added warnings
  Correct inserting data check (absence of default value) for view underlying tables (BUG#6443)
mysql-test/t/view.test:
  Correct inserting data check (absence of default value) for view underlying tables (BUG#6443)
mysys/my_bitmap.c:
  new bitmap operation
sql/field.h:
  index of field in table added
sql/item.cc:
  Name resolution context added
  table list removed from fix_fields() arguments
sql/item.h:
  Name resolution context added
  table list removed from fix_fields() arguments
sql/item_cmpfunc.cc:
  table list removed from fix_fields() arguments
sql/item_cmpfunc.h:
  table list removed from fix_fields() arguments
sql/item_func.cc:
  table list removed from fix_fields() arguments
sql/item_func.h:
  table list removed from fix_fields() arguments
sql/item_row.cc:
  table list removed from fix_fields() arguments
sql/item_row.h:
  table list removed from fix_fields() arguments
sql/item_strfunc.cc:
  fixed server crash on NULL argument
sql/item_strfunc.h:
  table list removed from fix_fields() arguments
sql/item_subselect.cc:
  table list removed from fix_fields() arguments
sql/item_subselect.h:
  table list removed from fix_fields() arguments
sql/item_sum.cc:
  table list removed from fix_fields() arguments
sql/item_sum.h:
  table list removed from fix_fields() arguments
sql/item_timefunc.cc:
  table list removed from fix_fields() arguments
sql/item_timefunc.h:
  table list removed from fix_fields() arguments
sql/item_uniq.h:
  table list removed from fix_fields() arguments
sql/log_event.cc:
  Name resolution context added
sql/log_event.h:
  Name resolution context added
sql/mysql_priv.h:
  Name resolution context added
sql/set_var.cc:
  table list removed from fix_fields() arguments
sql/share/errmsg.txt:
  new error message
sql/sp.cc:
  Name resolution context added
sql/sp_head.cc:
  table list removed from fix_fields() arguments
sql/sp_head.h:
  Name resolution context added
sql/sql_base.cc:
  table list removed from fix_fields() arguments
  Name resolution context added
sql/sql_class.cc:
  renamed variable
sql/sql_delete.cc:
  Name resolution context added
sql/sql_derived.cc:
  Name resolution context added
sql/sql_do.cc:
  table list removed from fix_fields() arguments
sql/sql_handler.cc:
  Name resolution context added
sql/sql_help.cc:
  Name resolution context added
sql/sql_insert.cc:
  Name resolution context added
  table list removed from fix_fields() arguments
sql/sql_lex.cc:
  Name resolution context added
sql/sql_lex.h:
  removed resolve mode (information stored into name resolution context)
sql/sql_load.cc:
  table list removed from fix_fields() arguments
sql/sql_olap.cc:
  Name resolution context added
sql/sql_parse.cc:
  Name resolution context added
sql/sql_prepare.cc:
  table list removed from fix_fields() arguments
sql/sql_select.cc:
  table list removed from fix_fields() arguments
sql/sql_show.cc:
  Name resolution context added
sql/sql_trigger.cc:
  table list removed from fix_fields() arguments
sql/sql_udf.h:
  table list removed from fix_fields() arguments
sql/sql_union.cc:
  Name resolution context added
sql/sql_update.cc:
  Name resolution context added
sql/sql_view.cc:
  Name resolution context added
sql/sql_view.h:
  table list removed from fix_fields() arguments
sql/sql_yacc.yy:
  Name resolution context added
sql/table.cc:
  Name resolution context added
  merged view processing moved
sql/table.h:
  merged view processing moved
2005-07-01 07:05:42 +03:00
unknown
d10877ce8c Better bug fix for:
#9728  'Decreased functionality in "on duplicate key update
#8147  'a column proclaimed ambigous in INSERT ... SELECT .. ON DUPLICATE'

This ensures fields are uniquely qualified and also that one can't update other tables in the ON DUPLICATE KEY UPDATE part


mysql-test/r/insert_select.result:
  More tests for bug #9728 and #8147
mysql-test/r/insert_update.result:
  Updated tests after changing how INSERT ... SELECT .. ON DUPLICATE KEY works
mysql-test/t/insert_select.test:
  More tests for bug #9728 and #8147
mysql-test/t/insert_update.test:
  Updated tests after changing how INSERT ... SELECT .. ON DUPLICATE KEY works
mysys/my_access.c:
  Cleanup (shorter loop variable names)
sql/ha_ndbcluster.cc:
  Indentation fixes
sql/item.cc:
  Remove item_flags
sql/item.h:
  Remove item_flags
sql/mysql_priv.h:
  New arguments to mysql_prepare_insert
sql/sql_base.cc:
  Remove old fix for bug #8147
sql/sql_insert.cc:
  Extend mysql_prepare_insert() with new field list for tables that can be used in the values port of ON DUPLICATE KEY UPDATE
sql/sql_parse.cc:
  Revert fix for #9728
  Allow one to use other tables in ON DUPLICATE_KEY for INSERT ... SELECT if there is no GROUP BY clause
sql/sql_prepare.cc:
  New arguments to mysql_prepare_insert
sql/sql_yacc.yy:
  Revert bug fix for #9728
2005-06-27 16:46:41 +03:00
unknown
f3a3e05249 Bug #9728 fix merge
mysql-test/r/insert_select.result:
  Auto merged
mysql-test/t/insert_select.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_base.cc:
  Manual merge
sql/sql_parse.cc:
  Manual merge
sql/sql_yacc.yy:
  Manual merge
2005-06-23 01:02:43 +04:00
unknown
256c99fdb2 item.h:
Fix for fix for bug#9728 decreased functionality in "on duplicate key update"
  Have to return false to set flag for whole expression.


sql/item.h:
  Fix for fix for bug#9728 decreased functionality in "on duplicate key update"
  Have to return false to set flag for whole expression.
2005-06-22 22:58:44 +04:00