Commit graph

570 commits

Author SHA1 Message Date
unknown
f4f15b5435 Merge dl145s.mysql.com:/data/bk/team_tree_merge/mysql-5.1
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1-opt


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/table.cc:
  Auto merged
2006-10-19 16:00:06 +02:00
unknown
d30186772f Merge dl145s.mysql.com:/data/bk/team_tree_merge/mysql-5.0
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt


mysql-test/r/merge.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/table.cc:
  Auto merged
2006-10-19 14:37:49 +02:00
unknown
98fd299133 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint_20061016
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint


BitKeeper/deleted/.del-collapsed:
  auto-union
BitKeeper/etc/collapsed:
  auto-union
Makefile.am:
  Auto merged
client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
include/my_dbug.h:
  Auto merged
mysql-test/lib/mtr_cases.pl:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/csv.result:
  Auto merged
mysql-test/r/mysql.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/csv.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
netware/BUILD/compile-netware-END:
  Auto merged
sql/field.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_view.h:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/time.cc:
  Auto merged
vio/viosocket.c:
  Auto merged
vio/viossl.c:
  Auto merged
mysql-test/include/mix1.inc:
  Manual merge.
mysql-test/r/func_time.result:
  Manual merge.
mysql-test/r/innodb_mysql.result:
  Manual merge.
mysql-test/t/func_time.test:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
sql/sql_view.cc:
  Manual merge.
2006-10-17 12:00:36 -04:00
unknown
48dfeb4de0 Fix previous bad patch for Bug#14262.
Remove table engine qualification where it's unnecessary.


mysql-test/r/view.result:
  Remove requirement for innodb where not needed.  (Running this test alone
  raised warnings that it was using myisam.)
mysql-test/t/view.test:
  Remove requirement for innodb where not needed.  (Running this test alone
  raised warnings that it was using myisam.)
sql/sql_parse.cc:
  Fix previous bad re-patch.
sql/sql_view.cc:
  Fix previous bad re-patch.
2006-10-17 11:06:11 -04:00
unknown
81eb1ccda2 Bug#21370: View renaming lacks tablename_to_filename encoding
Problem: renaming of FRM file and ARC files didn't use file name
  encoding, so RENAME TABLE for views failed for views having
  "tricky" characters in their names.
  Fix: adding build_table_filename() in missing places.


mysql-test/r/view.result:
  Adding test case
mysql-test/t/view.test:
  Adding test case
sql/parse_file.cc:
  Adding build_table_filename()
sql/sql_view.cc:
  Adding build_table_filename()
2006-10-16 22:42:03 +05:00
unknown
649f3d5479 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug20953


mysql-test/r/view.result:
  Auto merged
mysql-test/t/sp-error.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/sp-error.result:
  Manual merge.
2006-10-12 18:33:07 +04:00
unknown
8acc9a9612 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug20953
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug20953


mysql-test/r/view.result:
  Auto merged
mysql-test/t/sp-error.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/sp-error.result:
  Manual merge.
2006-10-12 18:06:26 +04:00
unknown
6d1fdc7308 BUG#20953: create proc with a create view that uses local vars/params
should fail to create

The problem was that this type of errors was checked during view
creation, which doesn't happen when CREATE VIEW is a statement of
a created stored routine.

The solution is to perform the checks at parse time.  The idea of the
fix is that the parser checks if a construction just parsed is allowed
in current circumstances by testing certain flags, and this flags are
reset for VIEWs.

The side effect of this change is that if the user already have
such bogus routines, it will now get a error when trying to do

  SHOW CREATE PROCEDURE proc;

(and some other) and when trying to execute such routine he will get

  ERROR 1457 (HY000): Failed to load routine test.p5. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)

However there should be very few such users (if any), and they may
(and should) drop these bogus routines.


mysql-test/r/sp-error.result:
  Add result for bug#20953: create proc with a create view that uses
  local vars/params should fail to create.
mysql-test/r/view.result:
  Update results.
mysql-test/t/sp-error.test:
  Add test case for bug#20953: create proc with a create view that uses
  local vars/params should fail to create.
mysql-test/t/view.test:
  Add second test for variable in a view.
  Remove SP variable in a view test, as it tests wrong behaviour.
  Add test for derived table in a view.
sql/sql_lex.cc:
  Remove LEX::variables_used.
sql/sql_lex.h:
  Remove LEX::variables_used and add st_parsing_options structure and
  LEX::parsing_options member.
sql/sql_view.cc:
  Move some error checking to sql/sql_yacc.yy.
sql/sql_yacc.yy:
  Check for disallowed syntax in a CREATE VIEW at parse time to rise a
  error when it is used inside CREATE PROCEDURE and CREATE FUNCTION, as
  well as by itself.
2006-10-12 18:02:57 +04:00
unknown
c942d5bfb1 Fix after manial merge. 2006-10-10 17:51:12 +04:00
unknown
9fdd94a7e1 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug19111


sql/sql_base.cc:
  Auto merged
mysql-test/r/view.result:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
2006-10-10 16:44:59 +04:00
unknown
c4e977ce0a Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug19111
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug19111


sql/sql_base.cc:
  Auto merged
mysql-test/r/view.result:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
2006-10-10 14:00:49 +04:00
unknown
469ff92d81 Bug#19111: TRIGGERs selecting from a VIEW on the firing base table fail.
In a trigger or a function used in a statement it is possible to do
SELECT from a table being modified by the statement.  However,
encapsulation of such SELECT into a view and selecting from a view
instead of direct SELECT was not possible.

This happened because tables used by views (which in their turn
were used from functions/triggers) were not excluded from checks
in unique_table() routine as it happens for the rest of tables
added to the statement table list for prelocking.

With this fix we ignore all such tables in unique_table(), thus
providing consistency: inside a trigger or a functions SELECT from
a view may be used where plain SELECT is allowed.  Modification of
the same table from function or trigger is still disallowed.  Also,
this patch doesn't affect the case where SELECT from the table being
modified is done outside of function of trigger, such SELECTs are
still disallowed (this limitation and visibility problem when function
select from a table being modified are subjects of bug 21326).  See
also bug 22427.


mysql-test/r/view.result:
  Add result for bug#19111: TRIGGERs selecting from a VIEW on the
  firing base table fail.
mysql-test/t/view.test:
  Add test case for bug#19111: TRIGGERs selecting from a VIEW on the
  firing base table fail.
sql/sql_base.cc:
  In unique_table() do not check tables that are used in a stored
  function or a trigger ('prelocking_placeholder' is set).  If such
  function or a trigger will attempt to modify a table, the error will
  be given, however select is allowed there.
2006-10-10 13:44:04 +04:00
unknown
7dad8e692e After merge fix
BitKeeper/deleted/.del-ps_6bdb.result:
  Auto merged
client/mysql.cc:
  Auto merged
include/m_ctype.h:
  Auto merged
mysql-test/r/cast.result:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysql-test/t/cast.test:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
mysql-test/t/strict.test:
  Auto merged
sql/field_conv.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
strings/ctype-big5.c:
  Auto merged
strings/ctype-bin.c:
  Auto merged
strings/ctype-cp932.c:
  Auto merged
strings/ctype-euc_kr.c:
  Auto merged
strings/ctype-eucjpms.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-ucs2.c:
  Auto merged
strings/ctype-ujis.c:
  Auto merged
strings/ctype-utf8.c:
  Auto merged
2006-10-03 16:00:09 +05:00
unknown
0ca2e21b5e Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge


mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
2006-10-02 14:19:51 +02:00
unknown
e1f79d43d0 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/16813/my50-16813


sql/table.cc:
  Auto merged
mysql-test/r/view.result:
  merging
mysql-test/t/view.test:
  merging
2006-10-01 18:06:07 +05:00
unknown
5db08aa988 Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/16813/my51-16813


sql/table.cc:
  Auto merged
mysql-test/r/view.result:
  merging
mysql-test/t/view.test:
  merging
2006-10-01 16:43:35 +05:00
unknown
4357e22061 Merge mysql.com:/usr/home/bar/mysql-5.0.b6147v2
into  mysql.com:/usr/home/bar/mysql-5.0.b6147rpl


mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/ps_6bdb.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/r/strict.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/r/warnings.result:
  Auto merged
mysql-test/t/strict.test:
  Auto merged
sql/field.cc:
  Auto merged
2006-09-29 16:40:18 +05:00
unknown
08f6fca42d Merge dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1-opt


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2006-09-29 11:30:35 +02:00
unknown
9314fabdd3 Merge mysql.com:/home/hf/work/16813/my50-16813
into  mysql.com:/home/hf/work/16813/my51-16813


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/table.cc:
  Auto merged
2006-09-29 12:17:33 +05:00
unknown
5389cc169a bug #16813 (WITH CHECK OPTION fails with UPDATE)
We use the condition from CHECK OPTION twice handling UPDATE command.
First we construnct 'update_cond' AND 'option_cond'
condition to select records to be updated, then we check the
'option_cond' for the updated row.
The problem is that first 'AND' condition is optimized during the 'select'
which can break 'option_cond' structure, so it will be unusable for
the sectond use - to check the updated row.
Possible soultion is either use copy of the condition in the first
use or to make optimization less traumatic for the operands.
I picked the first one. 


mysql-test/r/view.result:
  result fixed
mysql-test/t/view.test:
  testcase
sql/table.cc:
  now we use the copy of the CHECK OPTION condition to construct
  the select's condition
2006-09-29 12:16:07 +05:00
unknown
0954261761 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/5505-bug-5.0-opt-mysql


sql/share/errmsg.txt:
  Auto merged
sql/sql_base.cc:
  Auto merged
mysql-test/r/view.result:
  Manual merge
mysql-test/t/view.test:
  Manual merge
2006-09-29 01:01:52 +04:00
unknown
d332c37c58 Fixed bug#5505: Wrong error message on INSERT into a view
On an INSERT into an updatable but non-insertable view an error message was
issued stating the view being not updatable. This can lead to a confusion of a
user.

A new error message is introduced. Is is showed when a user tries to insert
into a non-insertable view.


sql/sql_base.cc:
  Fixed bug#5505: Wrong error message on INSERT into a view
  The update_non_unique_table_error() function now issues proper
  error for an INSERT.
sql/sql_insert.cc:
  Fixed bug#5505: Wrong error message on INSERT into a view
  Issue the ER_NON_INSERTABLE_TABLE error instead of the 
  ER_NON_UPDATABLE_TABLE on insert into a view.
sql/sql_view.cc:
  Fixed bug#5505: Wrong error message on INSERT into a view
  Issue the ER_NON_INSERTABLE_TABLE error instead of the
  ER_NON_UPDATABLE_TABLE on insert into a view.
mysql-test/r/view.result:
  Added the test case for bug#5505: Wrong error message on INSERT into a view
  Corrected a few test cases after fixing bug#5505
mysql-test/t/view.test:
  Added the test case for bug#5505: Wrong error message on INSERT into a view
  Corrected a few test cases after fixing bug#5505
sql/share/errmsg.txt:
  Fixed bug#5505: Wrong error message on INSERT into a view
  Added the ER_NON_INSERTABLE_TABLE error definition.
2006-09-29 01:00:18 +04:00
unknown
c689d424fd Merge macbook.gmz:/Users/kgeorge/mysql/work/B21174-5.0-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B21174-5.1-opt


mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/group_by.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/field.h:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
mysql-test/r/ps.result:
  merge 5.0-opt -> 5.1-opt
sql/unireg.cc:
  merge 5.0-opt -> 5.1-opt
2006-09-27 13:03:41 +03:00
unknown
f0bd502ac8 Fixed bug #21646.
Presence of a subquery in the ON expression of a join 
should not block merging the view that contains this join.
Before this patch the such views were converted into 
into temporary table views.


mysql-test/r/view.result:
  Added a test case for bug #21646.
mysql-test/t/view.test:
  Added a test case for bug #21646.
sql/mysql_priv.h:
  Fixed bug #21646.
  Added a new parsing state 'IN_ON', true when
  the parser is in an ON expression of a join.
sql/sql_lex.cc:
  Fixed bug #21646.
  Presence of a subquery in the ON expression of a join 
  should not block merging the view that contains this join.
sql/sql_yacc.yy:
  Fixed bug #21646.
  Added a new parsing state 'IN_ON', true when
  the parser is in an ON expression of a join.
2006-09-25 06:15:14 -07:00
unknown
5222b59093 Merge dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1


mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/group_by.result:
  Auto merged
mysql-test/r/heap_hash.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/join_outer.result:
  Auto merged
mysql-test/r/olap.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/range.result:
  Auto merged
mysql-test/r/row.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/type_date.result:
  Auto merged
mysql-test/r/union.result:
  Auto merged
mysql-test/r/view_grant.result:
  Auto merged
mysql-test/t/func_group.test:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_list.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/t/sp.test:
  SCCS merged
sql/item_cmpfunc.cc:
  SCCS merged
sql/sql_select.cc:
  SCCS merged
2006-09-18 12:57:20 +02:00
unknown
4c8e0e192b merge fixes 2006-09-18 12:14:27 +02:00
unknown
e4b044060c Merge dl145s.mysql.com:/data/bk/team_tree_merge/CLEAN/mysql-5.0
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt


sql/item.cc:
  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/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/item.h:
  SCCS merged
2006-09-15 11:52:49 +02:00
unknown
22c3e7b4e1 Fixed bug #5500: EXPLAIN returned a wrong select_type for queries using views.
Select_type in the EXPLAIN output for the query SELECT * FROM t1 was
'SIMPLE', while for the query SELECT * FROM v1, where the view v1
was defined as SELECT * FROM t1, the EXPLAIN output contained 'PRIMARY'
for the select_type column.
 


mysql-test/r/group_by.result:
  Adjusted results after the fix for bug #5500.
mysql-test/r/information_schema.result:
  Adjusted results after the fix for bug #5500.
mysql-test/r/olap.result:
  Adjusted results after the fix for bug #5500.
mysql-test/r/range.result:
  Adjusted results after the fix for bug #5500.
mysql-test/r/view.result:
  Added a test case for bug #5500.
  Adjusted other results.
mysql-test/r/view_grant.result:
  Adjusted results after the fix for bug #5500.
mysql-test/t/view.test:
  Added a test case for bug #5500.
2006-09-06 08:21:43 -07:00
unknown
f83f742b55 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint


include/config-netware.h:
  Auto merged
include/mysql.h:
  Auto merged
include/mysql_com.h:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/grant.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/share/errmsg.txt:
  SCCS merged
configure.in:
  SCCS merged
sql/sql_base.cc:
  SCCS merged
2006-09-05 13:49:24 -04:00
unknown
9b7a511ac1 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint


mysql-test/r/grant.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/grant.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sql_acl.cc:
  Auto merged
2006-09-05 13:44:07 -04:00
unknown
655470cefc Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint


mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/im_life_cycle.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/grant.test:
  Auto merged
mysql-test/t/im_life_cycle.imtest:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
configure.in:
  Manual merge.
mysql-test/r/grant.result:
  manual merge.
2006-09-05 13:42:41 -04:00
unknown
91d44bc2f0 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint


mysql-test/r/trigger.result:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
mysql-test/r/grant.result:
  Manual merge.
mysql-test/r/sp.result:
  Manual merge.
mysql-test/r/view.result:
  Manual merge.
mysql-test/t/grant.test:
  Manual merge.
mysql-test/t/sp.test:
  Manual merge.
mysql-test/t/view.test:
  manual merge.
sql/sql_acl.cc:
  manual merge.
sql/sql_parse.cc:
  manual merge.
sql/sql_yacc.yy:
  manual merge.
2006-09-05 13:35:13 -04:00
unknown
16de51bc07 Merge moonbone.local:/home/evgen/bk-trees/mysql-5.1-opt
into  moonbone.local:/work/tmp_merge-5.1-mysql


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2006-09-01 14:08:38 +04:00
unknown
8f0b5afa22 Post-merge fixes.
mysql-test/r/view.result:
  A post-merge fix.
mysql-test/t/grant.test:
  A post-merge fix.
mysql-test/t/view.test:
  A post-merge fix.
2006-08-30 03:22:59 +04:00
unknown
5fab3969af Merge bodhi.local:/opt/local/work/mysql-5.0-runtime-safemerge
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge


BitKeeper/deleted/.del-im_check_os.inc:
  Auto merged
BitKeeper/deleted/.del-im_options_set.imtest~b53d9d60e5684833:
  Auto merged
BitKeeper/deleted/.del-im_options_set.result~59278f56be61d921:
  Auto merged
BitKeeper/deleted/.del-im_options_unset.imtest~768eb186b51d0048:
  Auto merged
configure.in:
  Auto merged
BitKeeper/deleted/.del-im_options_unset.result~20a4790cd3c70a4f:
  Auto merged
include/mysql_com.h:
  Auto merged
mysql-test/lib/mtr_io.pl:
  Auto merged
mysql-test/r/im_daemon_life_cycle.result:
  Auto merged
mysql-test/r/im_life_cycle.result:
  Auto merged
mysql-test/r/im_utils.result:
  Auto merged
mysql-test/r/sp-error.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/type_varchar.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
  Auto merged
mysql-test/t/im_life_cycle.imtest:
  Auto merged
mysql-test/t/im_utils.imtest:
  Auto merged
mysql-test/t/sp-error.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
mysql-test/t/type_varchar.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_row.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/net_serv.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_cache.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_error.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_trigger.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/mysql-test-run.pl:
  Use local. Alik will merge his changes manually.
mysql-test/lib/mtr_process.pl:
  Use local.
mysql-test/r/grant.result:
  Use local.
mysql-test/r/sp.result:
  Use local.
mysql-test/r/ps.result:
  Manual merge.
mysql-test/t/grant.test:
  Manual merge.
mysql-test/t/ps.test:
  Manual merge.
mysql-test/t/sp.test:
  Manual merge.
sql/Makefile.am:
  Manual merge.
sql/field.cc:
  Manual merge.
sql/mysqld.cc:
  Manual merge.
sql/share/errmsg.txt:
  Manual merge.
sql/sp.cc:
  Manual merge.
sql/sp_head.h:
  Manual merge.
sql/sql_trigger.cc:
  Manual merge.
sql/sql_view.cc:
  Manual merge.
2006-08-30 03:00:19 +04:00
unknown
8ea5f31a46 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-14897


configure.in:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/im_life_cycle.result:
  Auto merged
mysql-test/t/im_life_cycle.imtest:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
mysql-test/r/grant.result:
  Manual merge.
mysql-test/r/view.result:
  Manual merge.
mysql-test/t/grant.test:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
2006-08-30 00:45:33 +04:00
unknown
f57382196b Merge moonbone.local:/work/tmp_merge-5.0-mysql
into  moonbone.local:/work/tmp_merge-5.1-opt-mysql


BUILD/check-cpu:
  Auto merged
include/config-netware.h:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/group_by.result:
  Auto merged
mysql-test/r/join_outer.result:
  Auto merged
mysql-test/r/ndb_condition_pushdown.result:
  Auto merged
mysql-test/r/range.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/type_datetime.result:
  Auto merged
mysql-test/r/user_var.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/range.test:
  Auto merged
mysql-test/t/select.test:
  Auto merged
mysql-test/t/type_datetime.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/ha_innodb.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/item_subselect.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
storage/innobase/btr/btr0btr.c:
  Auto merged
storage/innobase/buf/buf0buf.c:
  Auto merged
storage/innobase/dict/dict0dict.c:
  Auto merged
storage/innobase/fil/fil0fil.c:
  Auto merged
storage/innobase/fsp/fsp0fsp.c:
  Auto merged
storage/innobase/include/buf0buf.ic:
  Auto merged
storage/innobase/log/log0log.c:
  Auto merged
storage/innobase/log/log0recv.c:
  Auto merged
storage/innobase/os/os0file.c:
  Auto merged
storage/innobase/row/row0sel.c:
  Auto merged
storage/innobase/srv/srv0start.c:
  Auto merged
storage/innobase/ut/ut0dbg.c:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
client/mysqltest.c:
  Manual merge
mysql-test/r/innodb_mysql.result:
  Manual merge
mysql-test/t/innodb_mysql.test:
  Manual merge
mysql-test/t/join_outer.test:
  Manual merge
sql/item_cmpfunc.cc:
  Manual merge
sql/mysql_priv.h:
  Manual merge
sql/opt_range.cc:
  Manual merge
sql/sql_base.cc:
  Manual merge
storage/innobase/include/btr0cur.ic:
  Manual merge
storage/innobase/row/row0mysql.c:
  Manual merge
