Commit graph

415 commits

Author SHA1 Message Date
unknown
5ef6e903a4 Fixed bug #16504.
Multiple equalities were not adjusted after reading constant tables.
It resulted in neglecting good index based methods that could be
used to access of other tables.


mysql-test/r/having.result:
  Adjusted a test case results after fix for bug #16504.
mysql-test/r/select.result:
  Added a test case for bug #16504.
mysql-test/r/subselect.result:
  Adjusted a test case results after fix for bug #16504.
mysql-test/r/varbinary.result:
  Adjusted a test case results after fix for bug #16504.
mysql-test/t/select.test:
  Added a test case for bug #16504.
sql/item.cc:
  Fixed bug #16504.
  An Item_equal object may contain only a constant member.
  It may happen after reading constant tables.
sql/item_cmpfunc.cc:
  Fixed bug #16504.
  Added method Item_equal::check_const that check appearance of new 
  constant items in a multiple equality.
sql/item_cmpfunc.h:
  Fixed bug #16504.
  Added method Item_equal::check_const that check appearance of new 
  constant items in a multiple equality.
sql/sql_select.cc:
  Fixed bug #16504.
  Adjusted multiple equalities after reading constant tables.
  Fixed a few typo in comments.
2006-03-31 21:26:17 -08:00
unknown
abffce9cad Fix for bug #18306: MySQL crashes and restarts using subquery
mysql-test/r/subselect.result:
  Fix for bug #18306: MySQL crashes and restarts using subquery
  test case
mysql-test/t/subselect.test:
  Fix for bug #18306: MySQL crashes and restarts using subquery
  test case
sql/opt_range.cc:
  Fix for bug #18306: MySQL crashes and restarts using subquery
  Restore thd->mem_root because
  during the cond->val_int() evaluation we can come across a subselect 
  item which may allocate memory on the thd->mem_root and assumes
  all the memory allocated has the same life span as the subselect
  item itself.
2006-03-23 18:09:35 +04:00
unknown
09f54a2e5e Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into sunlight.local:/work_local/17336-bug-5.0-mysql


mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
2006-03-14 15:33:13 +03:00
unknown
8ba5a687ed Fixed bug#17366: Unchecked Item_int results in server crash
When there is conjunction of conds, the substitute_for_best_equal_field()
will call the eliminate_item_equal() function in loop to build final
expression. But if eliminate_item_equal() finds that some cond will always
evaluate to 0, then that cond will be substituted by Item_int with value ==
0. In this case on the next iteration eliminate_item_equal() will get that 
Item_int and treat it as Item_cond. This is leads to memory corruption and
server crash on cleanup phase.

To the eliminate_item_equal() function was added DBUG_ASSERT for checking
that all items treaten as Item_cond are really Item_cond.
The substitute_for_best_equal_field() now checks that if
eliminate_item_equal() returns Item_int and it's value is 0 then this 
value is returned as the result of whole conjunction.


mysql-test/t/subselect.test:
  Added test for bug#17366: Unchecked Item_int results in server crash
mysql-test/r/subselect.result:
   Added test for bug#17366: Unchecked Item_int results in server crash
sql/sql_select.cc:
  Fixed bug#17366: Unchecked Item_int results in server crash
   
  To the eliminate_item_equal() function was added DBUG_ASSERT for checking
  that all items treaten as Item_cond are really Item_cond.
  The substitute_for_best_equal_field() now checks that if
  eliminate_item_equal() returns something other than Item_cond and if it is
  then this value is returned as the result of whole conjunction.
2006-03-13 21:11:15 +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
d0fb23385d Fixed bug #16603.
A subquery transformation changes the HAVING clause of the embedding query if the subquery contains
a GROUP BY clause. Yet the split_sum_func2 function was not applied to the modified HAVING clause.
This could result in wrong answers.


mysql-test/r/subselect.result:
  Added a test case for bug #16603.
mysql-test/t/subselect.test:
  Added a test case for bug #16603.
2006-02-13 18:50:06 -08:00
unknown
494bccf044 Merging
mysql-test/ndb/ndbcluster.sh:
  Auto merged
mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/func_math.test:
  Auto merged
mysql-test/t/type_float.test:
  Auto merged
