Commit graph

676 commits

Author SHA1 Message Date
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
68c2a008a1 Merge mysql.com:/usr/home/ram/work/bug20732/my41-bug20732
into  mysql.com:/usr/home/ram/work/bug20732/my50-bug20732


sql/opt_range.cc:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/range.result:
  SCCS merged
mysql-test/t/range.test:
  SCCS merged
2006-10-19 16:15:30 +05:00
unknown
da7af481cd Fix for bug #20732: Partial index and long sjis search with '>' fails sometimes
We miss some records sometimes using RANGE method if we have
partial key segments.
Example:
  Create table t1(a char(2), key(a(1)));
  insert into t1 values ('a'), ('xx');
  select a from t1 where a > 'x';
We call index_read() passing 'x' key and HA_READ_AFTER_KEY flag
in the handler::read_range_first() wich is wrong because we have
a partial key segment for the field and might miss records like 'xx'.

Fix: don't use open segments in such a case.


mysql-test/r/range.result:
  Fix for bug #20732: Partial index and long sjis search with '>' fails sometimes
    - test result.
mysql-test/t/range.test:
  Fix for bug #20732: Partial index and long sjis search with '>' fails sometimes
    - test case.
sql/opt_range.cc:
  Fix for bug #20732: Partial index and long sjis search with '>' fails sometimes
    - check if we have a partial key segment for a Item_func::GT_FUNC;
      if so, don't set NEAR_MIN flag in order to use HA_READ_KEY_OR_NEXT
      instead of HA_READ_AFTER_KEY.
sql/opt_range.h:
  Fix for bug #20732: Partial index and long sjis search with '>' fails sometimes
    - key segment 'flag' slot added.
sql/sql_select.cc:
  Fix for bug #20732: Partial index and long sjis search with '>' fails sometimes
    - test (HA_PART_KEY_SEG | HA_NULL_PART) as we split it in the sql/table.cc
sql/table.cc:
  Fix for bug #20732: Partial index and long sjis search with '>' fails sometimes
    - set HA_NULL_PART flag instead of HA_PART_KEY_SEG in order not to mix them.
2006-10-19 12:52:37 +05:00
unknown
6caacb9bbd Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B22342-5.0-opt


sql/opt_range.cc:
  Auto merged
2006-10-16 19:46:02 +03:00
unknown
decf9082fb Bug #22342: No results returned for query using max and group by
When using index for group by and range access the server isolates    
 a set of ranges based on the conditions over the key parts of the
 index used. Then it uses only the ranges over the GROUP BY fields to
 jump from one group to another. Since the GROUP BY fields may form a
 prefix over the index, we may use only a prefix of the ranges produced
 by the range optimizer.
 Each range contains a notion on whether it includes its border values.
 The problem is that when using a range prefix, the last range is open
 because it assumes that there is a range on the next keypart. Thus when
 we use a prefix range as it is, it excludes all border values.
 The solution is when ignoring the suffix of the range conditions 
 (to jump over the GROUP BY prefix only) the server must change the 
 remaining intervals so they always contain their borders, e.g. 
 if the whole range was :
 (1,-inf) <= (<group_by_col>,<min_max_arg_col>) < (1, 3) we must make
 (1) <= (<group_by_col>) <= (1) because (a,b) < (c1,c2) means :
 a < c1 OR (a = c1 AND b < c2).


mysql-test/r/group_min_max.result:
  Bug #22342: No results returned for query using max and group by
   - test case
mysql-test/t/group_min_max.test:
  Bug #22342: No results returned for query using max and group by
   - test case
sql/opt_range.cc:
  Bug #22342: No results returned for query using max and group by
   - open the intervals for prefix select when there are more conditions
     than used for the prefix search.
sql/opt_range.h:
  Bug #22342: No results returned for query using max and group by
   - open the intervals for prefix select when there are more conditions
     than used for the prefix search.
2006-10-16 19:30:19 +03:00
unknown
1535da6592 Merge bk-internal:/home/bk/mysql-5.0-runtime
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint


BitKeeper/etc/collapsed:
  auto-union
mysql-test/lib/mtr_process.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
2006-10-03 14:26:11 +02:00
unknown
e634094680 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.1
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint


BitKeeper/etc/collapsed:
  auto-union
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/lib/mtr_process.pl:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-10-03 13:27:48 +02:00
unknown
4506b26d8c Merge neptunus.(none):/home/msvensson/mysql/mysql-5.1
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint


BitKeeper/etc/ignore:
  auto-union
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/partition.result:
  Auto merged
mysql-test/r/ps.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_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/innobase/handler/ha_innodb.cc:
  Auto merged
storage/innobase/handler/ha_innodb.h:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
sql/share/errmsg.txt:
  Manul merge(conflict with new german text)
sql/unireg.cc:
  Manual merge(as it is in 5.1)
2006-10-03 09:28:44 +02:00
unknown
21070e43ef Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mockturtle.local:/home/dlenev/src/mysql-5.1-rt-merge


mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-10-02 21:41:35 +04:00
unknown
8f67eac4a3 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  mockturtle.local:/home/dlenev/src/mysql-5.0-bg20670-2


mysql-test/r/trigger.result:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/sql_update.cc:
  Auto merged
2006-09-30 11:35:34 +04:00
unknown
72d698e8ed Merge bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  mockturtle.local:/home/dlenev/src/mysql-5.1-bg20670


mysql-test/r/trigger.result:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
2006-09-30 00:31:33 +04:00
unknown
c6e2a2a49b Merge rama.(none):/home/jimw/my/mysql-5.0-clean
into  rama.(none):/home/jimw/my/mysql-5.1-clean


include/m_ctype.h:
  Auto merged
include/m_string.h:
  Auto merged
include/my_global.h:
  Auto merged
include/my_sys.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/mysql_priv.h:
  Resolve conflict
sql/mysqld.cc:
  Resolve conflict
sql/set_var.cc:
  Resolve conflict
sql/slave.h:
  Resolve conflict
sql/sql_class.h:
  Resolve conflict
2006-09-28 20:20:33 -07:00
unknown
39bdf4c41c Merge bk-internal:/home/bk/mysql-5.0-maint
into  rama.(none):/home/jimw/my/mysql-5.0-clean


include/my_global.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
2006-09-28 20:17:17 -07:00
unknown
9afa051a12 Merge bk-internal:/home/bk/mysql-4.1-maint
into  rama.(none):/home/jimw/my/mysql-4.1-clean


include/my_global.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/mysqld.cc:
  Resolve conflict
2006-09-28 18:11:29 -07:00
unknown
44cdd695ab Merge rama.(none):/home/jimw/my/mysql-4.1-clean
into  rama.(none):/home/jimw/my/mysql-5.0-clean


include/m_ctype.h:
  Auto merged
include/m_string.h:
  Auto merged
include/my_global.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_class.h:
  Auto merged
include/my_sys.h:
  Resolve conflict
sql/mysql_priv.h:
  Resolve conflict
sql/mysqld.cc:
  Resolve conflict
sql/opt_range.cc:
  Resolve conflict
sql/sql_acl.cc:
  Resolve conflict
2006-09-28 18:09:10 -07:00
unknown
f6493451f8 Merge bk-internal:/home/bk/mysql-5.1-opt
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1-opt


sql/item.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
2006-09-28 14:52:09 +02:00
unknown
c1bbfb2b67 Fixed bug #18360: Type aggregation for IN and CASE may lead to a wrong
result

The IN function aggregates result types of all expressions. It uses that 
type in comparison of left expression and expressions in right part. 
This approach works in most cases. But let's consider the case when the
right part contains both strings and integers. In that case this approach may
cause wrong results because all strings which do not start with a digit are
evaluated as 0.
CASE uses the same approach when a CASE expression is given thus it's also
affected.

The idea behind this fix is to make IN function to compare expressions with
different result types differently. For example a string in the left
part will be compared as string with strings specified in right part and
will be converted to real for comparison to int or real items in the right
part.

A new function called collect_cmp_types() is added. It collects different
result types for comparison of first item in the provided list with each 
other item in the list. 

The Item_func_in class now can refer up to 5 cmp_item objects: 1 for each
result type for comparison purposes. cmp_item objects are allocated according
to found result types. The comparison of the left expression with any
right part expression is now based only on result types of these expressions.

The Item_func_case class is modified in the similar way when a CASE
expression is specified. Now it can allocate up to 5 cmp_item objects
to compare CASE expression with WHEN expressions of different types.
The comparison of the CASE expression with any WHEN expression now based only 
on result types of these expressions.



sql/item.cc:
  Cleaned up an outdated comment.
sql/item_cmpfunc.cc:
      Fixed bug #18360: Type aggregation for IN and CASE may lead to a wrong result
      A new function called collect_cmp_types() is added. It collects different
      result types for comparison of first item in the provided list with each 
      other item in the list. 
      The Item_func_in class now can refer up to 5 cmp_item objects: 1 for each
      result type for comparison purposes. cmp_item objects are allocated according
      to found result types. The comparison of the left expression with any
      right part expression is now based only on result types of these expressions.
      The Item_func_case class is modified in the similar way when a CASE
      expression is specified. Now it can allocate up to 5 cmp_item objects
      to compare CASE expression with WHEN expressions of different types.
      The comparison of the CASE expression with any WHEN expression now based only 
      on result types of these expressions.
sql/item_cmpfunc.h:
      Fixed bug#18360: Type aggregation for IN and CASE may lead to a wrong result
      The Item_func_in class now can refer up to 5 cmp_item objects.
      The Item_func_case class is modified in the similar way.
sql/opt_range.cc:
      Fixed bug #18360: Type aggregation for IN and CASE may lead to a wrong
      resultSmall code changes due to changes in Item_func_in class.
mysql-test/t/view.test:
  Added a test comment
mysql-test/t/func_in.test:
  Added a test case for bug#18360: Type aggregation for IN and CASE may lead to a wrong
  result
mysql-test/r/func_in.result:
  Added a test case for bug#18360: Type aggregation for IN and CASE may lead to a wrong
  result
2006-09-26 20:52:54 +04:00
unknown
e0d2f525fe Fix for bug#20670 "UPDATE using key and invoking trigger that modifies
this key does not stop" (5.1 version).

UPDATE statement which WHERE clause used key and which invoked trigger
that modified field in this key worked indefinetely.

This problem occured because in cases when UPDATE statement was
executed in update-on-the-fly mode (in which row is updated right
during evaluation of select for WHERE clause) the new version of
the row became visible to select representing WHERE clause and was
updated again and again.
We already solve this problem for UPDATE statements which does not
invoke triggers by detecting the fact that we are going to update
field in key used for scanning and performing update in two steps,
during the first step we gather information about the rows to be
updated and then doing actual updates. We also do this for
MULTI-UPDATE and in its case we even detect situation when such
fields are updated in triggers (actually we simply assume that
we always update fields used in key if we have before update
trigger).

The fix simply extends this check which is done with help of
check_if_key_used()/QUICK_SELECT_I::check_if_keys_used()
routine/method in such way that it also detects cases when
field used in key is updated in trigger. We do this by
changing check_if_key_used() to take field bitmap instead
field list as argument and passing TABLE::write_set
to it (we also have to add info about fields used in
triggers to this bitmap a bit earlier).
As nice side-effect we have more precise and thus more optimal
perfomance-wise check for the MULTI-UPDATE.
Also check_if_key_used() routine and similar method were renamed
to is_key_used()/is_keys_used() in order to better reflect that
it is simple boolean predicate.
Finally, partition_key_modified() routine now also takes field
bitmap instead of field list as argument.


sql/key.cc:
  Now check_if_key_used() takes field bitmap instead of field list as
  argument (bitmaps are also used in its implementation).
  It is no longer responsible for checking if key uses automatically
  updated TIMESTAMP fields, instead callers should properly mark such
  fields in field bitmap.
  Also renamed this function to is_key_used().
sql/mysql_priv.h:
  Renamed check_if_key_used() to is_key_used(), also now this routine
  takes field bitmap instead of field list as argument.
sql/opt_range.cc:
  QUICK_SELECT_I::check_if_keys_used() method and check_if_key_used()
  routine were renamed to is_keys_used()/is_key_used(). Also now they
  take bitmap instead of field list as argument.
sql/opt_range.h:
  QUICK_SELECT_I::check_if_key_used() method was renamed to is_keys_used().
  Now it takes field bitmap instead of field list as argument and no
  longer responsible for checking if key uses automatically updated
  TIMESTAMP fields. Instead callers should properly mark such fields
  in field bitmap.
sql/sql_partition.cc:
  partition_key_modified() now takes field bitmap instead of list
  as argument.
sql/sql_partition.h:
  partition_key_modified() now takes field bitmap as argument
  instead of field list.
sql/sql_update.cc:
  To detect situation in which trigger modifies part of key which is
  going to be used for processing of where clause and thus makes
  processing of this update with update-on-the-fly method unsafe
  we use check_if_key_used() routine and similar method (which were
  renamed to is_key_used()) plus information from TABLE::write_map
  bitmap. Note that we have to call TABLE::mark_columns_needed_for_update()
  method earlier now to fill this bitmap with information about fields
  updated in triggers.
  safe_update_on_fly() routine now uses the same approach and no
  longer needs list of fields as argument.
2006-09-21 13:39:29 +04:00
unknown
5a7c671c1f Merge chilla.local:/home/mydev/mysql-5.0--main
into  chilla.local:/home/mydev/mysql-5.0-toteam


sql/opt_range.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-09-21 10:55:23 +02:00
unknown
0e4dd85d67 Fix for bug#20670 "UPDATE using key and invoking trigger that modifies
this key does not stop" (version for 5.0 only).

UPDATE statement which WHERE clause used key and which invoked trigger
that modified field in this key worked indefinetely.

This problem occured because in cases when UPDATE statement was
executed in update-on-the-fly mode (in which row is updated right
during evaluation of select for WHERE clause) the new version of
the row became visible to select representing WHERE clause and was
updated again and again.
We already solve this problem for UPDATE statements which does not
invoke triggers by detecting the fact that we are going to update
field in key used for scanning and performing update in two steps,
during the first step we gather information about the rows to be
updated and then doing actual updates. We also do this for
MULTI-UPDATE and in its case we even detect situation when such
fields are updated in triggers (actually we simply assume that
we always update fields used in key if we have before update
trigger).

The fix simply extends this check which is done in check_if_key_used()/
QUICK_SELECT_I::check_if_keys_used() routine/method in such way that
it also detects cases when field used in key is updated in trigger.
As nice side-effect we have more precise and thus more optimal
perfomance-wise check for the MULTI-UPDATE.
Also check_if_key_used()/QUICK_SELECT_I::check_if_keys_used() were
renamed to is_key_used()/QUICK_SELECT_I::is_keys_used() in order to
better reflect that boolean predicate.

Note that this check is implemented in much more elegant way in 5.1 


mysql-test/r/trigger.result:
  Added test case for bug#20670 "UPDATE using key and invoking trigger that
  modifies this key does not stop".
mysql-test/t/trigger.test:
  Added test case for bug#20670 "UPDATE using key and invoking trigger that
  modifies this key does not stop".
sql/key.cc:
  Renamed check_if_key_used() to is_key_used(). Also this routine checks if
  key uses field which can be updated by before update trigger defined on the
  table. As result we avoid using update-on-the-fly method in cases when trigger
  updates part of key which is used by select which filters rows to be updated
  and thus avoid infinite updates. By doing such check here we cover both UPDATE
  and MULTI-UPDATE cases.
sql/mysql_priv.h:
  Renamed check_if_key_used() to is_key_used().
sql/opt_range.cc:
  Renamed check_if_key_used()/QUICK_SELECT_I::check_if_keys_used() to
  is_key_used()/QUICK_SELECT_I::is_keys_used().
sql/opt_range.h:
  Renamed QUICK_SELECT_I::check_if_keys_used() method to is_keys_used(),
  also updated comment describing it to reflect its extended semantics
  (this change was caused by change in check_if_key_used()/is_key_used()
   routine semantics).
sql/sql_trigger.cc:
  Introduced Table_triggers_list::is_updated_in_before_update_triggers()
  method which is needed for checking if field of subject table can be
  changed in before update trigger.
sql/sql_trigger.h:
  Table_triggers_list:
    Removed has_before_update_triggers() method which is not used any longer.
    Added declaration of is_updated_in_before_update_triggers() which is
    needed for checking if field of subject table can be changed by before
    update trigger.
sql/sql_update.cc:
  safe_update_on_fly():
    check_if_key_used() routine and check_if_keys_used() method were
    renamed to is_key_used()/is_keys_used(). 
    Now cases when trigger updates fields which are part of key used for
    filtering rows for update are caught directly in is_key_used().
    This also allows to cover both UPDATE and MULTI-UPDATE cases.
2006-09-21 11:35:38 +04:00
unknown
e0bca512df Merge chilla.local:/home/mydev/mysql-5.1--team
into  chilla.local:/home/mydev/mysql-5.1-tomain


mysql-test/t/disabled.def:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Manual merge from 5.1-engines.
2006-09-20 14:36:32 +02:00
unknown
ef466a2021 Merge april.(none):/home/svoj/devel/bk/mysql-5.1
into  april.(none):/home/svoj/devel/mysql/merge/mysql-5.1-engines


mysql-test/r/myisam.result:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
sql/handler.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
2006-09-18 19:43:33 +05:00
unknown
dfb219f6c9 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0
into  april.(none):/home/svoj/devel/mysql/merge/mysql-5.0-engines


mysql-test/r/myisam.result:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/share/errmsg.txt:
  SCCS merged
2006-09-18 16:23:45 +05: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
7a0f9c8d4c Merge dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-4.1-opt
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt


mysql-test/r/subselect.result:
  SCCS merged
mysql-test/t/subselect.test:
  SCCS merged
2006-09-18 11:19:40 +02:00
unknown
2b4b44b9a7 Merge chilla.local:/home/mydev/mysql-5.1--main
into  chilla.local:/home/mydev/mysql-5.1-toteam


mysql-test/t/disabled.def:
  Auto merged
BitKeeper/deleted/.del-index_merge_innodb.result:
  Auto merged
mysql-test/include/index_merge2.inc:
  Auto merged
mysql-test/include/mix1.inc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/ha_myisam.h:
  Auto merged
mysql-test/include/handler.inc:
  Manual merge 5.1 -> 5.1-engines
mysql-test/r/innodb_mysql.result:
  Manual merge 5.1 -> 5.1-engines
2006-09-14 21:44:17 +02:00
unknown
fba86d2b7e Merge maint2.mysql.com:/data/localhome/tsmith/bk/mrg50/50
into  maint2.mysql.com:/data/localhome/tsmith/bk/mrg50/51


BUILD/SETUP.sh:
  Auto merged
client/Makefile.am:
  Auto merged
dbug/Makefile.am:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysql/Makefile.am:
  Auto merged
mysql-test/lib/mtr_cases.pl:
  Auto merged
mysql-test/lib/mtr_match.pl:
  Auto merged
mysql-test/lib/mtr_misc.pl:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/range.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/range.test:
  Auto merged
mysql-test/t/system_mysql_db_fix.test:
  Auto merged
mysys/my_seek.c:
  Auto merged
regex/Makefile.am:
  Auto merged
scripts/Makefile.am:
  Auto merged
server-tools/instance-manager/Makefile.am:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_acl.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_repl.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/stacktrace.c:
  Auto merged
sql-common/client.c:
  Auto merged
sql/stacktrace.h:
  Auto merged
storage/innobase/Makefile.am:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
tests/Makefile.am:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
BitKeeper/deleted/.del-mytest.c:
  Delete: libmysql/mytest.c
BitKeeper/deleted/.del-make_win_bin_dist:
  Delete: scripts/make_win_bin_dist
BitKeeper/deleted/.del-message.mc~1:
  Delete: sql/message.mc
Makefile.am:
  Manual merge (use local)
configure.in:
  Manual merge (use local)
BitKeeper/deleted/.del-Makefile.in:
  Manual merge (use local)
client/mysqlbinlog.cc:
  Manual merge (use local)
extra/Makefile.am:
  Manual merge (use local)
extra/comp_err.c:
  Manual merge (use local)
extra/yassl/Makefile.am:
  Manual merge (use local)
extra/yassl/taocrypt/Makefile.am:
  Manual merge (use local)
include/my_dbug.h:
  Manual merge (use local)
mysql-test/mysql-test-run.pl:
  Manual merge (use local)
mysql-test/lib/mtr_process.pl:
  Manual merge (use local)
mysys/Makefile.am:
  Manual merge (use local)
server-tools/Makefile.am:
  Manual merge (use local)
sql/Makefile.am:
  Manual merge (use local)
sql/sp.cc:
  Manual merge
sql/sp_head.cc:
  Manual merge
sql/sql_class.h:
  Manual merge (use local)
sql/sql_select.cc:
  SCCS merged
sql/table.cc:
  Manual merge
storage/archive/ha_archive.cc:
  Manual merge
storage/heap/Makefile.am:
  Manual merge (use local)
storage/myisam/Makefile.am:
  Manual merge (use local)
storage/myisammrg/Makefile.am:
  Manual merge (use local)
strings/Makefile.am:
  Manual merge (use local)
vio/Makefile.am:
  Manual merge (use local)
zlib/Makefile.am:
  Manual merge (use local)
2006-09-13 09:03:52 +02:00
unknown
f74f377693 Merge april.(none):/home/svoj/devel/mysql/BUG20256/mysql-5.0-engines
into  april.(none):/home/svoj/devel/mysql/BUG20256/mysql-5.1-engines


sql/ha_myisam.cc:
  Auto merged
sql/ha_myisam.h:
  Auto merged
sql/handler.cc:
  Auto merged
BitKeeper/deleted/.del-index_merge.result:
  Auto merged
mysql-test/include/index_merge1.inc:
  Manual merge.
sql/handler.h:
  Manual merge.
sql/opt_range.cc:
  Manual merge.
2006-09-12 18:42:10 +05:00
unknown
fa1436bf1f BUG#20256 - LOCK WRITE - MyISAM
Only MyISAM tables locked with LOCK TABLES ... WRITE were affected.

A query that is optimized with index_merge doesn't reflect rows
inserted within LOCK TABLES.

MyISAM doesn't flush a state within LOCK TABLES. index_merge
optimization creates a copy of the handler, which thus gets
outdated MyISAM state.

New handler->clone() method is introduced to fix this problem.
For non-MyISAM storage engines it allocates a handler and opens
it with ha_open(). For MyISAM it additionally copies MyISAM state
pointer to cloned handler.


mysql-test/r/index_merge.result:
  A test case for bug#20256.
mysql-test/t/index_merge.test:
  A test case for bug#20256.
sql/ha_myisam.cc:
  clone method added to handler class.
sql/ha_myisam.h:
  clone method added to handler class.
sql/handler.cc:
  clone method added to handler class.
sql/handler.h:
  clone method added to handler class.
sql/opt_range.cc:
  Use handler clone method.
2006-09-12 18:25:35 +05:00
unknown
c4c36e17ac Fixed bug #16249: different results for a range with an without index
when a range condition use an invalid DATETIME constant.
Now we do not use invalid DATETIME constants to form end keys for
range intervals: range analysis just ignores predicates with such
constants.  


mysql-test/r/query_cache.result:
  Adjusted result warnings when adding a fix for bug #16249.
mysql-test/r/range.result:
  Added a test case for bug #16249.
mysql-test/t/range.test:
  Added a test case for bug #16249.
2006-08-31 07:27:34 -07:00
unknown
00c24198cb sql_base.cc, ndb_condition_pushdown.result, opt_range.cc:
After merge changes


mysql-test/r/ndb_condition_pushdown.result:
  After merge changes
sql/sql_base.cc:
  After merge changes
sql/opt_range.cc:
  After merge changes
2006-08-30 22:11:23 +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
da2e23f183 opt_range.cc:
Corrected fix for bug#18165


sql/opt_range.cc:
  Corrected fix for bug#18165
2006-08-25 00:23:42 +04:00
unknown
84a6539345 opt_range.cc:
Corrected fix for bug#18165


sql/opt_range.cc:
  Corrected fix for bug#18165
2006-08-24 23:16:54 +04:00
unknown
38558705d0 Fixed bug 16201: a memory corruption causing crashes due to a too small
buffer for a MY_BITMAP temporary buffer allocated on stack in the
function get_best_covering_ror_intersect().
Now the buffer of a proper size is allocated by a request from this
function in mem_root.

We succeeded to demonstrate the bug only on Windows with a very large
database. That's why no test case is provided for in the patch.


sql/opt_range.cc:
  Fixed bug 16201: a memory corruption causing crashes due to a too small 
  buffer for a MY_BITMAP temporary buffer allocated on stack in the
  function get_best_covering_ror_intersect().
  Now the buffer of a proper size is allocated by a request from this
  function in mem_root.
2006-08-22 04:14:39 -07:00
unknown
959363b956 BUG#21277: Wrong results in index_merge queries:
Remove the code that cleared "read fields set" for merged scans. That code
was based on assumption that "We're going to just read rowids", while 
actually QUICK_RANGE_SELECT code would also need key part values to check 
that retrieved record(s) fall within the scanned intervals.


mysql-test/r/index_merge_innodb.result:
  BUG#21277: Testcase
mysql-test/t/index_merge_innodb.test:
  BUG#21277: Testcase
2006-08-21 17:03:07 +04:00
unknown
915bdfbea8 Bug #2717: include/my_global.h mis-defines __attribute__
Fix when __attribute__() is stubbed out, add ATTRIBUTE_FORMAT() for specifying
  __attribute__((format(...))) safely, make more use of the format attribute,
  and fix some of the warnings that this turns up (plus a bonus unrelated one).


include/m_ctype.h:
  Add ATTRIBUTE_FORMAT to printf-like functions.
include/m_string.h:
  Add ATTRIBUTE_FORMAT to my_snprintf() declaration.