2006-08-29 18:58:50 +04:00
unknown
b2d1f7a444 Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17591


mysql-test/r/view.result:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
2006-08-29 14:37:52 +04:00
unknown
7a5a2544bf BUG#17591: Updatable view not possible with trigger or stored function
When a view was used inside a trigger or a function, lock type for
tables used in a view was always set to READ (thus making the view
non-updatable), even if we were trying to update the view.

The solution is to set lock type properly.


mysql-test/r/view.result:
  Add result for bug#17591: Updatable view not possible with trigger
  or stored function.
mysql-test/t/view.test:
  Add test case for bug#17591: Updatable view not possible with trigger
  or stored function.
sql/sql_view.cc:
  Move the code that sets requested lock type before the point where
  we exit from mysql_make_view() when we process a placeholder for
  prelocked table.
2006-08-29 14:32:59 +04:00
unknown
cf9a718252 Merge moonbone.local:/work/tmp_merge-5.0-opt-mysql
into  moonbone.local:/work/tmp_merge-5.0-mysql


mysql-test/r/view.result:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
2006-08-26 22:17:34 +04:00
unknown
21e6836b39 Fix for BUG#16899: Possible buffer overflow in handling of DEFINER-clause
User name (host name) has limit on length. The server code relies on these
limits when storing the names. The problem was that sometimes these limits
were not checked properly, so that could lead to buffer overflow.
  
The fix is to check length of user/host name in parser and if string is too
long, throw an error.


mysql-test/r/grant.result:
  Updated result file.
mysql-test/r/sp.result:
  Updated result file.
mysql-test/r/trigger.result:
  Updated result file.
mysql-test/r/view.result:
  Updated result file.
mysql-test/t/grant.test:
  Added test for BUG#16899.
mysql-test/t/sp.test:
  Added test for BUG#16899.
mysql-test/t/trigger.test:
  Added test for BUG#16899.
mysql-test/t/view.test:
  Added test for BUG#16899.
sql/mysql_priv.h:
  Added prototype for new function.
sql/sql_acl.cc:
  Remove outdated checks.
sql/sql_parse.cc:
  Add a new function for checking string length.
sql/share/errmsg.txt:
  Added new resources.
sql/sql_yacc.yy:
  Check length of user/host name.
2006-08-24 16:29:24 +04:00
unknown
d0394c7070 view.result, view.test:
Corrected test case for the bug#21261
sql_parse.cc:
  Corrected fix for bug#21261


mysql-test/t/view.test:
  Corrected test case for the bug#21261
mysql-test/r/view.result:
  Corrected test case for the bug#21261
sql/sql_parse.cc:
  Corrected fix for bug#21261
2006-08-24 03:05:13 +04:00
unknown
f96ee72fb0 Fix for BUG#16899: Possible buffer overflow in handling of DEFINER-clause
User name (host name) has limit on length. The server code relies on these
limits when storing the names. The problem was that sometimes these limits
were not checked properly, so that could lead to buffer overflow.

The fix is to check length of user/host name in parser and if string is too
long, throw an error.


mysql-test/r/grant.result:
  Updated result file.
mysql-test/r/sp.result:
  Updated result file.
mysql-test/r/trigger.result:
  Updated result file.
mysql-test/r/view.result:
  Updated result file.
mysql-test/t/grant.test:
  Added test for BUG#16899.
mysql-test/t/sp.test:
  Added test for BUG#16899.
mysql-test/t/trigger.test:
  Added test for BUG#16899.
mysql-test/t/view.test:
  Added test for BUG#16899.
sql/mysql_priv.h:
  Added prototype for new function.
sql/share/errmsg.txt:
  Added new resources.
sql/sql_acl.cc:
  Remove outdated checks.
sql/sql_parse.cc:
  Add a new function for checking string length.
sql/sql_yacc.yy:
  Check length of user/host name.
2006-08-23 21:31:00 +04:00
unknown
1cbebc6e18 ndb_condition_pushdown.result:
Corrected test case result after fix for bug#18165
view.result, view.test:
  Corrected test case for bug#21261


mysql-test/t/view.test:
  Corrected test case for bug#21261
mysql-test/r/view.result:
  Corrected test case for bug#21261
mysql-test/r/ndb_condition_pushdown.result:
  Corrected test case result after fix for bug#18165
2006-08-17 18:50:53 +04:00
unknown
c234aaa0ed Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  sunlight.local:/local_work/21261-bug-5.0-mysql


sql/sql_select.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2006-08-16 18:17:58 +04:00
unknown
a23d1792bc Fixed bug#21261: Wrong access rights was required for an insert into a view
SELECT right instead of INSERT right was required for an insert into to a view.
This wrong behaviour appeared after the fix for bug #20989. Its intention was
to ask only SELECT right for all tables except the very first for a complex
INSERT query. But that patch has done it in a wrong way and lead to asking 
a wrong access right for an insert into a view.

The setup_tables_and_check_access() function now accepts two want_access
parameters. One will be used for the first table and the second for other
tables.


mysql-test/t/view.test:
  Added a test case for bug#21261: Wrong access rights was required for an insert into a view
mysql-test/r/view.result:
  Added a test case for bug#21261: Wrong access rights was required for an insert into a view
sql/sql_update.cc:
  Fixed bug#21261: Wrong access rights was required for an insert into a view
  Modified to use updated setup_tables_and_check_access() function.
sql/sql_select.cc:
  Fixed bug#21261: Wrong access rights was required for an insert into a view
  Modified to use updated setup_tables_and_check_access() function.
sql/sql_load.cc:
  Fixed bug#21261: Wrong access rights was required for an insert into a view
  Modified to use updated setup_tables_and_check_access() function.
sql/sql_insert.cc:
  Fixed bug#21261: Wrong access rights was required for an insert into a view
  Modified to use updated setup_tables_and_check_access() function.
sql/sql_delete.cc:
  Fixed bug#21261: Wrong access rights was required for an insert into a view
  Modified to use updated setup_tables_and_check_access() function.
sql/sql_base.cc:
  Fixed bug#21261: Wrong access rights was required for an insert into a view
  The setup_tables_and_check_access() function now accepts two want_access
  parameters. One will be used for the first table and the second for other
  tables.
sql/mysql_priv.h:
  Fixed bug#21261: Wrong access rights was required for an insert into a view
  The setup_tables_and_check_access() function now accepts two want_access
  parameters.
2006-08-15 21:45:24 +04:00
unknown
c2ef98ad4c Fixed bug#15950: NOW() optimized away in VIEWs
This bug is a side-effect of bug fix #16377. NOW() is optimized in
BETWEEN to integer constants to speed up query execution. When view is being
created it saves already modified query and thus becomes wrong.

The agg_cmp_type() function now substitutes constant result DATE/TIME functions 
for their results only if the current query isn't CREATE VIEW or SHOW CREATE
VIEW.


mysql-test/t/view.test:
  Added a test case for bug#15950: NOW() optimized away in VIEWs
mysql-test/r/view.result:
  Added a test case for bug#15950: NOW() optimized away in VIEWs
sql/item_cmpfunc.cc:
  Fixed bug#15950: NOW() optimized away in VIEWs
  The agg_cmp_type() function now substitutes constant result DATE/TIME functions 
  for their results only if the current query isn't CREATE VIEW or SHOW CREATE
  VIEW.
2006-08-15 21:02:55 +04:00
unknown
131f9a71d1 Merge xiphis.org:/home/antony/work2/mysql-5.0-engines
into  xiphis.org:/home/antony/work2/mysql-5.0-merge


mysql-test/r/create.result:
  Auto merged
mysql-test/r/federated.result:
  Auto merged
mysql-test/r/insert_select.result:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/ps_6bdb.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysql-test/r/strict.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/r/warnings.result:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
2006-08-14 21:27:36 -07:00
unknown
66f6b5ba12 Bug#16172 DECIMAL data type processed incorrectly
issue an 'overflow warning' if result value is bigger than max possible value


include/decimal.h:
  Bug#16172 DECIMAL data type processed incorrectly
  new function decimal_intg()
mysql-test/r/cast.result:
  Bug#16172 DECIMAL data type processed incorrectly
  result fix
mysql-test/r/type_newdecimal.result:
  Bug#16172 DECIMAL data type processed incorrectly
  test result
mysql-test/r/view.result:
  Bug#16172 DECIMAL data type processed incorrectly
  result fix
mysql-test/t/type_newdecimal.test:
  Bug#16172 DECIMAL data type processed incorrectly
  test case
sql/item_create.cc:
  Bug#16172 DECIMAL data type processed incorrectly
  do not increase decimal part on 2(according to manual)
sql/my_decimal.h:
  Bug#16172 DECIMAL data type processed incorrectly
  new function my_decimal_intg()
strings/decimal.c:
  Bug#16172 DECIMAL data type processed incorrectly
  new function decimal_intg()
2006-08-08 16:03:42 +05:00
unknown
a1bd0bd118 BUG#14770 - LOAD DATA INFILE doesn't respect default values for
columns
Fixed confusing warning.

Quoting INSERT section of the manual:
----
Inserting NULL into a column that has been declared NOT NULL. For
multiple-row INSERT statements or INSERT INTO ... SELECT statements, the
column is set to the implicit default value for the column data type. This
is 0 for numeric types, the empty string ('') for string types, and the
"zero" value for date and time types. INSERT INTO ... SELECT statements are
handled the same way as multiple-row inserts because the server does not
examine the result set from the SELECT to see whether it returns a single
row. (For a single-row INSERT, no warning occurs when NULL is inserted into
a NOT NULL column. Instead, the statement fails with an error.)
----
This is also true for LOAD DATA INFILE. For INSERT user can specify
DEFAULT keyword as a value to set column default. There is no similiar
feature available for LOAD DATA INFILE.


mysql-test/r/auto_increment.result:
  Fixed confusing warning.
mysql-test/r/create.result:
  Fixed confusing warning.
mysql-test/r/insert.result:
  Fixed confusing warning.
mysql-test/r/insert_select.result:
  Fixed confusing warning.
mysql-test/r/key.result:
  Fixed confusing warning.
mysql-test/r/null.result:
  Fixed confusing warning.
mysql-test/r/null_key.result:
  Fixed confusing warning.
mysql-test/r/ps_2myisam.result:
  Fixed confusing warning.
mysql-test/r/ps_3innodb.result:
  Fixed confusing warning.
mysql-test/r/ps_4heap.result:
  Fixed confusing warning.
mysql-test/r/ps_5merge.result:
  Fixed confusing warning.
mysql-test/r/ps_6bdb.result:
  Fixed confusing warning.
mysql-test/r/strict.result:
  Fixed confusing warning.
mysql-test/r/view.result:
  Fixed confusing warning.
mysql-test/r/warnings.result:
  Fixed confusing warning.
sql/share/errmsg.txt:
  Fixed confusing warning.
2006-08-02 17:15:50 +05:00
unknown
8ce7848a52 Merge sunlight.local:/local_work/tmp_merge-5.0-opt-mysql
into  sunlight.local:/local_work/tmp_merge-5.1-opt-mysql


client/mysql.cc:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
sql/sql_view.cc:
  SCCS merged
2006-08-01 20:52:21 +04:00
unknown
deee3a30d6 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  sunlight.local:/local_work/tmp_merge-5.1-opt-mysql


mysql-test/r/auto_increment.result:
  Auto merged
mysql-test/r/binlog_row_blackhole.result:
  Auto merged
mysql-test/r/binlog_stm_blackhole.result:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/r/func_compress.result:
  Auto merged
mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/func_math.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/func_system.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/gis.result:
  Auto merged
mysql-test/r/group_by.result:
  Auto merged
mysql-test/r/group_min_max.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/olap.result:
  Auto merged
mysql-test/r/partition_pruning.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/rpl_get_lock.result:
  Auto merged
mysql-test/r/rpl_master_pos_wait.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/type_blob.result:
  Auto merged
mysql-test/r/union.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/group_min_max.test:
  Auto merged
mysql-test/t/partition_pruning.test:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.h:
  Auto merged
2006-08-01 09:24:19 +04:00
unknown
464cb603f0 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B11551-5.0-opt


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sql_view.cc:
  Auto merged
2006-07-31 21:17:20 +03:00
unknown
b74cb62348 Bug #11551: Asymmetric + undocumented behaviour of DROP VIEW and DROP TABLE
made DROP VIEW to continue on error and report an aggregated error 
 at its end. This makes it similar to DROP TABLE.


mysql-test/r/view.result:
  Bug #11551: Asymmetric + undocumented behaviour of DROP VIEW and DROP TABLE
   - test case
   - changed error message
mysql-test/t/view.test:
  Bug #11551: Asymmetric + undocumented behaviour of DROP VIEW and DROP TABLE
   - test case
sql/sql_view.cc:
  Bug #11551: Asymmetric + undocumented behaviour of DROP VIEW and DROP TABLE
   - made DROP VIEW to continue on error and report an aggregated error
2006-07-31 20:56:06 +03:00
unknown
4acf6de89b Merge bk-internal:/home/bk/mysql-5.0-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B21080-5.0-opt


mysql-test/r/view.result:
  merge
mysql-test/t/view.test:
  merge
2006-07-31 17:40:09 +03:00
unknown
c8673b09b8 Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
When executing ALTER TABLE all the attributes of the view were overwritten.
  This is contrary to the user's expectations.
  So some of the view attributes are preserved now : namely security and 
  algorithm. This means that if they are not specified in ALTER VIEW
  their values are preserved from CREATE VIEW instead of being defaulted.


mysql-test/r/view.result:
  Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
   - test suite
mysql-test/t/view.test:
  Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
   - test suite
sql/sql_lex.h:
  Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
   - must make create_view_suid a tristate : on/off/unspecified
sql/sql_view.cc:
  Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
   - open the view to get it's attributes and put then as defaults 
     for ALTER VIEW
sql/sql_yacc.yy:
  Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
   - must make create_view_suid a tristate : on/off/unspecified
sql/table.h:
  Bug #21080: ALTER VIEW makes user restate SQL SECURITY mode, and ALGORITHM
   - must make create_view_suid a tristate : on/off/unspecified
2006-07-31 17:33:37 +03:00
unknown
ddb91478e8 Merge sunlight.local:/local_work/tmp_merge-5.0-opt-mysql
into  sunlight.local:/local_work/tmp_merge-5.1-opt-mysql


client/mysql.cc:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/group_min_max.result:
  Auto merged
BitKeeper/deleted/.del-make_win_src_distribution.sh~f80d8fca44e4e5f1:
  Auto merged
BitKeeper/deleted/.del-mysqld.dsp~ffdbf2d234e23e56:
  Auto merged
BitKeeper/deleted/.del-mysqld_ia64.dsp~7f8cf84d81ee04e2:
  Auto merged
BitKeeper/deleted/.del-mysqldump.dsp~a8bd23547d3fc27e:
  Auto merged
BitKeeper/deleted/.del-mysqldump_ia64.dsp~a2aabe898be35b31:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysql-test/r/type_ranges.result:
  Auto merged
mysql-test/r/udf.result:
  Auto merged
mysql-test/r/union.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
mysql-test/t/func_group.test:
  Auto merged
mysql-test/t/group_min_max.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/innodb_mysql.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/select.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/time.cc:
  Auto merged
storage/ndb/test/ndbapi/Makefile.am:
  Auto merged
strings/decimal.c:
  Auto merged
mysql-test/r/analyse.result:
  Manual merge
mysql-test/r/bigint.result:
  Manual merge
mysql-test/r/create.result:
  Manual merge
mysql-test/r/information_schema.result:
  Manual merge
mysql-test/r/ps_2myisam.result:
  Manual merge
mysql-test/r/ps_3innodb.result:
  Manual merge
mysql-test/r/ps_4heap.result:
  Manual merge
mysql-test/r/ps_5merge.result:
  Manual merge
mysql-test/r/ps_6bdb.result:
  Manual merge
mysql-test/r/rpl_insert_id.result:
  Manual merge
mysql-test/r/select.result:
  Manual merge
mysql-test/r/sp.result:
  Manual merge
mysql-test/r/subselect.result:
  Manual merge
mysql-test/t/information_schema.test:
  Manual merge
mysql-test/t/rpl_insert_id.test:
  Manual merge
sql/field.h:
  Manual merge
sql/item.cc:
  Manual merge
sql/item.h:
  Manual merge
sql/item_strfunc.h:
  Manual merge
sql/item_sum.cc:
  Manual merge
sql/mysql_priv.h:
  Manual merge
sql/share/errmsg.txt:
  Manual merge
sql/sql_class.h:
  Manual merge
sql/sql_select.cc:
  Manual merge
2006-07-30 00:33:24 +04:00
unknown
ef452e19bf BUG#14940 "MySQL choose wrong index", v.2
- Make the range-et-al optimizer produce E(#table records after table 
                                           condition is applied),
- Make the join optimizer use this value,
- Add "filtered" column to EXPLAIN EXTENDED to show 
  fraction of records left after table condition is applied
- Adjust test results, add comments


mysql-test/r/archive_gis.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/auto_increment.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/bdb_gis.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/bench_count_distinct.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/binlog_stm_blackhole.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/case.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/cast.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/compress.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ctype_collate.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ctype_cp1250_ch.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/date_formats.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/distinct.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/fulltext.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_compress.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_crypt.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_default.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_encrypt.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_gconcat.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_group.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_if.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_in.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_like.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_math.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_op.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_regexp.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_set.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_str.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_system.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_test.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_time.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/gis.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/group_by.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/group_min_max.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/having.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/heap.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/heap_hash.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/index_merge.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/index_merge_innodb.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/index_merge_ror.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/innodb_gis.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/insert_update.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/join.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/join_nested.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/key_diff.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/myisam.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ndb_gis.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/negation_elimination.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/null.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/olap.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/partition_pruning.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/query_cache.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/row.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/rpl_get_lock.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/rpl_master_pos_wait.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/select.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ssl.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ssl_compress.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/subselect.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/type_blob.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/union.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/varbinary.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/variables.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/view.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/ctype_cp1250_ch.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/func_like.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/group_min_max.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/index_merge_ror.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/index_merge_ror_cpk.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/join.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/partition_pruning.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
sql/opt_range.cc:
  BUG#14940: Make range/index_merge/group-min-max optimizer produce TABLE::quick_condition_rows -
    estimate of #records that will match the table condition.
sql/sql_class.cc:
  BUG#14940: Add "filtered" column to output of EXPLAIN EXTENDED