sql/spatial.h:
  Auto merged
mysql-test/r/type_float.result:
  merging
sql/item_func.cc:
  merging
2006-01-21 18:50:06 +04:00
unknown
6a0695fe93 Fixed bug #12762:
allowed set functions aggregated in outer subqueries, allowed nested set functions.


mysql-test/r/func_gconcat.result:
  Changed a query when fixing bug #12762.
mysql-test/r/subselect.result:
  Added test cases for bug #12762.
  Allowed set functions aggregated in outer subqueries. Allowed nested set functions.
mysql-test/t/func_gconcat.test:
  Changed a query when fixing bug #12762.
mysql-test/t/subselect.test:
  Added test cases for bug #12762.
  Allowed set functions aggregated in outer subqueries. Allowed nested set functions.
sql/item.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
  aggregated in outer subquries.
  Changed Item_field::fix_fields to calculate attributes used when checking context conditions
  for set functions.
  Allowed alliases for set functions defined in outer subqueries.
sql/item.h:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
  aggregated in outer subquries.
sql/item_cmpfunc.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
  aggregated in outer subquries.
sql/item_func.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
  aggregated in outer subquries.
sql/item_row.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
  aggregated in outer subquries.
sql/item_strfunc.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Added a parameter to Item::split_sum_func2 aliowing to defer splitting for set functions
  aggregated in outer subquries.
sql/item_subselect.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced next levels for subqueries and a bitmap of nesting levels showing
  in what subqueries a set function can be aggregated.
sql/item_sum.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Added Item_sum methods to check context conditions imposed on set functions.
sql/item_sum.h:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Added Item_sum methods to check context conditions imposed on set functions.
sql/mysql_priv.h:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced a type of bitmaps to be used for nesting constructs.
sql/sql_base.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced next levels for subqueries and a bitmap of nesting levels showing
  in what subqueries a set function can be aggregated.
sql/sql_class.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_class.h:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_delete.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_lex.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced next levels for subqueries and a bitmap of nesting levels showing
  in what subqueries a set function can be aggregated.
sql/sql_lex.h:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced next levels for subqueries and a bitmap of nesting levels showing
  in what subqueries a set function can be aggregated.
sql/sql_parse.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced next levels for subqueries.
sql/sql_prepare.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced a bitmap of nesting levels showingin what subqueries a set function can be aggregated.
sql/sql_select.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced next levels for subqueries and a bitmap of nesting levels showing
  in what subqueries a set function can be aggregated.
sql/sql_update.cc:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced a bitmap of nesting levels showing in what subqueries a set function can be aggregated.
sql/sql_yacc.yy:
  Fixed bug #12762:
  allowed set functions aggregated in outer subqueries, allowed nested set functions.
  Introduced next levels for subqueries.
2005-10-15 14:32:37 -07:00
unknown
0f1516b98e Fix for bug #9855 (Inconsistend column type in create select)
mysql-test/r/func_gconcat.result:
  result fixed
mysql-test/r/subselect.result:
  result fixed
mysql-test/r/type_float.result:
  result fixed
mysql-test/t/type_float.test:
  testcase added
sql/item_func.cc:
  Now we set decimals to NOT_FIXED_DEC if the max_length is longer than
  maximum possible double length
2005-10-15 19:47:23 +05:00
unknown
16f3cb0394 fixes after merge of 4.1.
mysql-test/r/subselect.result:
  correcting non-ascii chars hosed by automerge as usual
mysql-test/t/subselect.test:
  correcting non-ascii chars hosed by automerge as usual
sql/log_event.cc:
  correcting bad manual merge. ZERO_LEN is not needed in 5.0, as ::exec_event() just tell()s the relay log instead
  of using get_event_len().
sql/log_event.h:
  get_event_len() is not needed in 5.0, ZERO_LEN neither.
sql/slave.cc:
  fixes to take into account 5.0 specificities in replication. ZERO_LEN is not needed.
2005-10-13 00:29:23 +02:00
unknown
8b1a32aead Merge mysql.com:/home/mysql_src/mysql-4.1
into  mysql.com:/home/mysql_src/mysql-5.0;
a very bad automerge (issues with non-ascii chars), plus some hard conflicts I'll fix by hand in a next cset