include/my_global.h:
  Fix neutering of __attribute__() on old versions of GCC and non-GCC compilers.
  Add ATTRIBUTE_FORMAT() macro for setting __attribute_((format(...)), since it
  is available from different versions of gcc and g++.
include/my_sys.h:
  Add ATTRIBUTE_FORMAT() to my_printf_error declaration
sql/item_subselect.cc:
  Silence warning about members being initialized out-of-order
sql/item_timefunc.cc:
  Fix format specifier in snprintf() calls with milliseconds
sql/mysql_priv.h:
  Add ATTRIBUTE_FORMAT to printf-like functions.
sql/mysqld.cc:
  Fix various format specifiers
  Make sure that method_conv is always set by myisam_stats_method
sql/opt_range.cc:
  Cast pointers to correct type for %lx
sql/set_var.cc:
  Fix __attribute__((unused)) (missing inner set of parens)
sql/slave.cc:
  Fix format specifier
sql/slave.h:
  Add ATTRIBUTE_FORMAT to slave_print_error() declaration.
sql/sql_acl.cc:
  Fix number of  arguments passed for formatting, and fix acl_host_or_ip being
  passed instead of just the hostname.
sql/sql_class.h:
  Add ATTRIBUTE_FORMAT to MYSQL_LOG::write().
2006-08-17 12:25:40 -07:00
unknown
c8cafde703 Fixed bug #18165.
Made [NOT]BETWEEN predicates SARGable in respect to the second and 
the third arguments.


mysql-test/r/range.result:
  Added a test case to bug #18165.
mysql-test/t/range.test:
  Added a test case to bug #18165.
sql/opt_range.cc:
  Fixed bug #18165.
  Made [NOT]BETWEEN predicates SARGable in respect to the second and 
  the third arguments.
  Put in a separate function called get_full_func_mm_tree the functionality
  that builds a conjunction of all SEL_TREEs for a simple predicate of the
  form (f op c), where f was a field and c was a constant, applying different
  equalities f=f' with f' being another field.
2006-08-16 09:37:19 -07:00
unknown
9cf4750ec3 BUG#21282: Incorrect query results for "t.key NOT IN (<big const list>)
In fix for BUG#15872, a condition of type "t.key NOT IN (c1, .... cN)"
where N>1000, was incorrectly converted to
  (-inf < X < c_min) OR (c_max < X)
Now this conversion is removed, we dont produce any range lists for such
conditions.


mysql-test/r/range.result:
  BUG#21282: Testcase
mysql-test/t/range.test:
  BUG#21282: Testcase
sql/opt_range.cc:
  BUG#21282: Incorrect query results for "t.key NOT IN (<big const list>) 
  In fix for BUG#15872, a condition of type "t.key NOT IN (c1, .... cN)"
  where N>1000, was incorrectly converted to 
    (-inf < X < c_min) OR (c_max < X)
  Now this conversion is removed, we dont produce any range lists for such
  conditions.
2006-08-15 21:08:22 +04:00
unknown
8462d3a46a Bug #21180: Subselect with index for both WHERE and ORDER BY produces empty result
Reseting subqueries with "quick" access methods was incomplete.
 Partially backported the correct reseting of QUICK_SELECTs from 5.x.


mysql-test/r/subselect.result:
  Bug #21180: Subselect with index for both WHERE and ORDER BY produces empty result
   - test case
mysql-test/t/subselect.test:
  Bug #21180: Subselect with index for both WHERE and ORDER BY produces empty result
   - test case
sql/opt_range.cc:
  Bug #21180: Subselect with index for both WHERE and ORDER BY produces empty result
   - partially backported the correct reseting of QUICK_SELECTs from 5.x.
sql/opt_range.h:
  Bug #21180: Subselect with index for both WHERE and ORDER BY produces empty result
   - partially backported the correct reseting of QUICK_SELECTs from 5.x.
2006-08-03 19:20:30 +03: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
3e2af0b811 BUG#14940: post-review fixes
sql/opt_range.cc:
  BUG#14940: post-review fixes:
   - fix comments
   - use set_if_smaller
2006-07-30 00:02:09 +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
d3b743ae18 BUG20733: Bug in partition pruning with zerofill field
Problem was with handling NULL values in ranges


mysql-test/r/partition_hash.result:
  New partition pruning test cases
mysql-test/r/partition_list.result:
  New partition pruning test cases
mysql-test/r/partition_pruning.result:
  New partition pruning test cases
mysql-test/r/partition_range.result:
  New partition pruning test cases
mysql-test/t/partition_hash.test:
  New partition pruning test cases
mysql-test/t/partition_list.test:
  New partition pruning test cases
mysql-test/t/partition_pruning.test:
  New partition pruning test cases
mysql-test/t/partition_range.test:
  New partition pruning test cases
sql/opt_range.cc:
  Added comment
sql/sql_partition.cc:
  Partition pruning didn't handle ranges with NULL values in a proper manner
2006-07-20 05:28:16 -04:00
unknown
906cd90d93 Merge mysql.com:/home/psergey/tmp_merge-2
into  mysql.com:/home/psergey/mysql-5.1-merge-2


mysql-test/r/range.result:
  Auto merged
mysql-test/t/range.test:
  Auto merged
sql/opt_range.cc:
  Auto merged
2006-07-14 19:10:54 +04:00
unknown
4ffd445b56 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/psergey/mysql-4.1-bug16168-push


sql/opt_range.cc:
  Auto merged
2006-07-01 01:55:43 +04:00
unknown
c1fa66c3a9 Merge mysql.com:/home/psergey/mysql-4.1-bug16168-push
into  mysql.com:/home/psergey/mysql-5.0-bug16168-merge


mysql-test/t/range.test:
  Auto merged
mysql-test/r/range.result:
  SCCS merged
sql/opt_range.cc:
  SCCS merged
2006-07-01 01:25:59 +04:00
unknown
9bec41887e Merge moonbone.local:/home/evgen/bk-trees/mysql-5.0-opt
into moonbone.local:/work/merge-5.1


mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/spatial.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_update.cc:
  Auto merged
strings/ctype-mb.c:
  Auto merged
2006-06-30 16:10:26 +04:00
unknown
633cbfb571 BUG#16168: Wrong results from range optimizer, "Use_count: Wrong count for key ..." warnings:
- Added comments.
 - Make SEL_ARG::clone() set SEL_ARG::elements in the created copy.


mysql-test/r/range.result:
  BUG#16168: Testcase
mysql-test/t/range.test:
  BUG#16168: Testcase
2006-06-30 09:05:12 +04:00
unknown
bdf32845d6 Merge mysql.com:/home/kgeorge/mysql/4.1/warnings
into  mysql.com:/home/kgeorge/mysql/5.0/warnings


sql/opt_range.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/item_cmpfunc.h:
  resolve the conflicts in 4.1->5.0 merge of the gcc 4.1 warnings in favor of 
  5.0 code
sql/spatial.h:
  resolve the conflicts in 4.1->5.0 merge of the gcc 4.1 warnings in favor of 
  5.0 code
sql/sql_select.h:
  resolve the conflicts in 4.1->5.0 merge of the gcc 4.1 warnings in favor of 
  5.0 code
2006-06-29 10:46:30 +03:00
unknown
730d16614d gcc 4.1 linux warning fixes backported from 5.0.
sql/item_cmpfunc.h:
  gcc 4.1 linux warning fixes backported from 5.0
sql/opt_range.cc:
  gcc 4.1 linux warning fixes.
sql/spatial.h:
  gcc 4.1 linux warning fixes backported from 5.0
sql/sql_select.h:
  gcc 4.1 linux warning fixes.
sql/sql_update.cc:
  gcc 4.1 linux warning fixes.
2006-06-28 16:28:29 +03:00
unknown
cd3fa2ee71 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1


include/my_sys.h:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_string.cc:
  Auto merged
2006-06-19 13:00:36 +03:00
unknown
4b316e6fd6 unsigned char -> uchar
Added missing copyright
Indentation and prototype fixes
Fixed compiler warning


include/my_sys.h:
  Fix prototype for my_print_open_files.
  Indentation fixes
mysys/mf_keycache.c:
  Fix that key cache can be compiled without #define THREAD
mysys/my_error.c:
  Indentation cleanups
mysys/my_memmem.c:
  Added missing copyright.
  Fix include files
sql/event.cc:
  unsigned char -> uchar
sql/field.cc:
  unsigned char -> uchar
sql/filesort.cc:
  Indentation fix
sql/ha_ndbcluster.cc:
  unsigned char -> uchar
sql/ha_ndbcluster_binlog.cc:
  unsigned char -> uchar
sql/item_strfunc.cc:
  unsigned char -> uchar
sql/log_event.cc:
  unsigned char -> uchar
sql/opt_range.cc:
  Indentation fixes
sql/sql_crypt.cc:
  unsigned char -> uchar
sql/sql_string.cc:
  unsigned char -> uchar
sql/tztime.cc:
  unsigned char -> uchar
storage/heap/hp_extra.c:
  Clear also next_block (See heap_scan_init)
storage/heap/hp_test2.c:
  Set required struct memeber max_table_size
  (Fixes that hp_test2 works again)
storage/myisam/mi_rsamepos.c:
  Fixed bug in mi_rsame_with_pos
strings/decimal.c:
  Fixed compiler warning
2006-06-19 12:45:34 +03:00
unknown
610b1a4ebd Manually merged
configure.in:
  Auto merged
client/mysqlbinlog.cc:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/archive.result:
  Auto merged
mysql-test/r/auto_increment.result:
  Auto merged
mysql-test/r/cast.result:
  Auto merged
mysql-test/r/ctype_utf8.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/multi_update.result:
  Auto merged
mysql-test/r/ndb_lock.result:
  Auto merged
mysql-test/r/replace.result:
  Auto merged
mysql-test/r/union.result:
  Auto merged
mysql-test/t/archive.test:
  Auto merged
mysql-test/t/auto_increment.test:
  Auto merged
mysql-test/t/delayed.test:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/multi_update.test:
  Auto merged
mysql-test/t/ndb_lock.test:
  Auto merged
mysql-test/t/select.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.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_select.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/structs.h:
  Auto merged
storage/archive/ha_archive.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2006-06-18 14:56:35 +04:00
unknown
2ef66fcaa0 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.1
into mysql.com:/home/psergey/mysql-5.1-bug19684


sql/opt_range.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-06-09 20:38:53 +04:00
unknown
555eb848f2 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/home/my/mysql-5.1


BitKeeper/etc/ignore:
  auto-union
include/heap.h:
  Auto merged
include/my_base.h:
  Auto merged
include/mysql_com.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
  Auto merged
mysql-test/r/binlog_stm_mix_innodb_myisam.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/ndb_index_unique.result:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_berkeley.h:
  Auto merged
mysql-test/r/view_grant.result:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_federated.h:
  Auto merged
sql/ha_heap.h:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/ha_myisam.h:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/ha_partition.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/spatial.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_bitmap.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/archive/ha_archive.cc:
  Auto merged
storage/archive/ha_archive.h:
  Auto merged
storage/example/ha_example.cc:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
unittest/mysys/base64-t.c:
  Auto merged
mysql-test/r/innodb_mysql.result:
  manual merge
mysql-test/t/innodb_mysql.test:
  manual merge
mysql-test/valgrind.supp:
  manual merge
sql/event.cc:
  manual merge
sql/ha_heap.cc:
  manual merge
sql/ha_myisam.cc:
  manual merge
sql/ha_ndbcluster.cc:
  manual merge
sql/ha_ndbcluster_binlog.cc:
  manual merge
sql/ha_partition.cc:
  manual merge
sql/handler.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/handler.h:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/item.h:
  automatic merge
sql/item_cmpfunc.cc:
  automatic merge
sql/log_event.cc:
  manual merge
  Trivial cleanup
sql/mysql_priv.h:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/opt_range.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_delete.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_insert.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_load.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_select.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_show.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_table.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/sql_update.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
sql/table.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
storage/blackhole/ha_blackhole.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
storage/csv/ha_tina.cc:
  manual merge
  renamed print_key_dupp_error to print_key_dup_error
mysql-test/valgrind.supp.orig:
  Manual merge
2006-06-04 21:05:22 +03:00
unknown
01d03e7b4b This changeset is largely a handler cleanup changeset (WL#3281), but includes fixes and cleanups that was found necessary while testing the handler changes
Changes that requires code changes in other code of other storage engines.
(Note that all changes are very straightforward and one should find all issues
by compiling a --debug build and fixing all compiler errors and all
asserts in field.cc while running the test suite),

- New optional handler function introduced: reset()
  This is called after every DML statement to make it easy for a handler to
  statement specific cleanups.
  (The only case it's not called is if force the file to be closed)

- handler::extra(HA_EXTRA_RESET) is removed. Code that was there before
  should be moved to handler::reset()

- table->read_set contains a bitmap over all columns that are needed
  in the query.  read_row() and similar functions only needs to read these
  columns
- table->write_set contains a bitmap over all columns that will be updated
  in the query. write_row() and update_row() only needs to update these
  columns.
  The above bitmaps should now be up to date in all context
  (including ALTER TABLE, filesort()).

  The handler is informed of any changes to the bitmap after
  fix_fields() by calling the virtual function
  handler::column_bitmaps_signal(). If the handler does caching of
  these bitmaps (instead of using table->read_set, table->write_set),
  it should redo the caching in this code. as the signal() may be sent
  several times, it's probably best to set a variable in the signal
  and redo the caching on read_row() / write_row() if the variable was
  set.

- Removed the read_set and write_set bitmap objects from the handler class

- Removed all column bit handling functions from the handler class.
  (Now one instead uses the normal bitmap functions in my_bitmap.c instead
  of handler dedicated bitmap functions)

- field->query_id is removed. One should instead instead check
  table->read_set and table->write_set if a field is used in the query.

- handler::extra(HA_EXTRA_RETRIVE_ALL_COLS) and
  handler::extra(HA_EXTRA_RETRIEVE_PRIMARY_KEY) are removed. One should now
  instead use table->read_set to check for which columns to retrieve.

- If a handler needs to call Field->val() or Field->store() on columns
  that are not used in the query, one should install a temporary
  all-columns-used map while doing so. For this, we provide the following
  functions:

  my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set);
  field->val();
  dbug_tmp_restore_column_map(table->read_set, old_map);

  and similar for the write map:

  my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->write_set);
  field->val();
  dbug_tmp_restore_column_map(table->write_set, old_map);

  If this is not done, you will sooner or later hit a DBUG_ASSERT
  in the field store() / val() functions.
  (For not DBUG binaries, the dbug_tmp_restore_column_map() and
  dbug_tmp_restore_column_map() are inline dummy functions and should
  be optimized away be the compiler).

- If one needs to temporary set the column map for all binaries (and not
  just to avoid the DBUG_ASSERT() in the Field::store() / Field::val()
  methods) one should use the functions tmp_use_all_columns() and
  tmp_restore_column_map() instead of the above dbug_ variants.

- All 'status' fields in the handler base class (like records,
  data_file_length etc) are now stored in a 'stats' struct. This makes
  it easier to know what status variables are provided by the base
  handler.  This requires some trivial variable names in the extra()
  function.

- New virtual function handler::records().  This is called to optimize
  COUNT(*) if (handler::table_flags() & HA_HAS_RECORDS()) is true.
  (stats.records is not supposed to be an exact value. It's only has to
  be 'reasonable enough' for the optimizer to be able to choose a good
  optimization path).

- Non virtual handler::init() function added for caching of virtual
  constants from engine.

- Removed has_transactions() virtual method. Now one should instead return
  HA_NO_TRANSACTIONS in table_flags() if the table handler DOES NOT support
  transactions.

- The 'xxxx_create_handler()' function now has a MEM_ROOT_root argument
  that is to be used with 'new handler_name()' to allocate the handler
  in the right area.  The xxxx_create_handler() function is also
  responsible for any initialization of the object before returning.

  For example, one should change:

  static handler *myisam_create_handler(TABLE_SHARE *table)
  {
    return new ha_myisam(table);
  }

  ->

  static handler *myisam_create_handler(TABLE_SHARE *table, MEM_ROOT *mem_root)
  {
    return new (mem_root) ha_myisam(table);
  }

- New optional virtual function: use_hidden_primary_key().
  This is called in case of an update/delete when
  (table_flags() and HA_PRIMARY_KEY_REQUIRED_FOR_DELETE) is defined
  but we don't have a primary key. This allows the handler to take precisions
  in remembering any hidden primary key to able to update/delete any
  found row. The default handler marks all columns to be read.

- handler::table_flags() now returns a ulonglong (to allow for more flags).

- New/changed table_flags()
  - HA_HAS_RECORDS	    Set if ::records() is supported
  - HA_NO_TRANSACTIONS	    Set if engine doesn't support transactions
  - HA_PRIMARY_KEY_REQUIRED_FOR_DELETE
                            Set if we should mark all primary key columns for
			    read when reading rows as part of a DELETE
			    statement. If there is no primary key,
			    all columns are marked for read.
  - HA_PARTIAL_COLUMN_READ  Set if engine will not read all columns in some
			    cases (based on table->read_set)
 - HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS
   			    Renamed to HA_PRIMARY_KEY_REQUIRED_FOR_POSITION.
 - HA_DUPP_POS              Renamed to HA_DUPLICATE_POS
 - HA_REQUIRES_KEY_COLUMNS_FOR_DELETE
			    Set this if we should mark ALL key columns for
			    read when when reading rows as part of a DELETE
			    statement. In case of an update we will mark
			    all keys for read for which key part changed
			    value.
  - HA_STATS_RECORDS_IS_EXACT
			     Set this if stats.records is exact.
			     (This saves us some extra records() calls
			     when optimizing COUNT(*))
			    

- Removed table_flags()
  - HA_NOT_EXACT_COUNT     Now one should instead use HA_HAS_RECORDS if
			   handler::records() gives an exact count() and
			   HA_STATS_RECORDS_IS_EXACT if stats.records is exact.
  - HA_READ_RND_SAME	   Removed (no one supported this one)

- Removed not needed functions ha_retrieve_all_cols() and ha_retrieve_all_pk()

- Renamed handler::dupp_pos to handler::dup_pos

- Removed not used variable handler::sortkey


Upper level handler changes:

- ha_reset() now does some overall checks and calls ::reset()
- ha_table_flags() added. This is a cached version of table_flags(). The
  cache is updated on engine creation time and updated on open.


MySQL level changes (not obvious from the above):

- DBUG_ASSERT() added to check that column usage matches what is set
  in the column usage bit maps. (This found a LOT of bugs in current
  column marking code).

- In 5.1 before, all used columns was marked in read_set and only updated
  columns was marked in write_set. Now we only mark columns for which we
  need a value in read_set.

- Column bitmaps are created in open_binary_frm() and open_table_from_share().
  (Before this was in table.cc)

- handler::table_flags() calls are replaced with handler::ha_table_flags()

- For calling field->val() you must have the corresponding bit set in
  table->read_set. For calling field->store() you must have the
  corresponding bit set in table->write_set. (There are asserts in
  all store()/val() functions to catch wrong usage)

- thd->set_query_id is renamed to thd->mark_used_columns and instead
  of setting this to an integer value, this has now the values:
  MARK_COLUMNS_NONE, MARK_COLUMNS_READ, MARK_COLUMNS_WRITE
  Changed also all variables named 'set_query_id' to mark_used_columns.

- In filesort() we now inform the handler of exactly which columns are needed
  doing the sort and choosing the rows.

- The TABLE_SHARE object has a 'all_set' column bitmap one can use
  when one needs a column bitmap with all columns set.
  (This is used for table->use_all_columns() and other places)

- The TABLE object has 3 column bitmaps:
  - def_read_set     Default bitmap for columns to be read
  - def_write_set    Default bitmap for columns to be written
  - tmp_set          Can be used as a temporary bitmap when needed.
  The table object has also two pointer to bitmaps read_set and write_set
  that the handler should use to find out which columns are used in which way.

- count() optimization now calls handler::records() instead of using
  handler->stats.records (if (table_flags() & HA_HAS_RECORDS) is true).

- Added extra argument to Item::walk() to indicate if we should also
  traverse sub queries.

- Added TABLE parameter to cp_buffer_from_ref()

- Don't close tables created with CREATE ... SELECT but keep them in
  the table cache. (Faster usage of newly created tables).


New interfaces:

- table->clear_column_bitmaps() to initialize the bitmaps for tables
  at start of new statements.

- table->column_bitmaps_set() to set up new column bitmaps and signal
  the handler about this.

- table->column_bitmaps_set_no_signal() for some few cases where we need
  to setup new column bitmaps but don't signal the handler (as the handler
  has already been signaled about these before). Used for the momement
  only in opt_range.cc when doing ROR scans.

- table->use_all_columns() to install a bitmap where all columns are marked
  as use in the read and the write set.

- table->default_column_bitmaps() to install the normal read and write
  column bitmaps, but not signaling the handler about this.
  This is mainly used when creating TABLE instances.

- table->mark_columns_needed_for_delete(),
  table->mark_columns_needed_for_delete() and
  table->mark_columns_needed_for_insert() to allow us to put additional
  columns in column usage maps if handler so requires.
  (The handler indicates what it neads in handler->table_flags())

- table->prepare_for_position() to allow us to tell handler that it
  needs to read primary key parts to be able to store them in
  future table->position() calls.
  (This replaces the table->file->ha_retrieve_all_pk function)

- table->mark_auto_increment_column() to tell handler are going to update
  columns part of any auto_increment key.

- table->mark_columns_used_by_index() to mark all columns that is part of
  an index.  It will also send extra(HA_EXTRA_KEYREAD) to handler to allow
  it to quickly know that it only needs to read colums that are part
  of the key.  (The handler can also use the column map for detecting this,
  but simpler/faster handler can just monitor the extra() call).

- table->mark_columns_used_by_index_no_reset() to in addition to other columns,
  also mark all columns that is used by the given key.

- table->restore_column_maps_after_mark_index() to restore to default
  column maps after a call to table->mark_columns_used_by_index().

- New item function register_field_in_read_map(), for marking used columns
  in table->read_map. Used by filesort() to mark all used columns

- Maintain in TABLE->merge_keys set of all keys that are used in query.
  (Simplices some optimization loops)

- Maintain Field->part_of_key_not_clustered which is like Field->part_of_key
  but the field in the clustered key is not assumed to be part of all index.
  (used in opt_range.cc for faster loops)

-  dbug_tmp_use_all_columns(), dbug_tmp_restore_column_map()
   tmp_use_all_columns() and tmp_restore_column_map() functions to temporally
   mark all columns as usable.  The 'dbug_' version is primarily intended
   inside a handler when it wants to just call Field:store() & Field::val()
   functions, but don't need the column maps set for any other usage.
   (ie:: bitmap_is_set() is never called)

- We can't use compare_records() to skip updates for handlers that returns
  a partial column set and the read_set doesn't cover all columns in the
  write set. The reason for this is that if we have a column marked only for
  write we can't in the MySQL level know if the value changed or not.
  The reason this worked before was that MySQL marked all to be written
  columns as also to be read. The new 'optimal' bitmaps exposed this 'hidden
  bug'.

- open_table_from_share() does not anymore setup temporary MEM_ROOT
  object as a thread specific variable for the handler. Instead we
  send the to-be-used MEMROOT to get_new_handler().
  (Simpler, faster code)



Bugs fixed:

- Column marking was not done correctly in a lot of cases.
  (ALTER TABLE, when using triggers, auto_increment fields etc)
  (Could potentially result in wrong values inserted in table handlers
  relying on that the old column maps or field->set_query_id was correct)
  Especially when it comes to triggers, there may be cases where the
  old code would cause lost/wrong values for NDB and/or InnoDB tables.

- Split thd->options flag OPTION_STATUS_NO_TRANS_UPDATE to two flags:
  OPTION_STATUS_NO_TRANS_UPDATE and OPTION_KEEP_LOG.
  This allowed me to remove some wrong warnings about:
  "Some non-transactional changed tables couldn't be rolled back"

- Fixed handling of INSERT .. SELECT and CREATE ... SELECT that wrongly reset
  (thd->options & OPTION_STATUS_NO_TRANS_UPDATE) which caused us to loose
  some warnings about
  "Some non-transactional changed tables couldn't be rolled back")

- Fixed use of uninitialized memory in ha_ndbcluster.cc::delete_table()
  which could cause delete_table to report random failures.

- Fixed core dumps for some tests when running with --debug

- Added missing FN_LIBCHAR in mysql_rm_tmp_tables()
  (This has probably caused us to not properly remove temporary files after
  crash)

- slow_logs was not properly initialized, which could maybe cause
  extra/lost entries in slow log.

- If we get an duplicate row on insert, change column map to read and
  write all columns while retrying the operation. This is required by
  the definition of REPLACE and also ensures that fields that are only
  part of UPDATE are properly handled.  This fixed a bug in NDB and
  REPLACE where REPLACE wrongly copied some column values from the replaced
  row.

- For table handler that doesn't support NULL in keys, we would give an error
  when creating a primary key with NULL fields, even after the fields has been
  automaticly converted to NOT NULL.

- Creating a primary key on a SPATIAL key, would fail if field was not
  declared as NOT NULL.


Cleanups:

- Removed not used condition argument to setup_tables

- Removed not needed item function reset_query_id_processor().

- Field->add_index is removed. Now this is instead maintained in
  (field->flags & FIELD_IN_ADD_INDEX)

- Field->fieldnr is removed (use field->field_index instead)

- New argument to filesort() to indicate that it should return a set of
  row pointers (not used columns). This allowed me to remove some references
  to sql_command in filesort and should also enable us to return column
  results in some cases where we couldn't before.

- Changed column bitmap handling in opt_range.cc to be aligned with TABLE
  bitmap, which allowed me to use bitmap functions instead of looping over
  all fields to create some needed bitmaps. (Faster and smaller code)

- Broke up found too long lines

- Moved some variable declaration at start of function for better code
  readability.

- Removed some not used arguments from functions.
  (setup_fields(), mysql_prepare_insert_check_table())

- setup_fields() now takes an enum instead of an int for marking columns
   usage.

- For internal temporary tables, use handler::write_row(),
  handler::delete_row() and handler::update_row() instead of
  handler::ha_xxxx() for faster execution.

- Changed some constants to enum's and define's.

- Using separate column read and write sets allows for easier checking
  of timestamp field was set by statement.

- Remove calls to free_io_cache() as this is now done automaticly in ha_reset()