sql/sql_select.cc:
  BUG#14940: 
  - Make the join optimizer to use TABLE::quick_condition_rows=
    = E(#table records after filtering with table condition) 
  - Add "filtered" column to output of EXPLAIN EXTENDED
sql/sql_select.h:
  BUG#14940: Added comments
sql/table.h:
  BUG#14940: Added comments
2006-07-28 21:27:01 +04:00
unknown
1b3cdb6085 Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
When executing INSERT over a view with calculated columns it was assuming all
  elements of the fields collection are actually Item_field instances.
  This may not be true when inserting into a view and that view has columns that are 
  such expressions that allow updating (like setting a collation for example).
  Corrected to access field information through the filed_for_view_update() function and 
  retrieve correctly the field info even for "update-friendly" non-Item_field items.


mysql-test/r/view.result:
  Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
   - test suite
mysql-test/t/view.test:
  Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
   - test suite
sql/item_strfunc.h:
  Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
   - obvious typo fixed
sql/sql_base.cc:
  Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
   - must access field information through the filed_for_view_update() function to retrieve
     correctly the field info even for "update-friendly" non-Item_field items.
2006-07-25 18:42:49 +03:00
unknown
03d411b1d1 Bug#6147: Traditional: Assigning a string to a numeric column has unexpected results
The problem was that when converting a string to an exact number,
rounding didn't work, because conversion didn't understand
approximate numbers notation.
Fix: a new function for string-to-number conversion was implemented,
which is aware of approxinate number notation (with decimal point
and exponent, e.g. -19.55e-1)


include/m_ctype.h:
  Adding new function into MY_CHARSET_HANDLER
  Adding prototypes for 8bit and ucs2 functions.
mysql-test/r/loaddata.result:
  Fixing results
mysql-test/r/ps_2myisam.result:
  Fixing results
mysql-test/r/ps_3innodb.result:
  Fixing results
mysql-test/r/ps_4heap.result:
  Fixing results
mysql-test/r/ps_5merge.result:
  Fixing results
mysql-test/r/ps_6bdb.result:
  Fixing results
mysql-test/r/rpl_rewrite_db.result:
  Fixing results
mysql-test/r/select.result:
  Fixing results
mysql-test/r/sp-vars.result:
  Fixing results
mysql-test/r/strict.result:
  Fixing results
mysql-test/r/view.result:
  Fixing results
mysql-test/r/warnings.result:
  Fixing results
mysql-test/t/strict.test:
  Fixing results
sql/field.cc:
  Using new function
strings/ctype-big5.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-bin.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-cp932.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-euc_kr.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-eucjpms.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-gb2312.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-gbk.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-latin1.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-simple.c:
  Implementing my_strntoull10_8bit
  Adding new function into MY_CHARSET_HANDLER
strings/ctype-sjis.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-tis620.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-ucs2.c:
  Implementing UCS2 wrapper for 8bit version
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-ujis.c:
  Adding new function into the MY_CHARSET_HANDLER structure
strings/ctype-utf8.c:
  Adding new function into the MY_CHARSET_HANDLER structure
mysql-test/r/round.result:
  New BitKeeper file ``mysql-test/r/round.result''
mysql-test/t/round.test:
  New BitKeeper file ``mysql-test/t/round.test''
2006-07-20 13:41:12 +05:00
unknown
f8dda7bfb9 Added a test case with views for bug #17526.
mysql-test/r/func_str.result:
  Adjusted results for the test case of bug 17526.
sql/item_strfunc.cc:
  Post-merge modification
2006-07-19 16:42:19 -07:00
unknown
1e44259440 Fixed bug #19714.
DESCRIBE returned the type BIGINT for a column of a view if the column
was specified by an expression over values of the type INT.
    
E.g. for the view defined as follows:
  CREATE VIEW v1 SELECT COALESCE(f1,f2) FROM t1
DESCRIBE returned type BIGINT for the only column of the view if f1,f2 are
columns of the INT type.
At the same time DESCRIBE returned type INT for the only column of the table
defined by the statement:
  CREATE TABLE t2 SELECT COALESCE(f1,f2) FROM t1.
    
This inconsistency was removed by the patch.

Now the code chooses between INT/BIGINT depending on the
precision of the aggregated column type.
 
Thus both DESCRIBE commands above returns type INT for v1 and t2.
 


mysql-test/r/analyse.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/bigint.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/create.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/olap.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_2myisam.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_3innodb.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_4heap.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_5merge.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_6bdb.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_7ndb.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/sp.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/subselect.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/type_ranges.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/view.result:
  Added a test case for bug #19714.
mysql-test/t/view.test:
  Added a test case for bug #19714.
2006-07-13 20:48:26 -07:00
unknown
d013f9e53a Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge-5.0


include/my_sys.h:
  Auto merged
mysql-test/r/auto_increment.result:
  Auto merged
mysql-test/r/func_math.result:
  Auto merged
mysql-test/r/func_system.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/type_blob.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
sql/slave.h:
  SCCS merged
mysql-test/r/show_check.result:
  Manual merge.
mysql-test/t/show_check.test:
  Manual merge.
sql/log_event.cc:
  Manual merge.
sql/share/errmsg.txt:
  Manual merge.
sql/sql_class.h:
  Manual merge.
sql/sql_db.cc:
  Manual merge.
2006-07-13 11:43:52 +04:00
unknown
41c7aece39 Added a test case with views for bug 18243 (see also func_str.test). 2006-07-06 14:41:01 -07:00
unknown
8a67bdd0c3 Merge mysql.com:/home/kgeorge/mysql/5.0/teamclean
into  mysql.com:/home/kgeorge/mysql/5.0/B16110


mysql-test/r/view.result:
  Auto merged
sql/sql_insert.cc:
  Auto merged
2006-07-04 12:20:45 +03:00
unknown
e08ff11534 Bug #16110: insert permitted into view col w/o default value
When compiling INSERT statements the check whether columns are provided values
depends on the flag whether a field is used in that query (Field::query_id).
However the check for updatability of VIEW columns (check_view_insertability())
was calling fix_fields() and thus setting the Field::query_id even for the 
view fields that are not referenced in the current INSERT statement.
So the correct check for columns without default values 
( check_that_all_fields_are_given_values() ) is assuming that all the VIEW
columns were mentioned in the INSERT field list and was issuing no 
warnings or errors.
Fixed check_view_insertability() to turn off the flag whether or not to set
Field::query_id (THREAD::set_query_id) before calling fix fields and restore
it when it's done.


mysql-test/r/view.result:
  Bug #16110: insert permitted into view col w/o default value
    * test case
mysql-test/t/view.test:
  Bug #16110: insert permitted into view col w/o default value
    * test case
sql/sql_insert.cc:
  Bug #16110: insert permitted into view col w/o default value
    * avoid setting the "field used" flag for fields when checking view columns 
      for updatability.
    * a missing DBUG_RETURN added.
2006-07-04 12:10:12 +03:00
unknown
90cb4c03fd Bug#17203: "sql_no_cache sql_cache" in views created from prepared statement
The problem was that we restored SQL_CACHE, SQL_NO_CACHE flags in SELECT
statement from internal structures based on value set later at runtime, not
the original value set by the user.

The solution is to remember that original value.


mysql-test/r/auto_increment.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_compress.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_math.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_system.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/func_time.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/information_schema.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/query_cache.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/rpl_get_lock.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/rpl_master_pos_wait.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/show_check.result:
  Add result for bug#17203.
mysql-test/r/subselect.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/type_blob.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/variables.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/r/view.result:
  Update result to not report SQL_NO_CACHE if it wasn't there at first place.
mysql-test/t/show_check.test:
  Add test case for bug#17203.
sql/sql_lex.cc:
  Reset SELECT_LEX::sql_cache together with SELECT_LEX::options.
sql/sql_lex.h:
  Add SELECT_LEX::sql_cache field to store original user setting.
sql/sql_select.cc:
  Output SQL_CACHE and SQL_NO_CACHE depending on stored original user setting.
sql/sql_yacc.yy:
  Make effect of SQL_CACHE and SQL_NO_CACHE mutually exclusive.  Ignore
  SQL_CACHE if SQL_NO_CACHE was used.  Remember what was set by the user.
  Reset SELECT_LEX::sql_cache together with SELECT_LEX::options.
2006-06-27 21:28:32 +04:00
unknown
9933c3bd3a Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge


mysql-test/r/binlog_row_mix_innodb_myisam.result:
  Auto merged
mysql-test/r/federated.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/extra/rpl_tests/rpl_ddl.test:
  Auto merged
mysql-test/r/rpl_ddl.result:
  Auto merged
mysql-test/r/sp-error.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/rpl_ndb_charset.result:
  Auto merged
mysql-test/r/type_ranges.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/r/trigger-grant.result:
  Auto merged
mysql-test/t/archive.test:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/federated.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/innodb_mysql.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/trigger-grant.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
mysql-test/r/create.result:
  Manual merge
mysql-test/r/innodb_mysql.result:
  Manual merge
sql/handler.cc:
  Manual merge
sql/share/errmsg.txt:
  Manual merge
sql/sql_class.h:
  Manual merge
sql/sql_delete.cc:
  Manual merge
sql/sql_insert.cc:
  Manual merge
sql/sql_table.cc:
  Manual merge
2006-06-16 01:15:19 +02:00
unknown
a8c24bf75e Merge mysql.com:/home/bkroot/mysql-5.1-new-rpl
into  mysql.com:/home/bk/b19066-mysql-5.1-new


mysql-test/r/show_check.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
2006-06-13 22:09:59 +02:00
unknown
7f19b1cc05 Added --pipe option for faster compile
Changed error to be more descriptive when you are refering to a not existing key
Fixed core dump in view test and changed to better error message


BUILD/compile-pentium64-debug-max:
  Added --pipe option for faster compile
  (This changset was missing in the tree I used to rebuild a new 5.1 tree)
BUILD/compile-pentium64-debug:
  Added --pipe option for faster compile
  (This changset was missing in the tree I used to rebuild a new 5.1 tree)
mysql-test/include/common-tests.inc:
  Changed error to be more descriptive
mysql-test/r/compress.result:
  Changed error to be more descriptive
mysql-test/r/explain.result:
  Changed error to be more descriptive
mysql-test/r/key_cache.result:
  Changed error to be more descriptive
mysql-test/r/preload.result:
  Changed error to be more descriptive
mysql-test/r/select.result:
  Changed error to be more descriptive
mysql-test/r/ssl.result:
  Changed error to be more descriptive
mysql-test/r/ssl_compress.result:
  Changed error to be more descriptive
mysql-test/r/view.result:
  Changed error to be more descriptive
mysql-test/t/disabled.def:
  Disable im_instance_conf and im_options  until Bug#20294 (Instance manager test im_instance_conf fails randomly) is fixed
mysql-test/t/explain.test:
  Changed error to be more descriptive
mysql-test/t/select.test:
  Changed error to be more descriptive
mysql-test/t/view.test:
  Changed error to be more descriptive
sql/share/errmsg.txt:
  Fix that ER_KEY_DOES_NOT_EXISTS has same SQLSTATE as ER_KEY_COLUMN_DOES_NOT_EXISTS
sql/sql_base.cc:
  Fixed core dump in view test
  Changed to correct error message that also shows the name of the faulty table
BUILD/compile-pentium64:
  New BitKeeper file ``BUILD/compile-pentium64''
2006-06-06 20:21:36 +03:00
unknown
ddc2569826 Bug#19066 (DELETE FROM inconsistency for NDB):
Under row-based replication, DELETE FROM will now always be
replicated as individual row deletions, while TRUNCATE TABLE will
always be replicated as a statement.


mysql-test/extra/rpl_tests/rpl_ddl.test:
  Using --echo instead of SELECT to print message.
mysql-test/r/binlog_row_mix_innodb_myisam.result:
  Result change.
mysql-test/r/federated.result:
  Result change.
mysql-test/r/range.result:
  Result change.
mysql-test/r/rpl_sp_effects.result:
  Result change.
mysql-test/r/show_check.result:
  Result change.
mysql-test/r/sp-error.result:
  Result change.
mysql-test/r/sp.result:
  Result change.
mysql-test/r/timezone2.result:
  Result change.
mysql-test/r/trigger-grant.result:
  Result change.
mysql-test/r/type_datetime.result:
  Result change.
mysql-test/r/type_ranges.result:
  Result change.
mysql-test/r/type_timestamp.result:
  Result change.
mysql-test/r/view.result:
  Result change.
mysql-test/t/archive.test:
  Test contain statements that only works for statement-based logging.
mysql-test/t/disabled.def:
  Disabling test due to reported bug.
mysql-test/t/federated.test:
  Adding ORDER BY clause to SELECT statements
mysql-test/t/range.test:
  Adding ORDER BY clause to SELECT (sub-)statement
mysql-test/t/rpl_sp_effects.test:
  Adding ORDER BY clause to SELECT statement.
mysql-test/t/show_check.test:
  Replacing DELETE FROM without WHERE with TRUNCATE TABLE.
mysql-test/t/sp-error.test:
  Replacing DELETE FROM without WHERE with TRUNCATE TABLE.
mysql-test/t/sp.test:
  Adding ORDER BY clause to SELECT statement.
mysql-test/t/timezone2.test:
  Replacing DELETE FROM without WHERE with TRUNCATE TABLE.
mysql-test/t/trigger-grant.test:
  Replacing DELETE FROM without WHERE with TRUNCATE TABLE.
mysql-test/t/type_datetime.test:
  Adding ORDER BY clause to SELECT statement.
mysql-test/t/type_ranges.test:
  Replacing DELETE FROM without WHERE with TRUNCATE TABLE.
mysql-test/t/type_timestamp.test:
  Replacing DELETE FROM without WHERE with TRUNCATE TABLE.
mysql-test/t/view.test:
  Adding ORDER BY clause to SELECT statement.
sql/sql_class.h:
  Adding member function to set replication to statement-based.
sql/sql_delete.cc:
  When row-based replication is used, DELETE FROM will always delete the
  contents of the table row-by-row and not use delete_all_rows().
mysql-test/extra/rpl_tests/rpl_truncate.test:
  New BitKeeper file ``mysql-test/extra/rpl_tests/rpl_truncate.test''
mysql-test/extra/rpl_tests/rpl_truncate_helper.inc:
  New BitKeeper file ``mysql-test/extra/rpl_tests/rpl_truncate_helper.inc''
mysql-test/r/rpl_truncate_2myisam.result:
  New BitKeeper file ``mysql-test/r/rpl_truncate_2myisam.result''
mysql-test/r/rpl_truncate_3innodb.result:
  New BitKeeper file ``mysql-test/r/rpl_truncate_3innodb.result''
mysql-test/r/rpl_truncate_7ndb.result:
  New BitKeeper file ``mysql-test/r/rpl_truncate_7ndb.result''
mysql-test/t/rpl_truncate_2myisam.test:
  New BitKeeper file ``mysql-test/t/rpl_truncate_2myisam.test''
mysql-test/t/rpl_truncate_3innodb.test:
  New BitKeeper file ``mysql-test/t/rpl_truncate_3innodb.test''
mysql-test/t/rpl_truncate_7ndb.test:
  New BitKeeper file ``mysql-test/t/rpl_truncate_7ndb.test''
2006-06-01 11:53:27 +02:00
unknown
76343a5dce Post-merge fixes 2006-05-31 22:55:45 -07:00
unknown
5c398ce055 Manually merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
2006-05-24 20:52:57 +04:00
unknown
321708d36d Post-review fixes for bug #19089
mysql-test/r/view.result:
  Post-review fixes.
sql/field.cc:
  Post-review fixes.
sql/field.h:
  Post-review fixes.
sql/sql_select.cc:
  Post-review fixes.
2006-05-22 07:57:46 -07:00
unknown
960578fdfd Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0


sql/sql_select.cc:
  Auto merged
mysql-test/r/view.result:
  Manual merge
mysql-test/t/view.test:
  Manual merge
2006-05-20 19:10:43 -07:00
unknown
db5d197414 Fixed bug #19089.
When a CREATE TABLE command created a table from a materialized
view id does not inherit default values from the underlying table.
Moreover the temporary table used for the view materialization
does not inherit those default values.
In the case when the underlying table contained ENUM fields it caused
misleading error messages. In other cases the created table contained
wrong default values.
The code was modified to ensure inheritance of default values for
materialized views.


mysql-test/r/view.result:
  Added a test case for bug #19089.
mysql-test/t/view.test:
  Added a test case for bug #19089.
sql/field.cc:
  Fixed bug ##19089.
  Added field dflt_field to the class Field.
  This field is set for temp table fields that inherits
  default values of items from which they are created.
sql/field.h:
  Fixed bug ##19089.
  Added field dflt_field to the class Field.
  This field is set for temp table fields that inherits
  default values of items from which they are created.
sql/sql_select.cc:
  Fixed bug #19089.
  When a CREATE TABLE command created a table from a materialized
  view id does not inherit default values from the underlying table.
  Moreover the temporary table used for the view materialization
  does not inherit those default values.
  The code was modified to ensure inheritance of default values for
  materialized views.
2006-05-20 18:54:43 -07:00
unknown
650fea23b1 Merge mysql.com:/home/jimw/my/mysql-5.0-clean
into  mysql.com:/home/jimw/my/mysql-5.1-clean


include/my_pthread.h:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/join_outer.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/rpl_temporary.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
storage/ndb/test/ndbapi/Makefile.am:
  Auto merged
storage/ndb/test/ndbapi/testInterpreter.cpp:
  Auto merged
sql/set_var.cc:
  Resolve conflict
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
  Resolve conflict
2006-05-19 19:07:33 -07:00
unknown
33c439ce58 Merge rurik.mysql.com:/home/igor/mysql-5.0
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-2


sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2006-05-18 11:30:42 -07:00
unknown
1c6beaee06 Fixed bug#19077: A nested materialized derived table is used before being populated.
The convert_constant_item() function converts constant items to ints on
prepare phase to optimize execution speed. In this case it tries to evaluate
subselect which contains a derived table and is contained in a derived table. 
All derived tables are filled only after all derived tables are prepared.
So evaluation of subselect with derived table at the prepare phase will
return a wrong result.

A new flag with_subselect is added to the Item class. It indicates that
expression which this item represents is a subselect or contains a subselect.
It is set to 0 by default. It is set to 1 in the Item_subselect constructor
for subselects.
For Item_func and Item_cond derived classes it is set after fixing any argument
in Item_func::fix_fields() and Item_cond::fix_fields accordingly.
The convert_constant_item() function now doesn't convert a constant item
if the with_subselect flag set in it. 


mysql-test/t/view.test:
  Added test case for bug#19077: A nested materialized derived table is used before being populated.
mysql-test/t/subselect.test:
  Added test case for bug#19077: A nested materialized derived table is used before being populated.
mysql-test/r/view.result:
  Added test case for bug#19077: A nested materialized derived table is used before being populated.
mysql-test/r/subselect.result:
  Added test case for bug#19077: A nested materialized derived table is used before being populated.
sql/item_subselect.cc:
  Fixed bug#19077: A nested materialized derived table is used before being populated.
  The Item_subselect class constructor sets new with_subselect flag to 1.
sql/item_func.cc:
  Fixed bug#19077: A nested materialized derived table is used before being populated.
  
  The Item_func::fix_fields() sets new with_subselect flag from with_subselect flags of its arguments.
sql/item_cmpfunc.cc:
  Fixed bug#19077: A nested materialized derived table is used before being populated.
  The convert_constant_item() function now doesn't convert a constant item
  with the with_subselect flag set.
  The Item_cond::fix_fields() sets new with_subselect flag from with_subselect flags of its arguments.
sql/item.cc:
  Fixed bug#19077: A nested materialized derived table is used before being populated.
  Set new with_subselect flag to default value - 0 in the Item constructor.
sql/item.h:
  Fixed bug#19077: A nested materialized derived table is used before being populated.
  A new flag with_subselect is added to the Item class. It indicates that
  expression which this item represents is a subselect or contains a subselect.
  It is set to 0 by default.
2006-05-18 00:55:28 +04:00
unknown
8df5fdb933 Merge rurik.mysql.com:/home/igor/tmp_merge
into  rurik.mysql.com:/home/igor/dev/mysql-5.1-0


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
2006-05-17 11:46:21 -07:00
unknown
c4e26cb03d Merge mysql.com:/home/kgeorge/mysql/5.0/tmp_merge
into  mysql.com:/home/kgeorge/mysql/5.1/merge


mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
sql/item_subselect.cc:
  Auto merged
2006-05-17 13:29:20 +03:00
unknown
f1efd0883d Fixed bug #19573.
The select statement that specified a view could be
slightly changed when the view was saved in a frm file.
In particular references to an alias name in the HAVING
clause could be substituted for the expression named by
this alias.
This could result in an error message for a query of
the form SELECT * FROM <view>. Yet no such message
appeared when executing the query specifying the view.


mysql-test/r/having.result:
  Adjusted results after fixing bug #19573.
mysql-test/r/view.result:
  Added a test case for bug #19573.
mysql-test/t/view.test:
  Added a test case for bug #19573.
2006-05-16 22:19:44 -07:00
unknown
7bb4f77828 Fixed bug #19490. The bug that caused server crash manifested
itself when executing queries referring to a view with GROUP BY
an expression containing non-constant interval.
It happened because Item_date_add_interval::eq neglected the
fact that the method can be applied to an expression of the form
    date(col) + interval time_to_sec(col) second
at the time when col could not be evaluated yet.
An attempt to evaluate time_to_sec(col) in this method resulted
in a crash.


mysql-test/r/view.result:
  Added a test case for bug #19490.
mysql-test/t/view.test:
  Added a test case for bug #19490.
sql/item_timefunc.cc:
  Fixed bug #19490. The bug that caused server crash manifested
  itself when executing queries referring to a view with GROUP BY
  an expression containing non-constant interval.
  It happened because Item_date_add_interval::eq neglected the
  fact that the method can be applied to an expression of the form
      date(col) + interval time_to_sec(col) second
  at the time when col could not be evaluated yet.
  An attempt to evaluate time_to_sec(col) in this method resulted
  in a crash.
  The code of Item_date_add_interval::eq was corrected.
2006-05-12 18:24:38 -07:00
unknown
aeaaa45626 BUG#7549: Missing error message for invalid view selection with subquery.
When a view statement is compiled on CREATE VIEW time, most of the 
optimizations should not be done. Finding the right optimization 
for a subquery is one of them.
Unfortunately the optimizer is resolving the column references of 
the left expression of IN subqueries in the process of deciding 
witch optimization to use (if needed). So there should be a 
special case in Item_in_subselect::fix_fields() : check the 
validity of the left expression of IN subqueries in CREATE VIEW 
mode and then proceed as normal. 


mysql-test/r/subselect.result:
  test case
mysql-test/r/view.result:
  chnaged explain due to column being resolved
mysql-test/t/subselect.test:
  test case
sql/item_subselect.cc:
  overloaded fix_fields to fix the left_expr in prepare_view_mode
sql/item_subselect.h:
  fix_fields overloaded so it can prepare left_expr
2006-05-11 15:30:54 +03:00
unknown
6fe40f76e2 Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new


mysql-test/r/view.result:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
storage/ndb/include/mgmapi/mgmapi.h:
  Auto merged
storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp:
  Auto merged
storage/ndb/src/kernel/vm/Configuration.cpp:
  Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.hpp:
  Auto merged
storage/ndb/src/mgmsrv/Services.hpp:
  Auto merged
configure.in:
  manual merge
sql/ha_ndbcluster.cc:
  manual merge
sql/share/errmsg.txt:
  manual merge
storage/ndb/src/mgmsrv/Services.cpp:
  manual merge
2006-04-26 17:01:00 +02:00
unknown
101e3703d9 fixed error message text 2006-04-26 17:57:41 +03:00
unknown
225330cd5b Merge mysql.com:/extern/mysql/5.1/generic/mysql-5.0-merge
into  mysql.com:/extern/mysql/5.1/generic/mysql-5.1-new


mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/timezone_grant.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/lex.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
mysql-test/r/rpl_insert_id.result:
  Manual merge.
mysql-test/t/disabled.def:
  Manual merge.
mysql-test/t/rpl_insert_id.test:
  Manual merge.
sql/item_func.cc:
  Manual merge.
sql/sql_yacc.yy:
  Manual merge - not complete yet.
2006-04-25 16:20:49 +02:00
unknown
4cfc649d25 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-merge-5.1


configure.in:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/share/errmsg.txt:
  merge
2006-04-24 13:32:07 +03:00
unknown
dc526db887 Fix for bug#15153 "CONVERT_TZ() is not allowed in all places in VIEWs".
Error was emitted when one tried to select information from view which used
merge algorithm and which also had CONVERT_TZ() function in its select list.

This bug was caused by wrong assumption that global table list for view
which is handled using merge algorithm begins from tables belonging to
the main select of this view. Nowadays the above assumption is not true only
when one uses convert_tz() function in view's select list, but in future
other cases may be added (for example we may support merging of views
with subqueries in select list one day). Relying on this false assumption
led to the usage of wrong table list for field lookups and therefor errors. 

With this fix we explicitly use pointer to the beginning of main select's
table list.


mysql-test/r/timezone_grant.result:
  Added additional test case for bug#15153 "CONVERT_TZ() is not allowed in
  all places in VIEWs" that checks that usage of CONVERT_TZ() function in view
  does not require additional privileges.
mysql-test/r/view.result:
  Added test case for bug#15153 "CONVERT_TZ() is not allowed in all places in 
  VIEWs".
mysql-test/t/timezone_grant.test:
  Added additional test case for bug#15153 "CONVERT_TZ() is not allowed in
  all places in VIEWs" that checks that usage of CONVERT_TZ() function in view
  does not require additional privileges.
mysql-test/t/view.test:
  Added test case for bug#15153 "CONVERT_TZ() is not allowed in all places in 
  VIEWs".
sql/sql_view.cc:
  mysql_make_view():
    We should not assume that global table list for view which is handled using
    merge algorithm begins from tables belonging to the main select of this
    view. Nowadays the above assumption is not true only when one uses
    convert_tz() function in view's select list, but in future other cases
    may be added (for example we may support merging of views with subqueries
    in select list one day). So let us instead explicitly use pointer to the
    beginning of main select's table list.
2006-04-22 11:54:25 +04:00
unknown
8dbb580748 The check for recursive view definitions added. (BUG#14308)
mysql-test/r/view.result:
  BUG#14308 test suite.
mysql-test/t/view.test:
  BUG#14308 test suite.
sql/share/errmsg.txt:
  New error message about a recursive view.
sql/sql_view.cc:
  The check of view recursion.
2006-04-13 23:12:26 +03:00
unknown
69e54f84ec Merge rurik.mysql.com:/home/igor/dev/mysql-5.0-0
into  rurik.mysql.com:/home/igor/dev/mysql-5.1-0


mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
2006-04-10 17:48:17 -07:00
unknown
e536c8eca7 Fixed bug #16069.
The function agg_cmp_type in item_cmpfunc.cc neglected the fact that 
the first argument in a BETWEEN/IN predicate could be a field of a view.
As a result in the case when the retrieved table was hidden by a view 
over it and the arguments in the BETWEEN/IN predicates are of 
the date/time type the function did not perform conversion of 
the constant arguments to the same format as the first field argument.
If formats of the arguments differed it caused wrong a evaluation of
the predicates.


mysql-test/r/view.result:
  Added a test case for bug #16069.
mysql-test/t/view.test:
  Added a test case for bug #16069.
2006-04-08 11:42:09 -07:00
unknown
ef4309284d Merge rurik.mysql.com:/home/igor/dev/mysql-5.0-0
into  rurik.mysql.com:/home/igor/dev/mysql-5.1-0


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/opt_sum.cc:
  Auto merged
2006-04-05 14:00:54 -07:00
unknown
e77888f530 Fixed bug #18237.
The code in opt_sum_query that prevented the COUNT/MIN/MAX 
optimization from being applied to outer joins  was not adjusted 
after introducing nested joins. As a result if an outer join
contained a reference to a view as an inner table the code of
opt_sum_query missed the presence of an on expressions and
erroneously applied the mentioned optimization.


mysql-test/r/view.result:
  Added a test case for bug #18237.
mysql-test/t/view.test:
  Added a test case for bug #18237.
2006-04-04 12:55:02 -07:00
unknown
6da39a4c1f Merge rurik.mysql.com:/home/igor/dev/mysql-5.0-0
into  rurik.mysql.com:/home/igor/dev/mysql-5.1-0


include/mysql.h:
  Auto merged
mysql-test/lib/mtr_timer.pl:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
sql-common/client.c:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/item.cc:
  Auto merged
storage/ndb/src/kernel/blocks/backup/Backup.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbTransaction.cpp:
  Auto merged
2006-03-27 18:30:40 -08:00
unknown
b0654461df Fixed bug #18386.
An invalid assertion in Item_direct_view_ref::eq caused 
an assertion abort in the debug version.


mysql-test/r/view.result:
  Added a test case for bug #18386.
mysql-test/t/view.test:
  Added a test case for bug #18386.
sql/item.cc:
  Fixed bug #18386.
  An invalid assertion in Item_direct_view_ref::eq caused 
  an assertion abort in the debug version.
  Changed the assertion.
2006-03-27 18:28:55 -08:00
unknown
4f3a18d5b5 Merge zim.(none):/home/brian/mysql/mysql-5.0
into  zim.(none):/home/brian/mysql/mysql-5.1-new


configure.in:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2006-03-09 10:39:40 -08:00
unknown
cc7a75e6fd Fixed bug#17726: Not checked empty list caused endless loop
When the Item_cond::fix_fields() function reduces cond tree, it in loop
scans it's own list and when it founds Item_cond with same function (AND
or OR) it does next things: 1) replaces that item with item's list. 2)
empties item's list. Due to this operation is done twice - for update and
for view, at the update phase cond's list of lower view is already empty.
Empty list returns ref to itself, thus making endless loop by replacing
list with itself, emptying, replacing again and so on. This results in
server hung up.