BitKeeper/deleted/.del-compile-pentium64-valgrind-max:
  Delete: BUILD/compile-pentium64-valgrind-max
BitKeeper/etc/config:
  Auto merged
sql/log.cc:
  Auto merged
sql/slave.h:
  Auto merged
client/mysqltest.c:
  manual merge
mysql-test/r/subselect.result:
  manual merge
mysql-test/t/subselect.test:
  manual merge
sql/log_event.cc:
  manual merge
sql/log_event.h:
  manual merge
sql/slave.cc:
  manual merge
sql/sql_yacc.yy:
  manual merge
2005-10-12 21:58:02 +02:00
unknown
be559ad6ce sql_yacc.yy:
Bug #10308: Parse 'purge master logs' with subselect correctly.
subselect.test:
  Bug #10308: Test for 'purge master logs' with subselect.
subselect.result:
  Bug #10308: Test result for 'purge master logs' with subselect.


mysql-test/r/subselect.result:
  Bug #10308: Test result for 'purge master logs' with subselect.
mysql-test/t/subselect.test:
  Bug #10308: Test for 'purge master logs' with subselect.
sql/sql_yacc.yy:
  Bug #10308: Parse 'purge master logs' with subselect correctly.
2005-10-12 09:47:59 +02:00
unknown
fe24add743 WL#2486 - natural and using join according to SQL:2003
* Provide backwards compatibility extension to name resolution of
  coalesced columns. The patch allows such columns to be qualified
  with a table (and db) name, as it is in 4.1.
  Based on a patch from Monty.

* Adjusted tests accordingly to test both backwards compatible name
  resolution of qualified columns, and ANSI-style resolution of
  non-qualified columns.
  For this, each affected test has two versions - one with qualified
  columns, and one without. 


mysql-test/include/ps_query.inc:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/bdb.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/innodb.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/join.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/join_nested.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/join_outer.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/null_key.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/order_by.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_2myisam.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_3innodb.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_4heap.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_5merge.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_6bdb.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/ps_7ndb.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/select.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/subselect.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/r/type_ranges.result:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/bdb.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/innodb.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/join.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/join_nested.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/join_outer.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/null_key.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/order_by.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/select.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/subselect.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
mysql-test/t/type_ranges.test:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
sql/sql_base.cc:
  * Applied Monty's patch for backwards compatible name resolution
    of qualified columns. The idea is:
    - When a column is qualified, search for the column in all
      tables/views underlying each natural join. In this case
      natural joins are *not* considered leaves.
    - If a column is not qualified, then consider natural joins
      as leaves, thus directly search the result columns of
      natural joins.
  * Simplified 'find_field_in_tables()' - unified two similar
    loops into one.
sql/table.cc:
  - Removed method & members not needed after Monty's patch.
sql/table.h:
  - Removed method & members not needed after Monty's patch.
tests/mysql_client_test.c:
  Put back old tests to test that coalesced columns of natural joins can be qualified.
2005-08-23 18:08:04 +03:00
unknown
b9314a4f89 changes in row operation 2005-08-19 09:46:59 +03:00
unknown
5082c41bf3 Manual merge 2005-08-15 21:58:17 -07:00
unknown
4161d7cb0d subselect.result:
Added missing drop statement
subselect.test:
  Added missing drop statement.


mysql-test/t/subselect.test:
  Added missing dro statement.
mysql-test/r/subselect.result:
  Added missing drop statement
2005-08-15 21:43:46 -07:00
unknown
4b49cbfbd4 sql_select.cc:
Fixed bug #11479.
  The JOIN::reinit method cannot call setup_tables
  after the optimization phase since this function
  removes some optimization settings for joined
  tables. E.g. it resets values of the null_row flag to 0.
subselect.result, subselect.test:
  Added a test case for bug #11479.


mysql-test/t/subselect.test:
  Added a test case for bug #11479.
mysql-test/r/subselect.result:
  Added a test case for bug #11479.
sql/sql_select.cc:
  Fixed bug #11479.
  The JOIN::reinit method cannot call setup_tables
  after the optimization phase since this function
  removes some optimization settings for joined
  tables. E.g. it resets values of the null_row flag to 0.