- Don't build table->normalized_path as this is now identical to table->path
  (after bar's fixes to convert filenames)

- Fixed some missed DBUG_PRINT(.."%lx") to use "0x%lx" to make it easier to
  do comparision with the 'convert-dbug-for-diff' tool.


Things left to do in 5.1:

- We wrongly log failed CREATE TABLE ... SELECT in some cases when using
  row based logging (as shown by testcase binlog_row_mix_innodb_myisam.result)
  Mats has promised to look into this.

- Test that my fix for CREATE TABLE ... SELECT is indeed correct.
  (I added several test cases for this, but in this case it's better that
  someone else also tests this throughly).
  Lars has promosed to do this.


BitKeeper/etc/ignore:
  added mysys/test_bitmap
include/base64.h:
  Removed my_global.h, as this must be included first in any program
include/heap.h:
  Added heap_reset() (Required by new handler interface)
include/my_base.h:
  Removed HA_EXTRA_RESET. MySQL will now call ::reset() instead of ::extra(HA_EXTRA_RESET).
  HA_EXTRA_RETRIVE_ALL_COLS and HA_EXTRA_RETRIVE_PRIMARY key are deleted as the column bitmaps makes these unnecessary
include/my_bitmap.h:
  Remove my_pthread.h (should be included at upper level)
  Introduced my_bitmap_map typedef to make it the bitmap handling more like a black box
  Added bitmap_is_overlapping(), bitmap_test_and_clear(), bitmap_copy() and bitmap_cmp()
  Made bitmap_set_bit(), bitmap_flip_bit(), bitmap_clear_bit() return void
include/myisam.h:
  Added mi_reset() (Required by new handler interface)
include/myisammrg.h:
  Added myrg_reset() (Required by new handler interface)
include/mysql_com.h:
  Added flag FIELD_IN_ADD_INDEX to be able to remove Field->add_index
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
  Added testing of CREATE ... SELECT in a mixed environment
  (This found some bugs that Mats is going to fix shortly)
mysql-test/install_test_db.sh:
  Simplify ldata usage
  Added --tmpdir=. option to mysqld bootstrap (Removed some warnings when TMPDIR was wrongly set)
mysql-test/mysql-test-run.pl:
  Added --tmpdir=. to bootstrap
mysql-test/mysql-test-run.sh:
  Use copy instead of INSTALL_DB for master and slave databases.
  (Speeds up startup time a lot!)
  Remove snapshot directories at startup (removes some strange warnings)
mysql-test/r/binlog_row_mix_innodb_myisam.result:
  Added testing of CREATE ... SELECT in a mixed environment
  (This found some bugs that Mats is going to fix shortly)
mysql-test/r/binlog_stm_mix_innodb_myisam.result:
  Added testing of CREATE ... SELECT in a mixed environment
mysql-test/r/create.result:
  Some extra tests of warnings and number of tables opened by CREATE ... SELECT
mysql-test/r/federated.result:
  Drop some left over tables
  Added testing of multiple table update and multiple table delete (with and without keys)
mysql-test/r/func_gconcat.result:
  Enable some disabled tests (converted them slightly to be predictable)
mysql-test/r/func_time.result:
  Added drop of test function
mysql-test/r/innodb_mysql.result:
  Added tests for CREATE ... SELECT
mysql-test/r/insert.result:
  More tests
  Added testing of duplicate columns in insert
mysql-test/r/loaddata.result:
  Added testing LOAD DATA ... SET ...
mysql-test/r/multi_update.result:
  Test multi updates and deletes using primary key and without
mysql-test/r/ndb_index_unique.result:
  Better error message
mysql-test/r/ndb_replace.result:
  New correct result after fixing REPLACE handling with NDB
mysql-test/r/rpl_ddl.result:
  Now we don't get these (wrong) warnings anymore
mysql-test/r/view_grant.result:
  Drop used views
mysql-test/t/create.test:
  Some extra tests of warnings and number of tables opened by CREATE ... SELECT
mysql-test/t/federated.test:
  Drop some left over tables
  Added testing of multiple table update and multiple table delete (with and without keys)
mysql-test/t/func_gconcat.test:
  Enable some disabled tests (converted them slightly to be predictable)
mysql-test/t/func_time.test:
  Added drop of test function
mysql-test/t/innodb_mysql.test:
  Added tests for CREATE ... SELECT
mysql-test/t/insert.test:
  More tests
  Added testing of duplicate columns in insert
mysql-test/t/loaddata.test:
  Added testing LOAD DATA ... SET ...
mysql-test/t/multi_update.test:
  Test multi updates and deletes using primary key and without
mysql-test/t/view_grant.test:
  Drop used views
mysql-test/valgrind.supp:
  Added supression of not needed warnings when printing stack trace
mysys/base64.c:
  Include my_global.h first
mysys/my_bitmap.c:
  Added bitmap_is_overlapping(), bitmap_test_and_clear() and bitmap_copy()
  Changed logic of bitmap handling to be a bit more efficent (Did this together with Mikael Ronström)
  Now the 'extra, not used bits' in the bitmap are assumed to have a 'random value' and the bitmap functions are free to change them whenever needed.
  Changed how mutex is allocated to make 'bitmap_free()' function simpler.
mysys/thr_lock.c:
  Added 0x before thread pointers (for easier comparison of DBUG traces)
sql/event.cc:
  Ensure 'use_all_columns()' is used for event tables
  Don't print warning that event table is damaged if it doesn't exists.
sql/field.cc:
  Added ASSERT_COLUMN_MARKED_FOR_WRITE in all store() methods and ASSERT_COLUMN_MARKED_FOR_READ in all val() methods to catch wrong setting if table->read_set and table->write_set
  (Rest of changes are only indentation cleanups)
sql/field.h:
  Removed Field->query_id (replaced by table->read_set and table->write_set)
  Removed Field->fieldnr (use Field->field_index instead)
  Removed Field->add_index (Use Field->flags instead)
  Add Field->part_of_key_not_clustered (for usage in opt_range.cc)
sql/filesort.cc:
  Added paramater sort_postion to filesort() to force sorting by position instead of storing all fields in the result set.
  This allowed me to remove checking of sql_command.
  Create a temporary column bitmap for fields that are used by the sorting process.
  Use column bitmaps instead of query_id
sql/ha_berkeley.cc:
  Update to 'newer' table handler interface
sql/ha_berkeley.h:
  Update to 'newer' table handler interface
sql/ha_federated.cc:
  Update to 'newer' table handler interface
  Only read columns that are needed from remote server.
  In case of eq ranges, don't generate two conditions in the WHERE clause
  (this can still be optimized, but would require a bigger code change)
  Use 'simpler to use' XXXX_LEN' macros
  A bit simpler logic in ::write_row() when creating statements.
  In update, only include test of fields actually read.
  (This greatly simplifies the queries sent by the federated engine)
  Similar changes done for delete_row()
sql/ha_federated.h:
  Update to 'newer' table handler interface
  Changed XXX_LEN macros to use sizeof(...)-1, to simplify usage in ha_federated.cc
  Added HA_PRIMARY_KEY_REQUIRED_FOR_DELETE to tell MySQL to read all primary key columns in case of DELETE
sql/ha_heap.cc:
  Update to 'newer' table handler interface
sql/ha_heap.h:
  Update to 'newer' table handler interface
sql/ha_innodb.cc:
  Update to 'newer' table handler interface
  - Update innobase_create_handler() to new interface
  - Removed HA_NOT_EXACT_COUNT (not needed)
  - Renamed HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS to HA_PRIMARY_KEY_REQUIRED_FOR_POSITION.
  - Prefixed base status variables with 'stats'
  - Use table column bitmaps instead of ha_get_bit_in_read_set()
  - Added ::reset(), with code from ::extra(HA_EXTRA_RESET)
  - Removed HA_EXTRA_RETRIVE_ALL_COLS and HA_EXTRA_RETRIEVE_PRIMARY_KEY as
    the table->read_set and table->write_set bitmaps now are accurate
sql/ha_innodb.h:
  Update to 'newer' table handler interface
  - table_flags are now ulonglong
  - Added reset() method
  - Removed not needed ha_retrieve_all_cols() and ha_retrieve_all_pk() columns.
  - Made build_template() a class function to be able to easier access class variables
sql/ha_myisam.cc:
  Update to 'newer' table handler interface
sql/ha_myisam.h:
  Update to 'newer' table handler interface
sql/ha_myisammrg.cc:
  Update to 'newer' table handler interface
sql/ha_myisammrg.h:
  Update to 'newer' table handler interface
sql/ha_ndbcluster.cc:
  Update to 'newer' table handler interface
  Fixed use_blob_value() to be accurate
  In ::complemented_read() we have to check both the read and write bitmap as the old code did mark all changed columns also in the read map
  Correct dumping of field data with DBUG_DUMP
  Prefix addresses in DBUG_PRINT with 0x
  Fixed usage of not initialized memory
  Update to use field->flags & FIELD_IN_ADD_INDEX instead of field->add_index.
sql/ha_ndbcluster.h:
  Update to 'newer' table handler interface
sql/ha_ndbcluster_binlog.cc:
  Mark usage of all columns in ndbcluster binlog tables
  false -> FALSE, true -> TRUE
  Use table->s->all_set instead of creating a temporary bitmap.
sql/ha_partition.cc:
  Update to 'newer' table handler interface
  Added memroot to initialise_partitions() and related functions to get faster memory allocation.
  partition_create_handler() is now responsible for initialisation of the partition object
  Some trivial optimizations and indentation fixes
  Ensure that table_flags() are up to date
  Removed documentation for removed HA_EXTRA flags
  Fixed 'strange' usage of m_file[i] in new_handlers_from_part_info()that worked in current code 'by chance'
sql/ha_partition.h:
  Update to 'newer' table handler interface
sql/handler.cc:
  create_xxx handler now takes MEMROOT as an argument to simplify memory allocation.
  Much simpler get_new_handler()
  (Initialization of the object is now handled by the create method for the engine)
  Moved all allocation of bitmap handling to the TABLE object (in table.cc)
  Added column_bitmaps_signal() to signal column usage changes.
  Changed binlog_log_row() to use the exiusting all_set bitmap in the table object.
  Added ha_reset() function to test that the file object is ok at end of statement and call handler::reset()
  Added use_hidden_primary_key() to signal handler that we we are going to read and update + delete the row and the handler should thus remember the position for the row
sql/handler.h:
  Added HA_NO_TRANSACTIONS, HA_PARTIAL_COLUMN_READ, HA_REQUIRES_KEY_COLUMNS_FOR_DELETE,HA_PRIMARY_KEY_REQUIRED_FOR_DELETE and HA_HAS_RECORDS
  Removed HA_NOT_EXACT_COUNT, HA_READ_RND_SAME
  HA_DUPP_POS -> HA_DUPLICATE_POS
  HA_NOT_EXACT_COUNT replaced by HA_STATS_RECORDS_IS_EXACT, HA_HAS_RECORDS and records()
  HA_PRIMARY_KEY_ALLOW_RANDOM_ACCESS renamed to HA_PRIMARY_KEY_REQUIRED_FOR_POSITION
  Added future row type 'ROW_TYPE_PAGES'
  Added MEM_ROOT to handlerton 'create' function
  Added ha_statistics, a structure for all status variable in the base handler class.
  Moved all status variables in the handler class into a stats structs to improve readability.
  ha_table_flags() is now a cached (not virtual) version of table_flags()
  reset() doesn't anymore call extra(HA_EXTRA_RESET) but is a function of it's own.
  Renamed dupp_ref to dup_ref
  Renamed not used handler::sortkey
  Moved read_set and write_set to TABLE structure
  handler::init() function added for cacheing of virtual constants from engine.
sql/item.cc:
  Added register_field_in_read_map() for marking used columns in expression.
  This is used by filesort() for creating an optimal column bitmap while retrieving columns for sorting.
  Initalize value.cs_info.character_set_client to fix core dump bug with --debug
  set_query_id -> mark_used_columns
  Mark used columns in read_set OR write_set.
sql/item.h:
  Removed reset_query_id_processor() as it's not needed anymore.
  Added register_field_in_read_map()
  Added extra argument to Item::walk() to indicate if we should also
  traverse sub queries.
sql/item_cmpfunc.cc:
  Temporary mark used columns to be read/writable
  Update Item::walk to new interface
sql/item_cmpfunc.h:
  Added extra argument to Item::walk() to indicate if we should also traverse sub queries.
sql/item_func.cc:
  Update Item::walk() to new interface
  table_flags() -> ha_table_flags()
sql/item_func.h:
  Update Item::walk() to new interface
sql/item_row.cc:
  Update Item::walk() to new interface
sql/item_row.h:
  Update Item::walk() to new interface
sql/item_strfunc.h:
  Update Item::walk() to new interface
sql/item_subselect.cc:
  Added Item_subselect::walk()
  (It was a bug it was missing before. Not sure what kind of bugs this could have caused)
sql/item_subselect.h:
  Update Item::walk() to new interface
sql/item_sum.cc:
  Update Item::walk() to new interface
  Updates for new handler interace
sql/item_sum.h:
  Update Item::walk() to new interface
sql/key.cc:
  Updates for new handler interace
sql/log.cc:
  Mark all columns used for log tables
  Split options flag
  Ensured that second argument to trans_register_ha is a bool
sql/log_event.cc:
  Fixed comments to be withing 79 characters
  Use OPTION_KEEP_LOG instead of OPTION_STATUS_NO_TRANS_UPDATE to remove wrong warnings
  Updates for new handler interface
  Use 0x%lx instead of %p (portability problem)
sql/mysql_priv.h:
  Added OPTION_KEEP_LOG to indicate that we should replicate the binlog even on rollback
  Removed not used 'conds' argument to setup_tables
sql/mysqld.cc:
  Indentation fixes and removed old comment
sql/opt_range.cc:
  Update to new handler and bitmap interface.
  Fixed calls to cp_buffer_from_ref() and walk() (new argument).
  Create new temporary bitmaps for ror scans.
  (Needed because of handler changes and to get more accurate column bitmaps than before)
  Remove not needed file->ha_reset() call before file->close().
  Some trivial optimization and indentation fixes.
  Use Field->part_of_key_not_clustered() to check if field is part of a key, instead of looping over all key parts.
  
  Added flag 'in_ror_merged_scan' to allow ::get_next() to know that we need a special column bitmap to only fetch pointer to record.
  This is needed because ror scan uses the same TABLE object but different file objects, which creates problem for the column bitmap handling.
  (This is a temporary solution. A better one would be to allocate an own TABLE object for ROR scans)
  
  Optimized bitmap handling in ror scans:
  - Start bitmap at position 0, not 1
  - Use same bitmap size as in TABLE
  - Use table->read_set and table->write_set to create column bitmaps instead of looping over all fields in table
sql/opt_range.h:
  Added 'in_ror_merged_scan' to indicate if we are doing a ROR scan
  Added temporary column bitmaps used in ROR scans
sql/opt_sum.cc:
  Added get_ext_record_count() which is used in COUNT() optimization if handler has HA_HAS_RECORDS
  Note that we don't call this if handler has HA_STATS_RECORDS_IS_EXACT set.
sql/protocol.cc:
  We need to mark columns as readable in ::store() as we sometimes return default value for fields to the user
sql/records.cc:
  Updates for new handler interface
sql/set_var.cc:
  Handle splitting OPTION_STATUS_NO_TRANS_UPDATE to two flags
sql/share/errmsg.txt:
  Fixed wrong
sql/sp.cc:
  Mark that we are using all columns for the proc table
  Update call to setup_tables() to use new prototype
sql/sp_head.cc:
  Removed QQ comment
sql/spatial.cc:
  Removed wrong QQ comment
sql/sql_acl.cc:
  Mark that we need all columns for acl tables
  Supply memroot to some 'new' calls.
  Indentation fixes
sql/sql_base.cc:
  set_query_id removed
  Ensure we call ha_reset() at end of each statement
  Mark read columns in read_set and changed columns in write_set (Before all columns was marked in read set)
  Fixed marking of some columns that was not proplerly marked before
  Maintain in TABLE->merge_keys set of all keys that are used in some way
  Removed not used 'conds' argument from setup_tables()
  Remove not used setting of 'dupp_field' in insert_fields()
  Added missing FN_LIBCHAR in mysql_rm_tmp_tables()
  (This has probably caused us to not properly remove temporary files after crash)
sql/sql_bitmap.h:
  Added is_overlapping()
sql/sql_class.cc:
  Slow_logs was not properly initialized, which could maybe cause extra/lost entries in slow log.
  set_query_id -> mark_used_columns
  Simpler variable usage in pack_row()  (cleanup)
  Moved some variable declartion at start of function for better code readability
sql/sql_class.h:
  Added enum_mark_columns
  Updated comments
  Renamed dupp_field -> dup_field
  Added virtual function 'can_rollback_data()' to select_insert() to be used in CREATE ... SELECT to optimize use of OPTION_STATUS_NO_TRANS_UPDATE.
  (This fixes a bug in CREATE ... SELECT where we did give wrong warnings when using non transacational tables)
sql/sql_delete.cc:
  Updates to new handler interface
  Call table->mark_columns_needed_for_delete() to allow us to put additional columns in column usage maps if handler so requires.
  Call table->prepare_for_position() to tell handler that we are going to call ha_position().
  Removed call to free_io_cache(). (io_cache is now removed in ha_reset()).
  Fixed calls to setup_tables()
sql/sql_do.cc:
  Update call to setup_fields()
sql/sql_handler.cc:
  Tell handler tables to always read all columns.
  Use temporary column map when storing value in field for later index usage
sql/sql_help.cc:
  Makr all used fields to be read
  Update call to setup_fields()
sql/sql_insert.cc:
  Tell handler we are going to update the auto_increment column
  dupp_field -> dup_field
  Set column usage bits for timestamp field.
  Call table->mark_columns_needed_for_insert() and table->mark_auto_increment_column()
  Removed not used argument from mysql_prepare_insert_check_table().
  
  If we get an duplicate row on insert, change column map to read and write all columns while retrying the operatation.
  This is required by the definition of REPLACE and also ensures that fields that are only part of UPDATE are properly handled.
  This fixed a bug in NDB and REPLACE where REPLACE wrongly copied some column values from the replaced row.
  
  Setup new bitmaps for delayed insert rows
  Remove reseting of next_number_fields as it will be reset on next call to handler_insert()
  
  Fixed usage of thd->options and OPTION_STATUS_NO_TRANS_UPDATE.
  The issue was that one should not to reset this flag as it may be set by a previous statement.
  The way it was now used caused us to loose some warnings and get other wrong warnings when using non transactional tables mixed with transactional.
  I fixed it by introducing 'select_insert::can_rollback_data' to inform send_error() that the given statement can be rolled back (which in case of CREATE TABLE can always be done)
  Don't close tables created with CREATE ... SELECT but keep them in the table cache.
  
  Moved out MY_HOOKS from inside function (better readability)
sql/sql_load.cc:
  Update to use new handler and column marking interface
  Update using setup_tables()
sql/sql_olap.cc:
  Update calls to setup_tables
  Use enums instead of constants to setup_fields()
sql/sql_parse.cc:
  Handle OPTION_KEEP_LOG:
  - Set it on CREATE TEMPORARY TABLE / DROP TABLE
  - Reset it when OPTION_STATUS_NO_TRANS_UPDATE is reset
  - Don't set it for CREATE ... SELECT (this is handled in select_create class)
  Remove reseting of OPTION_STATUS_NO_TRANS_UPDATE in begin_trans() as this should already be reset.
  If in autocommit mode, reset OPTION_KEEP_LOG and OPTION_STATUS_NO_TRANS_UPDATE to not give warnings in future commands
sql/sql_partition.cc:
  Update walk() usage
  Trivial indentation fixes
sql/sql_plugin.cc:
  Mark all columns as used for plugins
sql/sql_prepare.cc:
  Added assert to find out hidden bugs in character_set_client (got an error in debug binary when this not set correctly)
  Updates for new handler interface
  Update calls to setup_fields()
sql/sql_repl.cc:
  Indentation fixes
sql/sql_select.cc:
  Update call to setup_tables() and setup_fields()
  Remove some old disabled code
  Update to new hadler interface
  Indentation cleanups
  Added column bitmaps for temporary tables.
  Remove updating of the removed slots in the Field class
  Added TABLE argument to cp_buffer_from_ref() (To be able to install temporary column maps)
  For internal temporary tables, use handler::write_row(), handler::delete_row() and handler::update_row() instead of handler::ha_xxxx() for faster execution.
sql/sql_select.h:
  Indentaition fixes.
  Install temporary column usage maps when needed
  Added TABLE element to cp_buffer_from_ref()
sql/sql_show.cc:
  Update to new handler interface
  Mark all columns used for internal tables.
  Style fixes.
  Added support for 'future' ROW_TYPE_PAGES.
  Don't allocate TMP_TABLE_PARAM with calloc. The 'init()' function will initialize the structure properly.
sql/sql_table.cc:
  Update to new handler interface
  Simple my_snprintf -> strmake()
  Changed some constants to defines
  Don't test for NULL in primary key (as we a couple of line above force the PRIMARY KEY to be NOT NULL)
  Change field->add_index to use field->flags & FIELD_IN_ADD_INDEX
  Mark all columns as used for ALTER TABLE
  Style fixes
  Update call to filesort()
sql/sql_trigger.h:
  Added friend functions to be able to test if triggers exists for table we are going to insert/update or delete in.
sql/sql_udf.cc:
  Mark all columns as used for udf system table.
sql/sql_union.cc:
  Update call to walk()
  Update to new handler interface
sql/sql_update.cc:
  Remove query_id argument from compare_record()
  Use column bitmaps instead of query_id.
  We can't use compare_records() to skip updates for handlers that returns a partial column set and the read_set doesn't cover all columns in the write set, because compare_record() can't in this case know if a not read column changed value.
  Update call to setup_fields()
  Using separate column read and write sets allows for easier checking of timestamp field was set by statement.
  Removed call to free_io_cache() as this is now done in ha_reset()
  Call table->mark_columns_needed_for_update() and table->prepare_for_position()
  Style fixes
sql/sql_view.cc:
  Style fixes
sql/table.cc:
  Remove implicitely include 'errno.h'
  Remove code for building normalized path, as this is now identical to 'path'
  Remove field->fieldnr
  Added update of field->part_of_key_not_clustered()
  Create column bitmaps in TABLE and TABLE_SHARE
  Don't setup a temporary MEM_ROOT object as a thread specific variable for the handler. Instead we send the to-be-used MEMROOT to get_new_handler()
  Update to new handler interface
  Update call to walk()
  Added new functions:
  - st_table::clear_column_bitmaps()
  - st_table::prepare_for_position()
  - st_table::mark_columns_used_by_index()
  - st_table::restore_column_maps_after_mark_index()
  - st_table::mark_columns_used_by_index_no_reset()
  - st_table::mark_auto_increment_column()
  - st_table::mark_columns_needed_for_delete()
  - st_table::mark_columns_needed_for_update()
  - st_table::mark_columns_needed_for_insert()
sql/table.h:
  Moved column usage bitmaps from handler to TABLE
  Added to TABLE_SHARE all_set and column_bitmap_size
  Added to TABLE merge_keys, bitmap_init_values, def_read_set, def_write_set, tmp_set, read_set and write_set.
  Declared all new table column bitmap functions
  Added TABLE functions column_bitmaps_set(), column_bitmaps_set_no_signal(), use_all_columns() and default_column_bitmaps()
  Added functions: tmp_use_all_columns() and tmp_restore_column_map() to temporarly switch column bitmaps
  Added functions: dbug_tmp_use_all_columns() and dbug_tmp_restore_column_map() to temporarly switch column bitmaps to avoid asserts in Field::store() and Field::val().
sql/tztime.cc:
  Mark all columns as used for timezone tables
storage/archive/ha_archive.cc:
  Update to new handler interface
storage/archive/ha_archive.h:
  Update to new handler interface
storage/blackhole/ha_blackhole.cc:
  Update to new handler interface
storage/blackhole/ha_blackhole.h:
  Update to new handler interface
  removed not needed flag HA_DUPP_POS
storage/csv/ha_tina.cc:
  Update to new handler interface
storage/csv/ha_tina.h:
  Update to new handler interface
storage/example/ha_example.cc:
  Update to new handler interface
storage/example/ha_example.h:
  Update to new handler interface
storage/heap/hp_extra.c:
  Added heap_reset() (Required by new handler interface)
storage/heap/hp_test2.c:
  Use heap_reset()
storage/myisam/ft_boolean_search.c:
  Fixed compiler warning
storage/myisam/mi_extra.c:
  Added mi_reset() (Required by new handler interface)
storage/myisam/mi_search.c:
  Fixed DBUG_PRINT messages to use 0x%lx instead of %lx
storage/myisam/mi_test2.c:
  Use mi_reset()
storage/myisam/myisampack.c:
  Use mi_reset()
storage/myisammrg/myrg_extra.c:
  Added myrg_reset() (Required by new handler interface)
unittest/mysys/base64.t.c:
  Include my_global.h
  Don't include implictely include file 'stdlib.h'
2006-06-04 18:52:22 +03:00
unknown
6ccab8d4de BUG#19055: There may exist a SEL_TREE objects with type==KEY and keys[i]==NULL for any i.
(for example, such objects can be returned from get_mm_parts() for "string_field = int_val).
Make find_used_partitions_imerge() to handle such SEL_TREE objects.


mysql-test/r/partition_pruning.result:
  BUG#19055: testcase
mysql-test/t/partition_pruning.test:
  BUG#19055: testcase
2006-06-04 17:17:37 +04:00
unknown
b05628d21b Merge mysql.com:/home/kgeorge/mysql/4.1/B4981
into  mysql.com:/home/kgeorge/mysql/5.0/B4981


mysql-test/t/select.test:
  Auto merged
sql/opt_range.cc:
  Auto merged
mysql-test/r/select.result:
  merged
2006-06-02 15:35:40 +03:00
unknown
3390eaa085 Bug #4981: 4.x and 5.x produce non-optimal execution path,
3.23 regression test failure

The member SEL_ARG::min_flag was not initialized, 
due to which the condition for no GEOM_FLAG in function 
key_or did not choose "Range checked for each record" as 
the correct access method.


mysql-test/r/select.result:
  testcase for 'Range checked' access method
mysql-test/t/select.test:
  testcase for 'Range checked' access method
sql/opt_range.cc:
  All of the class members initialized
2006-06-02 12:04:03 +03:00
unknown
dde7a7c28f Merge mysql.com:/home/psergey/tmp_merge
into  mysql.com:/home/psergey/mysql-5.1-merge


include/my_sys.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
2006-05-19 16:00:29 +04:00
unknown
545ce85795 BUG#19618: post-review fixes: better comments 2006-05-16 13:39:03 +04:00
unknown
e5838e160b BUG#19618: Crash for unsigned_col NOT IN (-1, ... )
- When manually constructing a SEL_TREE for "t.key NOT IN(...)", take into account that 
  get_mm_parts may return a tree with type SEL_TREE::IMPOSSIBLE
- Added missing OOM checks
- Added comments


mysql-test/r/func_in.result:
  Testcase for BUG#19618
mysql-test/t/func_in.test:
  Testcase for BUG#19618
2006-05-15 14:18:23 +04:00
unknown
44de69cfdd Merge mysql.com:/home/psergey/tmp_merge3
into  mysql.com:/home/psergey/mysql-5.1-merge2


mysql-test/r/select.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/opt_range.cc:
  Manual merge
2006-05-13 22:40:26 +04:00
unknown
3fa6432b09 BUG#17379 Wrong reuse of E(#rows(range)) as E(#rows(ref(const))):
Re-work best_access_path() and find_best() to reuse E(#rows(range access)) as
E(#rows(ref[_or_null](const) access) only when it is appropriate.
[This is the final cumulative patch]


mysql-test/r/select.result:
  BUG#17379: Testcase
mysql-test/r/subselect.result:
  BUG#17379: Updated test results
mysql-test/t/select.test:
  BUG#17379: Testcase
sql/opt_range.cc:
  BUG#17379: Wrong reuse of E(#rows(range)) as E(#rows(ref(const))):
  Make range optimizer together with TABLE::quick_* also return TABLE::quick_n_ranges
sql/sql_select.cc:
  BUG#17379: Wrong reuse of E(#rows(range)) as E(#rows(ref(const))):
  Re-work best_access_path() to reuse E(#rows(range access)) as
  E(#rows(ref[_or_null](const) access) only when it is appropriate.
sql/table.h:
  BUG#17379: Wrong reuse of E(#rows(range)) as E(#rows(ref(const))):
  Make range optimizer together with TABLE::quick_* also return TABLE::quick_n_ranges
2006-05-10 17:40:20 +04:00
unknown
ba71026e03 fix HA_ERR_RECORD_DELETED for falcon 2006-05-09 15:14:29 -04: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
15e00f1f3d BUG#15872: Don't run the range analyzer on "t1.keypart NOT IN (const1, ..., )", as that consumes
too much memory. Instead, either create the equvalent SEL_TREE manually, or create only two ranges that
strictly include the area to scan
(Note: just to re-iterate: increasing NOT_IN_IGNORE_THRESHOLD will make optimization run slower for big 
IN-lists, but the server will not run out of memory. O(N^2) memory use has been eliminated)


mysql-test/r/func_in.result:
  Testcase for BUG#15872
mysql-test/t/func_in.test:
  Testcase for BUG#15872
sql/item.cc:
  BUG#15872: Added Item_decimal::set_decimal_value()
sql/item.h:
  UG#15872: Added Item_decimal::set_decimal_value()
sql/item_cmpfunc.h:
  BUG#15872: Added in_vector::create_item(), in_vector::value_to_item() and their implementations in concrete
  classes.
sql/opt_range.cc:
  BUG#15872: Don't run the range analyzer on "t1.keypart NOT IN (const1, ..., )", as that 
  consumes too much memory. Instead, either 
   A) create the equivalent SEL_TREE manually, making use of the fact that item_not_in->array
      has an ordered IN-list, or
   B) create only two ranges: (-inf|NULL) < X < min_value_from_in_list,  max_value_from_in_list < X
  (Choose #B if the IN-list has > 10K elements)
2006-04-25 23:33:31 +04:00
unknown
17e3ee3553 Merge rurik.mysql.com:/home/igor/tmp_merge
into  rurik.mysql.com:/home/igor/dev/mysql-5.1-2


mysql-test/r/index_merge_innodb.result:
  Auto merged
sql/opt_range.cc:
  Auto merged
2006-04-20 17:00:29 -07:00
unknown
c89555edcc BUG#19021, Crash in ROR-index_merge optimizer:
get_best_covering_ror_intersect() was copying ror_scans starting from the 
end of the array and not from its beginning.


mysql-test/r/index_merge_innodb.result:
  Testcase for BUG#19021
mysql-test/t/index_merge_innodb.test:
  Testcase for BUG#19021
sql/opt_range.cc:
  BUG#19021: In get_best_covering_ror_intersect(), the array of pointers to
  scans to be used is [tree->ror_scans, ror_scan_mark), and not
  [ror_scan_mark, ...)
2006-04-13 16:05:32 +04:00
unknown
c992a1f7bb Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/home/psergey/mysql-5.1-bug18558-pnd


sql/opt_range.cc:
  Auto merged
2006-04-06 21:26:23 +04:00
unknown
4d1666f6b8 BUG#18558 "Partition pruning results are incorrect for certain class of WHERE clauses" :
* Produce right results for conditions that were transformed to "(partitioning_range) AND
  (list_of_subpartitioning_ranges)": make each partition id set iterator auto-reset itself
  after it has returned all partition ids in the sequence 
* Fix "Range mapping" and "Range mapping" partitioning interval analysis functions to 
  correctly deal with NULL values. 


mysql-test/r/partition_pruning.result:
  Testcase for BUG#18558
mysql-test/t/partition_pruning.test:
  Testcase for BUG#18558
sql/opt_range.cc:
  BUG#18558: Move partition set iterator initialization to sql_partition.cc, comment fixes
sql/partition_info.h:
  BUG#18558: Make each partition set iterator auto-reset itself after it has returned all 
  partition ids in the set it enumerates.
sql/sql_partition.cc:
  BUG#18558: 
  - Make each partition set iterator auto-reset itself after it has returned all 
    partition ids in the set it enumerates. 
  - Fix partition interval analysis to correctly handle intervals with one or both
    NULL bounds.
sql/sql_partition.h:
  BUG#18558: 
   - Make each partition set iterator auto-reset itself after it has returned all 
     partition ids in the set it enumerates. 
   - Rename PARTITION_ITERATOR::has_null_value to ret_null_part
2006-04-06 21:23:33 +04:00
unknown
7b61256f68 Merge mysql.com:/home/timka/mysql/src/5.0-tmp-merge
into  mysql.com:/home/timka/mysql/src/5.1-merge


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
2006-04-04 14:35:17 +03:00
unknown
dc05f1954f Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/home/psergey/mysql-5.1-bug18025-r2


sql/opt_range.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
2006-03-31 15:20:00 +04:00
unknown
457510903f Fix for BUG#18025: Wrong query results because of bugs in partition pruning:
- Fix typo bug in SEL_ARG::is_singlepoint()
 - In set_up_range_analysis_info(), treat MEDIUMINT as enumerable type just like other integer types


mysql-test/r/partition_pruning.result:
  Testcase for BUG#18025
mysql-test/t/partition_pruning.test:
  Testcase for BUG#18025
sql/opt_range.cc:
  BUG#18025: Fix a typo bug in SEL_ARG::is_singlepoint()
sql/sql_partition.cc:
  BUG#18025: In set_up_range_analysis_info(), treat MEDIUMINT as enumerable type just like other integer types.
2006-03-31 15:17:15 +04:00
unknown
085aa5c99e Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into  mysql.com:/home/timka/mysql/src/5.0-bug-16710


mysql-test/r/group_min_max.result:
  Auto merged
mysql-test/t/group_min_max.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
2006-03-31 12:39:33 +03:00
unknown
a01d48f92e Fix for BUG#16710.
The bug was due to a missed case in the detection of whether an index
can be used for loose scan. More precisely, the range optimizer chose
to use loose index scan for queries for which the condition(s) over
an index key part could not be pushed to the index together with the
loose scan.

As a result, loose index scan was selecting the first row in the
index with a given GROUP BY prefix, and was applying the WHERE
clause after that, while it should have inspected all rows with
the given prefix, and apply the WHERE clause to all of them.

The fix detects and skips such cases.


mysql-test/r/group_min_max.result:
  Added test for BUG#16710.
mysql-test/t/group_min_max.test:
  Added test for BUG#16710.
sql/item.cc:
  Added new method [Item | Item_field]::find_item_in_field_list_processor.
sql/item.h:
  Added new method [Item | Item_field]::find_item_in_field_list_processor.
sql/opt_range.cc:
  Handle the case when there is no MIN/MAX aggregate function, and a
  keypart of the index being considered, that is after the GROUP BY
  prefix, is used in the WHERE clause and the condition where it is
  used cannot be pushed to the index.
  If this is the case, we rule out this index.
2006-03-31 12:34:28 +03:00
unknown
9f6cf5b6cc Merge bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/home/my/mysql-5.1


mysql-test/r/ndb_condition_pushdown.result:
  Auto merged
mysql-test/t/ndb_condition_pushdown.test:
  Auto merged
sql/ha_heap.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
storage/csv/ha_tina.cc:
  Auto merged
2006-03-29 17:28:40 +03:00
unknown
59eaf292de Fixed compiler and valgrind warnings
Added missing DBUG_xxx_RETURN statements
Fixed some usage of not initialized variables (as found by valgrind)
Ensure that we don't remove locked tables used as name locks from open table cache until unlock_table_names() are called.
This was fixed by having drop_locked_name() returning any table used as a name lock so that we can free it in unlock_table_names()
This will allow Tomas to continue with his work to use namelocks to syncronize things.

Note: valgrind still produces a lot of warnings about using not initialized code and shows memory loss errors when running the ndb tests


BitKeeper/etc/ignore:
  added mysql-test/r/*.log
client/mysqltest.c:
  Change type of variables to get rid of compiler warnings
  More debugging
  Fix memory leak
mysql-test/mysql-test-run.sh:
  Collect warnings about missing DBUG_RETURN statements
mysql-test/r/lock_multi.result:
  Add test of new code
mysql-test/r/ndb_condition_pushdown.result:
  Drop used tables before test
mysql-test/t/lock_multi.test:
  Add test of new code
mysql-test/t/ndb_condition_pushdown.test:
  Drop used tables before test
mysql-test/valgrind.supp:
  Ignore 'safe' warnings from libz (when used with archive)
sql/event.cc:
  More comments
  Simplify code
  Fixed memory leak found by valgrind
sql/ha_archive.cc:
  Remove compiler warnings (Wrong handlerton structure and signed/unsigned comparison)
sql/ha_berkeley.cc:
  Fixed compiler warning
sql/ha_blackhole.cc:
  Fixed compiler warning
sql/ha_federated.cc:
  Fixed compiler warning
sql/ha_heap.cc:
  Fixed compiler warning
sql/ha_myisam.cc:
  Fixed compiler warning
sql/ha_myisammrg.cc:
  Fixed compiler warning
sql/ha_ndbcluster.cc:
  Fixed compiler warnings
sql/ha_partition.cc:
  Fixed compiler warning
  Fixed error noticed by valgrind in ha_partition::rnd_init()
sql/handler.cc:
  Fixed compiler warning
sql/handler.h:
  Fixed compiler warning
sql/item.cc:
  Fixed compiler warning
sql/item_xmlfunc.cc:
  Fixed warning from valgrind when calling memcpy with wrong address
sql/lock.cc:
  More debugging
sql/log.cc:
  Fixed compiler warning
  Indentation fixes
sql/log.h:
  Fixed compiler warning
sql/mysql_priv.h:
  Changed prototype for 'drop_locked_tables'
sql/opt_range.cc:
  Indentation fix
sql/password.c:
  Removed compiler warnings
sql/set_var.cc:
  Fixed compiler warning
sql/slave.cc:
  Fixed compiler warning
sql/sp_head.cc:
  Fixed compiler warning
sql/sql_acl.cc:
  Fixed compiler warning
sql/sql_analyse.cc:
  Added missing DBUG_RETURN statements
sql/sql_base.cc:
  Removed de-reference of not initialized pointer
  More comments
  drop_locked_tables() changed to not delete tables used for name locking
  Fixed compiler warnings
sql/sql_delete.cc:
  Fixed usage of not initialized variable
  (deleted could be referenced in some not common error conditions)
sql/sql_parse.cc:
  Added missing DBUG_VOID_RETURN
  Simplify code
sql/sql_partition.cc:
  Fixed usage of wrong variable (noticed by valgrind)
sql/sql_plugin.cc:
  Removed compiler warning
sql/sql_show.cc:
  Removed compiler warning
sql/sql_table.cc:
  Ensure that we don't remove locked tables used as name locks from open table cache until unlock_table_names() are called.
  This was fixed by having drop_locked_name() returning any table used as a name lock so that we can free it in unlock_table_names()
  This will allow Tomas to continue with his work to use namelocks to syncronize things.
  
  Fixed wrong test of 'table_type' (path_length could otherwise be accessed uninitialized)
  
  Remove compile warnings about not initialized variables.
sql/sql_yacc.yy:
  Ensure that no_write_to_binlog is properly initialized
  (Was accessed uninitialized by partition code)
sql/table.cc:
  Removed valgrind warnings (not fatal)
  Removed compiler warnings
sql/tztime.cc:
  Removed valgrind warning
storage/ndb/include/ndbapi/NdbIndexStat.hpp:
  Removed compiler warning
2006-03-29 14:27:36 +03:00
unknown
44517ca040 Bug#18053 Partitions: crash if null
Bug#18070 Partitions: wrong result on WHERE ... IS NULL
 removed unnecessary code
 added handling of NULL values


mysql-test/r/partition.result:
  Bug#18053 Partitions: crash if null
  Bug#18070 Partitions: wrong result on WHERE ... IS NULL
   test case
mysql-test/t/partition.test:
  Bug#18053 Partitions: crash if null
  Bug#18070 Partitions: wrong result on WHERE ... IS NULL
   test case
sql/opt_range.cc:
  Bug#18053 Partitions: crash if null
  Bug#18070 Partitions: wrong result on WHERE ... IS NULL
   initialisation of part_iter.has_null_value
sql/sql_partition.h:
  Bug#18053 Partitions: crash if null
  Bug#18070 Partitions: wrong result on WHERE ... IS NULL
   added has_null_value
2006-03-28 17:25:19 +05:00
unknown
e65c4d2297 Merge 192.168.0.100:mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1


client/mysqltest.c:
  Auto merged
include/config-win.h:
  Auto merged
include/m_ctype.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
strings/ctype-bin.c:
  Auto merged
strings/ctype-euc_kr.c:
  Auto merged
strings/ctype-gb2312.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
2006-03-24 12:33:11 +01: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
0c63aee7f9 Bug # 17173 - Partitions: less than search fails
Bug # 17894 - Comparison with "less than" operator fails with range partition

The problem here was that on queries such as < 3, the range given is NULL < n < 3.
The null part works correctly where the null value is stored in rec[0] and the
field is marked as being null.  However, when the 3 is processed, the 3 is places
on rec[0] but the null flag is left uncleared.

partition_range.result:
  Results block for bug #17894
partition_range.test:
  Test block for bug #17894
partition_list.result:
  Results block for bug #17173
partition_list.test:
  Test block for bug #17173
opt_range.cc:
  call set_notnull to clear any null flag that may have been set


sql/opt_range.cc:
  call set_notnull to clear any null flag that may have been set
mysql-test/t/partition_list.test:
  Test block for bug #17173
mysql-test/r/partition_list.result:
  Results block for bug #17173
mysql-test/t/partition_range.test:
  Test block for bug #17894
mysql-test/r/partition_range.result:
  Results block for bug #17894
2006-03-13 14:50:16 +01:00
unknown
4e31551b92 Merge mysql.com:/home/bkroot/mysql-5.1-new
into  mysql.com:/home/bk/w3023-mysql-5.1-new


configure.in:
  Auto merged
BitKeeper/deleted/.del-sp_notembedded.test:
  Auto merged
mysql-test/extra/binlog_tests/binlog.test:
  Auto merged
mysql-test/extra/binlog_tests/blackhole.test:
  Auto merged
mysql-test/r/binlog_stm_ctype_cp932.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/log.h:
  Auto merged
sql/log_event.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/table.h:
  Auto merged
2006-02-28 10:06:58 +01:00
unknown
f7cf76fc80 Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1


BitKeeper/deleted/.del-innodb_notembedded.test:
  Delete: mysql-test/t/innodb_notembedded.test
BitKeeper/deleted/.del-sp_notembedded.test:
  Delete: mysql-test/t/sp_notembedded.test
BitKeeper/deleted/.del-subselect_notembedded.test:
  Delete: mysql-test/t/subselect_notembedded.test
BitKeeper/deleted/.del-ctype_cp932_notembedded.result:
  Delete: mysql-test/r/ctype_cp932_notembedded.result
BitKeeper/deleted/.del-innodb_notembedded.result:
  Delete: mysql-test/r/innodb_notembedded.result
BitKeeper/deleted/.del-sp_notembedded.result:
  Delete: mysql-test/r/sp_notembedded.result
BitKeeper/deleted/.del-subselect_notembedded.result:
  Delete: mysql-test/r/subselect_notembedded.result
configure.in:
  Auto merged
include/mysql.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysqld/emb_qcache.cc:
  Auto merged
libmysqld/embedded_priv.h:
  Auto merged
libmysqld/libmysqld.c:
  Auto merged
mysql-test/extra/binlog_tests/blackhole.test:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/mysqltest.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/query_cache_notembedded.result:
  Auto merged
mysql-test/r/sp-error.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/r/view_grant.result:
  Auto merged
mysql-test/t/backup.test:
  Auto merged
mysql-test/t/compress.test:
  Auto merged
mysql-test/t/delayed.test:
  Auto merged
mysql-test/t/handler.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/mysql_client_test.test:
  Auto merged
mysql-test/t/mysqltest.test:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/query_cache_notembedded.test:
  Auto merged
mysql-test/t/read_only.test:
  Auto merged
mysql-test/t/skip_grants.test:
  Auto merged
mysql-test/t/sp-destruct.test:
  Auto merged
mysql-test/t/sp-error.test:
  Auto merged
mysql-test/t/sp-threads.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/temp_table.test:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
mysql-test/t/wait_timeout.test:
  Auto merged
mysys/mf_dirname.c:
  Auto merged
sql/field.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.h:
  Auto merged
sql/log_event.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/protocol.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_cursor.cc:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/table.h:
  Auto merged
sql/tztime.cc:
  Auto merged
sql/tztime.h:
  Auto merged
storage/ndb/include/ndbapi/NdbDictionary.hpp:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
libmysqld/lib_sql.cc:
  Manual merge
mysql-test/extra/binlog_tests/binlog.test:
  Manual merge
mysql-test/extra/binlog_tests/ctype_cp932.test:
  No changes
mysql-test/r/binlog_stm_binlog.result:
  Manual merge
mysql-test/r/binlog_stm_ctype_cp932.result:
  No changes
mysql-test/t/innodb.test:
  Manual merge
mysql-test/t/view.test:
  Manual merge
mysys/my_bitmap.c:
  Manual merge
scripts/mysql_fix_privilege_tables.sql:
  Manual merge
sql/item.cc:
  Manual merge
sql/sql_cache.h:
  Manual merge
sql/sql_class.h:
  Manual merge
sql/sql_update.cc:
  Manual merge
2006-02-25 21:54:34 +02:00
unknown
f5f01b15e7 Fixed compiler warnings from gcc 4.0.2:
- Added empty constructors and virtual destructors to many classes and structs
- Removed some usage of the offsetof() macro to instead use C++ class pointers


configure.in:
  Added comment
ndb/include/ndbapi/NdbDictionary.hpp:
  Fixed compiler warnings from gcc 4.0.2
sql/field.cc:
  Fixed compiler warnings from gcc 4.0.2
sql/handler.h:
  Fixed compiler warnings from gcc 4.0.2
sql/item.h:
  Fixed compiler warnings from gcc 4.0.2
sql/item_cmpfunc.h:
  Fixed compiler warnings from gcc 4.0.2
sql/log_event.h:
  Fixed compiler warnings from gcc 4.0.2
sql/mysql_priv.h:
  Fixed compiler warnings from gcc 4.0.2
  For find_table_in_list I fixed it to use proper C++ class pointers instead of C style pointers
sql/opt_range.cc:
  Fixed compiler warnings from gcc 4.0.2
sql/parse_file.h:
  Fixed compiler warnings from gcc 4.0.2
sql/sp_rcontext.h:
  Fixed compiler warnings from gcc 4.0.2
sql/spatial.h:
  Fixed compiler warnings from gcc 4.0.2
sql/sql_base.cc:
  Fixed compiler warnings from gcc 4.0.2
sql/sql_cache.h:
  Fixed compiler warnings from gcc 4.0.2
sql/sql_class.h:
  Fixed compiler warnings from gcc 4.0.2
sql/sql_parse.cc:
  Fixed compiler warnings from gcc 4.0.2
  (Not pretty, but seams to work...)
sql/sql_select.h:
  Fixed compiler warnings from gcc 4.0.2
sql/sql_update.cc:
  Fixed compiler warnings from gcc 4.0.2
sql/table.h:
  Fixed compiler warnings from gcc 4.0.2
sql/tztime.cc:
  Fixed compiler warnings from gcc 4.0.2
sql/tztime.h:
  Fixed compiler warnings from gcc 4.0.2
2006-02-25 17:46:30 +02:00
unknown
7375fe240c Fix a typo in dbug printout
sql/opt_range.cc:
  Fix a typo in dbug printout: print "min_val < partitioning_field < max_val",
  not "max_val < partitioning_field < max_val"
2006-02-25 00:41:37 +03:00
unknown
d11aa8345d Merge mysqldev@production.mysql.com:my/mysql-5.1-release
into  mysql.com:/home/bk/w3023-mysql-5.1-new


mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
  Auto merged
mysql-test/extra/rpl_tests/rpl_log.test:
  Auto merged
mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test:
  Auto merged
mysql-test/r/binlog_row_insert_select.result:
  Auto merged
mysql-test/r/rpl_row_delayed_ins.result:
  Auto merged
mysql-test/t/rpl_sp.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
mysql-test/t/rpl_ndb_dd_basic.test:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.h:
  Auto merged
mysql-test/r/binlog_row_mix_innodb_myisam.result:
  Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_basic_11bugs.result:
  Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_basic_2myisam.result:
  Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_basic_3innodb.result:
  Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_create_table.result:
  Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_log.result:
  Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_log_innodb.result:
  Merge with 5.1.7 release clone.
mysql-test/r/rpl_row_sp008.result:
  Merge with 5.1.7 release clone.
mysql-test/t/rpl_row_basic_11bugs.test:
  Merge with 5.1.7 release clone.
mysql-test/t/rpl_row_sp008.test:
  Merge with 5.1.7 release clone.
2006-02-24 16:31:38 +01:00
unknown
cf5cb1e960 Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  linux.site:/home/reggie/work/mysql-5.1-bug15408


sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
2006-02-21 10:29:41 -06:00
unknown
c7d335a7d2 BUG#15448 (group_min_max test failure): Don't bypass group-min-max optimizer entry point
if we've got a tree of type ALWAYS or MAYBE.


sql/opt_range.cc:
  BUG#15448 (group_min_max test failure): Don't buypass group-min-max optimizer entry point 
  if we've got a tree of type ALWAYS or MAYBE.
  The effect observed by this bug has been introduced by this cset: 
  ChangeSet 1.1967.5.2 2005/12/26 08:40:09 sergefp@mysql.com. The cset introduced PARAM::remove_jump_scans
  which purpose was to avoid making [always unsuccessful] attempts to construct index_merge for construct 
  index_merge for conditions like "t.key1partX=c1 OR t.key1partY=c2". The effect of this change was that some
  queries that previously had produced a SEL_TREE representing candidate for index_merge(X,Y) now started to 
  produce SEL_TREE with type=ALWAYS, and group-min-max analysis for these trees has been bypassed.
  In this fix we make SEL_TREE with type=ALWAYS to be processed in the same way as (SEL_TREE*)NULL, its equivalent.
2006-02-21 00:17:29 +03:00
unknown
8270eb50e4 Merge reggie@192.168.0.9:/home/reggie/work/mysql-5.1-bug15408
into  big_geek.:C:/Work/mysql/mysql-5.1-bug15408


sql/ha_partition.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/handler.h:
  merging changes into my partition code reorg
2006-02-16 11:07:21 -06:00
unknown
d047fe77b7 BUG#15408: Partitions: subpartition names are not unique
Also, moved some of the code out of handler.h and into partition specific files for better 
separation.
Also, moved some of the C funcs into partition_info as formal C++ methods


mysql-test/r/partition_mgm_err.result:
  result block for test of bug # 15408
mysql-test/t/partition_mgm_err.test:
  test for duplicate subpartition names
sql/Makefile.am:
  adding sql_partition.h, partition_info.cpp, partition_info.h, and partition_element.h to the makefile
sql/ha_partition.cc:
  using the new members of partition_info
sql/ha_partition.h:
  using the new members of partition_info
sql/handler.h:
  moved this code into sql_partition.h
sql/mysql_priv.h:
  including sql_partition.h also now
sql/opt_range.cc:
  using the new members of partition_info
sql/sql_partition.cc:
  moved some of the functions out and into the partition_info class
  using the new members of partition_info
sql/sql_show.cc:
  using the new members of partition_info
win/cmakefiles/sql:
  added partition_info.cpp to the sql cmake file
sql/partition_element.h:
  New BitKeeper file ``sql/partition_element.h''
sql/partition_info.h:
  New BitKeeper file ``sql/partition_info.h''
sql/sql_partition.h:
  New BitKeeper file ``sql/sql_partition.h''
2006-02-16 10:38:33 -06:00
unknown
738a1ca08d Merge mysql.com:/home/bkroot/mysql-5.1-new
into  mysql.com:/home/bk/w3023-mysql-5.1-new


mysql-test/extra/binlog_tests/ctype_cp932.test:
  Auto merged
mysql-test/r/binlog_row_blackhole.result:
  Auto merged
mysql-test/r/binlog_stm_ctype_cp932.result:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log.h:
  Auto merged
sql/log_event.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/parse_file.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/log_event.cc:
  Merge with mysql-5.1-new
2006-02-16 08:46:45 +01:00
unknown
832dd46f49 Automerge
sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
client/mysqlslap.c:
  SCCS merged
configure.in:
  SCCS merged
libmysql/libmysql.c:
  SCCS merged
mysys/my_init.c:
  SCCS merged
2006-02-15 00:01:46 +01:00
unknown
d3ee9abf2a dbug changes:
1. dbug state is now local to a thread
2. new macros: DBUG_EXPLAIN, DBUG_EXPLAIN_INITIAL,
   DBUG_SET, DBUG_SET_INITIAL, DBUG_EVALUATE, DBUG_EVALUATE_IF
3. macros are do{}while(0) wrapped
4. incremental modifications to the dbug state (e.g. "+d,info:-t")
5. dbug code cleanup, style fixes
6. _db_on_ and DEBUGGER_ON/OFF removed
7. rest of MySQL code fixed because of 3 (missing ;) and 6
8. dbug manual updated
9. server variable @@debug (global and local) to control dbug from SQL!
a. -#T to print timestamps in the log


BitKeeper/deleted/.del-readme.prof~2f3bae1550a0038d:
  Delete: dbug/readme.prof
client/mysqlslap.c:
  typo fixed
configure.in:
  test for sleep() too
dbug/dbug.c:
  thread local dbug settings
  DBUG_EXPLAIN,DBUG_EXPLAIN_INITIAL,DBUG_SET,DBUG_SET_INITIAL
  style changes to be more in line with MySQL code
  cleanup (many mallocs removed)
  incremental modification of dbug state (e.g. DBUG_PUSH("+t:-d,info"))
  DBUG_SET, _db_explain_
  -#T
dbug/monty.doc:
  obsolete and duplicate docs removed
dbug/user.r:
  new features documented
include/my_dbug.h:
  correct do{}while wrapping
  thread local dbug settings
  DBUG_EXPLAIN,DBUG_EXPLAIN_INITIAL,DBUG_SET,DBUG_SET_INITIAL
  DBUG_EVALUATE,DBUG_EVALUATE_IF
libmysql/libmysql.c:
  remove _db_on_ and DEBUGGER_ON/OFF
mysys/my_init.c:
  missed DBUG_RETURN
mysys/my_thr_init.c:
  bugfix - transaction id's are unsigned
mysys/testhash.c:
  remove _db_on_ and DEBUGGER_ON/OFF
sql/ha_myisammrg.cc:
  missed ;
sql/ha_ndbcluster.cc:
  remove _db_on_ and DEBUGGER_ON/OFF
  missed ;
sql/ha_ndbcluster_binlog.cc:
  remove _db_on_ and DEBUGGER_ON/OFF
  missed ;
sql/item_cmpfunc.cc:
  missed ;
sql/lock.cc:
  missed DBUG_RETURN
sql/log_event.cc:
  missed ;
sql/mysqld.cc:
  remove _db_on_ and DEBUGGER_ON/OFF
  missed ;
  DBUG_SET_INITIAL
sql/opt_range.cc:
  remove _db_on_ and DEBUGGER_ON/OFF
sql/set_var.cc:
  class sys_var_thd_dbug and "debug" server variable
sql/set_var.h:
  class sys_var_thd_dbug and "debug" server variable
sql/slave.cc:
  missed ;
sql/sql_cache.cc:
  missed ;
sql/sql_plugin.cc:
  missed ;
sql/sql_select.cc:
  remove _db_on_ and DEBUGGER_ON/OFF
storage/heap/hp_test2.c:
  remove _db_on_ and DEBUGGER_ON/OFF
storage/myisam/ft_eval.c:
  remove _db_on_ and DEBUGGER_ON/OFF
storage/myisam/ft_test1.c:
  remove _db_on_ and DEBUGGER_ON/OFF
storage/myisam/mi_open.c:
  remove _db_on_ and DEBUGGER_ON/OFF
  missed ;
storage/myisam/mi_test1.c:
  remove _db_on_ and DEBUGGER_ON/OFF
storage/myisam/mi_test2.c:
  remove _db_on_ and DEBUGGER_ON/OFF
storage/myisam/mi_test3.c:
  remove _db_on_ and DEBUGGER_ON/OFF
storage/ndb/src/ndbapi/DictCache.cpp:
  missed ;
storage/ndb/src/ndbapi/NdbTransaction.cpp:
  missed ;
tests/mysql_client_test.c:
  remove _db_on_ and DEBUGGER_ON/OFF
2006-02-14 22:36:11 +01: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
d8c96f286f Fixed bug #16203.
If check_quick_select returns non-empty range then the function cost_group_min_max
cannot return 0 as an estimate of the number of retrieved records.
Yet the function erroneously returned 0 as the estimate in some situations.


mysql-test/r/group_min_max.result:
  Added a test case for bug #16203.
mysql-test/t/group_min_max.test:
  Added a test case for bug #16203.
2006-02-06 11:35:13 -08:00
unknown
97dae00306 Merge mysql.com:/home/kostja/mysql/tmp_merge
into  mysql.com:/home/kostja/mysql/mysql-5.1-merge


client/mysqlbinlog.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
include/my_base.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_help.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_test.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/table.cc:
  Auto merged
storage/myisam/mi_delete.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/myisam/sort.c:
  Auto merged
mysys/my_bitmap.c:
  Manual merge
sql/field.cc:
  e
  Manual merge
sql/item.cc:
  Manual merge (new Field_bit_as_char constructor signature)
sql/item_func.cc:
  Manual merge: use local
sql/sql_insert.cc:
  Manual merge: add VOID() around bitmap_init
2006-02-02 16:57:34 +03:00
unknown
c4f91d17b7 Merge mysql.com:/usr/local/mysql/mysql-5.1-win-fixes
into  mysql.com:/usr/local/mysql/x/mysql-5.1-new


VC++Files/sql/mysqld.vcproj:
  Auto merged
sql/event.h:
  Auto merged
sql/event_executor.cc:
  Auto merged
sql/event_timed.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_partition.cc:
  Auto merged
VC++Files/client/mysqldump.vcproj:
  Manual merge.
2006-01-30 17:57:20 +01:00
unknown
ab88a598ca Windows compile fixes in preparation for 5.1.6 beta.
VC++Files/client/mysqldump.vcproj:
  Add missing source file.
VC++Files/mysql.sln:
  Fix configuration mismatch.
VC++Files/sql/mysqld.vcproj:
  Enable row-based replication.
  Add missing source files.
scripts/make_win_src_distribution.sh:
  Add copying of missing directory.
sql/event.h:
  Fix type conflict only visible on Windows.
sql/event_executor.cc:
  Fix non-portable thread stuff.
sql/event_timed.cc:
  Fix type conflict only visible on Windows.
sql/ha_archive.cc:
  Add cast needed for Windows.
sql/handler.h:
  Fix Windows byte * <-> char * mismatch.
sql/opt_range.cc:
  Fix Windows byte * <-> char * mismatch.
sql/set_var.cc:
  BUG#16811
  Fix Windows compilation by making the cast-away of volatile implicit
  (Windows linker does not like volatile <-> non-volatile mismatch, in
  contrast to Unix)
sql/sql_partition.cc:
  Fix Windows byte * <-> char * mismatch.
2006-01-30 13:09:08 +01:00
unknown
ff5d012454 WL# 2986
Final patch
-----------

This WL is about using this bitmap in all parts of the partition handler.
Thus for:
rnd_init/rnd_next
index_init/index_next and all other variants of index scans
read_range_... the various range scans implemented in the partition handler.

Also use those bitmaps in the various other calls that currently loop over all
partitions.




mysql-test/r/partition_pruning.result:
  WL# 2986
  
  New results reflecting bitmap being used to determine if a partition is to be
  included
mysql-test/t/partition_pruning.test:
  WL# 2986
  
  New tests to show bitmap being used in ha_partition
sql/ha_partition.cc:
  WL# 2986
  
  Used work from 2682 and removed the partition select code.
      
  Added do {} while loop to any iteration over partitions to now utilise 
  m_part_info->used_partitions bitmap to determine if a partition should be
  used.
sql/ha_partition.h:
  WL# 2986
  
  Removed unused member
sql/handler.h:
  WL# 2986
  
  Removed unused member
sql/opt_range.cc:
  WL# 2986
  
  Added bitmap_clear_all to clear bitmap prior to pruning
  DBUG code for testing
sql/sql_partition.cc:
  WL# 2986
  
  Changed < to <=, which fixes the problem with edge cases going awry.
2006-01-28 16:22:32 -08:00
unknown
a89c10fd9b WL#3023 (RBR: Use locks in a statment-like manner):
Interface changes pushed early.
  Separation of public and implementation interface for external_lock()
  in preparation for implementation.


sql/handler.cc:
  Separating public virtual external_lock() into public non-virtual
  ha_external_lock() and private virtual external_lock().  Some minor
  changes to ha_*_row() function.
sql/handler.h:
  Separating public virtual external_lock() into public non-virtual
  ha_external_lock() and private virtual external_lock().
sql/lock.cc:
  Using new public ha_external_lock instead of internal external_lock.
sql/opt_range.cc:
  Using new public ha_external_lock instead of internal external_lock.
sql/sql_table.cc:
  Using new public ha_external_lock instead of internal external_lock.
2006-01-26 09:25:37 +01:00
unknown
18a1e69eba Manual merge
mysql-test/r/partition.result:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2006-01-18 14:09:08 +03:00
unknown
6f83ed91f3 WL #2747: Fix such that backup and restore works for user defined
partitioned tables in NDB


include/my_sys.h:
  Move packfrm and unpackfrm to mysys
mysql-test/r/ndb_restore.result:
  New test cases
mysql-test/t/ndb_restore.test:
  New test cases
mysys/my_compress.c:
  Moved packfrm and unpackfrm to mysys
sql/ha_ndbcluster.cc:
  Set value of partition function in hidden field for user defined
  partitioning in NDB to handle restore and later on-line reorganize
  of partitions
  To save space value of those functions are limited to 32 bits
sql/ha_partition.cc:
  Use new get_partition_id interface
sql/handler.h:
  Use new get_partition_id interface
sql/mysql_priv.h:
  Moved to mysys
sql/mysqld.cc:
  Minor
sql/opt_range.cc:
  New get_partition_id interface
sql/sql_partition.cc:
  New get_partition_id interface
  Fix error checks of specification of engines in ALTER TABLE
  Moved packfrm and unpackfrm to mysys
sql/sql_table.cc:
  Fixed debug printouts
storage/ndb/include/kernel/ndb_limits.h:
  New constant
storage/ndb/include/kernel/signaldata/DictTabInfo.hpp:
  New table description item
storage/ndb/include/ndb_version.h.in:
  New version specific constant
storage/ndb/include/ndbapi/NdbDictionary.hpp:
  New item in table descriptions
storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp:
  New item in table descriptions
storage/ndb/src/kernel/blocks/backup/Backup.cpp:
  Write fragment id in backup's log entry
storage/ndb/src/kernel/blocks/backup/BackupFormat.hpp:
  Write fragment id in backup's log entry
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  New item in table description
storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
  New item in table description
storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  Moved constant
storage/ndb/src/ndbapi/NdbDictionary.cpp:
  New item in table description
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  New item in table description
storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp:
  New item in table description
storage/ndb/tools/Makefile.am:
  Compress library needed for ndb_restore
storage/ndb/tools/restore/Restore.cpp:
  Handle fragment id and also handle backups from older versions
storage/ndb/tools/restore/Restore.hpp:
  Use fragment id
storage/ndb/tools/restore/consumer.hpp:
  Use fragment id
storage/ndb/tools/restore/consumer_printer.cpp:
  Use fragment id
storage/ndb/tools/restore/consumer_printer.hpp:
  Use fragment id
storage/ndb/tools/restore/consumer_restore.cpp:
  Code to map node groups if new cluster has different set of
  node groups from original cluster
  Very simple search and replace parser of partition syntax in frm file
  Fix settings of partition id properly using fragment id and hidden
  field in tables
storage/ndb/tools/restore/consumer_restore.hpp:
  Changed function headers and new one for mapping node groups
storage/ndb/tools/restore/consumer_restorem.cpp:
  Use fragment id
storage/ndb/tools/restore/restore_main.cpp:
  New parameter to set node group map, parser for this parameter
2006-01-17 09:25:12 +01: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
e931d813e1 merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_handler.cc:
  ur
2006-01-06 18:26:59 +01: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
0f1fa93af8 WL#2985 "Partition-pruning", "range walking" addition: better comments. 2006-01-05 17:47:07 +03:00
unknown
dc2a6e226d WL#2985 "Partition Pruning":
- post-...-post review fixes
- Added "integer range walking" that allows to do partition pruning for "a <=? t.field <=? b"
  by finding used partitions for a, a+1, a+2, ..., b-1, b. 


mysql-test/r/partition_pruning.result:
  WL#2985 "Partition Pruning": tests for "integer range walking"
mysql-test/t/partition.test:
  WL#2985 "Partition Pruning": post-review fixes
mysql-test/t/partition_pruning.test:
  WL#2985 "Partition Pruning": tests for "integer range walking"
sql/handler.h:
  WL#2985 "Partition Pruning": "integer range walking": 
  - class partition_info now has pointers to "partitioning interval analysis" functions
  - added "partition set iterator" definitions.
sql/opt_range.cc:
  WL#2985 "Partition Pruning": "integer range walking":
  - Switched to use "partitioning interval analysis" functions
  - Fixed two problems in find_used_partitions() that occur on complicated WHERE clauses.
sql/sql_partition.cc:
  WL#2985 "Partition Pruning": "integer range walking": 
  - Added "partitioning interval analysis" functions: get_part_iter_for_interval_via_mapping, 
    get_part_iter_for_interval_via_walking, 
  - Added appropriate partition-set-iterator implementations
  - Added a function to set up Partitioning Interval Analysis-related fields in partition_info.
sql/sql_select.cc:
  WL#2985 "Partition pruning": added comments.
2006-01-04 11:09:01 +03:00
unknown
c489cdebea merged
myisam/mi_delete.c:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
2006-01-03 18:12:03 +01:00
unknown
307c0b77a1 many warnings (practically safe but annoying) corrected
client/mysqladmin.cc:
  don't use the handler after it's closed
client/mysqlbinlog.cc:
  memory leak
client/mysqldump.c:
  many "ignore return value" warnings, one "NULL dereference"
cmd-line-utils/libedit/history.c:
  memory leak
include/my_base.h:
  cleanup
libmysql/libmysql.c:
  "return value ignored" warning
myisam/mi_delete.c:
  "return value ignored" warning
myisam/myisampack.c:
  "out-of-bound access" warning
myisam/sort.c:
  "double free" warning
mysys/default_modify.c:
  "double free" warning
mysys/mf_iocache2.c:
  "return value ignored" warnings
mysys/my_bitmap.c:
  s/return/DBUG_RETURN/
mysys/my_error.c:
  memory leak
server-tools/instance-manager/parse.cc:
  "NULL dereference" warning
sql-common/client.c:
  "NULL dereference" warning
sql/field.cc:
  deadcode, "NULL dereference", "uninitialized" warnings
sql/field.h:
  unused parameters removed from constructor
sql/ha_myisam.cc:
  "return value ignored" warnings
sql/item.cc:
  "return value ignored" warnings
  changed constructor
sql/item_func.cc:
  "return value ignored" warnings
sql/log_event.cc:
  uninitialized warning
sql/opt_range.cc:
  "double free" and uninitialized warnings
sql/opt_range.h:
  "return value ignored" warning
sql/repl_failsafe.cc:
  "return value ignored" warning
sql/set_var.cc:
  "return value ignored" warning
sql/slave.cc:
  "return value ignored" warnings
sql/slave.h:
  new prototype
sql/sql_acl.cc:
  deadcode and "NULL dereference" warnings
sql/sql_db.cc:
  "return value ignored" warning
sql/sql_handler.cc:
  "NULL dereference" warning
sql/sql_help.cc:
  "NULL dereference" warning
sql/sql_insert.cc:
  "return value ignored" warning
sql/sql_parse.cc:
  "return value ignored" warning
  one more DBUG_ASSERT
sql/sql_repl.cc:
  "return value ignored" and memory leak warnings
sql/sql_show.cc:
  "return value ignored" and "NULL dereference"  warnings
sql/sql_test.cc:
  "return value ignored" warning
sql/table.cc:
  memory leak
sql/uniques.cc:
  "return value ignored" warning
  endspaces deleted
2006-01-03 17:54:54 +01:00
unknown
78d1abbaf9 WL#2985 "Partition Pruning": post-review fixes: Better comments
mysql-test/r/partition_pruning.result:
  WL#2985 "Partition Pruning": more tests
mysql-test/t/partition_pruning.test:
  WL#2985 "Partition Pruning": more tests
sql/handler.h:
  WL#2985 "Partition Pruning": post-review fixes: comments
2005-12-29 09:32:46 +03:00
unknown
e6bff9a606 WL#2985 "Partition pruning", postreview fixes: Small code fixes and better comments
mysql-test/r/partition.result:
  Added testcase for BUG#15819
mysql-test/t/partition.test:
  Added testcase for BUG#15819
sql/item.h:
  WL#2985 "Partition pruning", postreview fixes: better comments
sql/item_timefunc.cc:
  WL#2985 "Partition pruning", postreview fixes: better comments
sql/opt_range.cc:
  WL#2985 "Partition pruning", postreview fixes: 
  - better comments, local function renames
  - Made SEL_ARG::is_singlepoint() to correctly handle NULL edge values.
  - fix uninitialized variable access: s/res |=/res =/
sql/sql_class.cc:
  WL#2985 "Partition pruning", postreview fixes: 
  Set correct max. length of "partitions" column in EXPLAIN output
sql/sql_lex.h:
  WL#2985 "Partition pruning", postreview fixes: better comments
sql/sql_partition.cc:
  WL#2985 "Partition pruning", postreview fixes: better comments
2005-12-27 15:04:35 +03:00
unknown
b3abc9773e WL#2985 "Partition pruning": fixes to post-review fixes: when modifying SEL_TREE::keys,
adjust SEL_TREE::keys_map appropriately.
2005-12-26 09:46:25 +03:00
unknown
32ff7d99d4 Fix typo bug in previous cset 2005-12-26 08:51:29 +03:00
unknown
a4a1bb0e2f WL#2985 "Partition Pruning": post-review fixes:
- Added more comments.
- Added a RANGE_OPT_PARAM::remove_jump_scans flag that disables construction of index_merge
  SEL_TREEs that represent unusable conditions like "key1part1<c1 OR key2part2<c2"
- make prune_partitions() function handle the case where range analysis produces a list of 
  index_merge trees (it turned out that this is possible, appropriate test case added).
- Other small fixes.


mysql-test/r/partition_pruning.result:
  WL#2985 "Partition Pruning": post-review fixes: more test cases
mysql-test/t/partition_pruning.test:
  WL#2985 "Partition Pruning": post-review fixes: more test cases
sql/opt_range.cc:
  WL#2985 "Partition Pruning": post-review fixes:
  - Added more comments.
  - Fix the debug printouts
  - Added a RANGE_OPT_PARAM::remove_jump_scans flag that disables construction of index_merge
    SEL_TREEs that represent unusable conditions like "key1part1<c1 OR key2part2<c2"
  - make prune_partitions() function handle the case where range analysis produces a list of 
    index_merge trees (it turned out that this is possible, appropriate test case added).
sql/sql_partition.cc:
  WL#2985 "Partition Pruning": post-review fixes: make requested edits in comments.
sql/table.h:
  WL#2985 "Partition Pruning": post-review fixes: added bool TABLE::no_partitions_used
  (this change was missed when making the original cset)
2005-12-26 08:40:09 +03:00
unknown
f19fb8709c WL#2985 "Partition Pruning"
sql/ha_ndbcluster.cc:
  WL#2985 "Partition Pruning": added part_info->used_partitions initialization
sql/ha_partition.cc:
  WL#2985 "Partition Pruning": added part_info->used_partitions initialization
sql/handler.h:
  WL#2985 "Partition Pruning": 
  Added function prototypes
  in partition_info:
   - Added 'used_partitions' bitmap
   - Added comments
sql/item.h:
  WL#2985 "Partition Pruning": 
  - added enum monotonicity_info
  - added virtual Item::get_monotonicity_info()
sql/item_timefunc.cc:
  WL#2985 "Partition Pruning": 
  - added Item_func_to_days::get_monotonicity_info()
  - added Item_func_year::get_monotonicity_info()
sql/item_timefunc.h:
  WL#2985 "Partition Pruning": 
  - added Item_func_to_days::get_monotonicity_info()
  - added Item_func_year::get_monotonicity_info()
sql/opt_range.cc:
  WL#2985 "Partition Pruning":
  - Split out PARAM structure into PARAM and RANGE_OPT_PARAM part.
  - Added partition pruning module code.
sql/opt_range.h:
  WL#2985 "Partition Pruning": 
  Added prune_partitions() function declaration. This is the entry point for partition pruning 
  module
sql/sql_class.cc:
  WL#2985 "Partition Pruning": added support for "EXPLAIN PARTITIONS SELECT ..."
sql/sql_lex.h:
  WL#2985 "Partition Pruning": added support for "EXPLAIN PARTITIONS SELECT ..."
sql/sql_partition.cc:
  WL#2985 "Partition Pruning": 
   - Added get_list_array_idx_for_endpoint and get_range_... functions to support partition 
     pruning on "partition_field < const"-like intervals.
   - Added partition_info::used_partitions bitmap.
   - Added make_used_partitions_str function
   - Fixed BUG#15819
sql/sql_select.cc:
  WL#2985 "Partition Pruning": 
  - Added prune_partitions() invocation right before the range analysis
  - Added code to handle return value from prune_partitions()
  - Added support for "EXPLAIN PARTITIONS SELECT ..."
sql/sql_yacc.yy:
  #2985 "Partition Pruning": added support for "EXPLAIN PARTITIONS SELECT ..."
2005-12-22 12:29:00 +03:00
unknown
4c2f929eb7 Merge mysql.com:/home/mydev/mysql-5.0-bug10932
into  mysql.com:/home/mydev/mysql-5.1-bug10932


include/myisam.h:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/unireg.h:
  Auto merged
configure.in:
  SCCS merged
2005-12-06 08:31:38 +01:00
unknown
65d412db6e Bug#10932 - Building server with key limit of 128, makes test cases fail
Allow for configuration of the maximum number of indexes per table.
Added and used a configure.in macro.
Replaced fixed limits by the configurable limit.
Limited MyISAM indexes to its hard limit.
Fixed a bug in opt_range.cc for many indexes with InnoDB.

Tested for 2, 63, 64, 65, 127, 128, 129, 255, 256, and 257 indexes.
Testing this part of the bugfix requires rebuilding of the server 
with different options. This cannot be done with our test suite. 
Therefore I added the necessary test files to the bug report.
If you repeat the tests, please note that the ps_* tests fail for
everything but 64 indexes. This is because of differences in the 
meta data, namely field lengths for index names etc.


config/ac-macros/misc.m4:
  Bug#10932 - Building server with key limit of 128, makes test cases fail
  Allow for configuration of the maximum number of indexes per table.
  Added a macro for the new build option.
configure.in:
  Bug#10932 - Building server with key limit of 128, makes test cases fail
  Allow for configuration of the maximum number of indexes per table.
  Added a call for the new macro.
include/myisam.h:
  Bug#10932 - Building server with key limit of 128, makes test cases fail
  Allow for configuration of the maximum number of indexes per table.
  Limit the number of keys for MyISAM to its hard limit.
sql/mysql_priv.h:
  Bug#10932 - Building server with key limit of 128, makes test cases fail
  Allow for configuration of the maximum number of indexes per table.
  Stick with the optimized Bitmap<64> if indexes are limited to 64
  or lower. Otherwise use a bigger bitmap. It must be defined as a
  multiple of 8.
sql/opt_range.cc:
  Bug#10932 - Building server with key limit of 128, makes test cases fail
  Allow for configuration of the maximum number of indexes per table.
  Initialize an object element to avoid a crash when using InnoDB
  with many indexes.
sql/unireg.h:
  Bug#10932 - Building server with key limit of 128, makes test cases fail
  Allow for configuration of the maximum number of indexes per table.
  Replace the fixed limit by the configurable limit.
tests/mysql_client_test.c:
  Bug#10932 - Building server with key limit of 128, makes test cases fail
  Allow for configuration of the maximum number of indexes per table.
  Replace the fixed limit by the configurable limit.
2005-12-02 16:27:18 +01:00
unknown
8c7852ba3c Merge mysql.com:/usr/local/bk/mysql-5.0
into  mysql.com:/usr/home/pem/mysql-5.1-new


include/my_base.h:
  Auto merged
libmysqld/examples/Makefile.am:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/ndb_alter_table.result:
  Auto merged
mysql-test/r/ndb_basic.result:
  Auto merged
mysql-test/t/ndb_alter_table.test:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/examples/ha_example.cc:
  Auto merged
storage/myisam/ft_parser.c:
  Auto merged
storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp:
  Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
libmysqld/Makefile.am:
  Manual merge.
sql/ha_ndbcluster.cc:
  Manual merge.
sql/mysqld.cc:
  Manual merge.
2005-11-28 20:14:12 +01:00
unknown
98b81f0a6d Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-bug15204


sql/opt_range.cc:
  Auto merged
2005-11-25 20:48:26 +03:00
unknown
08a4868bb6 BUG#15024: get_best_covering_ror_intersect() tries to build ROR-intersection
by starting with an empty index set and adding indexes to it until it
becomes covering. If the set becomes covering after adding the first index,
return NULL and don't try constructing ROR-intersection of one index (which
caused a crash)
2005-11-25 20:47:22 +03:00
unknown
591fabb390 Fix bug#13293 Wrongly used index results in endless loop.
Loose index scan using only second part of multipart index was choosen, which
results in creating wrong keys and endless loop.

get_best_group_min_max() now allows loose index scan for distinct only if used
keyparts forms a prefix of the index.


mysql-test/t/group_min_max.test:
  Test case for bug #13293 Wrongly used index results in endless loop.
mysql-test/r/group_min_max.result:
  Test case for bug #13293 Wrongly used index results in endless loop.
sql/opt_range.cc:
  Fix bug #13293 Wrongly used index results in endless loop.
  get_best_group_min_max() now allows loose index scan for distinct only if used keyparts forms a prefix of the index.
2005-11-24 19:54:02 +03:00
unknown
2d3d9773c1 Merge mysql.com:/home/my/mysql-5.1
into  mysql.com:/home/my/mysql-5.1-TDC


sql/handler.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-11-24 06:23:51 +02:00
unknown
0db7a010e4 Added bitmap_buffer_size()
Removed valgrind warnings when using not aligned bitmap buffer size
Added setting of thread_stack


include/my_bitmap.h:
  Added bitmap_buffer_size()
sql/handler.cc:
  use bitmap_buffer_size()
sql/opt_range.cc:
  use bitmap_buffer_size()
sql/sql_insert.cc:
  Use bitmap_buffer_size()
sql/sql_parse.cc:
  Added setting of thread_stack when taking thread from thread cache
sql/sql_plugin.cc:
  Set thread_stack
2005-11-24 06:15:35 +02:00
unknown
039168c2fa Merge mysql.com:/home/my/mysql-5.1
into  mysql.com:/home/my/mysql-5.1-TDC


mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_federated.h:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/key.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/parse_file.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.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_class.cc:
  Auto merged
sql/sql_class.h:
  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_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/structs.h:
  Auto merged
sql/field.cc:
  Merge with global tree
sql/sql_base.cc:
  Merge with global tree
sql/table.cc:
  Merge with global tree
2005-11-23 22:58:53 +02:00
unknown
f631b361b6 Table definition cache, part 2
The table opening process now works the following way:
- Create common TABLE_SHARE object
- Read the .frm file and unpack it into the TABLE_SHARE object
- Create a TABLE object based on the information in the TABLE_SHARE
  object and open a handler to the table object

Other noteworthy changes:
- In TABLE_SHARE the most common strings are now LEX_STRING's
- Better error message when table is not found
- Variable table_cache is now renamed 'table_open_cache'
- New variable 'table_definition_cache' that is the number of table defintions that will be cached
- strxnmov() calls are now fixed to avoid overflows
- strxnmov() will now always add one end \0 to result
- engine objects are now created with a TABLE_SHARE object instead of a TABLE object.
- After creating a field object one must call field->init(table) before using it

- For a busy system this change will give you:
 - Less memory usage for table object
 - Faster opening of tables (if it's has been in use or is in table definition cache)
 - Allow you to cache many table definitions objects
 - Faster drop of table


mysql-test/mysql-test-run.sh:
  Fixed some problems with --gdb option
  Test both with socket and tcp/ip port that all old servers are killed
mysql-test/r/flush_table.result:
  More tests with lock table with 2 threads + flush table
mysql-test/r/information_schema.result:
  Removed old (now wrong) result
mysql-test/r/innodb.result:
  Better error messages (thanks to TDC patch)
mysql-test/r/merge.result:
  Extra flush table test
mysql-test/r/ndb_bitfield.result:
  Better error messages (thanks to TDC patch)
mysql-test/r/ndb_partition_error.result:
  Better error messages (thanks to TDC patch)
mysql-test/r/query_cache.result:
  Remove tables left from old tests
mysql-test/r/temp_table.result:
  Test truncate with temporary tables
mysql-test/r/variables.result:
  Table_cache -> Table_open_cache
mysql-test/t/flush_table.test:
  More tests with lock table with 2 threads + flush table
mysql-test/t/merge.test:
  Extra flush table test
mysql-test/t/multi_update.test:
  Added 'sleep' to make test predictable
mysql-test/t/query_cache.test:
  Remove tables left from old tests
mysql-test/t/temp_table.test:
  Test truncate with temporary tables
mysql-test/t/variables.test:
  Table_cache -> Table_open_cache
mysql-test/valgrind.supp:
  Remove warning that may happens becasue threads dies in different order
mysys/hash.c:
  Fixed wrong DBUG_PRINT
mysys/mf_dirname.c:
  More DBUG
mysys/mf_pack.c:
  Better comment
mysys/mf_tempdir.c:
  More DBUG
  Ensure that we call cleanup_dirname() on all temporary directory paths.
  
  If we don't do this, we will get a failure when comparing temporary table
  names as in some cases the temporary table name is run through convert_dirname())
mysys/my_alloc.c:
  Indentation fix
sql/examples/ha_example.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/examples/ha_example.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/examples/ha_tina.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/examples/ha_tina.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/field.cc:
  Update for table definition cache:
  - Field creation now takes TABLE_SHARE instead of TABLE as argument
    (This is becasue field definitions are now cached in TABLE_SHARE)
    When a field is created, one now must call field->init(TABLE) before using it
  - Use s->db instead of s->table_cache_key
  - Added Field::clone() to create a field in TABLE from a field in TABLE_SHARE
  - make_field() takes TABLE_SHARE as argument instead of TABLE
  - move_field() -> move_field_offset()
sql/field.h:
  Update for table definition cache:
  - Field creation now takes TABLE_SHARE instead of TABLE as argument
    (This is becasue field definitions are now cached in TABLE_SHARE)
    When a field is created, one now must call field->init(TABLE) before using it
  - Added Field::clone() to create a field in TABLE from a field in TABLE_SHARE
  - make_field() takes TABLE_SHARE as argument instead of TABLE
  - move_field() -> move_field_offset()
sql/ha_archive.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_archive.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_berkeley.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Changed name of argument create() to not hide internal 'table' variable.
  table->s  -> table_share
sql/ha_berkeley.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_blackhole.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_blackhole.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_federated.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Fixed comments
  Remove index variable and replace with pointers (simple optimization)
  move_field() -> move_field_offset()
  Removed some strlen() calls
sql/ha_federated.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_heap.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Simplify delete_table() and create() as the given file names are now without extension
sql/ha_heap.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_innodb.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_innodb.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_myisam.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Remove not needed fn_format()
  Fixed for new table->s structure
sql/ha_myisam.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_myisammrg.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Don't set 'is_view' for MERGE tables
  Use new interface to find_temporary_table()
sql/ha_myisammrg.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Added flag HA_NO_COPY_ON_ALTER
sql/ha_ndbcluster.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Fixed wrong calls to strxnmov()
  Give error HA_ERR_TABLE_DEF_CHANGED if table definition has changed
  drop_table -> intern_drop_table()
  table->s -> table_share
  Move part_info to TABLE
  Fixed comments & DBUG print's
  New arguments to print_error()
sql/ha_ndbcluster.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
sql/ha_partition.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  We can't set up or use part_info when creating handler as there is not yet any table object
  New ha_intialise() to work with TDC (Done by Mikael)
sql/ha_partition.h:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  Got set_part_info() from Mikael
sql/handler.cc:
  We new use TABLE_SHARE instead of TABLE when creating engine handlers
  ha_delete_table() now also takes database as an argument
  handler::ha_open() now takes TABLE as argument
  ha_open() now calls ha_allocate_read_write_set()
  Simplify ha_allocate_read_write_set()
  Remove ha_deallocate_read_write_set()
  Use table_share (Cached by table definition cache)
sql/handler.h:
  New table flag: HA_NO_COPY_ON_ALTER (used by merge tables)
  Remove ha_deallocate_read_write_set()
  get_new_handler() now takes TABLE_SHARE as argument
  ha_delete_table() now gets database as argument
sql/item.cc:
  table_name and db are now LEX_STRING objects
  When creating fields, we have now have to call field->init(table)
  move_field -> move_field_offset()
sql/item.h:
  tmp_table_field_from_field_type() now takes an extra paramenter 'fixed_length' to allow one to force usage of CHAR
   instead of BLOB
sql/item_cmpfunc.cc:
  Fixed call to tmp_table_field_from_field_type()
sql/item_create.cc:
  Assert if new not handled cast type
sql/item_func.cc:
  When creating fields, we have now have to call field->init(table)
  dummy_table used by 'sp' now needs a TABLE_SHARE object
sql/item_subselect.cc:
  Trivial code cleanups
sql/item_sum.cc:
  When creating fields, we have now have to call field->init(table)
sql/item_timefunc.cc:
  Item_func_str_to_date::tmp_table_field() now replaced by call to
   tmp_table_field_from_field_type() (see item_timefunc.h)
sql/item_timefunc.h:
  Simply tmp_table_field()
sql/item_uniq.cc:
  When creating fields, we have now have to call field->init(table)
sql/key.cc:
  Added 'KEY' argument to 'find_ref_key' to simplify code
sql/lock.cc:
  More debugging
  Use create_table_def_key() to create key for table cache
  Allocate TABLE_SHARE properly when creating name lock
  Fix that locked_table_name doesn't test same table twice
sql/mysql_priv.h:
  New functions for table definition cache
  New interfaces to a lot of functions.
  New faster interface to find_temporary_table() and close_temporary_table()
sql/mysqld.cc:
  Added support for table definition cache of size 'table_def_size'
  Fixed som calls to strnmov()
  Changed name of 'table_cache' to 'table_open_cache'
sql/opt_range.cc:
  Use new interfaces
  Fixed warnings from valgrind
sql/parse_file.cc:
  Safer calls to strxnmov()
  Fixed typo
sql/set_var.cc:
  Added variable 'table_definition_cache'
  Variable table_cache renamed to 'table_open_cache'
sql/slave.cc:
  Use new interface
sql/sp.cc:
  Proper use of TABLE_SHARE
sql/sp_head.cc:
  Remove compiler warnings
  We have now to call field->init(table)
sql/sp_head.h:
  Pointers to parsed strings are now const
sql/sql_acl.cc:
  table_name is now a LEX_STRING
sql/sql_base.cc:
  Main implementation of table definition cache
  (The #ifdef's are there for the future when table definition cache will replace open table cache)
  Now table definitions are cached indepndent of open tables, which will speed up things when a table is in use at once from several places
  Views are not yet cached; For the moment we only cache if a table is a view or not.
  
  Faster implementation of find_temorary_table()
  Replace 'wait_for_refresh()' with the more general function 'wait_for_condition()'
  Drop table is slightly faster as we can use the table definition cache to know the type of the table
sql/sql_cache.cc:
  table_cache_key and table_name are now LEX_STRING
  'sDBUG print fixes
sql/sql_class.cc:
  table_cache_key is now a LEX_STRING
  safer strxnmov()
sql/sql_class.h:
  Added number of open table shares (table definitions)
sql/sql_db.cc:
  safer strxnmov()
sql/sql_delete.cc:
  Use new interface to find_temporary_table()
sql/sql_derived.cc:
  table_name is now a LEX_STRING
sql/sql_handler.cc:
  TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's
sql/sql_insert.cc:
  TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's
sql/sql_lex.cc:
  Make parsed string a const (to quickly find out if anything is trying to change the query string)
sql/sql_lex.h:
  Make parsed string a const (to quickly find out if anything is trying to change the query string)
sql/sql_load.cc:
  Safer strxnmov()
sql/sql_parse.cc:
  Better error if wrong DB name
sql/sql_partition.cc:
  part_info moved to TABLE from TABLE_SHARE
  Indentation changes
sql/sql_select.cc:
  Indentation fixes
  Call field->init(TABLE) for new created fields
  Update create_tmp_table() to use TABLE_SHARE properly
sql/sql_select.h:
  Call field->init(TABLE) for new created fields
sql/sql_show.cc:
  table_name is now a LEX_STRING
  part_info moved to TABLE
sql/sql_table.cc:
  Use table definition cache to speed up delete of tables
  Fixed calls to functions with new interfaces
  Don't use 'share_not_to_be_used'
  Instead of doing openfrm() when doing repair, we now have to call
  get_table_share() followed by open_table_from_share().
  Replace some fn_format() with faster unpack_filename().
  Safer strxnmov()
  part_info is now in TABLE
  Added Mikaels patch for partition and ALTER TABLE
  Instead of using 'TABLE_SHARE->is_view' use 'table_flags() & HA_NO_COPY_ON_ALTER
sql/sql_test.cc:
  table_name and table_cache_key are now LEX_STRING's
sql/sql_trigger.cc:
  TABLE_SHARE->db and TABLE_SHARE->table_name are now LEX_STRING's
  safer strxnmov()
  Removed compiler warnings
sql/sql_update.cc:
  Call field->init(TABLE) after field is created
sql/sql_view.cc:
  safer strxnmov()
  Create common TABLE_SHARE object for views to allow us to cache if table is a view
sql/structs.h:
  Added SHOW_TABLE_DEFINITIONS
sql/table.cc:
  Creation and destruct of TABLE_SHARE objects that are common for many TABLE objects
  
  The table opening process now works the following way:
  - Create common TABLE_SHARE object
  - Read the .frm file and unpack it into the TABLE_SHARE object
  - Create a TABLE object based on the information in the TABLE_SHARE
    object and open a handler to the table object
  
  open_table_def() is written in such a way that it should be trival to add parsing of the .frm files in new formats
sql/table.h:
  TABLE objects for the same database table now share a common TABLE_SHARE object
  In TABLE_SHARE the most common strings are now LEX_STRING's
sql/unireg.cc:
  Changed arguments to rea_create_table() to have same order as other functions
  Call field->init(table) for new created fields
sql/unireg.h:
  Added OPEN_VIEW
strings/strxnmov.c:
  Change strxnmov() to always add end \0
  This makes usage of strxnmov() safer as most of MySQL code assumes that strxnmov() will create a null terminated string
2005-11-23 22:45:02 +02:00
unknown
33a2716a85 Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-new


Makefile.am:
  Auto merged
client/mysqltest.c:
  Auto merged
configure.in:
  Auto merged
extra/Makefile.am:
  Auto merged
include/Makefile.am:
  Auto merged
include/my_global.h:
  Auto merged
libmysqld/examples/Makefile.am:
  Auto merged
mysql-test/Makefile.am:
  Auto merged
mysql-test/r/ndb_alter_table.result:
  Auto merged
mysql-test/t/ndb_alter_table.test:
  Auto merged
scripts/Makefile.am:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_federated.h:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/key.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/structs.h:
  Auto merged
sql/table.cc:
  Auto merged
sql/tztime.cc:
  Auto merged
storage/myisam/myisamchk.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/ndb/docs/Makefile.am:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
libmysqld/Makefile.am:
  Merged from 5.0 to 5.1.
sql/ha_berkeley.cc:
  Merged from 5.0 to 5.1.
sql/lex.h:
  Merged from 5.0 to 5.1.
sql/set_var.cc:
  Merged from 5.0 to 5.1.
sql/share/errmsg.txt:
  Merged from 5.0 to 5.1.
sql/sql_lex.h:
  Merged from 5.0 to 5.1.
sql/sql_show.cc:
  Merged from 5.0 to 5.1.
sql/sql_yacc.yy:
  Merged from 5.0 to 5.1.
2005-11-23 14:57:00 +02:00
unknown
fe63e09581 Inefficient usage of String::append() fixed.
Bad examples of usage of a string with its length fixed.
The incorrect length in the trigger file configuration descriptor
  fixed (BUG#14090).
A hook for unknown keys added to the parser to support old .TRG files.


sql/field.cc:
  Inefficient usage of String::append() fixed.
  Bad examples of usage of a string with its length fixed.
sql/ha_berkeley.cc:
  A bad example of usage of a string with its length fixed.
sql/ha_federated.cc:
  Inefficient usage of String::append() fixed.
sql/ha_myisammrg.cc:
  Bad examples of usage of a string with its length fixed.
sql/handler.cc:
  Inefficient usage of String::append() fixed.
sql/item.cc:
  Bad examples of usage of a string with its length fixed.
sql/item.h:
  A bad example of usage of a string with its length fixed.
sql/item_cmpfunc.cc:
  Bad examples of usage of a string with its length fixed.
sql/item_func.cc:
  Bad examples of usage of a string with its length fixed.
sql/item_strfunc.cc:
  Bad examples of usage of a string with its length fixed.
sql/item_subselect.cc:
  Bad examples of usage of a string with its length fixed.
sql/item_sum.cc:
  Bad examples of usage of a string with its length fixed.
  Inefficient usage of String::append() fixed.
sql/item_timefunc.cc:
  Inefficient using of String::append() fixed.
  Bad examples of usage of a string with its length fixed.
sql/item_uniq.h:
  Bad examples of usage of a string with its length fixed.
sql/key.cc:
  Bad examples of usage of a string with its length fixed.
sql/log.cc:
  Bad examples of usage of a string with its length fixed.
sql/log_event.cc:
  Bad examples of usage of a string with its length fixed.
sql/mysqld.cc:
  The dummy parser hook allocated.
sql/opt_range.cc:
  Inefficient usage of String::append() fixed.
sql/parse_file.cc:
  Bad examples of usage of a string with its length fixed.
  A hook for unknown keys added to the parser.
sql/parse_file.h:
  A hook for unknown keys added to the parser.
sql/protocol.cc:
  A bad example of usage of a string with its length fixed.
sql/repl_failsafe.cc:
  Bad examples of usage of a string with its length fixed.
sql/share/errmsg.txt:
  A warning for old format config file.
sql/slave.cc:
  Bad examples of usage of a string with its length fixed.
sql/sp.cc:
  Bad examples of usage of a string with its length fixed.
sql/sp_head.cc:
  Bad examples of usage of a string with its length fixed.
sql/spatial.cc:
  A bad example of usage of a string with its length fixed.
sql/sql_acl.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_analyse.cc:
  Bad examples of usage of a string with its length fixed.
  Inefficient usage of String::append() fixed.
sql/sql_lex.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_load.cc:
  A bad example of usage of a string with its length fixed.
sql/sql_parse.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_prepare.cc:
  A bad example of usage of a string with its length fixed.
sql/sql_select.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_show.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_string.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_string.h:
  The macro definition moved to sql_string.h to
    be accessible in all parts of server.
sql/sql_table.cc:
  Bad examples of usage of a string with its length fixed.
sql/sql_trigger.cc:
  Bad examples of usage of a string with its length fixed.
  The incorrect length in the trigger file configuration descriptor
    fixed (BUG#14090).
  The hook for processing incorrect sql_mode record added.
sql/sql_view.cc:
  A dummy  hook used for parsing views.
sql/structs.h:
  The macro definition moved to sql_string.h to be
    accessible in all parts of server.
sql/table.cc:
  A bad example of usage of a string with its length fixed.
sql/tztime.cc:
  A bad example of usage of a string with its length fixed.
2005-11-20 20:47:07 +02:00
unknown
41de6f9a7c Merge mysql.com:/home/mysql_src/mysql-5.0
into  mysql.com:/home/mysql_src/mysql-5.1-merge-of-5.0 (not all files are good,
I'll fix; I'll ask some devs to check their part)


BitKeeper/etc/ignore:
  auto-union
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/information_schema.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/myisam/mi_key.c:
  Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbImpl.hpp:
  Auto merged
storage/ndb/src/ndbapi/ndb_cluster_connection.cpp:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
configure.in:
  merge
mysql-test/r/ps_1general.result:
  merge ("ul", will fix)
sql/examples/ha_tina.cc:
  merge
sql/ha_innodb.cc:
  merge
sql/handler.h:
  merge
sql/log.cc:
  merge
sql/set_var.cc:
  merge
sql/share/errmsg.txt:
  merge (bad, will fix)
sql/sql_show.cc:
  merge (bad, will fix)
sql/sql_yacc.yy:
  merge
storage/ndb/src/ndbapi/NdbRecAttr.cpp:
  merge
2005-11-18 16:38:01 +01:00
unknown
2361720c98 Merge mysql.com:/home/my/mysql-5.0
into  mysql.com:/home/my/mysql-5.1


BUILD/FINISH.sh:
  Auto merged
BitKeeper/deleted/.del-makefilewin.i~5c8479dcb8a455b2:
  Auto merged
BitKeeper/deleted/.del-makefilewin~13888739357b3025:
  Auto merged
BitKeeper/deleted/.del-makefilewin~14f24a4a173e2fcd:
  Auto merged
BitKeeper/deleted/.del-makefilewin~15e9e5c9e8fa870b:
  Auto merged
BitKeeper/deleted/.del-makefilewin~1c53f31b88dd36e:
  Auto merged
BitKeeper/deleted/.del-makefilewin~1dbc058d76ebf1db:
  Auto merged
BitKeeper/deleted/.del-makefilewin~2e0407fe123f8365:
  Auto merged
BitKeeper/deleted/.del-makefilewin~2fc379bd4065c995:
  Auto merged
BitKeeper/deleted/.del-makefilewin~389ee2dcf79afb79:
  Auto merged
BitKeeper/deleted/.del-makefilewin~4d139e182457e553:
  Auto merged
BitKeeper/deleted/.del-makefilewin~5104767c73775697:
  Auto merged
BitKeeper/deleted/.del-makefilewin~608ed49dcd88e0f7:
  Auto merged
BitKeeper/deleted/.del-makefilewin~63acd666293282a:
  Auto merged
BitKeeper/deleted/.del-makefilewin~6ba64863bce3d0b8:
  Auto merged
BitKeeper/deleted/.del-makefilewin~72a64128bacce71b:
  Auto merged
BitKeeper/deleted/.del-makefilewin~78000390c783b1c5:
  Auto merged
BitKeeper/deleted/.del-makefilewin~7a9d7d5a42bbfaf5:
  Auto merged
Makefile.am:
  Auto merged
BitKeeper/deleted/.del-makefilewin~a40ea12eebdd6ef0:
  Auto merged
BitKeeper/deleted/.del-makefilewin~aeea7c82f21f7cf5:
  Auto merged
BitKeeper/deleted/.del-makefilewin~b643e38d8da389ac:
  Auto merged
BitKeeper/deleted/.del-makefilewin~c7b621c745e5de95:
  Auto merged
BitKeeper/deleted/.del-makefilewin~c8273a47b90f52bb:
  Auto merged
BitKeeper/deleted/.del-makefilewin~d1a9d1f7d33fcb73:
  Auto merged
BitKeeper/deleted/.del-makefilewin~d37b6b303348c871:
  Auto merged
BitKeeper/deleted/.del-makefilewin~d90f35fdc3f2ee5f:
  Auto merged
BitKeeper/deleted/.del-makefilewin~dc4b8ad5ea53bd:
  Auto merged
BitKeeper/deleted/.del-makefilewin~dea10ec1c94f7be:
  Auto merged
BitKeeper/deleted/.del-makefilewin~ef3a208fa0e9b0db:
  Auto merged
BitKeeper/deleted/.del-makefilewin~f1e3b890aa1c9ea3:
  Auto merged
BitKeeper/deleted/.del-makefilewin~f4b7b99a887b7de:
  Auto merged
BitKeeper/deleted/.del-makefilewin~fdda94ad32fa9e34:
  Auto merged
BitKeeper/deleted/.del-my_cnf~977f69858affc57b:
  Auto merged
BitKeeper/etc/config:
  Auto merged
VC++Files/libmysqld/libmysqld.dsp:
  Auto merged
VC++Files/sql/mysqld.dsp:
  Auto merged
client/mysqltest.c:
  Auto merged
include/Makefile.am:
  Auto merged
include/base64.h:
  Auto merged
include/my_base.h:
  Auto merged
include/mysql_com.h:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/ndb_basic.result:
  Auto merged
mysql-test/r/ndb_condition_pushdown.result:
  Auto merged
mysql-test/t/alter_table.test:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysys/Makefile.am:
  Auto merged
mysys/base64.c:
  Auto merged
scripts/make_win_src_distribution.sh:
  Auto merged
scripts/mysql_create_system_tables.sh:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_berkeley.h:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_help.cc:
  Auto merged
sql/sql_insert.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_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
storage/heap/_check.c:
  Auto merged
storage/heap/hp_create.c:
  Auto merged
storage/innobase/include/Makefile.am:
  Auto merged
storage/innobase/include/rem0rec.h:
  Auto merged
storage/innobase/include/rem0rec.ic:
  Auto merged
storage/innobase/row/row0ins.c:
  Auto merged
storage/innobase/row/row0upd.c:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_delete.c:
  Auto merged
storage/myisam/mi_rkey.c:
  Auto merged
storage/myisam/mi_rnext_same.c:
  Auto merged
storage/myisam/mi_search.c:
  Auto merged
storage/myisam/mi_write.c:
  Auto merged
storage/myisam/myisamchk.c:
  Auto merged
storage/myisam/myisamdef.h:
  Auto merged
storage/myisam/sort.c:
  Auto merged
storage/myisammrg/myrg_queue.c:
  Auto merged
storage/ndb/config/type_util.mk.am:
  Auto merged
storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp:
  Auto merged
storage/ndb/include/mgmapi/mgmapi_config_parameters.h:
  Auto merged
storage/ndb/include/mgmapi/ndbd_exit_codes.h:
  Auto merged
storage/ndb/include/transporter/TransporterCallback.hpp:
  Auto merged
storage/ndb/src/common/mgmcommon/IPCConfig.cpp:
  Auto merged
storage/ndb/src/common/transporter/SHM_Transporter.cpp:
  Auto merged
storage/ndb/src/common/transporter/SHM_Transporter.hpp:
  Auto merged
storage/ndb/src/common/transporter/SHM_Transporter.unix.cpp:
  Auto merged
storage/ndb/src/common/transporter/SHM_Transporter.win32.cpp:
  Auto merged
storage/ndb/src/common/transporter/Transporter.hpp:
  Auto merged
storage/ndb/src/common/transporter/TransporterRegistry.cpp:
  Auto merged
storage/ndb/src/common/util/Makefile.am:
  Auto merged
storage/ndb/src/common/util/Parser.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Auto merged
storage/ndb/src/kernel/error/ndbd_exit_codes.c:
  Auto merged
storage/ndb/src/kernel/vm/FastScheduler.cpp:
  Auto merged
storage/ndb/src/kernel/vm/TransporterCallback.cpp:
  Auto merged
storage/ndb/src/kernel/vm/VMSignal.hpp:
  Auto merged
storage/ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.hpp:
  Auto merged
storage/ndb/src/mgmsrv/Services.cpp:
  Auto merged
storage/ndb/src/ndbapi/TransporterFacade.cpp:
  Auto merged
storage/ndb/test/ndbapi/testBackup.cpp:
  Auto merged
storage/ndb/test/ndbapi/testOperations.cpp:
  Auto merged
storage/ndb/test/src/HugoCalculator.cpp:
  Auto merged
storage/ndb/tools/ndb_condig.cpp:
  Auto merged
strings/ctype-big5.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
BUILD/SETUP.sh:
  manual merge
configure.in:
  manual merge
mysql-test/r/alter_table.result:
  manual merge
sql/handler.cc:
  manual merge
sql/mysql_priv.h:
  manual merge
sql/records.cc:
  manual merge
sql/share/errmsg.txt:
  manual merge
sql/sql_table.cc:
  manual merge
  Fix labels
sql/sql_update.cc:
  manual merge
sql/table.cc:
  manual merge
sql/unireg.cc:
  manual merge
storage/ndb/config/type_ndbapi.mk.am:
  manual merge
2005-11-05 01:32:55 +02:00
unknown
234bf9a70c avoiding of calling Item::val_* methods family with opt_range mem_root, because its life time is too short. (BUG#14342)
mysql-test/r/subselect_innodb.result:
  BUG#14342 test case
mysql-test/t/subselect_innodb.test:
  BUG#14342 test case
sql/opt_range.cc:
  avoiding of calling Item::val_* methods family with opt_range mem_root, because its life time is too short.
2005-11-04 13:16:46 +02:00
unknown
fa8dafe5bb opt_range.cc:
Additional fix for bug#14093


sql/opt_range.cc:
  Additional fix for bug#14093
2005-11-03 17:43:03 +03:00
unknown
4f2fe28773 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/opt/local/work/mysql-5.0-14210


sql/handler.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
2005-11-03 15:24:55 +03:00
unknown
3fa0dd23e0 A fix and a test case for Bug#14210 "Simple query with > operator on
large table gives server crash": make sure that when a MyISAM temporary
table is created for a cursor, it's created in its memory root,
not the memory root of the current query.


mysql-test/r/sp.result:
  Test results fixed: a test case for Bug#14210
mysql-test/t/sp.test:
  A test case for Bug#14210 "Simple query with > operator on large table 
  gives server crash"
sql/handler.cc:
  - rewrite get_new_handler to accept a memory root and use it for
sql/handler.h:
  - get_new_handler declaration changed
sql/opt_range.cc:
  - get_new_handler declaration changed
sql/sql_base.cc:
  - get_new_handler declaration changed
sql/sql_select.cc:
  - the actual fix for Bug#14210. In create_myisam_from_heap we should
  create the new table handler in TABLE::mem_root, not in THD::mem_root:
  the latter is freed shortly after cursor is open.
  - adjust create_tmp_table to explicitly supply &table->mem_root
  to get_new_handler when creating a handler for a new temporary table
sql/sql_table.cc:
  - get_new_handler declaration changed
sql/table.cc:
  - get_new_handler declaration changed
sql/unireg.cc:
  - get_new_handler declaration changed
tests/mysql_client_test.c:
  A test case for Bug#14210 "Simple query with > operator on large table
   gives server crash": a C API test case is worth adding because of different
  memory allocation/freeing patterns in handling of C API and SP cursors
2005-11-03 14:20:13 +03:00
unknown
bb841518b9 Fix bug #14093 Query takes a lot of time when date format is not valid
Invalid date like 2000-02-32 wasn't converted to int, which lead to not
using index and comparison with field as astring, which results in slow
query execution.

convert_constatn_item() and get_mm_leaf() now forces MODE_INVALID_DATES to
allow such conversion.


sql/item.h:
  Fix bug #14093 Query takes a lot of time when date format is not valid
  To Item_int_with_ref added method real_item() which returns ref.
sql/item_cmpfunc.cc:
   Fix bug #14093 Query takes a lot of time when date format is not valid
  convert_constant_item() now allows conversion of invalid dates like 2000-01-32 to int to make it possible to use index when comparing fields with such dates.
sql/opt_range.cc:
   Fix bug #14093 Query takes a lot of time when date format is not valid
  get_mm_leaf() modified so it allows index usage for comparing fields with invalid dates like 2000-01-32.
mysql-test/r/select.result:
  Test case for bug#14093 Query takes a lot of time when date format is not valid
mysql-test/t/select.test:
  Test case for bug#14093 Query takes a lot of time when date format is not valid
2005-11-03 13:53:49 +03:00
unknown
c5f9e201eb Post-merge fixes 2005-10-19 12:41:30 +04:00
unknown
8698ffc968 BUG#121915: Merge 4.1->5.0
mysql-test/r/update.result:
  Auto merged
mysql-test/t/update.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/records.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/structs.h:
  Auto merged
2005-10-19 01:52:06 +04:00
unknown
8ff8fac53d BUG#12915: post-review fixes 2005-10-18 14:04:14 +04:00
unknown
c2621f3dcb Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0


BUILD/SETUP.sh:
  Auto merged
client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
include/my_sys.h:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/information_schema_inno.result:
  Auto merged
mysql-test/r/multi_statement.result:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/temp_table.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/information_schema_inno.test:
  Auto merged
mysql-test/t/multi_statement.test:
  Auto merged
mysql-test/t/mysql.test:
  Auto merged
mysql-test/t/temp_table.test:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/structs.h:
  Auto merged
sql/table.h:
  Auto merged
strings/decimal.c:
  Auto merged
sql/sql_parse.cc:
  manual merge
sql/sql_prepare.cc:
  manual merge
sql/table.cc:
  manual merge
2005-10-08 03:37:23 +03:00
unknown
c807724f36 Review of code pushed since last 5.0 pull:
Ensure that ccache is also used for C programs
mysql: Ensure that 'delimiter' works the same way in batch mode as in normal mode
mysqldump: Change to use ;; (instead of //) as a stored procedure/trigger delimiter
Fixed test cases by adding missing DROP's and rename views to be of type 'v#'
Removed MY_UNIX_PATH from fn_format()
Removed current_db_used from TABLE_LIST
Removed usage of 'current_thd' in Item_splocal
Removed some compiler warnings
A bit faster longlong2str code



BUILD/FINISH.sh:
  Ensure that ccache is also used for C programs
BUILD/SETUP.sh:
  Ensure that ccache is also used for C programs
client/mysql.cc:
  More debugging
  Ensure that 'delimiter' works the same way in batch mode as in normal mode.
  Compare 'delimiter' command case-insensitive.
  The above fixes the delimiter bugs so that we can now use ;; as a trigger/SP function delimiter in mysqldump.
client/mysqldump.c:
  Indentation fixes
  Use ;; as a delmimiter for stored procedures and triggers instead of //
client/mysqltest.c:
  Indentation fixes
include/my_sys.h:
  Remove not needed MY_UNIX_PATH parameter
mysql-test/r/alter_table.result:
  Better to reuse mysqltest database (test didn't properly delete mysqltest1 at start)
mysql-test/r/func_str.result:
  More testing of CONV() (to ensure that longlong2str() works correctly)
mysql-test/r/information_schema.result:
  Drop all used tables and views
  Rename view tables to 'v#' to ensure that if this test fails, not a lot of other test fails
mysql-test/r/information_schema_inno.result:
  Drop all used tables
mysql-test/r/multi_statement.result:
  Drop used tables
mysql-test/r/mysql.result:
  Add error messages to result
mysql-test/r/mysqldump.result:
  ;; is now used as SP/trigger delimiter
mysql-test/r/mysqlshow.result:
  Drop used tables
mysql-test/r/temp_table.result:
  Drop used views
  Rename views to v#
mysql-test/t/alter_table.test:
  Better to reuse mysqltest database (test didn't properly delete mysqltest1 at start)
mysql-test/t/func_str.test:
  More testing of CONV() (to ensure that longlong2str() works correctly)
mysql-test/t/information_schema.test:
  Drop all used tables and views
  Rename view tables to 'v#' to ensure that if this test fails, not a lot of other test fails
mysql-test/t/information_schema_inno.test:
  Drop all used tables
mysql-test/t/multi_statement.test:
  Drop used tables
mysql-test/t/mysql.test:
  Add error messages to result
mysql-test/t/mysqlshow.test:
  Drop used tables
mysql-test/t/temp_table.test:
  Drop used views
  Rename views to v#
mysys/mf_format.c:
  Remove not needed MY_UNIX_PATH parameter
  (This goes against how fn_format() is supposed to work and also conflicts with other options like MY_RETURN_REAL_PATH)
sql/ha_federated.cc:
  Removed extra empty line
sql/item.cc:
  Use 'str_value' instead of 'str_value_ptr' to hold result for Item_splocal
  Remove some calls to 'thd' in Item_splocal by making 'thd' a class variable
  One doesn't have to set 'null_value' when calling 'is_null()'
sql/item.h:
  Add THD as a class variable to Item_splocal
  Use 'str_value' instead of 'str_value_ptr' to hold temp result
  Fixed bug in Item_hex when used in CAST()
sql/item_func.cc:
  Optimize new code
sql/log_event.cc:
  Move 'to_unix_path()' out of fn_format()
sql/opt_range.cc:
  Simplify code
sql/sp_head.cc:
  Ensure that Item_splocal has thd set before we call '->this_item()'
sql/sql_class.cc:
  Return error if Statement::insert() fails in either hash_insert()
sql/sql_parse.cc:
  Remove 'current_db_used' as we can trivially check if db table qualifier was used without this.
  Simplify code
sql/sql_prepare.cc:
  Use enum instead of const int, to avoid ugly code for VC++
sql/structs.h:
  Remove compiler warnings when using STRING_WITH_LEN() with constant strings.
sql/table.cc:
  Fixed indentation
sql/table.h:
  Remove not needed current_db_used
strings/decimal.c:
  Simplify code
strings/longlong2str-x86.s:
  A bit faster longlong2str.
  (Took some ideas from Peter Gulutzan's code)
strings/my_strtoll10.c:
  Simplify code for MetroWerks compiler
2005-10-06 17:54:43 +03:00
unknown
d04832d195 Merge
BitKeeper/etc/ignore:
  auto-union
BUILD/autorun.sh:
  Auto merged
BitKeeper/deleted/.del-bdb.vcproj~ed8534936e40cefb:
  Auto merged
BitKeeper/deleted/.del-heap.vcproj~70c0cc1d680a51c1:
  Auto merged
BitKeeper/deleted/.del-innobase.vcproj~71e1de81f11138bf:
  Auto merged
BitKeeper/deleted/.del-myisam.vcproj~32bb9e4a163fcb5a:
  Auto merged
BitKeeper/deleted/.del-myisammrg.vcproj~6534e59acbfbb63:
  Auto merged
BitKeeper/deleted/.del-mysqld.vcproj~703886a28862bb2:
  Auto merged
Makefile.am:
  Auto merged
client/mysqltest.c:
  Auto merged
include/my_global.h:
  Auto merged
include/mysql_com.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/ndb_alter_table.result:
  Auto merged
mysql-test/r/ps_6bdb.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysys/default.c:
  Auto merged
scripts/make_win_src_distribution.sh:
  Auto merged
scripts/mysql_create_system_tables.sh:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_berkeley.h:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_heap.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_acl.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/innobase/buf/buf0buf.c:
  Auto merged
storage/innobase/buf/buf0flu.c:
  Auto merged
storage/innobase/data/data0data.c:
  Auto merged
storage/innobase/dict/dict0dict.c:
  Auto merged
storage/innobase/include/btr0btr.h:
  Auto merged
storage/innobase/include/data0type.ic:
  Auto merged
storage/innobase/include/dict0dict.h:
  Auto merged
storage/innobase/include/dict0mem.h:
  Auto merged
storage/innobase/include/mem0mem.h:
  Auto merged
storage/innobase/include/mem0mem.ic:
  Auto merged
storage/innobase/include/os0file.h:
  Auto merged
storage/innobase/include/row0mysql.h:
  Auto merged
storage/innobase/include/trx0trx.h:
  Auto merged
storage/innobase/include/ut0mem.h:
  Auto merged
storage/innobase/mem/mem0mem.c:
  Auto merged
storage/innobase/os/os0file.c:
  Auto merged
storage/innobase/os/os0proc.c:
  Auto merged
storage/innobase/rem/rem0rec.c:
  Auto merged
storage/innobase/row/row0ins.c:
  Auto merged
storage/innobase/row/row0mysql.c:
  Auto merged
storage/innobase/srv/srv0start.c:
  Auto merged
storage/innobase/trx/trx0sys.c:
  Auto merged
storage/innobase/trx/trx0trx.c:
  Auto merged
storage/innobase/ut/ut0mem.c:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_dbug.c:
  Auto merged
storage/myisam/mi_delete.c:
  Auto merged
storage/myisam/mi_delete_all.c:
  Auto merged
storage/myisam/mi_key.c:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisam/mi_rkey.c:
  Auto merged
storage/myisam/mi_search.c:
  Auto merged
storage/myisam/mi_test1.c:
  Auto merged
storage/myisam/mi_update.c:
  Auto merged
storage/myisam/mi_write.c:
  Auto merged
storage/myisam/myisamchk.c:
  Auto merged
storage/myisam/myisamdef.h:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/myisam/sp_key.c:
  Auto merged
storage/myisammrg/myrg_rkey.c:
  Auto merged
storage/ndb/include/kernel/GlobalSignalNumbers.h:
  Auto merged
storage/ndb/include/kernel/signaldata/ApiVersion.hpp:
  Auto merged
storage/ndb/include/kernel/signaldata/EventReport.hpp:
  Auto merged
storage/ndb/include/kernel/signaldata/StopReq.hpp:
  Auto merged
storage/ndb/include/mgmapi/ndb_logevent.h:
  Auto merged
storage/ndb/include/ndbapi/NdbBlob.hpp:
  Auto merged
storage/ndb/include/ndbapi/NdbIndexOperation.hpp:
  Auto merged
storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp:
  Auto merged
storage/ndb/include/ndbapi/NdbOperation.hpp:
  Auto merged
storage/ndb/include/ndbapi/NdbRecAttr.hpp:
  Auto merged
storage/ndb/include/ndbapi/NdbTransaction.hpp:
  Auto merged
storage/ndb/src/common/util/SimpleProperties.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/backup/Backup.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  Auto merged
storage/ndb/src/mgmapi/ndb_logevent.cpp:
  Auto merged
storage/ndb/src/mgmclient/CommandInterpreter.cpp:
  Auto merged
storage/ndb/src/mgmsrv/Config.cpp:
  Auto merged
storage/ndb/src/mgmsrv/Config.hpp:
  Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
  Auto merged
storage/ndb/src/mgmsrv/InitConfigFileParser.cpp:
  Auto merged
storage/ndb/src/mgmsrv/InitConfigFileParser.hpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.hpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvrConfig.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp:
  Auto merged
storage/ndb/src/mgmsrv/Services.cpp:
  Auto merged
storage/ndb/src/mgmsrv/Services.hpp:
  Auto merged
storage/ndb/src/mgmsrv/main.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbApiSignal.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbApiSignal.hpp:
  Auto merged
storage/ndb/src/ndbapi/NdbBlob.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbImpl.hpp:
  Auto merged
storage/ndb/src/ndbapi/NdbRecAttr.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbUtil.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbUtil.hpp:
  Auto merged
storage/ndb/src/ndbapi/Ndbif.cpp:
  Auto merged
storage/ndb/src/ndbapi/Ndblist.cpp:
  Auto merged
storage/ndb/src/ndbapi/ObjectMap.hpp:
  Auto merged
storage/ndb/test/include/NDBT_Test.hpp:
  Auto merged
storage/ndb/test/ndbapi/bank/BankLoad.cpp:
  Auto merged
storage/ndb/test/ndbapi/testOIBasic.cpp:
  Auto merged
storage/ndb/test/src/HugoCalculator.cpp:
  Auto merged
storage/ndb/test/src/NDBT_Test.cpp:
  Auto merged
storage/ndb/test/src/NdbBackup.cpp:
  Auto merged
storage/ndb/test/src/NdbRestarts.cpp:
  Auto merged
storage/ndb/tools/ndb_condig.cpp:
  Auto merged
storage/ndb/tools/restore/Restore.cpp:
  Auto merged
storage/ndb/tools/restore/consumer_restore.cpp:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
configure.in:
  merge
BUILD/SETUP.sh:
  merge
BitKeeper/deleted/.del-mysql.sln~f2120278f8a437be:
  SCCS merged
libmysqld/Makefile.am:
  merge
sql/ha_ndbcluster.cc:
  merge
sql/handler.h:
  merge
sql/mysqld.cc:
  merge
sql/opt_range.cc:
  merge
sql/slave.cc:
  merge
sql/slave.h:
  e
  merge
sql/sql_parse.cc:
  merge
sql/table.cc:
  merge
sql/examples/ha_tina.cc:
  merge
sql/examples/ha_tina.h:
  merge
sql/share/errmsg.txt:
  merge
storage/ndb/include/ndbapi/Ndb.hpp:
  merge
storage/ndb/src/common/debugger/EventLogger.cpp:
  merge
storage/ndb/src/kernel/blocks/dbdict/Makefile.am:
  merge
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
  merge
storage/ndb/src/ndbapi/Ndbinit.cpp:
  SCCS merged
2005-10-06 10:54:07 +02:00
unknown
1fe423aeba BUG#12915: Added single-table UPDATE/DELTE ... ORDER BY ... LIMIT
optimization: now can use index to find records to update/delete
when there is no WHERE clause.


mysql-test/r/update.result:
  Testcase for BUG#12915
mysql-test/t/update.test:
  Testcase for BUG#12915
sql/mysql_priv.h:
  BUG#12915: Added init_read_record_idx function.
sql/opt_range.cc:
  BUG#12915: Added get_index_for_order() - find an index that can be
  used to get first N table records in given ordering cheaper then 
  one would with full table scan.
sql/opt_range.h:
  BUG#12915: Added get_index_for_order() function
sql/records.cc:
  BUG#12915: Added init_read_record_idx(), rr_index() that allow to scan
  index using init_read_record()/read_record.read_record()
sql/sql_delete.cc:
  BUG#12915: Added single-table DELETE ... ORDER BY ... LIMIT optimization: 
  now can use index to find records to delete when there is no WHERE clause.
sql/sql_update.cc:
  BUG#12915: Added single-table UPDATE ... ORDER BY ... LIMIT optimization: 
  now can use index to find records to update when there is no WHERE clause.
sql/structs.h:
  BUG#12915: Added init_read_record_idx(), rr_index() that allow to scan
  index using init_read_record()/READ_RECORD::read_record()
2005-09-30 15:21:37 +04:00
unknown
b8ad9d1461 BUG#13081: Disable ROR-index_merge for NDB tables (by adding a
HA_KEY_SCAN_NOT_ROR index flag) as NDB index scans are not guaranteed to be ROR 
scans.
2005-09-30 14:20:15 +04:00
unknown
0004c431db Fix for BUG#13317: Make range optimizer able to produce ranges for "view.field IN (c1,c2)"
and "view.field BETWEEN c1 AND c2"


mysql-test/r/range.result:
  Testcase for BUG#13317
mysql-test/t/range.test:
  Testcase for BUG#13317
2005-09-21 21:36:15 +04:00
unknown
28028b5f07 Fix bug #12291 Table wasn't reinited for index scan after sequential scan
Optimizer did choose "Range checked for each record" for one of the tables.
For first few loops over that table it choose sequential access, on later
stage it choose to use index. Because table was previously initialized for 
sequential access, it skips intitialization for index access, and when
server tries to retrieve data error occurs.

QUICK_RANGE_SELECT::init() changes so if file already initialized for
sequential access, it calls ha_rnd_end() and initializes file for index
access.


sql/opt_range.cc:
  Fix bug #12291 Table wasn't reinited for index scan after sequential scan
mysql-test/t/select.test:
  Test case for bug #12291 Table wasn't reinited for index scan after sequential scan
mysql-test/r/select.result:
  Test case for bug #12291 Table wasn't reinited for index scan after sequential scan
2005-09-16 01:19:43 +04:00
unknown
36aeee3682 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1


configure.in:
  Auto merged
include/my_global.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/examples/ha_tina.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/ndb/include/kernel/signaldata/BackupImpl.hpp:
  Auto merged
storage/ndb/include/kernel/signaldata/BackupSignalData.hpp:
  Auto merged
storage/ndb/include/kernel/signaldata/NFCompleteRep.hpp:
  Auto merged
storage/ndb/include/kernel/signaldata/NodeFailRep.hpp:
  Auto merged
storage/ndb/src/kernel/blocks/backup/Backup.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/backup/Backup.hpp:
  Auto merged
storage/ndb/src/kernel/main.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
storage/ndb/src/mgmsrv/MgmtSrvr.hpp:
  Auto merged
storage/ndb/src/ndbapi/Makefile.am:
  Auto merged
storage/ndb/src/ndbapi/NdbTransaction.cpp:
  Auto merged
storage/ndb/test/src/NdbBackup.cpp:
  Auto merged
2005-09-09 15:26:47 +02:00
unknown
0a61c3abda join_outer.result, opt_range.cc, item_cmpfunc.cc:
Post merge changes
sql_yacc.yy:
  Post merge changes
sql_select.cc:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions (post merge changes).
   The function add_key_fields() is modified. There cannot be NOT before
   BETWEEN/IN anymore. Rather Item_func_between/in objects can represent
   now [NOT]BETWEEN/IN expressions.


sql/item_cmpfunc.cc:
  Post merge changes
sql/opt_range.cc:
  Post merge changes
sql/sql_select.cc:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions (post merge changes).
   The function add_key_fields() is modified. There cannot be NOT before
   BETWEEN/IN anymore. Rather Item_func_between/in objects can represent
   now [NOT]BETWEEN/IN expressions.
sql/sql_yacc.yy:
  Post merge changes.
mysql-test/r/join_outer.result:
  Post merge changes
2005-09-07 17:42:47 +04:00
unknown
2e883d19cf Merge mysql.com:/home/alexi/dev/mysql-4.1-0
into  mysql.com:/home/alexi/dev/mysql-5.0-0


sql/item_cmpfunc.cc:
  Auto merged
mysql-test/r/join_outer.result:
  Manual merge
mysql-test/t/join_outer.test:
  Manual merge
sql/item_cmpfunc.h:
  Manual merge
sql/opt_range.cc:
  Manual merge
sql/sql_yacc.yy:
  Manual merge
BitKeeper/etc/RESYNC_TREE:
  New BitKeeper file ``BitKeeper/etc/RESYNC_TREE''
2005-09-06 23:49:54 +04:00
unknown
f1cc504981 item_cmpfunc.h:
Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   The classes Item_func_between, Item_func_if, Item_func_in are modified.
   Item_func_between/in objects can represent now [NOT]BETWEEN/IN expressions.
   The class Item_func_opt_neg is added to factor out the functionality
   common for the modified classes Item_func_between and Item_func_in.
item_cmpfunc.cc:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   Added Item_func_between::fix_fields(), Item_func_if::fix_fields(),
   Item_func_in::fix_fields(). They correct generic calculation of
   the not_null_tables attribute when it is needed.
   Modified Item_func_between::val_int(), Item_func_in::val_int().
opt_range.cc:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   The function get_mm_tree() is modified. There cannot be NOT before
   BETWEEN/IN anymore. Rather Item_func_between/in objects can represent
   now [NOT]BETWEEN/IN expressions.
sql_yacc.yy:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   Item_func_between/in objects can represent now [NOT]BETWEEN/IN expresions.
join_outer.result:
  Fixed some testcases results (bugs #12101, #12102)
join_outer.test:
  Added testcases for bugs #12101, #12102


mysql-test/t/join_outer.test:
  Added testcases for bugs #12101, #12102
mysql-test/r/join_outer.result:
  Fixed some testcases results (bugs #12101, #12102)
sql/sql_yacc.yy:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   Item_func_between/in objects can represent now [NOT]BETWEEN/IN expresions.
sql/opt_range.cc:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   The function get_mm_tree() is modified. There cannot be NOT before
   BETWEEN/IN anymore. Rather Item_func_between/in objects can represent
   now [NOT]BETWEEN/IN expressions.
sql/item_cmpfunc.cc:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   Added Item_func_between::fix_fields(), Item_func_if::fix_fields(),
   Item_func_in::fix_fields(). They correct generic calculation of
   the not_null_tables attribute when it is needed.
   Modified Item_func_between::val_int(), Item_func_in::val_int().
sql/item_cmpfunc.h:
  Fixed bugs #12101, #12102: wrong calculation of not_null_tables()
   for some expressions.
   The classes Item_func_between, Item_func_if, Item_func_in are modified.
   Item_func_between/in objects can represent now [NOT]BETWEEN/IN expressions.
   The class Item_func_opt_neg is added to factor out the functionality
   common for the modified classes Item_func_between and Item_func_in.
2005-09-06 18:03:08 +04:00
unknown
9ea1d5e293 Merge zim.(none):/home/brian/mysql/mysql-5.0
into  zim.(none):/home/brian/mysql/mysql-5.1

Resolved to minor issues. 


BitKeeper/etc/config:
  Auto merged
Makefile.am:
  Auto merged
VC++Files/sql/mysqld.vcproj:
  Auto merged
extra/perror.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/t/alter_table.test:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
mysys/Makefile.am:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/lex.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_class.h:
  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_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/examples/ha_tina.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/unireg.h:
  Auto merged
storage/innobase/lock/lock0lock.c:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_search.c:
  Auto merged
storage/myisam/myisamchk.c:
  Auto merged
storage/myisam/myisamlog.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  Auto merged
configure.in:
  Fixed the resolve of versions.
mysql-test/r/alter_table.result:
  Fixed results.
2005-08-30 14:40:02 -07:00
unknown
a05ccbb01d Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-bug12720


sql/opt_range.cc:
  Auto merged
2005-08-30 14:15:05 +04:00
unknown
476843eff6 Fix for BUG#12720: In QUICK_RANGE_SELECT::reset(), reset in_range so next get_next() call
doesn't continue reading the last range.


mysql-test/r/index_merge_innodb.result:
  Testcase for BUG#12720
mysql-test/t/index_merge_innodb.test:
  Testcase for BUG#12720
2005-08-30 03:14:39 +04:00
unknown
64e6d7b193 Fix for BUG#12672.
mysql-test/r/group_min_max.result:
  Test for BUG#12672.
mysql-test/t/group_min_max.test:
  Test for BUG#12672.
sql/opt_range.cc:
  Some storage managers like InnoDB always retrieve the value of
  the primary key (if any) with any other key. For such storage
  managers the optimizer marks an index as covering if that index
  and the primary key contain all query fields. This is good for
  reading data from an index, but not for lookup. The patch detects
  such cases and tests whether an index is really a covering index
  by itself, without the primary key. If yes, then that index can
  be used for the index skip algorithm of the GROUP_MIN_MAX
  access method.
2005-08-29 17:13:42 +03:00
unknown
8707870dd9 merge
BUILD/autorun.sh:
  Auto merged
BitKeeper/deleted/.del-var:
  Delete: mysql-test/var
BitKeeper/etc/config:
  Auto merged
configure.in:
  Auto merged
mysql-test/r/information_schema_db.result:
  Auto merged
mysys/Makefile.am:
  Auto merged
mysys/default.c:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_berkeley.h:
  Auto merged
sql/ha_federated.h:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/lex.h:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_bitmap.h:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/examples/ha_tina.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_create.c:
  Auto merged
storage/myisam/mi_delete.c:
  Auto merged
storage/myisam/mi_extra.c:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisam/mi_preload.c:
  Auto merged
storage/myisam/mi_rsame.c:
  Auto merged
storage/myisam/mi_rsamepos.c:
  Auto merged
storage/myisam/mi_search.c:
  Auto merged
storage/myisam/mi_update.c:
  Auto merged
storage/myisam/mi_write.c:
  Auto merged
storage/myisam/myisamchk.c:
  Auto merged
storage/myisam/myisamdef.h:
  Auto merged
storage/myisam/myisamlog.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/myisam/sort.c:
  Auto merged
storage/ndb/src/common/portlib/NdbMutex.c:
  Auto merged
storage/ndb/src/common/portlib/NdbThread.c:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
2005-07-19 21:56:10 +02:00
unknown
5b6c1348c7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mishka.local:/home/my/mysql-5.0


client/mysqldump.c:
  Auto merged
include/my_sys.h:
  Auto merged
mysys/Makefile.am:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysys/default.c:
  SCCS merged
2005-07-18 19:03:01 +03:00
unknown
68b4d7b74d Cleanups during review
Changed defaults option --instance to --defaults-group-suffix
Changed option handling to allow --defaults-file, --defaults-extra-file and --defaults-group-suffix to be given in any order
Changed MYSQL_INSTANCE to MYSQL_GROUP_SUFFIX
mysql_print_defaults now understands --defaults-group-suffix
Remove usage of my_tempnam() (not safe function)
if( -> if ( and while( to while (


BitKeeper/deleted/.del-my_tempnam.c~a8562f15dad3012f:
  Delete: mysys/my_tempnam.c
VC++Files/client/mysqlclient.dsp:
  Remove not used file my_tempnam.c
VC++Files/client/mysqlclient_ia64.dsp:
  Remove not used file my_tempnam.c
VC++Files/libmysql/libmysql.dsp:
  Remove not used file my_tempnam.c
VC++Files/libmysql/libmysql_ia64.dsp:
  Remove not used file my_tempnam.c
VC++Files/mysys/mysys.dsp:
  Remove not used file my_tempnam.c
VC++Files/mysys/mysys_ia64.dsp:
  Remove not used file my_tempnam.c
client/mysql.cc:
  Change to use get_defaults_options()
  Remove compiler warnings
client/mysqldump.c:
  Indentation fixes
  Use quoted table name for 'primary_key_fields'
extra/my_print_defaults.c:
  Add support for --defaults-group-suffix
  change to use get_default_options()
extra/replace.c:
  Replace my_tempnam() with create_tmp_file() to allow us to remove my_tempnam.c
include/config-win.h:
  Added DEFAULT_GROUP_SUFFIX_ENV
include/my_sys.h:
  Change defaults_instance -> defaults_group_suffix
  Change get_defaults_files -> get_defaults_options
libmysql/Makefile.shared:
  Added DEFAULT_GROUP_SUFFIX_ENV
mysys/Makefile.am:
  Added DEFAULT_GROUP_SUFFIX_ENV
  Remove my_tempnam.c
mysys/default.c:
  Changed --instance to --defaults-group-suffix
  Changed MYSQL_INSTANCE to MYSQL_GROUP_SUFFIX and moved the name to Makefile.am
  (mysys shouldn't by MySQL independent)
  Changed option handling to allow --defaults-file, --defaults-extra-file and --defaults-group-suffix to be given in any order
mysys/default_modify.c:
  Optimized code to use allocated space more efficently
  Reduce code size
  Ensure that realloc() works independent of argument size
mysys/my_bitmap.c:
  Added missing return
sql/ha_innodb.cc:
  Change if( -> if (
sql/ha_ndbcluster.cc:
  Change while( -> while (
sql/item_cmpfunc.cc:
  Break loop early (simple optimization)
sql/item_strfunc.cc:
  Change if( -> if (
sql/log.cc:
  Fixed comment
sql/mysqld.cc:
  Change if( -> if (
sql/opt_range.cc:
  while( -> while (
  if( -> if (
sql/parse_file.cc:
  Change if( -> if (
sql/sql_cache.cc:
  while( -> while (
sql/sql_parse.cc:
  Change if( -> if (
sql/sql_prepare.cc:
  Added comment
sql/sql_select.cc:
  while( -> while (
  Removed index variable by incrementing pointer
sql/sql_show.cc:
  Change if( -> if (
sql/sql_yacc.yy:
  Change if( -> if (
tests/mysql_client_test.c:
  Added cast to first argument to bzero()
2005-07-18 15:33:18 +03:00
unknown
cd483c5520 Patch for push of wl1354 Partitioning 2005-07-18 13:31:02 +02:00
unknown
e2bd74015c opt_range.cc:
Fixed bug #11853.
  Corrected the code of the range optimization for
  NOT IN and NOT BETWEEN.
range.test, range.result:
  Fixed bug #11853.


mysql-test/t/range.test:
  Fixed bug #11853.
sql/opt_range.cc:
  Fixed bug #11853.
  Corrected the code of the range optimization for
  NOT IN and NOT BETWEEN.
2005-07-16 08:19:20 -07:00
unknown
e4be45da93 Merge
BitKeeper/etc/logging_ok:
  auto-union
BUILD/autorun.sh:
  Auto merged
BitKeeper/etc/config:
  Auto merged
Makefile.am:
  Auto merged
include/my_bitmap.h:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/ps_6bdb.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysys/Makefile.am:
  Auto merged
mysys/default.c:
  Auto merged
scripts/mysql_create_system_tables.sh:
  Auto merged
scripts/mysql_fix_privilege_tables.sql:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_acl.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_udf.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/heap/Makefile.am:
  Auto merged
storage/heap/hp_hash.c:
  Auto merged
storage/innobase/btr/btr0btr.c:
  Auto merged
storage/innobase/btr/btr0cur.c:
  Auto merged
storage/innobase/configure.in:
  Auto merged
storage/innobase/fil/fil0fil.c:
  Auto merged
storage/innobase/ibuf/ibuf0ibuf.c:
  Auto merged
storage/innobase/include/os0file.h:
  Auto merged
storage/innobase/include/page0cur.h:
  Auto merged
storage/innobase/include/row0mysql.h:
  Auto merged
storage/innobase/include/srv0srv.h:
  Auto merged
storage/innobase/include/trx0trx.h:
  Auto merged
storage/innobase/include/trx0trx.ic:
  Auto merged
storage/innobase/lock/lock0lock.c:
  Auto merged
storage/innobase/log/log0recv.c:
  Auto merged
storage/innobase/os/os0file.c:
  Auto merged
storage/innobase/page/page0cur.c:
  Auto merged
storage/innobase/page/page0page.c:
  Auto merged
storage/innobase/rem/rem0rec.c:
  Auto merged
storage/innobase/row/row0mysql.c:
  Auto merged
storage/innobase/row/row0sel.c:
  Auto merged
storage/innobase/row/row0upd.c:
  Auto merged
storage/innobase/srv/srv0srv.c:
  Auto merged
storage/innobase/trx/trx0trx.c:
  Auto merged
storage/innobase/trx/trx0undo.c:
  Auto merged
storage/myisam/Makefile.am:
  Auto merged
storage/myisam/mi_create.c:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisam/mi_packrec.c:
  Auto merged
storage/myisam/mi_unique.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/myisammrg/Makefile.am:
  Auto merged
storage/ndb/include/mgmcommon/ConfigRetriever.hpp:
  Auto merged
storage/ndb/include/transporter/TransporterDefinitions.hpp:
  Auto merged
storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp:
  Auto merged
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
storage/ndb/src/mgmsrv/main.cpp:
  Auto merged
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
storage/ndb/test/ndbapi/create_tab.cpp:
  Auto merged
storage/ndb/test/ndbapi/testBlobs.cpp:
  Auto merged
strings/ctype-big5.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
configure.in:
  merge
mysql-test/t/disabled.def:
  merge
mysys/my_bitmap.c:
  SCCS merged
sql/ha_federated.cc:
  merge
sql/ha_innodb.cc:
  merge
sql/ha_ndbcluster.cc:
  merge
sql/mysqld.cc:
  e
  merge
sql/sql_insert.cc:
  merge
sql/sql_lex.h:
  merge
sql/sql_load.cc:
  merge
sql/sql_select.cc:
  merge
  e
  C
sql/sql_update.cc:
  merge
sql/table.cc:
  merge
2005-07-12 20:01:22 +02:00
unknown
3c82f72091 manual merge
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
strings/ctype-utf8.c:
  Auto merged
2005-07-04 03:50:04 +03:00
unknown
306ebf7b1c Fixes during review of new code
- Mostly indentation fixes
- Added missing test
- Ensure that Item_func_case() checks for stack overruns
- Use real_item() instead of (Item_ref*) item
- Fixed wrong error handling


myisam/mi_unique.c:
  Improved comments
myisam/myisampack.c:
  Updated version number
mysql-test/r/group_by.result:
  Added test that was lost during earlier merge
mysql-test/r/information_schema.result:
  Safety fix: Drop procedures before used
mysql-test/t/group_by.test:
  Added test that was lost during earlier merge
mysql-test/t/information_schema.test:
  Safety fix: Drop procedures before used
mysys/hash.c:
  Updated comment
sql/field.cc:
  false -> FALSE
sql/ha_ndbcluster.cc:
  Fix some style issues
  - No () around argument to 'case'
  - Space before ( in switch and if
  - Removed 'goto'
  - Added {}
  - Added () to make expressions easier to read
  - my_snprintf -> strmov
sql/handler.cc:
  if( -> if (
sql/item.cc:
  Indentation changes
sql/item.h:
  false -> FALSE
sql/item_cmpfunc.cc:
  Ensure that Item_func_case() check for stack overrun properly
sql/item_cmpfunc.h:
  Ensure that Item_func_case() check for stack overrun properly
sql/item_func.cc:
  Indentation fixes
  Fixed wrong goto label
sql/mysqld.cc:
  Remove test for opt_disable_networking as this flag can never be set here
sql/opt_range.cc:
  Simplify code
sql/sql_class.h:
  Move define out from middle of class definition
sql/sql_parse.cc:
  Remove extra empty lines
sql/sql_select.cc:
  use real_item() instead of (Item_ref*) item
  Modifed function comment to be align with others
  Simple optimization
sql/sql_union.cc:
  Portability fix:
  Don't use 'bool_variable|=...'
sql/sql_view.cc:
  Move List_iterator_fast out from loops (rewind is faster than creating a new itearator)
strings/ctype-utf8.c:
  if( -> if (
strings/ctype.c:
  Remove disabled code
strings/decimal.c:
  Indentation fixes
strings/xml.c:
  Indentation fixes
2005-07-04 03:42:33 +03:00
unknown
1aa6343fe8 Simple optimization
nsure that delete works not only on table->record[0] for federated tables


sql/field.cc:
  Test OOM condition
sql/ha_federated.cc:
  Simple optimizations
  Ensure that delete works not only on table->record[0]
sql/opt_range.cc:
  Simplify code
2005-06-29 12:44:40 +03:00
unknown
10986dba1b Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0
into rurik.mysql.com:/home/igor/mysql-5.0


sql/opt_range.cc:
  Auto merged
2005-06-28 12:04:46 -07:00
unknown
19103bf364 opt_range.cc:
Fixed a compilation error.


sql/opt_range.cc:
  Fixed a compilation error.
2005-06-28 12:00:38 -07:00
unknown
d2f7623d45 Fixed comments.
sql/opt_range.cc:
  comment fixed.
sql/sp_head.cc:
  An obsolete comment removed.
2005-06-28 22:49:14 +04:00
unknown
95fd25f2db Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0


sql/opt_range.cc:
  Auto merged
2005-06-28 10:40:29 -07:00
unknown
79c1be9e44 A fix and a test case for Bug#10736 "mysql_stmt_attr_set
CURSOR_TYPE_READ_ONLY select within select".
The bug was caused by the reset of thd->mem_root to thd->main_mem_root in 
Item_subselect::exec, which in turn triggered too early free_root() for
data which was needed on subsequent fetches from a cursor.
This reset also caused a memory leak in stored procedures, as 
subsequent executions of instructions containing a subselect
were allocating memory in thd->main_mem_root, which is not freed
until the end of the entire SP, instead of the per-call mem_root,
which is freed in the end of execution of the instruction.


sql/item_subselect.cc:
  Don't try to protect subqueries from the code that assumes that
  it can reset thd->mem_root and get away with it: it's responsibility
  of the caller to ensure that no assumption about the life span
  of the allocated memory made by the called code is broken.
  Besides, this didn't work well with cursors and stored procedures, 
  where the runtime memory root is not the same as &thd->main_mem_root.
sql/opt_range.cc:
  In get_mm_leaf restore the original mem_root of the thd which has
  been temporarily reset with the quick select mem_root earlier: if 
  thd->mem_root points to the QUICK...::mem_root, the memory allocated
  in JOIN::exec during evaluation of a subquery gets freed too early.
tests/mysql_client_test.c:
  A test case for Bug#10736 "mysql_stmt_attr_set CURSOR_TYPE_READ_ONLY
   select within select"
2005-06-28 20:52:15 +04:00
unknown
1031b871e7 range.result, range.test:
Added a test case for bug #10031.
opt_range.cc:
  Fixed bug #10031: range condition was not used with
  views. Range analyzer did not take into account that
  view columns were always referred through Item_ref.


sql/opt_range.cc:
  Fixed bug #10031: range condition was not used with
  views. Range analyzer did not take into account that
  view columns were always referred through Item_ref.
mysql-test/t/range.test:
  Added a test case for bug #10031.
mysql-test/r/range.result:
  Added a test case for bug #10031.
2005-06-28 07:27:00 -07:00
unknown
05c7edf648 Move reset of insert_values to ensure it's done also during error conditions
This fixed a failure of insert_update.test on some platforms


mysys/thr_alarm.c:
  Fixed problem noticed by valgrind
sql/opt_range.cc:
  Simple optimization for common case
sql/sql_base.cc:
  Safety assert
sql/sql_insert.cc:
  Added comment
2005-06-28 15:06:16 +03:00
unknown
f7780a1cc2 opt_range.cc:
Added missing `;' to DBUG_RETURN()


sql/opt_range.cc:
  Added missing `;' to DBUG_RETURN()
2005-06-28 04:33:06 +02:00
unknown
3bfb668fac Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into mysql.com:/home/timka/mysql/src/5.0-dbg


sql/opt_range.cc:
  Auto merged
2005-06-23 17:23:48 +03:00
unknown
dfaf7a0184 opt_range.cc:
Identation correction.


sql/opt_range.cc:
  Identation correction.
2005-06-23 04:10:43 -07:00
unknown
7961b0c4cb Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1


sql/opt_range.cc:
  Auto merged
2005-06-23 13:10:42 +02:00
unknown
dadda87f54 Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0


sql/opt_range.cc:
  Auto merged
2005-06-23 04:10:42 -07:00
unknown
a91620aeff Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-back-vac-look


sql/opt_range.cc:
  Auto merged
2005-06-23 11:10:41 +00:00
unknown
1a8c334b30 Fix for BUG#11185.
The source of the problem is in Field_longlong::cmp. If 'this' is
  an unsigned number, the method casts both the current value, and
  the constant that we compare with to an unsigned number. As a
  result if the constant we compare with is a negative number, it
  wraps to some unsigned number, and the comparison is incorrect.
  
  When the optimizer chooses the "range" access method, this problem
  causes handler::read_range_next to reject the current key when the
  upper bound key is a negative number because handler::compare_key
  incorrectly considers the positive and negative keys to be equal.
  
  The current patch does not correct the source of the problem in
  Field_longlong::cmp because it is not easy to propagate sign
  information about the constant at query execution time. Instead
  the patch changes the range optimizer so that it never compares
  unsiged fields with negative constants. As an added benefit,
  queries that do such comparisons will execute faster because
  the range optimizer replaces conditions like:
  (a) (unsigned_int [< | <=] negative_constant) == FALSE
  (b) (unsigned_int [> | >=] negative_constant) == TRUE
  with the corresponding constants.
  In some cases this may even result in constant time execution.


mysql-test/r/range.result:
  - Added test for BUG#11185
  - Added missing test from 4.1. This test also tests the fix for BUG#11185.
mysql-test/t/range.test:
  - Added test for BUG#11185
  - Added missing test from 4.1. This test also tests the fix for BUG#11185.
sql/opt_range.cc:
  Added a new optimization to the range optimizer where we detect that
  an UNSIGNED field is compared with a negative constant. Depending on
  the comparison operator, we know directly that the result of the
  comparison is either TRUE or FALSE for all input values, and we need
  not check each value.
      
  This optimization is also necessary so that the index range access
  method produces correct results when comparing unsigned fields with
  negative constants.
2005-06-23 12:08:56 +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
e4296f5868 Fix for BUG#11185.
The source of the problem is in Field_longlong::cmp. If 'this' is
an unsigned number, the method casts both the current value, and
the constant that we compare with to an unsigned number. As a
result if the constant we compare with is a negative number, it
wraps to some unsigned number, and the comparison is incorrect.

When the optimizer chooses the "range" access method, this problem
causes handler::read_range_next to reject the current key when the
upper bound key is a negative number because handler::compare_key
incorrectly considers the positive and negative keys to be equal.

The current patch does not correct the source of the problem in
Field_longlong::cmp because it is not easy to propagate sign
information about the constant at query execution time. Instead
the patch changes the range optimizer so that it never compares
unsiged fields with negative constants. As an added benefit,
queries that do such comparisons will execute faster because
the range optimizer replaces conditions like:
(a) (unsigned_int [< | <=] negative_constant) == FALSE
(b) (unsigned_int [> | >=] negative_constant) == TRUE
with the corresponding constants.
In some cases this may even result in constant time execution.


mysql-test/r/range.result:
  - Changed incorrect result of an old test
  - Added new results for BUG#11185
mysql-test/t/range.test:
  - Added new tests for BUG#11185
  - Deleted an old comment because now the problem is fixed
sql/opt_range.cc:
  Added a new optimization to the range optimizer where we detect that
  an UNSIGNED field is compared with a negative constant. Depending on
  the comparison operator, we know directly that the result of the
  comparison is either TRUE or FALSE for all input values, and we need
  not check each value.
  
  This optimization is also necessary so that the index range access
  method produces correct results when comparing unsigned fields with
  negative constants.
2005-06-23 10:56:44 +03:00
unknown
ee090956a8 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1


configure.in:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.cc:
  Auto merged
storage/innobase/btr/btr0cur.c:
  Auto merged
storage/innobase/buf/buf0buf.c:
  Auto merged
storage/innobase/include/rem0rec.h:
  Auto merged
storage/innobase/include/rem0rec.ic:
  Auto merged
storage/innobase/os/os0file.c:
  Auto merged
storage/innobase/page/page0page.c:
  Auto merged
storage/innobase/row/row0ins.c:
  Auto merged
storage/innobase/trx/trx0rec.c:
  Auto merged
storage/ndb/src/common/util/version.c:
  Auto merged
sql/sql_insert.cc:
  Auto merged
2005-06-22 19:07:29 +02:00
unknown
80a621321b WL#2286 - Compile MySQL w/YASSL support
Fix GCC 4.0 link failure.
Better CXX_VERSION guessing.


config/ac-macros/misc.m4:
  Better CXX_VERSION guessing.
configure.in:
  CXX_VERSION guessing moved to misc.m4.
  HAVE_EXPLICIT_TEMPLATE_INSTANTIATION moved to config.h.
  Use compiler AR with MIPSpro and Forte instead of instantiating templates explicitly.
extra/yassl/src/crypto_wrapper.cpp:
  EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
extra/yassl/src/template_instnt.cpp:
  EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
extra/yassl/src/yassl_int.cpp:
  GCC 4.0 link fix. This file needs __cxa_pure_virtual.
extra/yassl/taocrypt/include/runtime.hpp:
  Fix GCC 4.0 link failure. Instruct compiler to always emit __cxa_pure_virtual even if
  it seems to be never used.
extra/yassl/taocrypt/include/types.hpp:
  Include config.h.
extra/yassl/taocrypt/src/algebra.cpp:
  EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
extra/yassl/taocrypt/src/dh.cpp:
  GCC 4.0 link fix. This file needs __cxa_pure_virtual.
extra/yassl/taocrypt/src/dsa.cpp:
  GCC 4.0 link fix. This file needs __cxa_pure_virtual.
extra/yassl/taocrypt/src/integer.cpp:
  EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
extra/yassl/taocrypt/src/rsa.cpp:
  GCC 4.0 link fix. This file needs __cxa_pure_virtual.
extra/yassl/taocrypt/src/template_instnt.cpp:
  EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
sql/field.cc:
  EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
sql/item.cc:
  EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
sql/item_buff.cc:
  EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
sql/mysqld.cc:
  EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
sql/opt_range.cc:
  EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
sql/set_var.cc:
  EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
sql/slave.cc:
  EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
sql/sql_acl.cc:
  EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
sql/sql_class.cc:
  EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
sql/sql_insert.cc:
  EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
sql/sql_map.cc:
  EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
sql/sql_select.cc:
  EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
sql/sql_show.cc:
  EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
sql/table.cc:
  EXPLICIT_TEMPLATE_INSTANTIATION renamed to HAVE_EXPLICIT_TEMPLAE_INSTANTIATION.
2005-06-22 14:08:28 +05:00
unknown
20c63a30ec Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1


configure.in:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.cc:
  Auto merged
2005-06-20 12:42:39 +02:00
unknown
b603e47d90 Fix for BUG#8441: in index_merge code when creating index search tuples use
KEY_PART_INFO::store_length, not KEY_PART_INFO::length (like range code does)


mysql-test/r/index_merge_innodb.result:
  Testcase for BUG8441
mysql-test/t/index_merge_innodb.test:
  Testcase for BUG8441
2005-06-20 08:56:37 +00:00
unknown
2c8ee686d8 WL#2286 - Compile MySQL w/YASSL support
Fix for yaSSL link failures with Forte Developer 7, MIPSpro Compilers, Compaq C++.
These compilers have problem with implicit template instantiation in archives
(libyassl.a, libtaocrypt.a). Instantiate templates explicitly.

Fix for yaSSL link failure on powermacg5 (gcc 3.3). When -O3 is specified gcc inlines
__cxa_pure_virtual. This is wrong behavior, __cxa_pure_virtual must never be inlined.


configure.in:
  Better CXX_VERSION guessing.
  EXPLICIT_TEMPLATE_INSTANTIATION macro indicates whether to instantiate templates explicitly.
  Instantiate templates explicitly on MIPSpro, Compaq, Forte.
extra/yassl/src/crypto_wrapper.cpp:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
extra/yassl/src/template_instnt.cpp:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
  More portable templates instantiation.
extra/yassl/src/yassl_int.cpp:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
  More portable templates instantiation.
extra/yassl/taocrypt/include/runtime.hpp:
  Fix for link failure on powermacg5 (gcc 3.3). __cxa_pure_virtual must never be inlined.
extra/yassl/taocrypt/src/algebra.cpp:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
extra/yassl/taocrypt/src/integer.cpp:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
extra/yassl/taocrypt/src/template_instnt.cpp:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
sql/field.cc:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
sql/item.cc:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
sql/item_buff.cc:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
sql/mysqld.cc:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
sql/opt_range.cc:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
sql/set_var.cc:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
sql/slave.cc:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
sql/sql_acl.cc:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
sql/sql_class.cc:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
sql/sql_insert.cc:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
sql/sql_map.cc:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
sql/sql_select.cc:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
sql/sql_show.cc:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
sql/table.cc:
  Replace __GNUC__ by EXPLICIT_TEMPLATE_INSTANTIATION.
2005-06-19 21:46:44 +05:00
unknown
a778fb5159 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145c.mysql.com:/home/ndbdev/tomas/mysql-5.1


sql/item.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-06-15 00:57:23 +02:00
unknown
d87c2dd6bf Fix for BUG#11044 - "SELECT DISTINCT on indexed column returns inconsistent results"
The problem was that when there was no MIN or MAX function, after finding the
group prefix based on the DISTINCT or GROUP BY attributes we did not search further
for a key in the group that satisfies the equi-join conditions on attributes that
follow the group attributes. Thus we ended up with the wrong rows, and subsequent
calls to select_cond->val_int() in evaluate_join_record() were filtering those
rows. Hence - the query result set was empty.

The problem occured both for GROUP BY queries without MIN/MAX and for queries
with DISTINCT (which were internally executed as GROUP BY queries).


mysql-test/r/group_min_max.result:
  Added test result for BUG#11044. Notice that the group by query is
  equivalent to the distinct query and both are executed via the same
  algorithm.
mysql-test/t/group_min_max.test:
  Added test for BUG#11044. Notice that the group by query is
  equivalent to the distinct query and both are executed via the
  same algorithm.
sql/opt_range.cc:
  * Use the extended prefix in QUICK_GROUP_MIN_MAX_SELECT::get_next()
    to find keys that satisfy equality conditions in the case when there is
    no MIN or MAX function.
  * Corrected some method comments.
  * Corrected debug printout of cost information.
2005-06-14 12:52:44 +03:00
unknown
05aa70c416 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into dl145b.mysql.com:/home/ndbdev/tomas/mysql-5.1


BitKeeper/etc/logging_ok:
  auto-union
configure.in:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  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_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_udf.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/ndb/src/ndbapi/DictCache.cpp:
  Auto merged
storage/ndb/src/ndbapi/DictCache.hpp:
  Auto merged
2005-06-07 06:50:50 +02:00
unknown
affe9f8c84 merge
mysql-test/mysql-test-run.sh:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_federated.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_bitmap.h:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/myisam/mi_create.c:
  Auto merged
storage/myisam/mi_test1.c:
  Auto merged
2005-06-06 23:39:19 +02:00
unknown
bd47a7df59 Merge with 4.1
BitKeeper/etc/logging_ok:
  auto-union
client/sql_string.cc:
  Auto merged
configure.in:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/olap.result:
  Auto merged
mysql-test/r/warnings.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/warnings.test:
  Auto merged
mysys/raid.cc:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
sql/field.cc:
  Auto merged
BitKeeper/deleted/.del-ha_isam.cc~4dce65904db2675e:
  Auto merged
BitKeeper/deleted/.del-ha_isammrg.cc~dc682e4755d77a2e:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_blackhole.cc:
  Auto merged
sql/ha_heap.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_geofunc.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_uniq.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/procedure.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/protocol_cursor.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_analyse.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_error.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_map.cc:
  Auto merged
sql/sql_olap.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_string.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_udf.cc:
  Auto merged
sql/examples/ha_archive.cc:
  Auto merged
sql/examples/ha_example.cc:
  Auto merged
sql/examples/ha_tina.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/tztime.cc:
  Auto merged
strings/ctype-win1250ch.c:
  Auto merged
mysql-test/r/func_gconcat.result:
  merge & ensure that 4.1 and 5.0 source have tests in same order
mysql-test/r/innodb.result:
  merge & ensure that 4.1 and 5.0 source have tests in same order
mysql-test/t/func_gconcat.test:
  merge & ensure that 4.1 and 5.0 source have tests in same order
mysql-test/t/innodb.test:
  merge & ensure that 4.1 and 5.0 source have tests in same order
sql/item_func.cc:
  merge
sql/mysqld.cc:
  merge
sql/opt_range.cc:
  merge
sql/sql_parse.cc:
  merge
  Give better name to goto labels
sql/sql_select.cc:
  merge
2005-06-07 00:31:53 +03:00
unknown
062a1b8b4e a compiler must see '#pragma implementation' *before*
'#pragma interface' (that comes with the #include'd header file)
2005-06-05 19:38:52 +02:00
unknown
4eb26350cb merge
client/mysql.cc:
  Auto merged
libmysql/libmysql.c:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_bitmap.h:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-06-05 17:19:50 +03:00
unknown
72dd44b9de Move USE_PRAGMA_IMPLEMENTATION to proper place
Ensure that 'null_value' is not accessed before val() is called in FIELD() functions
Fixed initialization of key maps. This fixes some problems with keys when you have more than 64 keys
Fixed that ROLLUP don't always create a temporary table. This fix ensures that func_gconcat.test results are now predictable


mysql-test/r/func_gconcat.result:
  Move innodb specific test to innodb.test
  Changed table name r2 -> t2
  More test to see how ROLLUP was optimized
mysql-test/r/innodb.result:
  Moved test here form func_gconcat
mysql-test/r/olap.result:
  New test results after optimization
mysql-test/t/func_gconcat.test:
  Move innodb specific test to innodb.test
  Changed table name r2 -> t2
  More test to see how ROLLUP was optimized
mysql-test/t/innodb.test:
  Moved test here form func_gconcat
sql/field.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_berkeley.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_blackhole.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_heap.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_innodb.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_isam.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_isammrg.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_myisam.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_myisammrg.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_ndbcluster.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/handler.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/hash_filo.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_cmpfunc.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_func.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
  Ensure that 'null_value' is not accessed before val() is called
sql/item_geofunc.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_strfunc.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_subselect.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_sum.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_timefunc.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_uniq.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/log_event.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/mysql_priv.h:
  Change key_map_full to not be const as we are giving it a proper value on startup
sql/mysqld.cc:
  Move key_map variables here and initialize key_map_full properly
sql/opt_range.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/opt_range.h:
  Fix that test_quick_select() works with any ammount of keys
sql/procedure.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/protocol.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/protocol_cursor.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/set_var.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_analyse.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_class.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_crypt.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_insert.cc:
  Fixed that max_rows is ulong
sql/sql_list.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_map.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_olap.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_select.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
  Fixed that ROLLUP don't have to always create a temporary table
  Added new argument to remove_const() to make above possible
  Fixed some errors that creapt up when we don't always do a temporary table for ROLLUP
sql/sql_string.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_table.cc:
  Simple optimizations
  Fixed wrong checking of build_table_path() in undef-ed code
sql/sql_udf.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_yacc.yy:
  removed extra {}
2005-06-03 23:46:03 +03:00
unknown
5d9bbb07f6 changed name of my_bitmap member since it has a different meaning than in 5.0 2005-06-02 22:10:57 +02:00
unknown
15ca553ab4 bitmap bug fixes and interface change 2005-06-02 18:40:25 +02:00
unknown
c01a9fc22b Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1


sql/field.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_udf.cc:
  Auto merged
2005-06-02 09:50:47 +02:00
unknown
bda8d58d8e Merge
BitKeeper/deleted/.del-ha_isam.cc~4dce65904db2675e:
  Auto merged
BitKeeper/deleted/.del-ha_isammrg.cc~dc682e4755d77a2e:
  Auto merged
client/sql_string.cc:
  Auto merged
mysys/raid.cc:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_blackhole.cc:
  Auto merged
sql/ha_heap.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_geofunc.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_uniq.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/procedure.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/protocol_cursor.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_analyse.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_map.cc:
  Auto merged
sql/sql_olap.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_string.cc:
  Auto merged
sql/examples/ha_archive.cc:
  Auto merged
sql/sql_udf.cc:
  Auto merged
sql/tztime.cc:
  Auto merged
sql/examples/ha_example.cc:
  Auto merged
sql/examples/ha_tina.cc:
  Auto merged
2005-06-02 04:45:09 +02:00
unknown
cee10f979e tztime.cc:
Set #pragma implementation" earlier
Many files:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION


client/sql_string.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
mysys/raid.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/field.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_berkeley.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_blackhole.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_heap.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_innodb.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_isam.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_isammrg.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_myisam.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_myisammrg.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/ha_ndbcluster.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/handler.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/hash_filo.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_cmpfunc.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_func.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_geofunc.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_strfunc.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_subselect.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_sum.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_timefunc.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/item_uniq.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/log_event.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/opt_range.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/procedure.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/protocol.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/protocol_cursor.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/set_var.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_analyse.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_class.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_crypt.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_list.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_map.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_olap.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/examples/ha_archive.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_select.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_string.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/sql_udf.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/examples/ha_example.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/examples/ha_tina.cc:
  Need to include <my_global.h> before #ifdef USE_PRAGMA_IMPLEMENTATION
sql/tztime.cc:
  Set #pragma implementation" earlier
2005-06-02 02:43:32 +02:00
unknown
906b210a4a Code cleanups during code reviews
Ensure we get error if INSERT IGNORE ... SELECT fails
Fixed wrong key_part->key_length usage in index_merge


client/mysql.cc:
  Code cleanups & simply optimizations
mysql-test/r/information_schema.result:
  Safety
mysql-test/t/information_schema.test:
  Safety
sql/ha_ndbcluster.cc:
  Code cleanups
sql/item.cc:
  Code cleanups
sql/item_subselect.cc:
  Code cleanups
sql/item_sum.cc:
  Code cleanups
sql/opt_range.cc:
  Made get_index_only_read_time() static (instad of inline) to increase portability (function was not declared before use)
  Simple optimization
  Fixed wrong key_part->key_length usage in index_merge
  Removed not used variable n_used_covered
  Indentation fixes & comment cleanups
sql/parse_file.cc:
  Code cleanups
sql/sql_base.cc:
  Code cleanups
sql/sql_bitmap.h:
  Added missing return
sql/sql_insert.cc:
  Ensure we get error if INSERT IGNORE ... SELECT fails
sql/sql_select.cc:
  Code cleanups
sql/sql_show.cc:
  Safety fix if a LOT of errors are ignored
sql/sql_update.cc:
  Code cleanups
sql/table.cc:
  Code cleanups
sql/table.h:
  Code cleanups
sql/uniques.cc:
  Code cleanups
strings/decimal.c:
  Simple optimization
  Code cleanups
2005-06-01 16:35:09 +03:00