To the Item_cond::fix_fields() function added check that ensures that
list being replaced with isn't empty.


mysql-test/t/view.test:
  Added test for bug#17726: Not checked empty list caused endless loop
mysql-test/r/view.result:
  Added test for bug#17726: Not checked empty list caused endless loop
sql/item_cmpfunc.cc:
  Fixed bug#17726: Not checked empty list caused endless loop
  To the Item_cond::fix_fields() function added check that ensures that
  list being replaced with isn't empty.
2006-03-03 16:19:57 +03:00
unknown
e54ecf09be Merge mysql.com:/home/dlenev/src/mysql-5.0-bg13525
into  mysql.com:/home/dlenev/src/mysql-5.1-merges2


client/mysqltest.c:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/heap.result:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
storage/myisammrg/myrg_queue.c:
  Auto merged
sql/sql_rename.cc:
  Manual merge.
sql/sql_trigger.cc:
  Manual merge.
sql/sql_yacc.yy:
  Manual merge.
2006-02-27 20:00:07 +03:00
unknown
0aae3cd515 Merge svlasenko@bk-internal.mysql.com:/home/bk/mysql-5.0
into  selena.:H:/MYSQL/src/#15943-mysql-5.0


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2006-02-27 20:00:03 +03:00
unknown
0afb6ff660 Fixes to embedded server to be able to run tests with it
(Needed for "list of pushes" web page and autopush)


include/mysql.h:
  Fix to embedded server to be able to run tests on it
libmysql/libmysql.c:
  Fix to embedded server to be able to run tests on it
libmysqld/emb_qcache.cc:
  Fix to embedded server to be able to run tests on it
libmysqld/embedded_priv.h:
  Fix to embedded server to be able to run tests on it
libmysqld/lib_sql.cc:
  Fix to embedded server to be able to run tests on it
libmysqld/libmysqld.c:
  Fix to embedded server to be able to run tests on it
mysql-test/mysql-test-run.sh:
  Fix to embedded server to be able to run tests on it
mysql-test/r/binlog.result:
  Updated test for embedded server
mysql-test/r/ctype_cp932.result:
  Updated test for embedded server
mysql-test/r/innodb.result:
  Updated test for embedded server
mysql-test/r/mysqltest.result:
  Updated test for embedded server
mysql-test/r/query_cache.result:
  Updated test for embedded server
mysql-test/r/query_cache_notembedded.result:
  Updated test for embedded server
mysql-test/r/sp-error.result:
  Updated test for embedded server
mysql-test/r/sp.result:
  Updated test for embedded server
mysql-test/r/subselect.result:
  Updated test for embedded server
mysql-test/r/view.result:
  Updated test for embedded server
mysql-test/r/view_grant.result:
  Updated test for embedded server
mysql-test/t/backup.test:
  Updated test for embedded server
mysql-test/t/binlog.test:
  Updated test for embedded server
mysql-test/t/blackhole.test:
  Updated test for embedded server
mysql-test/t/compress.test:
  Updated test for embedded server
mysql-test/t/ctype_cp932.test:
  Updated test for embedded server
mysql-test/t/delayed.test:
  Updated test for embedded server
mysql-test/t/handler.test:
  Updated test for embedded server
mysql-test/t/innodb.test:
  Updated test for embedded server
mysql-test/t/mysql.test:
  Updated test for embedded server
mysql-test/t/mysql_client_test.test:
  Updated test for embedded server
mysql-test/t/mysqltest.test:
  Updated test for embedded server
mysql-test/t/query_cache.test:
  Updated test for embedded server
mysql-test/t/query_cache_notembedded.test:
  Updated test for embedded server
mysql-test/t/read_only.test:
  Updated test for embedded server
mysql-test/t/skip_grants.test:
  Updated test for embedded server
mysql-test/t/sp-destruct.test:
  Updated test for embedded server
mysql-test/t/sp-error.test:
  Updated test for embedded server
mysql-test/t/sp-threads.test:
  Updated test for embedded server
mysql-test/t/sp.test:
  Updated test for embedded server
mysql-test/t/subselect.test:
  Updated test for embedded server
mysql-test/t/temp_table.test:
  Updated test for embedded server
mysql-test/t/view.test:
  Updated test for embedded server
mysql-test/t/view_grant.test:
  Updated test for embedded server
mysql-test/t/wait_timeout.test:
  Updated test for embedded server
mysys/mf_dirname.c:
  Review fix: Don't access data outside of array
mysys/my_bitmap.c:
  Remove compiler warnings
scripts/mysql_fix_privilege_tables.sql:
  Add flush privileges to .sql script so that one doesn't have to reboot mysqld when one runs the mysql_fix_privilege_script
sql-common/client.c:
  Updated test for embedded server
sql/item.cc:
  Remove DBUG_PRINT statement that can cause crashes when running with --debug
sql/mysqld.cc:
  Fix to embedded server to be able to run tests on it
sql/protocol.cc:
  Fix to embedded server to be able to run tests on it
  (Trivial reconstruction of code)
sql/protocol.h:
  Fix to embedded server to be able to run tests on it
sql/sql_base.cc:
  Better comment
sql/sql_class.cc:
  Fix to embedded server to be able to run tests on it
sql/sql_class.h:
  Fix to embedded server to be able to run tests on it
sql/sql_cursor.cc:
  Fix to embedded server to be able to run tests on it
sql/sql_parse.cc:
  Fix to embedded server to be able to run tests on it
  Don't crash for disabled commands when using embedded server
sql/sql_prepare.cc:
  Fix to embedded server to be able to run tests on it
mysql-test/r/ctype_cp932_notembedded.result:
  New BitKeeper file ``mysql-test/r/ctype_cp932_notembedded.result''
mysql-test/r/innodb_notembedded.result:
  New BitKeeper file ``mysql-test/r/innodb_notembedded.result''
mysql-test/r/sp.result.orig:
  New BitKeeper file ``mysql-test/r/sp.result.orig''
mysql-test/r/sp_notembedded.result:
  New BitKeeper file ``mysql-test/r/sp_notembedded.result''
mysql-test/r/subselect_notembedded.result:
  New BitKeeper file ``mysql-test/r/subselect_notembedded.result''
mysql-test/t/ctype_cp932_notembedded.test:
  New BitKeeper file ``mysql-test/t/ctype_cp932_notembedded.test''
mysql-test/t/innodb_notembedded.test:
  New BitKeeper file ``mysql-test/t/innodb_notembedded.test''
mysql-test/t/sp.test.orig:
  New BitKeeper file ``mysql-test/t/sp.test.orig''
mysql-test/t/sp_notembedded.test:
  New BitKeeper file ``mysql-test/t/sp_notembedded.test''
mysql-test/t/subselect_notembedded.test:
  New BitKeeper file ``mysql-test/t/subselect_notembedded.test''
2006-02-24 18:34:15 +02:00
unknown
559abcf5d9 Fixes bug #15943. resets error flag for show create view command, to allow
proper processing of multiple sql statements sent as a single command.


mysql-test/r/view.result:
  result file update for #15943 test case
mysql-test/t/view.test:
  test case added for bug #15943
2006-02-13 19:53:34 +03:00
unknown
d7becbc2c8 Merge mysql.com:/home/kostja/mysql/mysql-5.0-root
into  mysql.com:/home/kostja/mysql/mysql-5.1-merge


BitKeeper/deleted/.del-ndb_load.result:
  Delete: mysql-test/r/ndb_load.result
BitKeeper/deleted/.del-ndb_load.test:
  Delete: mysql-test/t/ndb_load.test
extra/perror.c:
  Auto merged
mysql-test/r/fulltext.result:
  Auto merged
mysql-test/r/ndb_blob.result:
  Auto merged
mysql-test/r/sp-code.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/fulltext.test:
  Auto merged
mysql-test/t/sp-destruct.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp:
  Auto merged
storage/ndb/src/kernel/main.cpp:
  Auto merged
storage/ndb/src/kernel/vm/Configuration.cpp:
  Auto merged
storage/ndb/src/kernel/vm/Configuration.hpp:
  Auto merged
storage/ndb/src/ndbapi/NdbBlob.cpp:
  Auto merged
storage/ndb/test/ndbapi/testBlobs.cpp:
  Auto merged
storage/ndb/tools/delete_all.cpp:
  Auto merged
mysql-test/t/disabled.def:
  Manual merge.
2006-02-09 13:35:59 +03:00
unknown
7ea60ae91e Fixed bug #16382.
When an ambiguous field name is used in a group by clause a warning is issued
in the find_order_in_list function by a call to push_warning_printf.
An expression that was not always valid was passed to this call as the field
name parameter.


mysql-test/r/view.result:
  Added a test case for bug #16382.
mysql-test/t/view.test:
  Added a test case for bug #16382.
2006-02-01 20:43:43 -08:00
unknown
b114f4ef81 Merge neptunus.(none):/home/msvensson/mysql/mysqltest_var/my50-mysqltest_var
into  neptunus.(none):/home/msvensson/mysql/mysqltest_var/my51-mysqltest_var


mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/extra/binlog_tests/blackhole.test:
  Auto merged
mysql-test/extra/binlog_tests/ctype_ucs_binlog.test:
  Auto merged
mysql-test/extra/rpl_tests/rpl_EE_err.test:
  Auto merged
mysql-test/extra/rpl_tests/rpl_log.test:
  Auto merged
mysql-test/extra/rpl_tests/rpl_stm_000001.test:
  Auto merged
mysql-test/extra/rpl_tests/rpl_stm_charset.test:
  Auto merged
mysql-test/r/backup.result:
  Auto merged
mysql-test/r/loaddata.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/rpl_loaddata_s.result:
  Auto merged
mysql-test/r/rpl_replicate_do.result:
  Auto merged
mysql-test/r/rpl_rewrt_db.result:
  Auto merged
mysql-test/r/rpl_stm_000001.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/r/warnings.result:
  Auto merged
mysql-test/t/backup.test:
  Auto merged
mysql-test/t/loaddata.test:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysql-test/t/ndb_autodiscover.test:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/rpl_000015-slave.sh:
  Auto merged
mysql-test/t/rpl_flushlog_loop-master.opt:
  Auto merged
mysql-test/t/rpl_flushlog_loop-master.sh:
  Auto merged
mysql-test/t/rpl_flushlog_loop-slave.opt:
  Auto merged
mysql-test/t/rpl_flushlog_loop-slave.sh:
  Auto merged
mysql-test/t/rpl_loaddata_s.test:
  Auto merged
mysql-test/t/rpl_replicate_do.test:
  Auto merged
mysql-test/t/rpl_rewrt_db.test:
  Auto merged
mysql-test/t/rpl_rotate_logs.test:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
mysql-test/t/sp-destruct.test:
  Auto merged
mysql-test/t/symlink.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
mysql-test/t/user_var-binlog.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
mysql-test/t/warnings.test:
  Auto merged
mysql-test/mysql-test-run.pl:
  Merge 5.0 -> 5.1
mysql-test/r/binlog_stm_blackhole.result:
  Merge 5.0 -> 5.1
mysql-test/r/mysqltest.result:
  Merge 5.0 -> 5.1
mysql-test/r/rpl_loaddata.result:
  Merge 5.0 -> 5.1
mysql-test/r/rpl_loaddata_m.result:
  Merge 5.0 -> 5.1
mysql-test/r/rpl_stm_log.result:
  Merge 5.0 -> 5.1
mysql-test/r/rpl_timezone.result:
  Merge 5.0 -> 5.1
mysql-test/t/mysqlbinlog.test:
  Merge 5.0 -> 5.1
mysql-test/t/mysqlbinlog2.test:
  Merge 5.0 -> 5.1
mysql-test/t/mysqltest.test:
  Merge 5.0 -> 5.1
mysql-test/t/rpl_drop_db.test:
  Merge 5.0 -> 5.1
mysql-test/t/rpl_loaddata.test:
  Merge 5.0 -> 5.1
mysql-test/t/rpl_loaddata_m.test:
  Merge 5.0 -> 5.1
mysql-test/t/rpl_timezone.test:
  Merge 5.0 -> 5.1
mysql-test/t/trigger-compat.test:
  Merge 5.0 -> 5.1
mysql-test/t/trigger-grant.test:
  Merge 5.0 -> 5.1
2006-01-24 14:10:48 +01:00
unknown
8f760dc08c Merge neptunus.(none):/home/msvensson/mysql/mysqltest_var/my50-mysqltest_var
into  neptunus.(none):/home/msvensson/mysql/mysqltest_var/my50-mysqltest_var-integration


mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/rpl000001.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/rpl000001.test:
  Auto merged
mysql-test/t/symlink.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
mysql-test/t/type_varchar.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
mysql-test/mysql-test-run.pl:
  Manual merge
mysql-test/r/mysqltest.result:
  Manual merge
mysql-test/t/mysqltest.test:
  Manual merge
mysql-test/t/trigger-compat.test:
  Manual merge, remove the "--text" argument, not portable
mysql-test/t/trigger-grant.test:
  Manual merge, remove the "--text" argument, not portable
2006-01-24 08:43:34 +01:00
unknown
d40f7056ae Make it possible to run mysql-test-run.pl with default test suite in different vardir.
mysql-test/include/have_outfile.inc:
  Use MYSQLTEST_VARDIR