2005-08-15 21:33:58 -07:00
unknown
5afacbab51 item_subselect.cc:
postmerge fix
subselect.result:
  new 5.0 result (postmerge)


mysql-test/r/subselect.result:
  new 5.0 result (postmerge)
sql/item_subselect.cc:
  postmerge fix
2005-08-13 11:15:17 +03:00
unknown
ad888850c0 Merge abelkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  hasky.mysql.fi:/home/sanja/work-merge-5.0


mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/item_subselect.cc:
  merge
2005-08-13 08:19:34 +03:00
unknown
19b4760f19 fixed convertion and handling IN subqueries with rows (BUG#11867)
mysql-test/r/subselect.result:
  testst of IN subqueries with row
mysql-test/t/subselect.test:
  tests of ion subqueries with row
sql/item.h:
  add method to prevent of removing Item_ref_null_helper from HAVING
sql/item_cmpfunc.h:
  Prevented removing of Item_test_isnotnull from HAVING
sql/item_subselect.cc:
  fixed converting row IN subqueries
sql/sql_select.cc:
  fixed debug print
2005-08-13 07:45:14 +03:00
unknown
2b53b711d8 Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-2486-merge


mysql-test/r/errors.result:
  Auto merged
mysql-test/r/fulltext.result:
  Auto merged
mysql-test/r/fulltext_order_by.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/join_nested.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/errors.test:
  Auto merged
mysql-test/t/fulltext.test:
  Auto merged
mysql-test/t/fulltext_order_by.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/join_nested.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
sql/sql_insert.cc:
  merge WL#2486
sql/sql_show.cc:
  merge WL#2486
2005-08-12 19:27:54 +03:00
unknown
7517d7e112 Implementation of WL#2486 -
"Process NATURAL and USING joins according to SQL:2003".

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

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

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


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


client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
myisam/ft_boolean_search.c:
  Auto merged
myisammrg/myrg_static.c:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/rpl_drop_temp.result:
  Auto merged
mysql-test/r/type_datetime.result:
  Auto merged
mysql-test/t/bigint.test:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
mysql-test/t/rpl_drop_temp.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql-common/my_time.c:
  Auto merged
include/my_sys.h:
  manual merge 4.1->5.0
mysql-test/r/bigint.result:
  manual merge 4.1->5.0
mysql-test/r/subselect.result:
  manual merge 4.1->5.0
mysql-test/t/subselect.test:
  manual merge 4.1->5.0
mysys/charset.c:
  manual merge 4.1->5.0
sql/ha_ndbcluster.cc:
  manual merge 4.1->5.0
sql/item_strfunc.cc:
  manual merge 4.1->5.0
sql/sql_base.cc:
  manual merge 4.1->5.0
sql/sql_select.cc:
  manual merge 4.1->5.0
sql/sql_union.cc:
  manual merge 4.1->5.0
strings/Makefile.am:
  manual merge 4.1->5.0
tests/mysql_client_test.c:
  manual merge 4.1->5.0
2005-08-11 12:18:53 +01:00
unknown
310bb7e2da Merge rurik.mysql.com:/home/igor/mysql-4.1
into rurik.mysql.com:/home/igor/dev/mysql-4.1-0


mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
2005-08-08 16:55:29 -07:00
unknown
6f0a626097 subselect.test, subselect.result:
Added a test case for bug #12392.
item_cmpfunc.cc:
  Fixed bug #12392.
  Missing handling of rows containing NULL components
  when evaluating IN predicates caused a crash.


sql/item_cmpfunc.cc:
  Fixed bug #12392.
  Missing handling of rows containing NULL components
  when evaluating IN predicates caused a crash.
mysql-test/r/subselect.result:
  Added a test case for bug #12392.
mysql-test/t/subselect.test:
  Added a test case for bug #12392.
2005-08-08 16:51:12 -07:00
unknown
97988099eb Review of new pushed code
- Fixed some error condtion when handling dates with 'T'
- Added extra test for bug #11867 (Wrong result with "... WHERE ROW( a, b ) IN ( SELECT DISTINCT a, b WHERE ...)" to show it's not yet fixed
- Safety fixes and cleanups


mysql-test/r/subselect.result:
  Added extra test case to test case for bug #11867
  (Result shows that current code is not yet right and needs to be fixed)
mysql-test/r/type_datetime.result:
  More tests for dates of type CCYYMMDDTHHMMSS
mysql-test/t/subselect.test:
  Added extra test case to test case for bug #11867
mysql-test/t/type_datetime.test:
  More tests for dates of type CCYYMMDDTHHMMSS
sql-common/my_time.c:
  Fixed handling of dates of type CCYYMMDDTHHMMSS
  (Old code couldn't handle 2003-0304 or 2003-0003-02)
sql/slave.cc:
  Indentation cleanup
sql/sql_parse.cc:
  Added test of return value of get_system_var()
sql/sql_select.cc:
  Removed unnecessary call to field->table->maybe_null
sql/sql_union.cc:
  Indentation fixes
2005-08-09 00:13:49 +03:00
unknown
a217d5c516 subselect.result:
Correction after manual merge.


mysql-test/r/subselect.result:
  Correction after manual merge.
2005-08-07 15:10:07 -07:00
unknown
89e421cdb0 Manual merge 2005-08-07 15:10:06 -07:00
unknown
84d34d9d59 subselect.result:
Added test case for bug #11867.
  Fixed results for two existing test cases.
subselect.test:
  Added test case for bug #11867.
item_subselect.cc:
  Fixed bug #11867.
  Added missing code in Item_in_subselect::row_value_transformer
  that caused problems for queries with
  ROW(elems) IN (SELECT DISTINCT cols FROM ...).


sql/item_subselect.cc:
  Fixed bug #11867.
  Added missing code in Item_in_subselect::row_value_transformer
  that caused problems for queries with
  ROW(elems) IN (SELECT DISTINCT cols FROM ...).
mysql-test/t/subselect.test:
  Added test case for bug #11867.
mysql-test/r/subselect.result:
  Added test case for bug #11867.
  Fixed results for two existing test cases.
2005-08-07 14:03:46 -07: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
6c9d93eba6 Fix for BUG#11821 manually merged
sql/item.cc:
  Auto merged
2005-07-12 17:11:24 +00:00
unknown
3be7d3fcee Fix for BUG#11821: Make Item_type_holder be able to work with MIN(field),
MAX(field).


mysql-test/r/subselect.result:
  Testcase for BUG#11821
mysql-test/t/subselect.test:
  Testcase for BUG#11821
2005-07-12 16:30:45 +00:00
unknown
fe80b7b5bf fixed encrypt() name 2005-06-24 01:30:52 +03:00
unknown
c4a8325da2 opt_range.cc:
Fixed buf #11487.
  Added a call of  QUICK_RANGE_SELECT::init to the
  QUICK_RANGE_SELECT::reset method. Without it the second
  evaluation of a subquery employing the range access failed.
subselect.result, subselect.test:
  Added a test case for bug #11487.


mysql-test/t/subselect.test:
  Added a test case for bug #11487.
mysql-test/r/subselect.result:
  Added a test case for bug #11487.
sql/opt_range.cc:
  Fixed buf #11487.
  Added a call of  QUICK_RANGE_SELECT::init to the
  QUICK_RANGE_SELECT::reset method. Without it the second
  evaluation of a subquery employing the range access failed.
2005-06-23 02:08:30 -07:00
unknown
aaf5e0485c Add missing test result
mysql-test/t/subselect.test:
  Add test of result
2005-05-20 16:31:46 +03:00
unknown
648b072da2 do not try to use equal field from outer query as field of local join (BUG#6384)
mysql-test/r/subselect.result:
  changes in plans
  test for bug#6384
mysql-test/t/subselect.test:
  test for bug#6384
sql/sql_select.cc:
  do not set equal field from outer query
2005-05-20 16:01:41 +03:00
unknown
3e2988d00f Fixes to merge from 4.1
client/mysqldump.c:
  Temporarily disable unused (and broken) code.
mysql-test/r/group_min_max.result:
  Update results
mysql-test/r/mysqldump.result:
  Update results
mysql-test/r/subselect.result:
  Update results
mysql-test/t/group_min_max.test:
  Ignore number of rows in output of most explain results
sql/sql_insert.cc:
  Fix reference to max_unique_length
2005-05-18 15:40:34 -07:00
unknown
f8a20dbeb6 Resolve merge from 4.1
BitKeeper/etc/logging_ok:
  auto-union
configure.in:
  Auto merged
myisam/mi_check.c:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
client/mysqldump.c:
  Resolve merge
mysql-test/r/myisam.result:
  Resolve merge
mysql-test/r/mysqldump.result:
  Resolve merge
mysql-test/r/olap.result:
  Resolve merge
mysql-test/r/subselect.result:
  Resolve merge
mysql-test/t/myisam.test:
  Resolve merge
mysql-test/t/mysqldump.test:
  Resolve merge
mysql-test/t/olap.test:
  Resolve merge
mysql-test/t/range.test:
  Resolve merge
mysql-test/t/subselect.test:
  Resolve merge
ndb/src/common/util/version.c:
  Resolve merge
ndb/src/ndbapi/ndberror.c:
  Resolve merge
sql/item.cc:
  Resolve merge
sql/item_strfunc.h:
  Resolve merge
sql/sql_select.cc:
  Resolve merge
sql/sql_yacc.yy:
  Resolve merge
2005-05-18 11:06:34 -07:00
unknown
bc933962a3 relaxed DBUG_ASSERT in Item_int_with_ref::new_item() to "any constant" (BUG#10020)
mysql-test/r/subselect.result:
  test fro bug 10020
mysql-test/t/subselect.test:
  bug 10020 test suite
sql/item.cc:
  any constant allowed here BUG#10020)
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2005-05-16 12:19:10 +03:00
unknown
d85fdc1b84 subselect.result, subselect.test:
Added a test case for bug #9516.
item_subselect.h:
  Fixed bug #9516.
  The bug was due to that fact that the class Item_subselect
  inherited the generic implementation of the function
  not_null_tables that was not valid for the objects
  of this class. As a result evaluation of the
  not_null_tables attribute was not correct for subqueries.
  This caused invalid transformations of outer joins into
  inner joins.


sql/item_subselect.h:
  Fixed bug #9516.
  The bug was due to that fact that the class Item_subselect
  inherited the generic implementation of the function
  not_null_tables that was not valid for the objects
  of this class. As a result evaluation of the
  not_null_tables attribute was not correct for subqueries.
  This caused invalid transformations of outer joins into
  inner joins.
mysql-test/t/subselect.test:
  Added a test case for bug #9516.
mysql-test/r/subselect.result:
  Added a test case for bug #9516.
2005-04-15 22:08:34 -07:00
unknown
2b92a78eb8 subselect.result, subselect.test:
Added a test case for bug #9338.
sql_select.cc:
  Fixed bug #9338.
  When an occurence of a field reference has to be replaced
  by another field reference the whole Item_field must be
  replaced.
item.cc:
  Fixed bug #9338.
  The method Item_field::replace_equal_field_processor was
  replaced by Item_field::replace_equal_field. The new method
  is used to replace the occurences of Item_field objects.
item.h:
  Fixed bug #9338.
  The virtual function replace_equal_field_processor was replaced
  by replace_equal_field. The latter is supposed to be used as a
  callback function in calls of the method transform.


sql/item.h:
  Fixed bug #9338.
  The virtual function replace_equal_field_processor was replaced
  by replace_equal_field. The latter is supposed to be used as a
  callback function in calls of the method transform.
sql/item.cc:
  The method Item_field::replace_equal_field_processor was
  replaced by Item_field::replace_equal_field The new method
  is used to replace the occurences of Item_field objects.
sql/sql_select.cc:
  Fixed bug #9338.
  When an occurence of a field reference has to be replaced
  by another field reference the whole Item_field must be
  replaced.
mysql-test/t/subselect.test:
  Added a test case for bug #9338.
mysql-test/r/subselect.result:
  Added a test case for bug #9338.
2005-04-15 20:43:45 -07:00
unknown
0c9304fd6d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0


mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-04-01 15:06:35 +03:00
unknown
db7561ecf8 Invalid DEFAULT values for CREATE TABLE now generates errors. (Bug #5902)
CAST() now produces warnings when casting a wrong INTEGER or CHAR values. This also applies to implicite string to number casts. (Bug #5912)
ALTER TABLE now fails in STRICT mode if it generates warnings.
Inserting a zero date in a DATE, DATETIME or TIMESTAMP column during TRADITIONAL mode now produces an error. (Bug #5933)


mysql-test/r/bigint.result:
  New warning added
mysql-test/r/cast.result:
  Added testing of wrong CAST's of strings to numbers and numbers to strings
mysql-test/r/create.result:
  Added test for wrong default values (#5902)
mysql-test/r/func_if.result:
  Changed tests to produce less warnings
mysql-test/r/func_misc.result:
  New warning
mysql-test/r/func_str.result:
  Added missing drop table
  Changed test to produce less warnings
  New warnings
mysql-test/r/ndb_index_unique.result:
  Removed wrong default usage
mysql-test/r/ps_1general.result:
  Changed tests to produce less warnings
mysql-test/r/row.result:
  New warnings
mysql-test/r/rpl_session_var.result:
  Changed tests to produce less warnings
mysql-test/r/strict.result:
  New tests for CAST() and zero date handling
mysql-test/r/subselect.result:
  Changed tests to produce less warnings
mysql-test/r/type_ranges.result:
  Changed tests to produce less warnings
mysql-test/t/cast.test:
  Added testing of wrong CAST's of strings to numbers and numbers to strings
mysql-test/t/create.test:
  Added test for wrong default values (#5902)
mysql-test/t/func_if.test:
  Changed tests to produce less warnings
mysql-test/t/func_str.test:
  Added missing drop table
  Changed test to produce less warnings
  New warnings
mysql-test/t/ndb_index_unique.test:
  Removed wrong default usage
mysql-test/t/ps_1general.test:
  Changed tests to produce less warnings
mysql-test/t/rpl_session_var.test:
  Changed tests to produce less warnings
mysql-test/t/strict.test:
  New tests for CAST() and zero date handling
mysql-test/t/subselect.test:
  Changed tests to produce less warnings
mysql-test/t/type_ranges.test:
  Changed tests to produce less warnings
sql/Makefile.am:
  Added new include file
sql/field.cc:
  Added warnings for zero dates for DATE, DATETIME and TIMESTAMP
  Moved Field_blob::max_length() to a more appropriate position
  Changed type for 'level' in set_warning() to avoid casts
sql/field.h:
  Changed type for 'level' in set_warning() to avoid casts
sql/field_conv.cc:
  Copy date and datetime fields through string in 'traditional' mode to detect zero dates
sql/item.cc:
  Removed compiler warnings
  Give warnings for wrong CAST of strings -> number
sql/item.h:
  Moved Item_string::val_real() and ::val_int() to item.cc
sql/item_row.cc:
  Better detection of null values (which doesn't produce warnings)
sql/item_sum.cc:
  Better detection of null values (which doesn't produce warnings)
sql/item_timefunc.cc:
  Give warnings for wrong CAST of number -> string
sql/my_decimal.cc:
  Fixed typo in comment
sql/mysql_priv.h:
  Removed prototype for static function
  Moved defines for error handling to sql_error.h (to be able to use these in field.h)
sql/mysqld.cc:
  Simplify code
sql/sql_class.h:
  Moved to sql_error.h
sql/sql_load.cc:
  Removed wrong cast
sql/sql_parse.cc:
  Fixed wrong printf()
sql/sql_table.cc:
  Made mysql_prepare_table() static
  Changed references to pointers to make code more readable
  ALTER TABLE now aborts if one gets warnings in STRICT mode
sql/time.cc:
  Fixed possible wrong call
sql/unireg.cc:
  Removed one call to current_thd
  Give errors if one uses a wrong DEFAULT value
2005-04-01 15:04:50 +03:00
unknown
8a898a0b72 merge 4.1->5.0
mysql-test/r/group_by.result:
  Auto merged
mysql-test/r/metadata.result:
  Auto merged
mysql-test/r/union.result:
  Auto merged
mysql-test/t/union.test:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
support-files/mysql.server.sh:
  Auto merged
2005-03-31 10:39:48 +03:00
unknown
dda97623a7 postreview changes
fixed bug in IN/ALL/ANY subqeries with HAVING clause (BUG#9350)


mysql-test/r/subselect.result:
  added new subquery tests to make code covarage better
mysql-test/t/subselect.test:
  added new subquery tests to make code covarage better
sql/item_subselect.cc:
  fixed typo in comment
  removed unused code
  fixed bug with HAVING clause detectiuon (BUG#9350)
  postreview changes
2005-03-30 10:07:08 +03:00
unknown
070fe467a3 fixed left expression of IN/ALL/ANY subquery transformation support (BUG#8888)
mysql-test/r/subselect.result:
  result changing
  fixed last test
  test of transformation of left expression of subquery
mysql-test/t/subselect.test:
  fixed last test
  test of transformation of left expression of subquery
sql/item_subselect.cc:
  fixfields made for left part of IN/ALL/ANY subquery before calling cols() to detect type of transformation (scalar or row)
  similar action of both transformation moved to separate function
sql/item_subselect.h:
  optimised field initialization and new method
2005-03-10 14:01:22 +02:00
unknown
eb18f93a78 Show all generated warnings in SHOW ERROR
Previously we only stored the first given error (the error sent to the client)


include/mysys_err.h:
  Moved ER_FILENOTFOUND last to avoid getting 'error 0'
mysql-test/r/backup.result:
  More warnings from in case of errors
mysql-test/r/innodb.result:
  More warnings from in case of errors
mysql-test/r/key_cache.result:
  More warnings from in case of errors
mysql-test/r/myisam.result:
  More warnings from in case of errors
mysql-test/r/preload.result:
  More warnings from in case of errors
mysql-test/r/repair.result:
  More warnings from in case of errors
mysql-test/r/rpl_failed_optimize.result:
  More warnings from in case of errors
mysql-test/r/subselect.result:
  More warnings from in case of errors
mysql-test/t/backup.test:
  Portability fix
mysql-test/t/innodb.test:
  Avoid some warnings
mysql-test/t/myisam.test:
  Portability fix
mysql-test/t/rpl_rotate_logs.test:
  Portablitiy fix
mysys/errors.c:
  Move ER_FILENOTFOUND last to avoid error 0
sql/mysql_priv.h:
  Indentation change
sql/mysqld.cc:
  Save all given errors for SHOW ERRORS
sql/protocol.cc:
  Store new errors for SHOW ERROR
  (Ignore those that are already reported with my_error())
sql/sql_class.cc:
  More errors with SHOW ERROR
sql/sql_class.h:
  More errors with SHOW ERROR
sql/sql_error.cc:
  More errors with SHOW ERROR
sql/sql_parse.cc:
  Temporary fix: Don't give error for the to-be-removed 'pre-open tables code'
sql/sql_show.cc:
  More debugging
  Don't register errors while populating schema tables.
  (If we do, we get a LOT of warnings from information_schema.test)
sql/sql_table.cc:
  Don't register errors from handler in drop table (as we already do it the upper level DROP TABLE code)
  Don't register errors for 'restore_table' as in most cases the table doesn't exists
sql/sql_union.cc:
  Use file->write_row() instead of 'write_record'.
  This gives us easer to handle error messages and is faster than the old version
2005-02-24 23:33:42 +02:00
unknown
cd32f96095 Tests modified to coved decimal-related code
mysql-test/r/analyse.result:
  test result extended
mysql-test/r/cast.result:
  test result extended
mysql-test/r/func_group.result:
  test result extended
mysql-test/r/subselect.result:
  test result extended
mysql-test/t/analyse.test:
  test extended
mysql-test/t/cast.test:
  test extended
mysql-test/t/func_group.test:
  test extended
mysql-test/t/subselect.test:
  test extended
2005-02-21 19:20:05 +04:00
unknown
92f55e98dd Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-bug8218


mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-02-14 23:49:01 +03:00
unknown
40ffce74eb Merge mysql.com:/home/psergey/mysql-4.1-bug8218
into mysql.com:/home/psergey/mysql-5.0-bug8218


mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-02-14 23:47:31 +03:00