mysql-test/include/test_outfile.inc:
  Use MYSQLTEST_VARDIR
mysql-test/mysql-test-run.pl:
  Create variable $MYSQLTEST_VARDIR that points to  the vardir
  Don't create a symlink from var/ to the physical vardir if it's somewhere else
  Setup a symlink(or copy dir on windows) for std_data so it is available in the physical vardir
  Use "../tmp" as slave-load-tmpdir, since the server is started in var/master-data and slave in var/slave-data they will both find the dumps in "../tmp"
mysql-test/mysql-test-run.sh:
  Export MYSQLTEST_VARDIR, always pointing at mysql-test/var
mysql-test/r/backup.result:
  Use MYSQLTEST_VARDIR
mysql-test/r/blackhole.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/loaddata.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/mysqlbinlog.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/mysqltest.result:
  Use MYSQLTEST_VARDIR
mysql-test/r/outfile.result:
  Use MYSQLTEST_VARDIR
mysql-test/r/query_cache.result:
  Add missing drop function
mysql-test/r/rpl000001.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/rpl000004.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/rpl_innodb.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/rpl_loaddata.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/rpl_loaddata_rule_m.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/rpl_loaddata_rule_s.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/rpl_loaddatalocal.result:
  Use MYSQLTEST_VARDIR
mysql-test/r/rpl_log.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/rpl_misc_functions.result:
  Use MYSQLTEST_VARDIR
mysql-test/r/rpl_replicate_do.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/rpl_rewrite_db.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/rpl_timezone.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/symlink.result:
  Use MYSQLTEST_VARDIR
mysql-test/r/trigger.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/view.result:
  Use "../std_data_ln" to find std_data files
mysql-test/r/warnings.result:
  Use "../std_data_ln" to find std_data files
mysql-test/t/backup-master.sh:
  Use MYSQLTEST_VARDIR
mysql-test/t/backup.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/blackhole.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/ctype_ucs_binlog.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/im_daemon_life_cycle-im.opt:
  Use MYSQLTEST_VARDIR
mysql-test/t/im_options_set.imtest:
  Use MYSQLTEST_VARDIR
mysql-test/t/im_options_unset.imtest:
  Use MYSQLTEST_VARDIR
mysql-test/t/loaddata.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/myisam.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/mysqlbinlog.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/mysqlbinlog2.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/mysqldump.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/mysqltest.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/ndb_autodiscover.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/outfile.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/query_cache.test:
  Add missing drop function
mysql-test/t/repair.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl000001.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/rpl000004.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/rpl000009.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl000015-slave.sh:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl000017-slave.sh:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_EE_error.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_charset.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_drop_db.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_flush_log_loop-master.opt:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_flush_log_loop-master.sh:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_flush_log_loop-slave.opt:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_flush_log_loop-slave.sh:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_innodb.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/rpl_loaddata.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/rpl_loaddata_rule_m.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/rpl_loaddata_rule_s.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/rpl_loaddatalocal.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_log.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/rpl_misc_functions-slave.sh:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_misc_functions.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_replicate_do.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/rpl_rewrite_db.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/rpl_rotate_logs-slave.sh:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_rotate_logs.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/rpl_timezone.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/show_check.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/sp-destruct.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/symlink.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/temp_table-master.opt:
  Use MYSQLTEST_VARDIR
mysql-test/t/trigger-compat.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/trigger-grant.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/trigger.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/type_varchar.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/user_var-binlog.test:
  Use MYSQLTEST_VARDIR
mysql-test/t/view.test:
  Use "../std_data_ln" to find std_data files
mysql-test/t/warnings.test:
  Use "../std_data_ln" to find std_data files
mysql-test/include/sourced.inc:
  New BitKeeper file ``mysql-test/include/sourced.inc''
mysql-test/include/sourced1.inc:
  New BitKeeper file ``mysql-test/include/sourced1.inc''
2006-01-24 08:30:54 +01:00
unknown
d07932a3f1 Merge bk@192.168.21.1:mysql-5.1-new into mysql.com:/home/hf/work/5.1.emb
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/handler.test:
  Auto merged
mysql-test/t/mysql_client_test.test:
  Auto merged
mysql-test/t/mysqltest.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
2006-01-19 18:05:57 +04:00
unknown
6731dd6380 Embedded-server related tests fixes
BitKeeper/deleted/.del-ctype_cp932_notembedded.test~7c748e8e7ae6e7fe:
  Delete: mysql-test/t/ctype_cp932_notembedded.test
mysql-test/r/innodb.result:
  result fixed
mysql-test/r/query_cache.result:
  result fixed
mysql-test/r/query_cache_notembedded.result:
  result fixed
mysql-test/r/sp-error.result:
  result fixed
mysql-test/r/sp.result:
  result fixed
mysql-test/r/view.result:
  result fixed
mysql-test/r/view_grant.result:
  result fixed
mysql-test/t/sp-destruct.test:
  test disabled
mysql-test/t/view.test:
  lines moved to view_grant.test
mysql-test/t/view_grant.test:
  lines moved from view.test
2006-01-19 13:25:12 +04:00
unknown
bdbf423457 Merge rurik.mysql.com:/home/igor/dev/mysql-5.0-0
into  rurik.mysql.com:/home/igor/dev/mysql-5.1-0


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/opt_sum.cc:
  Auto merged
2006-01-06 23:26:20 -08:00
unknown
312c2f4759 Fixed bug #16016: MIN/MAX optimization was not applied to views.
mysql-test/r/view.result:
  Added a test case for bug #16016.
mysql-test/t/view.test:
  Added a test case for bug #16016.
sql/opt_sum.cc:
  Fixed bug #16016: MIN/MAX optimization was not applied to views.
  The fix employs the standard way of handling direct references to view fields.
2006-01-06 22:28:26 -08:00
unknown
91881b44c3 Merge mysql.com:/home/jimw/my/mysql-5.0-clean
into  mysql.com:/home/jimw/my/mysql-5.1-clean


include/config-win.h:
  Auto merged
mysql-test/r/bdb.result:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/bdb.test:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/parse_file.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/field.cc:
  Resolve conflict
sql/ha_ndbcluster.cc:
  Resolve conflict
sql/log_event.cc:
  Resolve conflict
2006-01-06 10:42:58 -08:00
unknown
29fde52802 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0


mysql-test/r/create.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/t/disabled.def:
  Manual merge
sql/mysqld.cc:
  Manual merge
sql/sp_head.cc:
  Manual merge
sql/sql_trigger.cc:
  Manual merge
2006-01-06 01:08:48 +02:00
unknown
64206b1850 Review fixes of new pushed code
- Fixed tests
- Optimized new code
- Fixed some unlikely core dumps
- Better bug fixes for:
  - #14397 - OPTIMIZE TABLE with an open HANDLER causes a crash
  - #14850 (ERROR 1062 when a quering a view using a Group By on a column that can be null


mysql-test/r/create.result:
  Update results after removing wrong warnings for CREATE ... SELECT
  New tests
mysql-test/r/handler.result:
  Drop used tables
mysql-test/r/kill.result:
  Make test portable
mysql-test/r/mysqlshow.result:
  Drop tables used by previous test
mysql-test/r/trigger.result:
  Reuse old procedure name
mysql-test/r/view.result:
  Extra tests
mysql-test/t/create.test:
  New tests to test fix of removing wrong warnings for CREATE ... SELECT
mysql-test/t/disabled.def:
  Enable 'kill' test (should now be portable)
mysql-test/t/handler.test:
  Drop used tables
mysql-test/t/kill.test:
  Make test portable even if kill doesn't work at once
mysql-test/t/mysqlshow.test:
  Drop tables used by previous test
mysql-test/t/trigger.test:
  Reuse old procedure name
mysql-test/t/view.test:
  Extra tests
sql/field.cc:
  Removed compiler warning
sql/ha_federated.cc:
  my_snprintf -> strmake()
  (Simple optimization)
sql/ha_ndbcluster.cc:
  Indentation cleanups and trival optimization
sql/item.cc:
  Moved save_org_in_field() to item.cc to make it easier to test
  Remove setting of null_value as this is not needed
sql/item.h:
  Moved save_org_in_field() to item.cc to make it easier to test
sql/log_event.cc:
  Remove inline of slave_load_file_stem()
  Added 'extension' parameter to slave_load_file_stem() to get smaller code
  Removed not critical (or needed) DBUG_ASSERT()'s
  Cleaned up usage of slave_load_file_stem() to not depend on constant string lengths
  Indentation fixes
sql/opt_range.cc:
  Moved code from declaration to function body
  (To make it more readable)
sql/parse_file.cc:
  Fixed DBUG_PRINT
sql/sp.cc:
  Simple cleanups
  - Removed not needed {} level
  - Ensure saved variables starts with old_
sql/sp_head.cc:
  Indentation fixes
  Remove core dump when using --debug when m_next_cached_sp == 0
  Fixed compiler warnings
  Trivial optimizations
sql/sp_head.h:
  Changed argument to set_definer() to const
  Added THD argument to recursion_level_error() to avoid call to current_thd
sql/sql_acl.cc:
  Removed not needed test (first_not_own_table is the guard)
sql/sql_base.cc:
  Removed extra empty line
sql/sql_handler.cc:
  Don't test table version in mysql_ha_read() as this is already tested in lock_tables()
  Moved call to insert_fields to be after lock_table() to guard aganst reopen of tables
  (Better fix for Bug#14397 - OPTIMIZE TABLE with an open HANDLER causes a crash)
sql/sql_insert.cc:
  Mark fields that are set in CREATE ... SELECT as used
  (Removed wrong warnings about field not having a default value)
sql/sql_parse.cc:
  Removed not needed test of 'tables' (first_not_own_table is the guard)
  Simplify code
sql/sql_select.cc:
  Use group->field to check if value is null instead of item called by 'save_org_in_field'
  This is a better bug fix for #14850 (ERROR 1062 when a quering a view using a Group By on a column that can be null)
sql/sql_trigger.cc:
  Move sql_modes_parameters outside of function
  Indentation fixes
  Fixed compiler warning
  Ensure that thd->lex->query_tables_own_last is set properly before calling check_table_access()
  (This allows us to remove the extra test in check_grant() and check_table_access())
2006-01-06 00:47:49 +02:00
unknown
eff9369d10 Merge mysql.com:/home/dlenev/src/mysql-5.0-bg14836
into  mysql.com:/home/dlenev/src/mysql-5.1-merges


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_show.cc:
  Auto merged
storage/ndb/src/kernel/blocks/backup/Backup.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
  Auto merged
storage/ndb/tools/ndb_size.pl:
  Auto merged
mysql-test/r/information_schema.result:
  Manual merge.
mysql-test/t/information_schema.test:
  Manual merge.
sql/sql_trigger.cc:
  Manual merge.
2005-12-24 20:13:51 +03:00
unknown
c7a440d1c6 Fix for bug#14861 aliased column names are not preserved.
Create tmp table filed using original item name when it's necessary


mysql-test/r/view.result:
  Fix for bug#14861 aliased column names are not preserved.
    test case
mysql-test/t/view.test:
  Fix for bug#14861 aliased column names are not preserved.
    test case
2005-12-19 15:36:03 +04:00
unknown
346694bddf Merge mysql.com:/home/dlenev/src/mysql-5.0-merges
into  mysql.com:/home/dlenev/src/mysql-5.1-merges


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2005-12-12 14:59:14 +03:00
unknown
2dbeedd504 Merge mysql.com:/usr/home/pem/bug14834/mysql-5.0
into  mysql.com:/usr/home/pem/mysql-5.1-new


BitKeeper/triggers/post-commit:
  Merge.
configure.in:
  Manual merge.
mysql-test/r/sp.result:
  Merge.
mysql-test/r/view.result:
  Merge.
sql/share/errmsg.txt:
  Manual merge.
sql/sp_head.cc:
  Merge.
sql/sql_parse.cc:
  Merge.
sql/sql_table.cc:
  Merge.
sql/sql_yacc.yy:
  Merge.
2005-12-07 15:17:18 +01:00
unknown
a2023cf018 Merge mysqldev@production.mysql.com:my/mysql-5.0-release
into  mysql.com:/home/dlenev/src/mysql-5.0-bg11555-2


mysql-test/r/view.result:
  Auto merged
mysql-test/t/sp-error.test:
  Auto merged
sql/sp_head.cc:
  Auto merged
mysql-test/r/sp-error.result:
  SCCS merged
2005-12-07 14:38:20 +03:00
unknown
24af7680d4 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-bg11555-2


mysql-test/r/sp-error.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_trigger.h:
  Auto merged
sql/sp.cc:
  Manual merge.
sql/sp.h:
  Manual merge.
sql/sql_base.cc:
  Manual merge.
2005-12-07 12:47:25 +03:00
unknown
361977c0da Fix for bug #11555 "Stored procedures: current SP tables locking make
impossible view security".

We should not expose names of tables which are explicitly or implicitly (via
routine or trigger) used by view even if we find that they are missing.
So during building of list of prelocked tables for statement we track which
routines (and therefore tables for these routines) are used from views. We
mark elements of LEX::routines set which correspond to routines used in views
by setting Sroutine_hash_entry::belong_to_view member to point to TABLE_LIST
object for topmost view which uses routine. We propagate this mark to all
routines which are used by this routine and which we add to this set. We also
mark tables used by such routine which we add to the list of tables for
prelocking as belonging to this view.


mysql-test/r/sp-error.result:
  Added test for bug #11555 "Stored procedures: current SP tables locking make 
  impossible view security".
mysql-test/r/view.result:
  We should not expose tables which are expicitly/implicitly used in view in
  check table statement.
mysql-test/t/sp-error.test:
  Added test for bug #11555 "Stored procedures: current SP tables locking make 
  impossible view security".
mysql-test/t/view.test:
  Removed comment obsoleted by bugfix.
sql/sp.cc:
  We should not expose names of tables which are explicitly or implicitly
  (via routine or trigger) used by view even if we find that they are missing.
  So during building of list of prelocked tables for statement we track which
  routines (and therefore tables for these routines) are used from views. We
  mark elements of LEX::routines set which correspond to routines used in views
  by setting Sroutine_hash_entry::belong_to_view member to point to TABLE_LIST
  object for topmost view which uses routine. We propagate this mark to all
  routines which are used by this routine and which we add to this set. We also
  mark tables used by such routine which we add to the list of tables for
  prelocking as belonging to this view.
sql/sp.h:
  sp_cache_routines_and_add_tables_for_view()/for_triggers():
    To be able to determine correctly uppermost view which uses this view/table
    with trigger we have to pass pointer to TABLE_LIST object instead of pointer
    to view's LEX or to Table_triggers_list object.
sql/sp_head.cc:
  sp_head::add_used_tables_to_table_list():
    Added new argument which allows to mark tables which are added to table
    list for prelocking as belonging to view (this allows properly hide names
    of tables which are used in routines used by views).
sql/sp_head.h:
  sp_head::add_used_tables_to_table_list():
    Added new argument which allows to mark tables which are added to table
    list for prelocking as belonging to view (this allows properly hide names
    of tables which are used in routines used by views).
sql/sql_base.cc:
  open_tables():
    sp_cache_routines_and_add_tables_for_view()/for_triggers() now accept
    pointer to table list element as last argument, this allows them to determine
    correctly uppermost view which uses this view/table with trigger.
sql/sql_trigger.h:
  Table_triggers_list:
    sp_cache_routines_and_add_tables_for_triggers() now accept pointer to table
    list element as last argument, this allows to determine correctly uppermost
    view which uses this table with trigger.
2005-12-07 12:27:17 +03:00
unknown
3e1fed7b11 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


mysql-test/r/sp.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-12-05 18:18:56 +01:00
unknown
d9c233ae76 better error for optimize/repair/etc a view 2005-12-05 12:08:30 +01:00
unknown
099d2bfbb1 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-merge-5.1


configure.in:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/sql_cache.cc:
  merge
sql/sql_lex.h:
  merge
2005-12-03 08:56:00 +02:00
unknown
5dac7516e2 Merge sanja.is.com.ua:/home/bell/mysql/bk/work-bug1-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-merge1-5.0


sql/sp_head.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2005-12-02 21:20:25 +02:00
unknown
4202271065 Now we shall store only position (index of first character)
of SELECT from query begining, to be independet of query buffer
allocation.
Correct procedure used to find beginning of the current statement
during parsing (BUG#14885).


mysql-test/r/view.result:
  BUG#14885 test suite.
mysql-test/t/view.test:
  BUG#14885 test suite.
sql/sp_head.cc:
  The debug print statement fixed to prevent crash in case of NULL
  in m_next_cached_sp.
sql/sql_lex.h:
  Now we shall store only position (index of first character)
  of SELECT from query beginning.
sql/sql_view.cc:
  Position of the SELECT used to output it to .frm.
sql/sql_yacc.yy:
  Now we shall store only position (index of first character)
  of SELECT from query beginning.
  Correct procedure used to find beginning of the current statement
  during parsing.
2005-12-02 21:18:12 +02:00
unknown
ca34f415e9 Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
-issue more correct message for incorrect date|datetime|time values
  -ER_WARN_DATA_OUT_OF_RANGE message is changed
  -added new error message


mysql-test/r/auto_increment.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/bigint.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/ctype_ucs.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/date_formats.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/func_sapdb.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/func_str.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/func_time.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/insert.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/loaddata.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/mysqldump.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/ps_2myisam.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/ps_3innodb.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/ps_4heap.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/ps_5merge.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/ps_6bdb.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/ps_7ndb.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/rpl_rewrite_db.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/sp.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/strict.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/timezone2.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/timezone_grant.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_bit.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_bit_innodb.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_date.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_datetime.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_decimal.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_float.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_newdecimal.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_ranges.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_time.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_uint.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/view.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/warnings.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
sql/share/errmsg.txt:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    -ER_WARN_DATA_OUT_OF_RANGE message is changed
    -added new error message
sql/time.cc:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    issue more correct message for incorrect date|datetime|time values
2005-12-02 15:01:44 +04:00
unknown
c86ba5f5e7 Fix for bug#11491 Misleading error message if not NULL column set to NULL,
SQL mode TRADITIONAL
  Message is chenged from 'ER_WARN_NULL_TO_NOTNULL' to 'ER_BAD_NULL_ERROR'


mysql-test/r/auto_increment.result:
  Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                    SQL mode TRADITIONAL
    result change
mysql-test/r/create.result:
  Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                    SQL mode TRADITIONAL
    result change
mysql-test/r/insert.result:
  Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                    SQL mode TRADITIONAL
    result change
mysql-test/r/insert_select.result:
  Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                    SQL mode TRADITIONAL
    result change
mysql-test/r/key.result:
  Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                    SQL mode TRADITIONAL
    result change
mysql-test/r/null.result:
  Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                    SQL mode TRADITIONAL
    result change
mysql-test/r/null_key.result:
  Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                    SQL mode TRADITIONAL
    result change
mysql-test/r/ps_2myisam.result:
  Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                    SQL mode TRADITIONAL
    result change
mysql-test/r/ps_3innodb.result:
  Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                    SQL mode TRADITIONAL
    result change
mysql-test/r/ps_4heap.result:
  Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                    SQL mode TRADITIONAL
    result change
mysql-test/r/ps_5merge.result:
  Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                    SQL mode TRADITIONAL
    result change
mysql-test/r/ps_6bdb.result:
  Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                    SQL mode TRADITIONAL
    result change
mysql-test/r/ps_7ndb.result:
  Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                    SQL mode TRADITIONAL
    result change
mysql-test/r/strict.result:
  Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                    SQL mode TRADITIONAL
    result change
mysql-test/r/view.result:
  Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                    SQL mode TRADITIONAL
    result change
mysql-test/r/warnings.result:
  Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                    SQL mode TRADITIONAL
    result change
mysql-test/t/strict.test:
  Fix for bug#11491 Misleading error message if not NULL column set to NULL,
                    SQL mode TRADITIONAL
    test change
2005-12-01 15:30:11 +04:00
unknown
3e4d4a3656 View creation code fixed to expect empty TABLE_LIST::table pointer (BUG#15096).
mysql-test/r/view.result:
  BUG#15096 test suite.
mysql-test/t/view.test:
  BUG#15096 test suite.
sql/sql_view.cc:
  View placed in a function never get TABLE during view creation,
  because we have never executed that function in this process.
  So we should expect empty TABLE_LIST::table pointer.
2005-12-01 12:15:48 +02:00
unknown
18ca0d6302 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/13622-bug-5.0-mysql


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2005-11-18 17:26:44 +03:00
unknown
283962473c WL#2486 - natural/using joins according to SQL:2003.
Enabled view tests that didn't work before.


mysql-test/r/view.result:
  Enabled natural outer join tests with views - now they work after WL#2486 was pushed.
mysql-test/t/view.test:
  Enabled natural outer join tests with views - now they work after WL#2486 was pushed.
2005-11-18 10:51:46 +02:00
unknown
d29438f25e Manually merged
sql/sql_view.cc:
  Auto merged
2005-11-18 01:16:15 +03:00
unknown
9de8e3b0ef Merge
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2005-11-16 02:08:20 +03:00
unknown
0a9badeca4 Fix bug #14816 test_if_order_by_key() expected only Item_fields.
test_if_order_by_key() expected only Item_fields to be in order->item, thus
failing to find available index on view's field, which results in reported
error.

Now test_if_order_by_key() calls order->item->real_item() to get field for
choosing index.


sql/sql_select.cc:
  Fix bug #14816 test_if_order_by_key() expected only Item_fields.
  Make test_if_order_by_key() use real_item() to get field.
mysql-test/r/view.result:
  Test case for bug#14816 test_if_order_by_key() expected only Item_fields.
mysql-test/t/view.test:
  Test case for bug#14816 test_if_order_by_key() expected only Item_fields.
2005-11-14 22:10:34 +03:00
unknown
6c708fadcb Fix bug #14850 Item_ref's null_value wasn't updated
Item_ref's null_value wasn't updated in save_org_in_field() causing reported
error.


sql/item.h:
  Fix bug #14850 Item_ref's null_value wasn't updated
  Make save_org_in_field() update Item_ref's null_value.
mysql-test/r/view.result:
  Test case for bug #14850 Item_ref's null_value wasn't updated
mysql-test/t/view.test:
   Test case for bug #14850 Item_ref's null_value wasn't updated
2005-11-14 21:52:39 +03:00
unknown
56f43d9d02 Fix bug #13622 Wrong view .frm created if some field's alias contain \n
View .frm parser assumes that query string will take only 1 line, with \n in
aliases query stringmay take several lines thus produces bad .frm file.

'query' parameter type changed from 'string' to 'escaped string'


sql/sql_view.cc:
  Fix bug #13622 \n in column alias results in broken .frm
  'query' parameter type changed to 'escaped string'
mysql-test/r/view.result:
  Test case for bug #13622 Wrong view .frm created if some field's alias contain \n
mysql-test/t/view.test:
  Test case for bug #13622 Wrong view .frm created if some field's alias contain \n
2005-11-11 20:03:32 +03:00
unknown
7dbea7df27 WL#2818 (Add creator to the trigger definition for privilege
checks on trigger activation)


mysql-test/r/information_schema.result:
  Update result file: a new column DEFINER has been added to
  INFORMATION_SCHEMA.TRIGGERS.
mysql-test/r/mysqldump.result:
  Update result file: a new column DEFINER has been added to
  INFORMATION_SCHEMA.TRIGGERS.
mysql-test/r/rpl_ddl.result:
  Update result file: a new column DEFINER has been added to
  INFORMATION_SCHEMA.TRIGGERS.
mysql-test/r/rpl_sp.result:
  Update result file: a new clause DEFINER has been added to
  CREATE TRIGGER statement.
mysql-test/r/rpl_trigger.result:
  Results for new test cases were added.
mysql-test/r/skip_grants.result:
  Error message has been changed.
mysql-test/r/trigger.result:
  Added DEFINER column.
mysql-test/r/view.result:
  Error messages have been changed.
mysql-test/r/view_grant.result:
  Error messages have been changed.
mysql-test/t/mysqldump.test:
  Drop created procedure to not affect further tests.
mysql-test/t/rpl_trigger.test:
  Add tests for new column in information schema.
mysql-test/t/skip_grants.test:
  Error tag has been renamed.
mysql-test/t/view.test:
  Error tag has been renamed.
mysql-test/t/view_grant.test:
  Error tag has been changed.
sql/item_func.cc:
  Fix typo in comments.
sql/mysql_priv.h:
  A try to minimize copy&paste:
    - introduce operations to be used from sql_yacc.yy;
    - introduce an operation to be used from trigger and
      view processing code.
sql/share/errmsg.txt:
  - Rename ER_NO_VIEW_USER to ER_MALFORMED_DEFINER in order to
    be shared for view and trigger implementations;
  - Fix a typo;
  - Add a new error code for trigger warning.
sql/sp.cc:
  set_info() was split into set_info() and set_definer().
sql/sp_head.cc:
  set_info() was split into set_info() and set_definer().
sql/sp_head.h:
  set_info() was split into set_info() and set_definer().
sql/sql_acl.cc:
  Add a new check: exit from the cycle if the table is NULL.
sql/sql_lex.h:
  - Rename create_view_definer to definer, since it is used for views
    and triggers;
  - Change st_lex_user to LEX_USER, since st_lex_user is a structure.
    So, formally, it should be "struct st_lex_user", which is longer
    than just LEX_USER;
  - Add trigger_definition_begin.
sql/sql_parse.cc:
  - Add a new check: exit from the cycle if the table is NULL;
  - Implement definer-related functions.
sql/sql_show.cc:
  Add DEFINER column.
sql/sql_trigger.cc:
  Add DEFINER support for triggers.
sql/sql_trigger.h:
  Add DEFINER support for triggers.
sql/sql_view.cc:
  Rename create_view_definer to definer.
sql/sql_yacc.yy:
  Add support for DEFINER-clause in CREATE TRIGGER statement.
  
  Since CREATE TRIGGER and CREATE VIEW can be similar at the start,
  yacc is unable to distinguish between them. So, had to modify both
  statements in order to make it parsable by yacc.
mysql-test/r/trigger-compat.result:
  Result file for triggers backward compatibility test.
mysql-test/r/trigger-grant.result:
  Result file of the test for WL#2818.
mysql-test/t/trigger-compat.test:
  Triggers backward compatibility test: check that the server
  still can load triggers w/o definer attribute and modify
  tables with such triggers (add a new trigger, etc).
mysql-test/t/trigger-grant.test:
  Test for WL#2818 -- check that DEFINER support in triggers
  works properly
2005-11-10 22:25:03 +03:00
unknown
b5e8347f81 Fixed BUG#14719: Views DEFINER grammar is incorrect
Corrected the syntax for the current_user() case.
  (It's "definer = current_user[()]", not just "current_user[()]".)


mysql-test/r/view.result:
  New test case for BUG#14719
mysql-test/t/view.test:
  New test case for BUG#14719
sql/sql_yacc.yy:
  Corrected the CREATE VIEW syntax for the current_user() DEFINER case.
  (It's "definer = current_user[()]", not just "current_user[()]".)
2005-11-09 16:51:00 +01:00
unknown
a67e6fdf8b 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:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
2005-11-05 22:45:54 -08:00
unknown
502495271d Post review fixes. 2005-11-05 22:41:36 -08:00
unknown
a7956c817e Post-merge fixes 2005-11-03 12:38:46 +03:00
unknown
883b38a2cd Merged 2005-11-03 10:28:12 +03:00
unknown
2b1652046d 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:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
2005-11-02 22:24:36 -08:00
unknown
3e2e44f044 Post review fixes.
sql/sql_table.cc:
  Post review fixes
2005-11-02 22:13:10 -08:00
unknown
8a80936517 #view.test#:
new file
sql_table.cc, handler.h:
  Fixed bug #14540.
  Added error mnemonic code HA_ADMIN_NOT_BASE_TABLE
  to report that an operation cannot be applied for views.
view.test, view.result:
  Added a test case for bug #14540.
errmsg.txt:
  Fixed bug #14540.
  Added error ER_CHECK_NOT_BASE_TABLE.


mysql-test/r/view.result:
  Added a test case for bug #14540.
mysql-test/t/view.test:
  Added a test case for bug #14540.
sql/handler.h:
  Fixed bug #14540.
  Added error mnemonic code HA_ADMIN_NOT_BASE_TABLE
  to report that an operation cannot be applied for views.
sql/share/errmsg.txt:
  Added error ER_CHECK_NOT_BASE_TABLE.
sql/sql_table.cc:
  Fixed bug #14540.
  Added error mnemonic code HA_ADMIN_NOT_BASE_TABLE
  to report that an operation cannot be applied for views.
2005-11-02 13:44:58 -08:00
unknown
17fcbcf772 BUG#14026: When doing the end-of-prepare fix up for TABLE_LISTs used in the PS, do the fixup
for underlying tables of a merge VIEWs, too.


mysql-test/r/view.result:
  Testcase for BUG#14026
mysql-test/t/view.test:
  Testcase for BUG#14026
2005-11-02 07:05:19 +03:00
unknown
7dd86f7570 Fix bug #14466 lost sort order in GROUP_CONCAT() in a view
Item_func_group_concat::print() wasn't printing sort order thus creating wrong
view. This results in reported error.


sql/item_sum.cc:
  Fix bug #14466 lost sort order in GROUP_CONCAT() in a view
  Now Item_func_group_concat::print() prints sort order.
mysql-test/r/view.result:
  Test case for bug #14466 lost sort order in GROUP_CONCAT() in a view
mysql-test/t/view.test:
  Test case for bug #14466 lost sort order in GROUP_CONCAT() in a view
2005-11-01 17:27:10 +03:00
unknown
fbb2fd3e58 Merge mysql.com:/usr/local/bk/mysql-5.0
into  mysql.com:/usr/home/pem/bug14256/mysql-5.0


mysql-test/r/view.result:
  Auto merged
mysql-test/r/view_grant.result:
  Merge fix.
mysql-test/t/view_grant.test:
  Merge fix.
2005-10-28 14:55:01 +02:00
unknown
25d1e01409 Fixed BUG#14256: definer in view definition is not fully qualified
Changed the parser test for wildcards in hostname to checking for empty
  strings instead (analogous with the test in default_view_definer()),
  since wildcards do appear in the definer's host-part sometimes.


mysql-test/r/view.result:
  Updated result.
mysql-test/r/view_grant.result:
  Added test for BUG#14256.
mysql-test/t/view.test:
  Changed test for explicit definer; wildcards in host are ok, empty host-part is not.
mysql-test/t/view_grant.test:
  Added test for BUG#14256.
sql/sql_yacc.yy:
  Changed test for wildcards in hostpart of explicit view definer to test for empty
  host part instead. (Analogous with sql_parse.cc:default_view_definer().)
2005-10-28 12:11:32 +02:00
unknown
24ac4019c5 support of view underlying tables and SP functions security check added (BUG#9505) (WL#2787)
mysql-test/r/information_schema.result:
  error message changed
mysql-test/r/sp.result:
  error message changed
mysql-test/r/sql_mode.result:
  fixed test suite
mysql-test/r/view.result:
  error message changed
mysql-test/r/view_grant.result:
  test of underlying view tables check
mysql-test/t/sql_mode.test:
  fixed test suite
mysql-test/t/view_grant.test:
  test of underlying view tables check
sql/item.cc:
  check of underlying tables privilege added
sql/item.h:
  Name the resolution context points to the security  context of view (if item belong to the view)
sql/item_func.cc:
  a view error hiding for execution of prepared function belonged to a view
  fixed checking privileges if stored functions belonds to some view
sql/mysql_priv.h:
  refult of derived table processing functions changed to bool
  Security_context added as an argument to find_field_in_table()
sql/share/errmsg.txt:
  error message fixed
sql/sql_acl.cc:
  Storing requested privileges of tables added
  View underlying tables privilege check added
sql/sql_base.cc:
  View underlying tables privilege check added
sql/sql_cache.cc:
  Code cleunup: we should not register underlying tables of view second time
sql/sql_delete.cc:
  ancestor -> merge_underlying_list renaming
sql/sql_derived.cc:
  refult of derived table processing functions changed to bool
  do not give SELECT_ACL for TEMPTABLE views
sql/sql_lex.h:
  The comment added
sql/sql_parse.cc:
  registration of requested privileges added
sql/sql_prepare.cc:
  registration of requested privileges added
sql/sql_update.cc:
  manipulation of requested privileges for underlying tables made the same as for table which we are updating
sql/sql_view.cc:
  underlying tables of view security check support added
sql/table.cc:
  renaming and fixing view preparation methods, methods for checking underlyoing tables security context added
sql/table.h:
  storege for reuested privileges added
2005-10-28 00:18:23 +03:00
unknown
706157f025 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
server-tools/instance-manager/instance.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_manager.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
2005-10-12 00:59:52 +03:00
unknown
0ce12f70ed Reviewing new pushed code
- CHAR() now returns binary string as default
- CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
- Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
  (Some old systems returns ETIME and it's safer to test for both values
   than to try to write a wrapper for each old system)
- Fixed new introduced bug in NOT BETWEEN X and X
- Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
- Use octet2hex() for all conversion of string to hex
- Simplify and optimize code


client/mysqldump.c:
  Simple optimizations of new code
  Indentation fixes
client/mysqltest.c:
  Removed not needed variable
include/mysql_com.h:
  Made octec2hex() more usable
mysql-test/r/ctype_utf8.result:
  CHAR() now returns binary string as default
mysql-test/r/func_str.result:
  CHAR() now returns binary string as default
mysql-test/r/range.result:
  Added test to verify new introduced bug in NOT BETWEEN X and X
mysql-test/r/user_var-binlog.result:
  CHAR() now returns binary string as default
mysql-test/r/view.result:
  More tests of view rename
mysql-test/t/ctype_utf8.test:
  CHAR() now returns binary string as default
mysql-test/t/func_str.test:
  CHAR() now returns binary string as default
mysql-test/t/range.test:
  Added test to verify new introduced bug in NOT BETWEEN X and X
mysql-test/t/view.test:
  More tests of view rename
mysys/mf_keycache.c:
  Indentation changes
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
mysys/my_os2cond.c:
  Fix to MySQL coding style
  Optimized functions
mysys/thr_lock.c:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
mysys/thr_mutex.c:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
server-tools/instance-manager/instance.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
server-tools/instance-manager/thread_registry.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/ha_federated.cc:
  Use octet2hex()
sql/ha_ndbcluster.cc:
  Removed not used variable
sql/handler.cc:
  Simplify code
  Use *NONE* instead of 'none' for not existing storage engine
  Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
sql/item.h:
  Remove not needed test for *ref.  (If ref is set, it should never point at 0)
sql/item_func.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
  Simplify code
  More comments
  Require that last argument to find_and_check_access() is given
  (Made code shorter and faster)
sql/item_strfunc.cc:
  Changed CHAR() to return result in binary collation
  CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
  
  Bar will shortly add the following syntax:
  CHAR(.... USING character_set)
  and ensure that
  CONVERT(CHAR(....) USING utf8) cuts not legal utf8 strings
  Use ocet2hex()
sql/item_strfunc.h:
  CHAR() now returns a binary string
sql/log_event.cc:
  Use octet2hex()
  Simplify code
sql/parse_file.cc:
  Indentation fixes
  Use for() instead of while()
sql/password.c:
  Make octet2hex() more generally usable by returning pointer to end 0
sql/slave.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/sql_base.cc:
  Indentation fixes
sql/sql_insert.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/sql_manager.cc:
  Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
sql/sql_parse.cc:
  Don't check thd->db when checking for function privileges
sql/sql_prepare.cc:
  Fixed wrong merge
sql/sql_select.cc:
  Fixed new bug for NOT BETWEEN X and X
sql/sql_show.cc:
  Removed not used variable
sql/sql_table.cc:
  Indentation fixed
  Removed DBUG_PRINT that is obvious from context
sql/sql_view.cc:
  Simplify code
sql/unireg.cc:
  Use octet2hex()
2005-10-12 00:58:22 +03:00
unknown
ee5795f2f4 Fix bug#13327 check_equality() wasn't checking view's fields
check_equality() finds equalities among field items. It checks input items
to be Item_fields thus skipping view's fields, which are represented by
Item_direct_view_ref. Because of this index wasn't applied in all cases
it can be.

To fix this problem check_equality() now takes real item of
Item_direct_view_ref, except outer view refs (with depended_from set).


sql/sql_select.cc:
  Fix bug #13327 VIEW performs index scan
   For proper views fields handling check_equality() now takes real item from Item_direct_view_ref, with exception of outer view refs.
mysql-test/r/view.result:
  Test case for bug#13327 VIEW performs index scan
mysql-test/t/view.test:
  Test case for bug#13327 VIEW performs index scan
2005-10-10 18:53:57 +04: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
d7e4e1a561 item.cc:
Fixed bug #13410.
  Fixed name resolution for qualified reference to a view column
  in the HAVING clause.
view.result, view.test:
  Added a test case for bug #13410.


mysql-test/t/view.test:
  Added a test case for bug #13410.
mysql-test/r/view.result:
  Added a test case for bug #13410.
sql/item.cc:
  Fixed bug #13410.
  Fixed name resolution for qualified reference to a view column
  in the HAVING clause.
2005-09-26 23:29:02 -07:00
unknown
f6a552b1cb sql_base.cc, item.cc:
Fixed bug #13411.
  Fixed name resolution for non-qualified reference to a view column
  in the HAVING clause.
view.result, view.test:
  Added a test case for bug #13411.


mysql-test/t/view.test:
  Added a test case for bug #13411.
mysql-test/r/view.result:
  Added a test case for bug #13411.
sql/item.cc:
  Fixed bug #13411.
  Fixed name resolution for non-qualified reference to a view column
  in the HAVING clause.
sql/sql_base.cc:
  Fixed bug #13411.
  Fixed name resolution for non-qualified reference to a view column
  in the HAVING clause.
2005-09-26 20:18:59 -07:00
unknown
015d55b754 Merge grichter@bk-internal.mysql.com:/home/bk/mysql-5.0
into lmy002.wdf.sap.corp:/home/georg/work/mysql/bugs/mysql-5.0-master


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sql_view.cc:
  Auto merged
2005-09-19 05:32:38 +02:00
unknown
bf58b698e2 Fix for bug#5508 after Sanja's review
mysql-test/r/view.result:
  test results for rename table view1 to view2
mysql-test/t/view.test:
  tests for rename table view1 to view2
sql/share/errmsg.txt:
  added new errormessage (schema change not allowed in rename table view)
sql/sql_rename.cc:
  added support for renaming views
sql/sql_view.cc:
  added new function mysql_rename_view
sql/sql_view.h:
  added prototype mysql_rename_view
2005-09-16 17:13:21 +02:00
unknown
d01927dc7e Merge
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2005-09-15 20:50:10 +04:00
unknown
11e0bdd70b Updated test results for view test.
mysql-test/r/view.result:
  Updated test results
2005-09-14 16:27:55 -04:00
unknown
de4fbc212c Fix bug #11416 Server crash if using a view that uses function convert_tz
When parser parses function convert_tz it loads available timezone tables in
thd->lex->time_zone_tables_used. But view have another lex that main query.
Thus time_zone_tables_used of main query left uninitialized.
When Item_func_conver_tz is fixed it takes timezone tables from main query
and later when it executed it assumes that timezone tables are loaded and
failed that assertion.



sql/sql_view.cc:
  Fix bug #11416 Server crash if using a view that uses function convert_tz
mysql-test/r/view.result:
  Test case for bug#11416 Server crash if using a view that uses function convert_tz
mysql-test/t/view.test:
  Test case for bug#11416 Server crash if using a view that uses function convert_tz
2005-09-15 00:08:12 +04:00
unknown
97bea9092e Merge mysql.com:/home/alexi/mysql-5.0
into  mysql.com:/home/alexi/dev/mysql-5.0-13000


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2005-09-14 20:32:59 +04:00
unknown
b214671e09 Fixed BUG#12963, BUG#13000: wrong VIEW creation with DAYNAME(),
DAYOFWEEK(), and WEEKDAY().


mysql-test/r/func_time.result:
  Fixed new results for testcases containing EXPLAIN EXTENDED SELECT ...
   WEEKDAY ... DAYNAME. The new results are correct and correspond to
   the changes in create_func_weekday() and create_func_dayname().
mysql-test/r/view.result:
  Fixed some testcases results (bugs #12963, #13000).
mysql-test/t/view.test:
  Added testcases for for bugs #12963, #13000.
sql/item_create.cc:
  Fixed bugs #12963, #13000: wrong VIEW creation with DAYNAME(),
   DAYOFWEEK(), and WEEKDAY().
   Modified create_func_dayname(), create_func_dayofweek(), and
   create_func_weekday(). They don´t insert Item_func_to_days
   object now.
sql/item_timefunc.cc:
  Fixed bugs #12963, #13000: wrong VIEW creation with DAYNAME(),
   DAYOFWEEK(), and WEEKDAY().
   Modified Item_func_weekday::val_int(). The argument of weekday should
   not be considered now to be Item_func_to_days object.
sql/item_timefunc.h:
  Fixed bugs #12963, 13000: wrong VIEW creation with DAYNAME(),
   DAYOFWEEK(), and WEEKDAY.
   Modified Item_func_weekday::func_name(). It returns now different
   names depending on the odbc_type attribute value.
2005-09-14 20:25:00 +04:00
unknown
eae520f383 postmerge fix 2005-09-14 17:27:33 +03:00
unknown
98b6fd8797 postmerge fix 2005-09-14 12:24:14 +03:00
unknown
d0a78e6fa6 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-owner2-5.0


sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
mysql-test/r/func_in.result:
  merge
mysql-test/r/lowercase_view.result:
  merge
mysql-test/r/mysqldump.result:
  merge
mysql-test/r/sql_mode.result:
  merge
mysql-test/r/temp_table.result:
  merge
mysql-test/r/view.result:
  merge
mysql-test/t/view.test:
  merge
2005-09-14 11:07:04 +03:00
unknown
f7aeb6f9fd part 1 (ver 2, postreview fix) of WL#2787
view definer information syntax/storage/replication
fixed SOURCE field of .frm


mysql-test/r/func_in.result:
  definer information added to CREATE VIEW
mysql-test/r/lowercase_view.result:
  definer information added to CREATE VIEW
mysql-test/r/mysqldump.result:
  definer information added to CREATE VIEW
mysql-test/r/rpl_view.result:
  check log of queries
mysql-test/r/skip_grants.result:
  --skip-grants do not allow use user information
mysql-test/r/sql_mode.result:
  definer information added to CREATE VIEW
mysql-test/r/temp_table.result:
  definer information added to CREATE VIEW
mysql-test/r/view.result:
  definer information added to CREATE VIEW
  test of storing/restoring definer information
mysql-test/r/view_grant.result:
  test of grant check of definer information
  definer information added to CREATE VIEW
mysql-test/t/rpl_view.test:
  check log of queries
mysql-test/t/skip_grants.test:
  --skip-grants do not allow use user information
mysql-test/t/view.test:
  test of storing/restoring definer information
mysql-test/t/view_grant.test:
  test of grant check of definer information
sql/mysql_priv.h:
  CREATE/ALTER VIEW print support
  set current user as definer procedure
sql/share/errmsg.txt:
  new errors/warnings
sql/sql_acl.cc:
  make find_acl_user public to allow to check user
sql/sql_acl.h:
  make find_acl_user public to allow to check user
sql/sql_lex.h:
  storing definer information
sql/sql_parse.cc:
  send CREATE/ALTER VIEW for replication with full list of options
  set current user as definer procedure
sql/sql_show.cc:
  new CREATE VIEW options printed
sql/sql_view.cc:
  check of definer clause
  changes in .frm file
  definer information storage support
  now we store only original SELECT in SOURCE field of .frm
sql/sql_yacc.yy:
  definer information sintax support
  getting SOURCE field information for .frm
sql/table.h:
  definer information storage
2005-09-14 10:53:09 +03:00
unknown
ee4b49698d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/bug10713_new/my50-bug10713_new


mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/table.h:
  Auto merged
2005-09-14 08:10:18 +02:00
unknown
849273bcfb Merge
sql/sql_base.cc:
  Auto merged
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2005-09-13 22:22:51 +04:00
unknown
a009a3dcdc Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/bug10713_new/my50-bug10713_new


mysql-test/r/view.result:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
2005-09-13 14:46:42 +02:00
unknown
2761c64884 BUG#10713 mysqldump includes database in create view and referenced tables
- Update test results
 - Updates after review


mysql-test/r/func_in.result:
  Update test results
mysql-test/r/lowercase_view.result:
  Update test results
mysql-test/r/mysqldump.result:
  Update test results
mysql-test/r/sql_mode.result:
  Update test results
mysql-test/r/temp_table.result:
  Update test results
mysql-test/r/view.result:
  Update test results
mysql-test/t/mysqldump.test:
  Update test results
sql/sql_show.cc:
  Updated after review
2005-09-13 12:43:43 +02:00
unknown
d2789003b3 Fix for BUG#6808.
The problem was in that add_table_to_list was testing for duplicate tables
in a list of tables that included the created view.


mysql-test/r/view.result:
  Test for BUG#6808
mysql-test/t/view.test:
  Test for BUG#6808
sql/sql_parse.cc:
  When testing for table name uniquness, skip the first table the current
  statement is CREATE VIEW. Notice that the first table is skipped differently
  for CREATE TABLE ... SELECT ... statements, so we don't have to handle that
  case here (see production 'create_select', the call 'to save_and_clear').
2005-09-12 17:01:17 +03:00
unknown
b3dc4ea3e3 Fix bug #12993 View column rename broken in subselect
When view column aliased in subselect alias is set on ref which represents
field. When tmp table is created for subselect, it takes name of original field
not ref. Because of this alias on view column in subselect is lost. Which
results in reported error.

Now when alias is set on ref, it's set on ref real item too.


mysql-test/r/view.result:
  Test case for bug #12993  View column rename broken in subselect
mysql-test/t/view.test:
  Test case for bug #12993  View column rename broken in subselect
sql/sql_base.cc:
  Fix bug #12993 View column rename broken in subselect
  Now when alias is set on ref, it's set on ref real item too.
2005-09-12 02:46:35 +04:00
unknown
dfc328e104 Manual merge 2005-09-07 22:55:49 +04: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
3003e5a0eb Fix for BUG#12941: in create_tmp_field(), if the passed item is an Item_ref, put newly
created item into item->result_field, not *(item->ref)->result_field.


mysql-test/r/view.result:
  Tescase for BUG#12941
mysql-test/t/view.test:
  Tescase for BUG#12941
2005-09-07 11:50:41 +04:00
unknown
a8fc85cbe3 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug3-5.0


BitKeeper/etc/config:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.h:
  Auto merged
2005-09-01 22:42:37 +03:00
unknown
0ccb16d636 Fix bug #12489 wrongly printed strcmp() function results in creation of broken
view.

For Item_func_strcmp print() was not defined and for this class was called
print_op of it's parent class. Because of this strcmp() was printed wrongly
and this results int creation of broken view.

Added function Item_func_strcmp::print() which correctly prints strcmp()
function.


sql/item_cmpfunc.h:
  Fix bug #12489 wrongly printed strcmp() function results in creation of broken view.
mysql-test/r/view.result:
  Test case for bug #12489 wrongly printed strcmp() function results in creation of broken view.
mysql-test/t/view.test:
  Test case for bug #12489 wrongly printed strcmp() function results in creation of broken view.
2005-08-31 00:54:41 +04:00
unknown
f5d7dca964 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug1-5.0


sql/sql_view.cc:
  Auto merged
mysql-test/r/view.result:
  merge
mysql-test/t/view.test:
  merge
2005-08-25 17:47:18 +03:00
unknown
b224e52c99 Merge lmy004.:/work/mysql-5.0-clean
into lmy004.:/work/mysql-5.0-bug12533-2


mysql-test/r/view.result:
  Auto merged
sql/sql_show.cc:
  Auto merged
2005-08-25 09:38:59 +02:00
unknown
750a05887f fix for bug #12533 (crash on DESCRIBE <view> after renaming base table column)
mysql-test/r/view.result:
  result of test for bug #12533
mysql-test/t/view.test:
  test for bug #12533 (crash on DESCRIBE <view> after renaming base table column)
sql/sql_show.cc:
  close thread tables even if process_table bails out
2005-08-25 09:24:21 +02:00
unknown
a57d244458 Fix for bug#5501 (SHOW TABLE STATUS should show "view" in upper case)
mysql-test/r/information_schema.result:
  changed output "view" to uppercase
mysql-test/r/view.result:
  changed output "view" to uppercase
sql/sql_show.cc:
  changed table field "view" to uppercase
2005-08-24 12:51:00 +02:00
unknown
eb7c4ff2db Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-bug3-5.0


BitKeeper/etc/config:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/view.result:
  merge
mysql-test/t/view.test:
  merge
sql/share/errmsg.txt:
  merge
sql/sql_insert.cc:
  merge
sql/table.h:
  merge
2005-08-23 23:17:36 +03:00
unknown
a166d8ca2e Manual merge 2005-08-18 15:17:04 -07:00
unknown
c9fa6a47bd view.test:
Added a test case for bug #10970.
view.result:
  Added a test case for bug #10970.
  Modified the error messages for error ER_VIEW_SELECT_TMPTABLE.
sql_view.cc:
  Fixed bug #10970.
  In the function mysql_create_view if a view does not refer
  any tables directly the variable table must be updated
  after the call of open_and_lock_tables.
errmsg.txt:
  Modified the error messages for error ER_VIEW_SELECT_TMPTABLE
  (when fixing bug #10970).


sql/share/errmsg.txt:
  Modified the error messages for error ER_VIEW_SELECT_TMPTABLE
  (when fixing bug #10970).
sql/sql_view.cc:
  Fixed bug #10970.
  In the function mysql_create_view if a view does not refer
  any tables directly the variable table must be updated
  after the call of open_and_lock_tables.
mysql-test/r/view.result:
  Fixed bug #10970.
  Modified the error messages for error ER_VIEW_SELECT_TMPTABLE.
mysql-test/t/view.test:
  Added a test case for bug #10970.
2005-08-17 22:19:12 -07:00
unknown
cf7b1241d1 sql_view.cc:
correct exit from mysql_create_view to restore ennvironment (BUG#12468)
view.result, view.test:
  test of CRETE VIEW in SP


mysql-test/t/view.test:
  test of CRETE VIEW in SP
mysql-test/r/view.result:
  test of CRETE VIEW in SP
sql/sql_view.cc:
  correct exit from mysql_create_view to restore ennvironment
2005-08-17 22:42:53 +03:00
unknown
def42df9fe Fix bug #10624 Views with multiple UNION and UNION ALL produce incorrect
results.

st_select_lex_unit::print() was losing UNION ALL if in statement were present
UNION DISTINCT.


mysql-test/r/view.result:
  Test case for bug #10624  Views with multiple UNION and UNION ALL produce incorrect results.
mysql-test/t/view.test:
  Test case for bug #10624  Views with multiple UNION and UNION ALL produce incorrect results.
sql/sql_lex.cc:
  Fix bug #10624 Views with multiple UNION and UNION ALL produce incorrect results.
2005-08-15 23:05:05 +04:00
unknown
d32c4314ed Fix bug #12298 Typo in timestampdiff() function name results in erroneous
view being created.

Item_func_timestamp_diff::func_name() were returning function name as
"timestamp_diff" thus when view was executed function parameters wasn't 
properly recognized and error was raised.


mysql-test/r/func_time.result:
  Fix test result after bugfix #12298
sql/item_timefunc.h:
  Fix bug #12298 Typo in timestampdiff() function name results in wrong view being created.
mysql-test/t/view.test:
  Test case for bug #12298 Typo in timestampdiff()  function name results in erroneous view being created.
mysql-test/r/view.result:
  Test case for bug #12298 Typo in timestampdiff() function name results in erroneous view being created.
2005-08-12 22:42:50 +04:00
unknown
8282261289 sql_base.cc:
Fixed bug #12470.
  A misplaced initialization of the cond_count counter
  resulted in a wrong calculation of it. This caused a memory
  corruption since this counter was used as a parameter of
  some memory allocation.
view.test:
  Added a test case for bug #12470.


mysql-test/t/view.test:
  Added a test case for bug #12470.
sql/sql_base.cc:
  Fixed bug #12470.
  A misplaced initialization of the cond_count counter
  resulted in a wrong calculation of it. This caused a memory
  corruption since this counter was used as a parameter of
  some memory allocation.
2005-08-12 01:27:04 -07:00
unknown
743fde2404 sql_base.cc:
Fixed bug #12382.
  INSERT statement effectively changed thd->set_query_id to 0,
  while SELECT statement changed it to 0. As a result
  the insert_fields function that expanded '*' was called
  with different values of thd->set_query_id for the query
  SELECT * FROM view depending on whether it was run after
  an INSERT or after a SELECT statement. This was corrected
  by restoring the old value of thd->set_query_id when
  returning from the function setup_fields where possible
  reset could occur.
  If the value of thd->set_query_id == 0 then the fields
  substituted instead of '*' were not registered as used
  for bitmaps used_keys. This caused selection of an invalid
  execution plan for the query SELECT * from <view>.
view.result, view.test:
  Added a test case for bug #12382.


mysql-test/t/view.test:
  Added a test case for bug #12382.
mysql-test/r/view.result:
  Added a test case for bug #12382.
sql/sql_base.cc:
  Fixed bug #12382.
  INSERT statement effectively changed thd->set_query_id to 0,
  while SELECT statement changed it to 0. As a result
  the insert_fields function that expanded '*' was called
  with different values of thd->set_query_id for the query
  SELECT * FROM view depending on whether it was run after
  an INSERT or after a SELECT statement. This was corrected
  by restoring the old value of thd->set_query_id when
  returning from the function setup_fields where possible
  reset could occur.
  If the value of thd->set_query_id == 0 then the fields
  substituted instead of '*' were not registered as used
  for bitmaps used_keys. This caused selection of an invalid
  execution plan for the query SELECT * from <view>.
2005-08-11 16:10:34 -07:00
unknown
502e97f875 Fix for BUG#12228: SP cache code:
* Cleanup SP Cache code, now SP Cache only deletes sp_head objects in 
  sp_cache_flush_obsolete() invalidates all pointers to routines in the cache.
* Use new SP Cache use contract in the code.

There is no test case because it doesn't seem to be possible to cause thread races to end
the same way they end in heavy-load test. This patch removes the crash in heavy test.


mysql-test/r/type_bit.result:
  Drop the tables this test tries to create
mysql-test/r/view.result:
  Drop function this test creates
mysql-test/t/type_bit.test:
  Drop the tables this test tries to create
mysql-test/t/view.test:
  Drop function this test creates
sql/sp.cc:
  Fix for BUG#12228: When a routine is deleted/modified, invalidate all cached SPs in all
  threads. We need to do so because sp_lex_keeper::{prelocking_tables, query_tables_own_last}
  in one SP may depend on another SP sp_lex_keeper::m_lex is using.
sql/sp_cache.cc:
  Fix for BUG#12228:
  * Move class sp_cache to here from sp_cache.h, document the functions.
  * sp_cache_insert, sp_cache_remove, sp_cache_invalidate and sp_cache_lookup must not delete
    sp_head* objects as they may be called during SP execution when sp_head objects are used.
  * Added sp_cache_flush_obsolete() function that may delete sp_head objects.
  * Removed sp_cache_remove as there is no need for it now - when we change one SP we should
    invalidate all other SPs, because sp_lex_keeper::{prelocking_tables, 
    query_tables_own_last} from one SP depend on content of another SP (used in 
    sp_lex_keeper::m_lex).
sql/sp_cache.h:
  Fix for BUG#12228:
  * Move class sp_cache to sp_cache.cc it is not needed in .h file
  * Added comments
sql/sql_parse.cc:
  Fix for BUG#12228: Call new sp_cache_flush_obsolete() function before running the query
sql/sql_prepare.cc:
  Fix for BUG#12228: Call new sp_cache_flush_obsolete() function before preparing/executing a PS
2005-08-08 23:23:34 +00:00
unknown
b7ab93001d Fix out-of-order results in view results file
mysql-test/r/view.result:
  Update results file
2005-08-04 16:33:29 -07:00
unknown
c5bcb9f01c Manual merge of #11335 bugfix
sql/item_sum.cc:
  Auto merged
mysql-test/r/view.result:
  Manual merge
mysql-test/t/view.test:
  Manual megre
sql/sql_select.cc:
  Manual merge
2005-08-05 00:34:42 +04:00
unknown
e442059c0d Manual merge
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_trigger.h:
  Auto merged
2005-08-03 03:47:07 +00:00
unknown
705118d1f6 issue correct error message in case of view presence for duplicated table on update (BUG#10773)
frequently used command sequence replaced with inline function


BitKeeper/etc/config:
  logging switching off
mysql-test/r/lowercase_view.result:
  hided view underlying tables from error message
mysql-test/r/view.result:
  hided view underlying tables from error message
mysql-test/t/lowercase_view.test:
  hided view underlying tables from error message
mysql-test/t/view.test:
  hided view underlying tables from error message
sql/mysql_priv.h:
  subroutine which return correct error message
sql/share/errmsg.txt:
  new error message
sql/sql_base.cc:
  subroutine which issue correct error message in case of view presence for duplicated table on update
sql/sql_delete.cc:
  issue correct error message in case of view presence for duplicated table on update
sql/sql_insert.cc:
  issue correct error message in case of view presence for duplicated table on update
sql/sql_parse.cc:
  issue correct error message in case of view presence for duplicated table on update
sql/sql_update.cc:
  issue correct error message in case of view presence for duplicated table on update
sql/sql_view.cc:
  frequently used command sequence replaced with inline function
sql/table.cc:
  frequently used command sequence replaced with inline function
sql/table.h:
  frequently used command sequence replaced with inline function
2005-08-02 22:54:49 +03:00
unknown
11abe15eab Added Non-prelocked SP execution: Now a PROCEDURE doesn't enter/leave prelocked mode for
its body, but lets each statement to get/release its own locks. This allows a broader set
of statements to be executed inside PROCEDUREs (but breaks replication)
This patch should fix BUG#8072, BUG#8766, BUG#9563, BUG#11126


mysql-test/r/sp-security.result:
  Drop tables this test attempts to create
mysql-test/r/sp-threads.result:
  Update test results
mysql-test/r/sp.result:
  Disabled a test that triggers BUG#11986, cleanup used tables when tests start.
mysql-test/r/view.result:
  Enabled a test case that now works with prelocking-free SPs
mysql-test/t/sp-security.test:
  Drop tables this test attempts to create
mysql-test/t/sp.test:
  Disabled a test that triggers BUG#11986, cleanup used tables when tests start.
mysql-test/t/view.test:
  Enabled a test case that now works with prelocking-free SPs
sql/handler.cc:
  Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
sql/item_func.cc:
  Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
sql/sp.cc:
  Non-prelocked SP execution: Added support for skipping prelocking of procedure body for
  "CALL proc(...)" statements.
sql/sp.h:
  Non-prelocked SP execution: Added support for skipping prelocking of procedure body for
  "CALL proc(...)" statements.
sql/sp_cache.h:
  Added comments
sql/sp_head.cc:
  Non-prelocked SP execution:
  * Try to unlock tables after PROCEDURE arguments have been evaluated.
  * Make sp_lex_keeper be able to execute in 2 modes: A) when already in prelocked mode
    B) when its statement enters/leaves prelocked mode itself.
sql/sp_head.h:
  Non-prelocked SP execution:  Make sp_lex_keeper to additionally keep list of tables it 
  needs to prelock when its statement enters/leaves prelocked mode on its own.
sql/sql_base.cc:
  Non-prelocked SP execution: Make open_tables() to
   * detect 'CALL proc(...)' and not to do prelocking for procedure body statements.
   * Make lex->query_tables_last to point precisely to a boundary in lex->query_tables 
     list where 'own' tables and views' tables end and added-for-prelocking tables begin.
     (it was not true before - view's tables could end up after query_tables_own_last)
sql/sql_class.cc:
  Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
sql/sql_class.h:
  Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
sql/sql_lex.cc:
  Non-prelocked SP execution: More rigourous cleanup in st_lex::cleanup_after_one_table_open()
sql/sql_parse.cc:
  Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt, remove outdated comments
sql/sql_trigger.h:
  Rename: thd->transaction.in_sub_stmt -> thd->in_sub_stmt
2005-07-30 08:19:57 +00:00
unknown
a292b42436 Fix bug #11335 View redefines TinyInt(1) column definition
Item_type_holder doesn't store information about length and exact type of
original item which results in redefining length to max_length and geometry 
type to longtext.

Changed the way derived tables except unions are built. Now they are created
from original field list instead of list of Item_type_holder.


mysql-test/r/subselect.result:
  Fixed wrong test case result. bug#11335
mysql-test/r/view_grant.result:
   Fixed wrong test case result. bug#11335
mysql-test/r/view.result:
  Added test case for bug #11335. Fixed wrong test case result.
mysql-test/t/view.test:
  Test case for bug #11335 View  redefines TinyInt(1) column definition.
sql/sql_union.cc:
  Fix bug #11335 View redefines TinyInt(1) column definition.
  Changed the way derived tables except unions are built. Now they are created from original field list instead of list of Item_type_holders.
sql/sql_select.cc:
  Fix bug #11335 View redefines TinyInt(1) column definition.
  Added special handling of DATE/TIME fields to preserve field's type in tmp field creation.
  In create_tmp_field() for Item_field added special handling of case when item have to be able to store NULLs but underlaid field is NOT NULL.
sql/item_sum.cc:
  Fix bug #11335 View redefines TinyInt(1) column definition.
  Added special handling of DATE/TIME fields to preserve field's type while tmp
  field created in Item_sum_hybrid::create_tmp_field().
2005-07-30 05:53:35 +04: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
038631da3b Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/mysql-5.0-bug-11760


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2005-07-20 06:59:31 +04:00
unknown
c816f29713 Fix bug #11760 Typo in Item_func_add_time::print() results in NULLs returned
by subtime() in view

Item_func_add_time::print() were printing arg[0] instead of arg[1] which
results in wrongly created view. Functions addtime() and subtime were
affected by this bug.


sql/item_timefunc.cc:
  Fix bug #11760 Typo in Item_func_add_time::print() results in wrongly created view
mysql-test/t/view.test:
  Test case for bug #11760  Typo in Item_func_add_time::print() results in wrongly created view
mysql-test/r/view.result:
  Test case for bug #11760  Typo in Item_func_add_time::print() results in wrongly created view
mysql-test/r/date_formats.result:
  Fixed wrong test result. Affected by bug#11760
2005-07-20 06:55:51 +04: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
7bdc4dd0a1 After-merge fixes (4.1 -> 5.0).
mysql-test/r/sp.result:
  Test results fixed: rewritten test for Bug#6129
mysql-test/r/view.result:
  Push a change to the result file from Sanja's patch.
mysql-test/t/sp.test:
  Rewrite the test for Bug#6129 (now that stored procedures don't
  evaluate system variables at parse, the test produced different results).
  The old test failed with 1 in the second invocation (the old
  result was wrong).
sql/item_func.cc:
  After-merge fix.
sql/item_func.h:
  After-merge fix.
sql/mysql_priv.h:
  After-merge fix.
sql/mysqld.cc:
  Rollback the patch for Bug#7403 (it breaks the test suite).
2005-07-16 16:10:42 +04: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
7f80ca5493 take into account table lock mode when opening table:
try to find most suitable table, to avouid pickup table with too low locking mode or occupy table with write mode for select when it will be need for update later
(BUG#9597)


mysql-test/r/view.result:
  opening table in correct locking mode test
mysql-test/t/view.test:
  opening table in correct locking mode test
sql/sql_base.cc:
  take into account table lock mode when opening table:
  try to find most suitable table, to avouid pickup table with too low locking mode or occupy table with write mode for select when it will be need for update later
2005-07-15 01:22:14 +03:00
unknown
327afd65b5 Merge
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2005-07-13 02:39:23 +02:00
unknown
c3d276165d Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into moonbone.local:/work/mysql-5.0-bug-11709


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2005-07-13 04:39:22 +04:00
unknown
8c182f9734 view.result, view.test:
Fix for test case for bug#11709


mysql-test/t/view.test:
  Fix for test case for bug#11709
mysql-test/r/view.result:
  Fix for test case for bug#11709
2005-07-13 04:10:19 +04: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
f628028455 view.test, view.result:
Expanded the test case for bug #6120 to cover
  DROP VIEW / CREATE VIEW scenario.
sql_view.cc:
  Expanded the fix for bug #6120 to cover the case of
  DROP VIEW / CREATE_VIEW.


sql/sql_view.cc:
  Expanded the fix for bug #6120 to cover the case of
  DROP VIEW / CREATE_VIEW.
mysql-test/r/view.result:
  Expanded the test case for bug #6120 to cover
  DROP VIEW / CREATE VIEW scenario.
mysql-test/t/view.test:
  Expanded the test case for bug #6120 to cover
  DROP VIEW / CREATE VIEW scenario.
2005-07-12 10:44:32 -07:00
unknown
51f8821af0 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0
into igor-inspiron.creware.com:/home/igor/mysql-5.0


sql/sql_base.cc:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2005-07-12 10:44:31 -07:00
unknown
9d9ef52dbe Merge
sql/sql_base.cc:
  Auto merged
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2005-07-12 20:49:43 +04:00
unknown
2ae3cdcf97 Fix bug #11399 Column alias was lost during view preraration.
New item created in find_field_in_table() to fix view's item, was created 
without taking into account original item's alias. This patch checks if alias 
is set to the original item and if so sets it to newly created item.


sql/sql_base.cc:
  Fix bug#11399 Alias wasn't set on view column
mysql-test/t/view.test:
  Test case for bug#11399 Use an alias in a select statement on a view
mysql-test/r/view.result:
  Test case for bug#11399 Use an alias in a select statement on a view
2005-07-12 20:45:34 +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
c31a78c863 portability fix: the Max_data_length replaced with # 2005-07-08 16:25:07 +05:00
unknown
39968552a8 view.result, view.test:
Added a test case for bug #6120.
sql_view.cc:
  Fixed bug #6120.
  The SP cache must be invalidated when a view is altered.


sql/sql_view.cc:
  Fixed bug #6120.
  The SP cache must be invalidated when a view is altered.
mysql-test/t/view.test:
  Added a test case for bug #6120.
mysql-test/r/view.result:
  Added a test case for bug #6120.
2005-07-06 09:00:17 -07:00
unknown
8546ddd39a Merge mysql.com:/home/jimw/my/mysql-5.0-6903
into  mysql.com:/home/jimw/my/mysql-5.0-clean


mysql-test/r/view.result:
  Auto merged
sql/sql_show.cc:
  Auto merged
mysql-test/r/sql_mode.result:
  Merge
mysql-test/t/sql_mode.test:
  Merge
2005-07-05 17:05:31 -07:00
unknown
323652f4dc Merge
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2005-07-05 13:42:19 +03:00
unknown
836f5a5a1e fixed environment creation and cleaning up for processing view one by one during checking (BUG#11337)
mysql-test/r/view.result:
  checking views after some view with error (BUG#11337)
mysql-test/t/view.test:
  checking views after some view with error (BUG#11337)
sql/sql_lex.cc:
  environment cleaning up for processing view one by one
sql/sql_lex.h:
  methods for lex cleunup during view processing one by one
sql/sql_table.cc:
  fixed environment creation and cleaning up for processing view one by one (BUG#11337)
2005-07-05 13:37:02 +03:00
unknown
7ff88ba7a7 merge
sql/item_sum.h:
  Auto merged
2005-07-05 11:21:47 +03:00
unknown
be515e075c fixed var_samp printing (BUG#10651)
mysql-test/r/view.result:
  Using var_samp with view (BUG#10651)
mysql-test/t/view.test:
  Using var_samp with view (BUG#10651)
sql/item_sum.h:
  fixed var_samp printing
2005-07-02 16:12:32 +03:00
unknown
7e8c38656f fixed difference between ps-protocol and usual execution
mysql-test/r/view.result:
  removed wrong warning
sql/sql_view.cc:
  fix_fields have to be (and will be) made later
2005-07-02 13:16:30 +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
be3d709170 Merge
mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2005-06-24 21:47:17 +04:00
unknown
fd3ac3829b Fix bug#11325 Wrong date comparison in views
Wrong comparing method were choosen which results in false comparison.

Make Item_bool_func2::fix_length_and_dec() to get type and field from
real_item() to make REF_ITEM pass the check. 


sql/item_cmpfunc.cc:
  Fix bug#11325 Wrong date comparison in views
mysql-test/t/view.test:
  Test case for bug#11325 Wrong date comparison in views.
mysql-test/r/view.result:
  Test case for bug#11325 Wrong date comparison in views.
2005-06-24 20:16:52 +04:00
unknown
3d1172a10f fixed encrypt() print (BUG#7024)
mysql-test/r/view.result:
  using encrypt & substring_index in view
mysql-test/t/view.test:
  using encrypt & substring_index in view
sql/item_strfunc.h:
  fixed encrypt() print
2005-06-24 00:24:11 +03:00
unknown
6487eb814f test made independent 2005-06-22 08:52:06 +03:00
unknown
5088334084 merge 2005-06-22 08:42:03 +03:00
unknown
8fc03d970b Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  moonbone.local:/work/mysql-5.0-bug-11298


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-06-22 04:48:25 +04:00
unknown
401fa3cb4b Fix bug#11298 insert into select from VIEW produces incorrect result
when using ORDER BY

Insert were inserting data from last record fetched instead of inserting from 
temporary table.

Make Item_ref to save data from result_field if it's available rather then
from *ref on save_in_field() call.



sql/item.h:
   Fix bug#11298 insert into select from VIEW produces incorrect result when using ORDER BY
sql/item.cc:
  Fix bug#11298 insert into select from VIEW produces incorrect result when using ORDER BY
mysql-test/r/view.result:
  Test case for bug#11298 insert into select from VIEW produces incorrect result when using ORDER BY
mysql-test/t/view.test:
  Test case for bug#11298 insert into select from VIEW produces incorrect result when using ORDER BY
2005-06-22 04:45:10 +04:00
unknown
8f011afe03 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug4-5.0


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
2005-06-21 20:44:18 +03:00
unknown
612de7c643 fixed view fields names check and generation (changed after Trudy review: underlying field names treat as user set ones) (BUG#7448)
mysql-test/r/view.result:
  test of view field names generation
mysql-test/t/view.test:
  test of view field names generation
sql/item.cc:
  add a flag that indicates that the name of the item was an auto-generated one and so can be changed in a view
sql/item.h:
  add a flag that indicates that the name of the item was an auto-generated one and so can be changed in a view
  layout fixed
sql/item_func.cc:
  line made less then 80 columns
sql/sql_view.cc:
  fixed checking of duplicates of view fields:
  1) case-insensitive system charset/collation is used now to compare view filds
  2) in case if the duplicate field name was of an auto-generated one, we create another unique name for it
sql/sql_yacc.yy:
  add a flag that indicates that the name of the item was an auto-generated one and so can be changed in a view
2005-06-21 20:30:48 +03:00
unknown
e85b001321 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  moonbone.local:/work/mysql-5.0-bug-7422


mysql-test/r/view.result:
  SCCS merged
mysql-test/t/view.test:
  SCCS merged
2005-06-21 21:15:20 +04:00
unknown
c4257ae3ce Fix bug #7422 "order by" doesn't work
Field with wrong buffer was used to make sort key, which results in producing
same sort key for all records.



sql/filesort.cc:
  Fix bug#7422 "order by" doesn't work
mysql-test/t/view.test:
  Test case for bug#7422 "order by" doesn't work
mysql-test/r/view.result:
  Test case for bug#7422 "order by" doesn't work
2005-06-21 20:14:50 +04:00
unknown
58adb70a8b fixed time_format printing (BUG#7521)
mysql-test/r/view.result:
  using time_format in view (BUG#7521)
mysql-test/t/view.test:
  using time_format in view (BUG#7521)
sql/item_timefunc.h:
  fixed func_name reportion
2005-06-20 14:56:17 +03:00
unknown
467ca505b5 fixed printing of sum(distinct ) & avg(distinct ) & cast(... as decimal) (BUG#7015, BUG#11387)
mysql-test/r/view.result:
  using sum(distinct ), cast(... as decimal) & avg(distinct ) in views
mysql-test/t/view.test:
  using sum(distinct ), cast(... as decimal) & avg(distinct ) in views
sql/item.h:
  Add a comment for Item::print
sql/item_func.cc:
  Use functype(), not func_name() for item equvalence detection
sql/item_func.h:
  Missed function typoes added
  Add a comment for Item_func::func_name()
  style fix
sql/item_strfunc.cc:
  Use functype(), not func_name() for item equvalence detection
sql/item_strfunc.h:
  Add missing func_name and func_type
sql/item_sum.cc:
  Item_sum func_name report beggining of function till first argument
sql/item_sum.h:
  Item_sum func_name report beggining of function till first argument
sql/item_timefunc.cc:
  Use functype(), not func_name() for item equvalence detection
sql/item_timefunc.h:
  Add missing func_name and func_type
sql/item_uniq.h:
  Add missing func_name
2005-06-17 17:27:47 +03:00
unknown
ed483fcd21 Fix SHOW CREATE VIEW to handle ANSI_QUOTES mode. (Bug #6903)
mysql-test/r/sql_mode.result:
  Update results
mysql-test/r/view.result:
  Update results
mysql-test/t/sql_mode.test:
  Add new regression tests
sql/sql_show.cc:
  Fix SHOW CREATE VIEW to honor ANSI_QUOTES mode.
2005-06-15 16:27:41 -07:00
unknown
afaa3c8923 sql_yacc.yy:
missing semicolon added
sql_base.cc:
  bad merge fixed
sp_head.cc, view.test, view.result:
  Correct restoring view name in SP table locking BUG#9758
configure.in:
  restore -fno-implicit-templates -fno-exceptions -fno-rtti in configure


configure.in:
  restore -fno-implicit-templates -fno-exceptions -fno-rtti in configure
mysql-test/r/view.result:
  Correct restoring view name in SP table locking BUG#9758
mysql-test/t/view.test:
  Correct restoring view name in SP table locking BUG#9758
sql/sp_head.cc:
  Correct restoring view name in SP table locking BUG#9758
sql/sql_base.cc:
  bad merge fixed
sql/sql_yacc.yy:
  missing semicolon added
2005-05-17 17:08:43 +02:00
unknown
2380fc937b Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mishka.local:/home/my/mysql-5.0


mysql-test/r/group_min_max.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2005-05-13 13:36:02 +03:00
unknown
b21cf962e3 concurrent-insert can now be set to 2 for concurrent inserts when there is holes in the data file
myisam_max_extra_sort_file_size is depricated
Ensure that myisam_data_pointer_size is honoured when creating new MyISAM files
Changed default value of myisam_data_pointer_size from 4 to 6 to get rid of 'table-is-full' errors



include/myisam.h:
  Change type of myisam_block_size and myisam_concurrent_insert to make them changeable in mysqld.cc
  Removed not used varaible myisam_max_extra_temp_length
include/thr_lock.h:
  Added extra parameter to get_status
myisam/mi_create.c:
  Ensure that myisam_data_pointer_size is honoured
myisam/mi_dynrec.c:
  If 'append_insert_at_end' is set, only write at end of myisam record file
myisam/mi_locking.c:
  Add extra argument to 'mi_get_status' to allow thr_lock to signal that we want to do a concurrent insert
  If this is used, we will append new insert rows at end of data file.
  Change mi_check_status() to allow concurrent_inserts even if there are holes in the file when myisam_concurent_insert=2
myisam/mi_static.c:
  Change behavior of myisam_concurrent_insert so that setting this to 2 allows inserts even if there is a hole in the data file.
  Default value is 2 for MyISAM direct usage but will be set to 1 (old default) by mysqld.cc
myisam/mi_statrec.c:
  If 'append_insert_at_end' is set, only write at end of myisam record file
myisam/mi_write.c:
  If 'append_insert_at_end' is set, only write at end of myisam record file
myisam/myisamdef.h:
  Support for insert-at-end even if there is holes in data file
mysql-test/r/gis-rtree.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/r/group_min_max.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/r/index_merge.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/r/index_merge_ror.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/r/merge.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/r/myisam.result:
  Test of concurrent_insert=2
mysql-test/r/null.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/r/preload.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/r/ps_1general.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/r/range.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/r/variables.result:
  concurrent_insert is now a integer, not a boolean
  myisam_extra_sort_file_size is deleted
mysql-test/r/view.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/t/index_merge.test:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/t/myisam.test:
  Test of concurrent_insert=2
mysql-test/t/ps_1general.test:
  Drop test table
mysql-test/t/variables.test:
  concurrent_insert is now a integer, not a boolean
  myisam_extra_sort_file_size is deleted
mysql-test/t/view.test:
  Drop tables that may be left from previous tests
mysys/thr_lock.c:
  Extra paramter to get_status to signal if concurrent_insert was used
sql/mysqld.cc:
  concurrent-insert can now be set to 2 for concurrent inserts when there is holes in the data file
  myisam_max_extra_sort_file_size is depricated
sql/set_var.cc:
  concurrent-insert is now an integer, not a bool
  myisam_max_extra_sort_file_size is deleted
2005-05-13 12:08:08 +03:00
unknown
623444963e Manual merge
sql/sql_base.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
2005-05-10 16:41:47 -07:00
unknown
e02416c53c Many files:
Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
view.test:
  Added test case for bug #8528.
view.result:
  Added test case for bug #8528. Fixed other test cases.


mysql-test/r/view.result:
  Added test case for bug #8528. Fixed other test cases.
mysql-test/t/view.test:
  Added test case for bug #8528.
sql/sql_base.cc:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
sql/sql_delete.cc:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
sql/sql_insert.cc:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
sql/sql_parse.cc:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
sql/sql_prepare.cc:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
sql/sql_select.cc:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
sql/sql_update.cc:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
sql/sql_view.cc:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
sql/table.cc:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
sql/table.h:
  Fixed bug #8528.
  Representation for single-table views was made similar to
  representation for multi-table views.
2005-05-10 16:31:13 -07:00
unknown
60496497df Fix for BUG#8490: In mysql_make_view for join algorithm views we need
to insert view's subqueries into select_lex->slave(->next)* chain. 
In case a join has several such views, don't add the same subqueries several times
(this forms a loop on the above chain which breaks many parts of the code)


mysql-test/r/view.result:
  Testcase for BUG#8490
mysql-test/t/view.test:
  Testcase for BUG#8490
2005-04-23 00:13:46 +04:00
unknown
8a0db105b4 view.result:
Correction after fix for bug #9902.


mysql-test/r/view.result:
  Correction after fix for bug #9902.
2005-04-18 14:44:14 -07:00
unknown
cfefd88d37 information_schema.result, information_schema.test:
Added a test in connection with the fix for
  bug #6106.
view.result, view.test:
  Added test cases for bugs #6106/6107.
sql_show.cc:
  The addition of the case for items of the type REF_ITEM in the
  function uses_only_table_name_fields became necessary after
  the fix for bug #6106.
sql_base.cc:
  The problem was due to the fact that two different column
  references were glued together though one of them belonged to
  a subquery while another to an outer query. This caused
  eventually a wrong calculation of values for the used_tables
  attribute.


sql/sql_base.cc:
  The problem was due to the fact that two different column
  references were glued together though one of them belonged to
  a subquery while another to an outer query. This caused
  eventually a wrong calculation of values for the used_tables
  attribute.
sql/sql_show.cc:
  The addition of the case for items of the type REF_ITEM in the
  function uses_only_table_name_fields became necessary after
  the fix for bug #6106.
mysql-test/t/view.test:
  Added test cases for bugs #6106/6107.
mysql-test/r/view.result:
  Added test cases for bugs #6106/6107.
mysql-test/t/information_schema.test:
  Added a test in connection with the fix for
  bug #6106.
mysql-test/r/information_schema.result:
  Added a test in connection with the fix for
  bug #6106.
2005-04-13 23:06:37 -07:00
unknown
4189e7c85f Cleanup tests and results after merge from 4.1 of embedded
server testing cleanups.


mysql-test/r/innodb.result:
  Update results
mysql-test/r/insert_select-binlog.result:
  Update results
mysql-test/r/mix_innodb_myisam_binlog.result:
  Update results
mysql-test/r/ps_1general.result:
  Update results
mysql-test/r/ps_grant.result:
  Update results
mysql-test/r/view.result:
  Update results
mysql-test/t/client_xml.test:
  Skip test with embedded server
mysql-test/t/flush_read_lock_kill.test:
  Skip test with embedded server
mysql-test/t/grant3.test:
  Skip test with embedded server
mysql-test/t/information_schema.test:
  Skip test with embedded server
mysql-test/t/innodb.test:
  Fix up filenames
mysql-test/t/multi_update.test:
  Skip test with embedded server
mysql-test/t/mysqlshow.test:
  Skip test with embedded server
mysql-test/t/ps_1general.test:
  Move grant-related tests to ps_grant, and fix cleanup of filename
mysql-test/t/ps_grant.test:
  Add additional tests
mysql-test/t/sp-security.test:
  Skip test with embedded server
mysql-test/t/user_limits.test:
  Skip test with embedded server
mysql-test/t/view.test:
  Split grant-related tests to new test file view_grant
2005-04-04 12:43:58 -07:00
unknown
b978c66330 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-multi-5.0


mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/sql_view.cc:
  Auto merged
2005-04-03 15:30:18 +03:00