Commit graph

209 commits

Author SHA1 Message Date
unknown
5b81b2dc87 Merge mysql.com:/home/jimw/my/mysql-5.0-10543
into  mysql.com:/home/jimw/my/mysql-5.0-clean


sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
2005-06-09 19:29:55 -07:00
unknown
f0329bfb8c Fix partial keys when converting VARCHAR to TEXT. (Bug #10543)
mysql-test/r/type_varchar.result:
  Update results
mysql-test/t/type_varchar.test:
  Add new regression test
sql/field.cc:
  Add Field::type_can_have_key_part() static method
sql/field.h:
  Add Field::type_can_have_key_part() signature.
sql/sql_table.cc:
  Only reset the length of a key part when changing from a
  field type that can't be used partially to a field that can,
  or vice versa, or when the part is smaller than the length
  of the field.
2005-05-25 18:11:47 -07:00
unknown
c6283dbba9 Cleanup's during review
Added ASSERT() to detect wrongly packed fields


sql/field.h:
  Fixed comments to right format
sql/opt_range.cc:
  Merged code
sql/sql_base.cc:
  Fixed indentation
sql/sql_insert.cc:
  Fixed comments to right format
sql/sql_select.cc:
  Simplify code
sql/unireg.cc:
  Simply code for calculating key_buff_length
  Added ASSERT() to detect wrongly packed fields
2005-05-25 18:33:32 +03:00
unknown
4e6177d87f Merge
sql/field.h:
  SCCS merged
2005-05-12 14:45:24 +02:00
unknown
d406a64780 Merge neptunus.(none):/home/msvensson/mysql/bug10241
into neptunus.(none):/home/msvensson/mysql/mysql-5.0


include/my_global.h:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_berkeley.h:
  Auto merged
sql/ha_heap.h:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/ha_myisam.h:
  Auto merged
sql/ha_myisammrg.h:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_geofunc.h:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/item_sum.h:
  Auto merged
BitKeeper/deleted/.del-ha_isam.h~bf53d533be3d3927:
  Auto merged
BitKeeper/deleted/.del-ha_isammrg.h~66fd2e5bfe7207dc:
  Auto merged
sql/examples/ha_archive.h:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/procedure.h:
  Auto merged
sql/protocol.h:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_list.h:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_string.h:
  Auto merged
sql/sql_udf.h:
  Auto merged
sql/tztime.h:
  Auto merged
2005-05-09 11:26:48 +02:00
unknown
c574528807 typo fixed 2005-05-07 08:59:12 +02:00
unknown
6de14a23f7 A lot of fixes to Precision math
Mostly about precision/decimals of the results of the operations


include/decimal.h:
  decimal interface changed a little
sql/field.cc:
  a lot of precision/decimals related changes to the Field_new_decimal
sql/field.h:
  Field_new_decimal interface changed
sql/ha_ndbcluster.cc:
  f->precision should be used here
sql/item.cc:
  precision/decimals counting related changes
sql/item.h:
  precision/decimals counting related changes
sql/item_cmpfunc.cc:
  precision/decimals counting related changes
sql/item_cmpfunc.h:
  precision/decimals counting related changes
sql/item_func.cc:
  precision/decimals counting related changes
sql/item_func.h:
  precision/decimals counting related changes
sql/item_sum.cc:
  precision/decimals counting related changes
sql/item_sum.h:
  precision/decimals counting related changes
sql/my_decimal.cc:
  precision/decimals counting related changes
sql/my_decimal.h:
  precision/decimals counting related changes
sql/mysqld.cc:
  precision/decimals counting related changes
sql/set_var.cc:
  precision/decimals counting related changes
sql/sp_head.cc:
  dbug_decimal_print was replaced with dbug_decimal_as_string
sql/sql_class.h:
  div_precincrement variable added
sql/sql_parse.cc:
  precision/decimals counting related changes
sql/sql_select.cc:
  precision/decimals counting related changes
sql/sql_show.cc:
  Field::representation_length was removed
strings/decimal.c:
  decimal_actual_fraction was introduced
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2005-05-05 20:06:49 +05:00
unknown
9ab5f6143e BUG#10241 cygwin port: invalid pragma interface directives
- Introduce ifdefs so we can control when to use #pragma interface on cygwin


include/my_global.h:
  Turn on use of #pragma implementation and #pragma interface if compiled with GCC and platform != Cygwin
include/raid.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/examples/ha_archive.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/examples/ha_example.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/field.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_berkeley.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_blackhole.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_heap.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_innodb.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_isam.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_isammrg.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_myisam.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_myisammrg.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/ha_ndbcluster.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/handler.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_cmpfunc.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_func.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_geofunc.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_strfunc.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_subselect.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_sum.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/item_timefunc.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/opt_range.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/procedure.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/protocol.h:
  replace __GNUC__ with USE_PRAGMA_IMPLEMENTATION
sql/set_var.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/sql_class.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/sql_list.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/sql_select.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/sql_string.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/sql_udf.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
sql/tztime.h:
  replace __GNUC__ with USE_PRAGMA_INTERFACE
2005-05-04 15:05:56 +02:00
unknown
a6acc4462c Merge with 4.1
BitKeeper/etc/logging_ok:
  auto-union
configure.in:
  Auto merged
include/config-win.h:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/r/drop.result:
  Auto merged
mysys/default.c:
  Auto merged
mysys/mf_keycache.c:
  Auto merged
sql/field.h:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~f96b7055cac394e:
  Auto merged
mysql-test/r/cast.result:
  Merge
mysql-test/t/cast.test:
  Merge
sql/sql_insert.cc:
  Merge
sql/sql_select.cc:
  Merge
2005-04-30 09:46:08 +03:00
unknown
1df25ccdac Fix for #6553 and #8776 (no errors on bad spatial data)
mysql-test/r/gis-rtree.result:
  test result fixed
mysql-test/r/gis.result:
  test result fixed
mysql-test/t/gis-rtree.test:
  test case fixed
mysql-test/t/gis.test:
  test case added
sql/field.cc:
  error messages launched now when we try to put bad spatial
  data in the GEOMETRY field
sql/field.h:
  interface fixed
sql/item_geofunc.cc:
  bad_data sign now instead of NULL now returned from
  Item_geometry_from_text::val_str
sql/share/errmsg.txt:
  error message added
sql/spatial.cc:
  bad_geometry data instance
sql/spatial.h:
  bad_geometry_data declaration
sql/sql_base.cc:
  messages now created in store_* function
2005-04-29 20:23:02 +05:00
unknown
97b0821462 CAST(string_argument AS UNSIGNED) didn't work for big integers above the signed range. (Bug #7036)
Produce warnings of wrong cast of strings to signed/unsigned.
Don't block not resolved IP's if DNS server is down (Bug #8467)
Fix compiler problems with MinGW (Bug #8872)


configure.in:
  Fix compiler problems with MinGW (Bug #8872)
include/config-win.h:
  Fix compiler problems with MinGW (Bug #8872)
include/my_global.h:
  Fix compiler problems with MinGW (Bug #8872)
mysql-test/r/cast.result:
  Test for cast to signed/unsigned outside of range (Bug #7036)
mysql-test/t/cast.test:
  Test for cast to signed/unsigned outside of range (Bug #7036)
mysys/default.c:
  Cleanup (combine identical code). 
  Done mainly by Jani
sql/field.h:
  Added cast_to_int_type() to ensure that enums are casted as numbers
sql/hostname.cc:
  Don't block not resolved IP's if DNS server is down (Bug #8467)
sql/item.h:
  Added cast_to_int_type() to ensure that enums are casted as numbers
sql/item_func.cc:
  CAST(string_argument AS UNSIGNED) didn't work for big integers above the
  signed range. (Bug #7036)
  Produce warnings of wrong cast of strings to signed/unsigned
sql/item_func.h:
  CAST(string_argument AS UNSIGNED) didn't work for big integers above the
  signed range. (Bug #7036)
2005-04-29 17:03:34 +03:00
unknown
27b2b1fad3 Bit type: fix for create_field::create_field().
sql/field.cc:
  Bit type: fix for create_field::create_field().
  We should return saved length in case of Field_bit_as_char.
2005-04-14 14:32:25 +05:00
unknown
923b76f8d1 Bit type: code clean-up.
sql/field.h:
  Field_bit_as_char::size_of() added - we use it in the ::new_key_field().
sql/sql_table.cc:
  We have to set pack_flag for bit fields in the mysql_prepare_table()
  as we use it in the create_length_to_internal_length().
2005-04-12 23:12:00 +05:00
unknown
dcb61639e7 Bit type support for non-MyISAM tables. 2005-04-12 12:27:43 +05:00
unknown
0c9304fd6d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0


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


mysql-test/r/bigint.result:
  New warning added
mysql-test/r/cast.result:
  Added testing of wrong CAST's of strings to numbers and numbers to strings
mysql-test/r/create.result:
  Added test for wrong default values (#5902)
mysql-test/r/func_if.result:
  Changed tests to produce less warnings
mysql-test/r/func_misc.result:
  New warning
mysql-test/r/func_str.result:
  Added missing drop table
  Changed test to produce less warnings
  New warnings
mysql-test/r/ndb_index_unique.result:
  Removed wrong default usage
mysql-test/r/ps_1general.result:
  Changed tests to produce less warnings
mysql-test/r/row.result:
  New warnings
mysql-test/r/rpl_session_var.result:
  Changed tests to produce less warnings
mysql-test/r/strict.result:
  New tests for CAST() and zero date handling
mysql-test/r/subselect.result:
  Changed tests to produce less warnings
mysql-test/r/type_ranges.result:
  Changed tests to produce less warnings
mysql-test/t/cast.test:
  Added testing of wrong CAST's of strings to numbers and numbers to strings
mysql-test/t/create.test:
  Added test for wrong default values (#5902)
mysql-test/t/func_if.test:
  Changed tests to produce less warnings
mysql-test/t/func_str.test:
  Added missing drop table
  Changed test to produce less warnings
  New warnings
mysql-test/t/ndb_index_unique.test:
  Removed wrong default usage
mysql-test/t/ps_1general.test:
  Changed tests to produce less warnings
mysql-test/t/rpl_session_var.test:
  Changed tests to produce less warnings
mysql-test/t/strict.test:
  New tests for CAST() and zero date handling
mysql-test/t/subselect.test:
  Changed tests to produce less warnings
mysql-test/t/type_ranges.test:
  Changed tests to produce less warnings
sql/Makefile.am:
  Added new include file
sql/field.cc:
  Added warnings for zero dates for DATE, DATETIME and TIMESTAMP
  Moved Field_blob::max_length() to a more appropriate position
  Changed type for 'level' in set_warning() to avoid casts
sql/field.h:
  Changed type for 'level' in set_warning() to avoid casts
sql/field_conv.cc:
  Copy date and datetime fields through string in 'traditional' mode to detect zero dates
sql/item.cc:
  Removed compiler warnings
  Give warnings for wrong CAST of strings -> number
sql/item.h:
  Moved Item_string::val_real() and ::val_int() to item.cc
sql/item_row.cc:
  Better detection of null values (which doesn't produce warnings)
sql/item_sum.cc:
  Better detection of null values (which doesn't produce warnings)
sql/item_timefunc.cc:
  Give warnings for wrong CAST of number -> string
sql/my_decimal.cc:
  Fixed typo in comment
sql/mysql_priv.h:
  Removed prototype for static function
  Moved defines for error handling to sql_error.h (to be able to use these in field.h)
sql/mysqld.cc:
  Simplify code
sql/sql_class.h:
  Moved to sql_error.h
sql/sql_load.cc:
  Removed wrong cast
sql/sql_parse.cc:
  Fixed wrong printf()
sql/sql_table.cc:
  Made mysql_prepare_table() static
  Changed references to pointers to make code more readable
  ALTER TABLE now aborts if one gets warnings in STRICT mode
sql/time.cc:
  Fixed possible wrong call
sql/unireg.cc:
  Removed one call to current_thd
  Give errors if one uses a wrong DEFAULT value
2005-04-01 15:04:50 +03:00
unknown
c831a156ce postmerge 4.1->5.0 fixes
mysql-test/r/group_by.result:
  result change
mysql-test/r/union.result:
  result change
mysql-test/r/view.result:
  result change
mysql-test/t/subselect.test:
  fixed mistake of merge
sql/field.cc:
  new 5.0 types support
  temporary table/db names detection in field fixed
sql/field.h:
  removed non-existent methods
  added wrongly deleted during manual merge string
sql/item.cc:
  support of new types added to merge of union types routines
sql/item.h:
  fixed method definition
sql/item_cmpfunc.cc:
  fixed type
sql/item_func.h:
  item type name fixed
sql/item_subselect.cc:
  added forgoten methods
sql/item_subselect.h:
  fixed type
sql/sql_derived.cc:
  fixed typo of manual merge
sql/sql_view.cc:
  added new parameter
2005-04-01 02:14:30 +03:00
unknown
8a898a0b72 merge 4.1->5.0
mysql-test/r/group_by.result:
  Auto merged
mysql-test/r/metadata.result:
  Auto merged
mysql-test/r/union.result:
  Auto merged
mysql-test/t/union.test:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
support-files/mysql.server.sh:
  Auto merged
2005-03-31 10:39:48 +03:00
unknown
5a42525027 fixed union types merging and table related metadata (BUG#8824)
mysql-test/r/func_group.result:
  new result
mysql-test/r/metadata.result:
  new result
  test of metadata of variables, unions and derived tables
mysql-test/r/union.result:
  new results
  test of union of enum
mysql-test/t/metadata.test:
  test of metadata of variables, unions and derived tables
mysql-test/t/union.test:
  test of union of enum
sql/field.cc:
  Field type merging rules added
  Fixed table name/alias returting for field made from temporary tables
sql/field.h:
  removed unned field type reporting
sql/item.cc:
  fixed bug in NEW_DATE type field creartion
  replaced mechanism of merging types of UNION
sql/item.h:
  replaced mechanism of merging types of UNION
sql/item_func.h:
  new item type to make correct field type detection possible
sql/item_subselect.cc:
  added table name parameter to prepare() to show right table alias for derived tables
sql/sql_derived.cc:
  added table name parameter to prepare() to show right table alias for derived tables
sql/sql_lex.h:
  added table name parameter to prepare() to show right table alias for derived tables
sql/sql_parse.cc:
  made function for enum/set pack length calculation
sql/sql_prepare.cc:
  added table name parameter to prepare() to show right table alias for derived tables
sql/sql_select.cc:
  new temporary table field creation by Item_type_holder
  fixed table alias for temporary table
sql/sql_union.cc:
  added table name parameter to prepare() to show right table alias for derived tables
2005-03-23 08:36:48 +02:00
unknown
892a6138ff Eliminate warnings noticed by VC7. This includes fixing my_mmap() on
Windows to call CreateFileMapping() with correct arguments, and
propogating the introduction of query_id_t to everywhere query ids are
passed around. (Bug #8826)


libmysql/libmysql.c:
  Make implicit cast explicit
myisam/mi_open.c:
  Make cast of value to smaller data size explicit
myisam/mi_packrec.c:
  Cast file size (my_off_t) to size_t for mmap
mysys/my_mmap.c:
  Fix Windows version of my_mmap() to use the right parameters
  for call to CreateFileMapping()
sql/field.cc:
  Use temporary value of correct type
sql/field.h:
  Use query_id_t for query_id value
sql/ha_berkeley.cc:
  Fix flag check
sql/ha_innodb.h:
  Use query_id_t for query_id value
sql/handler.cc:
  Explain opt_using_transactions calculation, and add cast
sql/handler.h:
  Fix forward declaration of COND
sql/item.cc:
  Fix val_bool() tests of val_int() to avoid implicit cast
sql/item_cmpfunc.cc:
  Fix typo in switch label
sql/item_func.cc:
  Make implicit cast explicit
sql/item_strfunc.cc:
  Now that query_id is a query_id_t, need to cast it to a ulong here
sql/item_subselect.cc:
  Fix test of value
sql/log.cc:
  Cast my_off_t used for file size to size_t for memory allocation
  Also cast my_off_t when using it to calculate the number of pages for TC log
  Cast total_ha_2pc to uchar when saving it
sql/mysql_priv.h:
  Move up query_id definition so it can be used more widely
sql/opt_range.cc:
  Add unused delete operator to prevent compiler warning
sql/set_var.cc:
  Cast value for max_user_connections
sql/sql_cache.cc:
  Remove unused label
sql/sql_class.h:
  Fix query id values to be of type query_id_t
sql/sql_db.cc:
  Move variable only used inside #ifdef within the #ifdef
sql/sql_help.cc:
  Remove unused label
sql/sql_insert.cc:
  Use query_id_t for query id values
sql/sql_lex.h:
  Add unused delete operator to prevent compiler warning
sql/sql_select.cc:
  Remove unused variable
  Make cast of value explicit
sql/sql_select.h:
  Use query_id_t for query id values
sql/sql_table.cc:
  Make comparison to function pointer explicit
sql/sql_update.cc:
  Use query_id_t for query id values
sql/table.h:
  Use query_id_t for query id values
strings/ctype-simple.c:
  Add cast of long value to (char) in expression
strings/ctype-ucs2.c:
  Add cast of long value to (char) in expression
strings/ctype-utf8.c:
  Make cast to smaller size explicit
2005-03-18 16:12:25 -08:00
unknown
284b8b8b63 Cleanup during reviews
Removed some optional arguments
Fixed portability problem in federated tests


client/sql_string.cc:
  update from sql/sql_string.cc
client/sql_string.h:
  update from sql/sql_string.h
mysql-test/r/federated.result:
  Fixed error message
sql/field.cc:
  Cleanup during review
  Remove const in 'const unsigned int'
sql/field.h:
  Remove const in 'const unsigned int'
sql/ha_federated.cc:
  Better error string.  Add missing argument to error (before 'errno' was picked up from stack)
sql/handler.cc:
  Removed compiler warning
sql/item_func.cc:
  Cleanup during review
sql/item_sum.cc:
  Cleanup during review
sql/lock.cc:
  Remove optional arguments
sql/log_event.cc:
  Remove optional arguments
sql/mysql_priv.h:
  Remove optional arguments
  cahnge preapre_create_fields to use pointers instead of references
sql/opt_range.cc:
  Fix arguments so that return value is last
sql/sql_base.cc:
  Remove optional arguments
sql/sql_delete.cc:
  Remove optional arguments
sql/sql_error.cc:
  Remove optional arguments
sql/sql_help.cc:
  Remove optional arguments
sql/sql_parse.cc:
  Remove optional arguments
sql/sql_prepare.cc:
  Remove optional arguments
sql/sql_rename.cc:
  Remove optional arguments
sql/sql_select.cc:
  Remove optional arguments
sql/sql_show.cc:
  Cleanup during review
sql/sql_string.cc:
  Simple optimization
sql/sql_table.cc:
  Remove optional arguments
  Fixed indentation
sql/sql_update.cc:
  Remove optional arguments
sql/sql_yacc.yy:
  Change references to pointers
2005-03-16 16:11:01 +02:00
unknown
1534ed8e15 WL#926 "SUM(DISTINCT) and AVG(DISTINCT)": improvement of SUM(DISTINCT) and
implementation of AVG(DISTINCT) which utilizes the approach with Fields.
The patch implemented in October is portede to the up-to-date tree 
containing DECIMAL type.
Tests for AVG(DISTINCT) (although there is not much to test provided
that SUM(DISTINCT) works), cleanups for COUNT(DISTINCT) and GROUP_CONCAT()
will follow in another changeset.


sql/field.cc:
  A handy way to init create_field used for use with virtual tmp tables.
  Feel free to extend it for your own needs.
sql/field.h:
  Declaration for create_field::init_for_tmp_table()
sql/item.cc:
  Implementation for a framework used to easily handle different result
  types of SQL expressions. Instead of having instances of each possible 
  result type (integer, decimal, double) in every item, variables
  of all used types are moved to struct Hybrid_type.
  Hybrid_type can change its dynamic type in runtime, and become,
  for instance, DECIMAL from INTEGER.
  All type-specific Item operations are moved to the class hierarchy
  Hybrid_type_traits. Item::decimals and Item::max_length can
  be moved to Hybrid_type as well.
sql/item.h:
  Declaration for Hybrid_type framework. See also comments for item.cc
  in this changeset.
sql/item_sum.cc:
  Rewritten implementation for Item_sum_sum_distinct (SUM(DISTINCT))
  and added implementation for Item_sum_avg_distinct (AVG(DISTINCT)).
  The classes utilize Hybrid_type class hierarchy and Fields to
  convert SUM/AVG arguments to binary representation and store in a RB-tree.
sql/item_sum.h:
  Declarations for Item_sum_distinct (the new intermediate class used
  for SUM and AVG distinct), Item_sum_sum_distinct, Item_sum_avg_distinct.
sql/sql_select.cc:
  Implementatio of create_virtual_tmp_table().
sql/sql_select.h:
  Declaration for create_virtual_tmp_table.
sql/sql_yacc.yy:
  Grammar support for Item_sum_avg_distinct.
2005-03-13 23:50:43 +03:00
unknown
45a26d449d merge with 4.1
BitKeeper/etc/ignore:
  auto-union
BitKeeper/etc/logging_ok:
  auto-union
client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
innobase/dict/dict0dict.c:
  Auto merged
innobase/fil/fil0fil.c:
  Auto merged
innobase/row/row0sel.c:
  Auto merged
mysql-test/r/select_found.result:
  Auto merged
mysql-test/r/type_set.result:
  Auto merged
mysys/default.c:
  Auto merged
sql/field.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
strings/ctype-simple.c:
  Auto merged
include/mysql_com.h:
  Merge
sql/filesort.cc:
  merge
2005-02-28 12:18:39 +02:00
unknown
8b8c9452dd Fixed wrong memory references found by purify
(No really critical errors found, but a few possible wrong results)


innobase/dict/dict0dict.c:
  Replace memcmp with comparison of characters to avoid warnings from purify when 'sptr' points to a very short string
mysql-test/r/select_found.result:
  Add missing drop table
mysql-test/r/type_set.result:
  More tests
mysql-test/t/select_found.test:
  Add missing drop table
mysql-test/t/type_set.test:
  More tests
mysys/my_init.c:
  Avoid warning from purify (purify doesn't handle getrusage() properly)
sql/field.h:
  enum & set are sorted as numbers. This fixes an access to uninitialized memory when enum/set are multi-byte characters
sql/filesort.cc:
  enum & set are sorted as numbers. This fixes an access to uninitialized memory when enum/set are multi-byte characters
sql/item_cmpfunc.cc:
  Fixed warning from purify. (Not critical as the arguments are passed to a function but not used)
  Allocate Arg_comparator() with 'new' instead of sql_alloc() to ensure proper initialization
sql/mysqld.cc:
  Wait for signal handler to stop when running --bootstrap
  (Fixes warning from purify)
sql/sql_insert.cc:
  Initialize slot used by innodb.cc (not critical)
sql/sql_lex.h:
  Better comments
sql/sql_repl.cc:
  memcmp -> bcmp() to avoid warning from purify
sql/sql_select.cc:
  Fix for out-of-bound memory reference when doing DISTINCT on const expressions
strings/ctype-simple.c:
  Fixes to not access uninitialized memory
  (Not critical)
2005-02-28 11:59:46 +02:00
unknown
67b16d202b Fixed failing test cases 'row.test' when running with --ps-protocol
Simple optimzations done while reviewing code


client/mysqltest.c:
  Added options --enable-ps-warnings and --disable-ps-warnings
  (to fix failing test case)
mysql-test/t/row.test:
  Disable warnings that comes from 'parse' parth
sql/field.cc:
  Removed calls to is_null() in field functions.
  (Not needed as NULL handling is done on the level above fields)
  Indentation fixes
  Removed calls to alloca() as buffer needed was quite small.
sql/field.h:
  Indentation changes and comment fixes
sql/filesort.cc:
  Simple optimization during code review
sql/item.cc:
  Indentation fixes
  Removed some unnecessary tests (added DBUG_ASSERTS() instead)
sql/item_buff.cc:
  Indentation fixes
sql/my_decimal.cc:
  Indentation fixes
  Simple optimization
  Fixed compiler warning
sql/sql_update.cc:
  Removed unnessessary assignment
2005-02-15 16:45:00 +02:00
unknown
4adab48b6c Things missing in last changset
After merge fixes
Don't give duplicate warnings for some ::store() functions


mysql-test/mysql-test-run.sh:
  Added back missing line
mysql-test/r/ps_2myisam.result:
  Update results after removing duplicate warnings from ::store()
mysql-test/r/ps_3innodb.result:
  Update results after removing duplicate warnings from ::store()
mysql-test/r/ps_4heap.result:
  Update results after removing duplicate warnings from ::store()
mysql-test/r/ps_5merge.result:
  Update results after removing duplicate warnings from ::store()
sql/field.cc:
  Don't give duplicate warnings for some ::store() functions
  Before we could get different number of warnings in the test suite for different platforms
sql/field.h:
  Update results after removing duplicate warnings from ::store()
sql/sql_class.h:
  Update results after removing duplicate warnings from ::store()
sql/sql_error.cc:
  Update results after removing duplicate warnings from ::store()
sql/sql_list.h:
  After merge fix
2005-02-10 15:41:51 +02:00
unknown
91db48e35a Precision Math implementation
BitKeeper/etc/ignore:
  Added client/decimal.c client/my_decimal.cc client/my_decimal.h to the ignore list
2005-02-09 02:50:45 +04:00
unknown
12c522515f Merge 2005-02-04 12:01:30 -08:00
unknown
66eb71f3fc A fix: bug#6931: Date Type column problem when using UNION-Table
bug#7833:  Wrong datatype of aggregate column is returned


mysql-test/r/func_group.result:
  Test case for bug 7833:  Wrong datatype of aggregate column is returned
mysql-test/r/union.result:
  Test case for bug 6931: Date Type column problem when using UNION-Table.
mysql-test/t/func_group.test:
  Test case for bug 7833:  Wrong datatype of aggregate column is returned
mysql-test/t/union.test:
  Test case for bug 6931: Date Type column problem when using UNION-Table.
2005-02-04 15:31:36 +03:00
unknown
9474fed704 Manual merge of fix for bug #7884 "Able to add invalid unique index on
TIMESTAMP prefix" into 4.1 tree.


sql/field.h:
  Manual merge.
2005-01-18 17:23:46 +03:00
unknown
b1a0f67a03 Clean up in implementation of f_is_geom()/f_is_bitfield()/f_is_enum()
macros.

It does not fixes any bugs in 4.0. But it prevents from future error in
any bugfixes that may use these macros. Also after merging into 4.1 tree
this cleanup will fix bug #7884 "Able to add invalid unique index on
TIMESTAMP prefix".


sql/field.h:
  Since FIELDFLAG_INTERVAL, FIELDFLAG_BITFIELD, FIELDFLAG_BLOB and
  FIELDFLAG_GEOM flags occupy the same space as number of decimals for
  FIELDFLAG_NUMBER fields, it is safer to check in "f_is_geom()"-type
  macros that we have non-number field, like we already do in f_is_blob()
  macro.
2005-01-18 17:04:16 +03:00
unknown
5167b5f0ce Bug #6379: ENUM values are incorrectly converted
- add_field_to_list() now uses <List>String
instead of TYPELIB to be able to distinguish
literals 'aaa' and hex literals 0xaabbcc.
- move some code from add_field_to_list() where
  we don't know column charset yet, to 
  mysql_prepare_table(), where we do.
2004-12-02 12:48:43 +04:00
unknown
c882c26101 Bug #6019 - SELECT tries to use too short prefix index on utf8 data
Field_string::pack should respect max_length as Field_string::pack_key does
2004-10-26 20:31:41 +02:00
unknown
29a62c1129 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-ryan


sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
2004-10-01 18:55:17 +04:00
unknown
7b51154461 Support for TIMESTAMP columns holding NULL values. Unlike all other
column types TIMESTAMP is NOT NULL by default, so in order to have 
TIMESTAMP column holding NULL valaues you have to specify NULL as
one of its attributes (this needed for backward compatibility).

Main changes:
Replaced TABLE::timestamp_default_now/on_update_now members with
TABLE::timestamp_auto_set_type flag which is used everywhere
for determining if we should auto-set value of TIMESTAMP field 
during this operation or not. We are also use Field_timestamp::set_time()
instead of handler::update_timestamp() in handlers.


mysql-test/r/type_timestamp.result:
  Added test for TIMESTAMP columns which are able to store NULL values.
mysql-test/t/type_timestamp.test:
  Added test for TIMESTAMP columns which are able to store NULL values.
sql/field.cc:
  Added support for TIMESTAMP fields holding NULL values.
  We don't need Field_timestamp::set_timestamp_offsets() anymore.
  Instead we need Field_timestamp::get_auto_set_type() function
  which will convert TIMESTAMP auto-set type stored in Field in 
  unireg_check to value from timestamp_auto_set_type_enum.
  (We can't replace this function with additional Field_timestamp member
  and some code in constructor because then we will have troubles
  with Field::new_field() method).
  We should also set field to not null in Field_timestamp::set_time() now.
sql/field.h:
  Added support for TIMESTAMP fields holding NULL values.
  We don't need Field_timestamp::set_timestamp_offsets() anymore.
  Instead we need Field_timestamp::get_auto_set_type() function,
  which will convert TIMESTAMP auto-set type stored in Field in 
  unireg_check to value from timestamp_auto_set_type_enum.
  We also have to support NULL values in Field_timestamp::get_timestamp()
  function.
sql/field_conv.cc:
  Added comment clarifying behavior in case of TIMESTAMP fields which are
  able to store NULL values.
sql/ha_berkeley.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_heap.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_innodb.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_isam.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_isammrg.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_myisam.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_myisammrg.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/ha_ndbcluster.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now for determining 
  if we should auto-set value of TIMESTAMP field during this operation.
  We are also use Field_timestamp::set_time() instead of 
  handler::update_timestamp().
sql/handler.cc:
  handler::update_timestamp() is no longer needed since now we use
  Field_timestamp::set_time() instead.
  (we can't use handler::update_timestamp() anyway since field position
  only is not enough for TIMESTAMP fields which are able to store NULLs)
sql/handler.h:
  handler::update_timestamp() is no longer needed since now we use
  Field_timestamp::set_time() instead.
sql/item_timefunc.cc:
  Since now TIMESTAMP fields can hold NULL values we should take this into
  account.
sql/sql_base.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now. 
  (Here we use Field_timestamp::get_auto_set_type() to setup its value
   before further statement execution).
sql/sql_insert.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now.
sql/sql_load.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now.
sql/sql_parse.cc:
  Added support for TIMESTAMP fields holding NULL values.
  We should distinguish NULL default values and non-specified default
  values for such fields (because latter could mean DEFAULT NOW()
  ON UPDATE NOW() in some cases).
sql/sql_show.cc:
  Added support for TIMESTAMP fields holding NULL values.
  Unlike all other fields these are NOT NULL by default
  so we have to specify NULL attribute explicitly for them.
sql/sql_table.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now.
sql/sql_update.cc:
  Now we use TABLE::timestamp_field_type instead of 
  TABLE::timestamp_default_now/on_update_now.
sql/sql_yacc.yy:
  Added support for TIMESTAMP fields holding NULL values.
  Unlike all other fields these are NOT NULL by default
  (so we have to set NOT_NULL_FLAG properly for them).
sql/table.h:
  Added timestamp_auto_set_type enum which values are used for indicating
  during which operations we should automatically set TIMESTAPM field
  value to current timestamp.
  TABLE: Replaced timestamp_default_now/on_update_now members with
  timestamp_auto_set_type flag (Now when TIMESTAMP field are able to 
  store NULL values, single position of field in record is not enough 
  for updating this field anyway).
2004-10-01 18:54:06 +04:00
unknown
9131bd2404 Give store_for_compare a more meaningful name, cleanup and comment the
call.


sql/item_cmpfunc.cc:
  Rename: Field::store_for_compare -> Field::can_be_compared_as_longlong
2004-09-28 15:29:38 +04:00
unknown
e6f924efe5 Fix for bug #4131 "TIMESTAMP columns missing minutes and seconds when
using GROUP BY"
Now we are setting Field_timestamp::field_length to 19 in open_table()
if we are in new mode (and we are restoring it back when we are coming
back to normal mode). This also should solve potential problems with
some of LOAD DATA INFILE and SELECT * INTO in this mode.


mysql-test/r/type_timestamp.result:
  Added test for bug #4131 'TIMESTAMP columns missing minutes and seconds
  when using GROUP BY' and other --new mode related behavior.
mysql-test/t/type_timestamp.test:
  Added test for bug #4131 'TIMESTAMP columns missing minutes and seconds
  when using GROUP BY' and other --new mode related behavior.
sql/field.cc:
  Added Field_timestamp::orig_field_length member for saving original
  field_length value, because this member can be modified if new_mode is
  in effect.
  Lot of Field_timestamp code simplified and Field_timestamp::make_field()
  is no longer needed because we are setting field_length to 19 if we are
  in --new mode now.
sql/field.h:
  Added Field_timestamp::orig_field_length member for saving original
  field_length value, because this member can be modified if new_mode
  is in effect. 
  Field_timestamp::make_field() is no longer needed because we are setting
  field_length to 19 if we are in --new mode now.
sql/sql_base.cc:
  If --new mode is in effect all TIMESTAMP fields should pretend that they
  have length of 19. We are achieving this by setting 
  Field_timestamp::field_length to 19 (or original value) in open_table().
  We are using TABLE::timestamp_mode variable for avoiding of unnecessary
  looping over all fields of the table and setting field_length if table
  was used with same new_mode value before.
  
  Note: We do not introduce general framework for setting up Field objects
  for usage with current THD here because this fix is only needed in 4.0
  and Monty said that we will also remove looping over all fields when
  updating table_name member at some point. This more general framework
  will also complicate nice optimization with avoiding of unneeded looping.
sql/sql_parse.cc:
  Now when we are creating TIMESTAMP(19) fields by default in --new mode,
  otherwise we will have unaligned behavior between ALTER and CREATE.
sql/table.h:
  Added TABLE::timestamp_mode field for saving information whenever we set 
  field_length members of table's TIMESTAMP fields to 19 (to honor 
  new_mode) or they have original values.
2004-09-27 00:50:00 +04:00
unknown
07f5a44bc0 Review of new pushed code (Indentation fixes and simple optimizations)
Use 'mysqltest' as test database instead of test_$1 or test1,test2 to not accidently delete an important database
Safety fix for mailformed MERGE files


Build-tools/mysql-copyright:
  Print correct file name in case of errors
  Fixed indentation
include/config-win.h:
  Removed unnecessary #ifdef
myisammrg/myrg_open.c:
  Don't give a core if merge file contains INSERT_METHOD first (not legal but better safe than sorry)
  Don't set struct variables to zero that are already zero
  Indentation fixes
mysql-test/r/create.result:
  Use 'mysqltest' as test database
mysql-test/r/ndb_basic.result:
  Use 'mysqltest' as test database
mysql-test/r/ndb_blob.result:
  Use 'mysqltest' as test database
mysql-test/r/ndb_transaction.result:
  Use 'mysqltest' as test database
mysql-test/r/ps_1general.result:
  Use 'mysqltest' as test database
mysql-test/r/rpl_charset.result:
  Use 'mysqltest' as test database
mysql-test/r/rpl_delete_all.result:
  Use 'mysqltest' as test database
mysql-test/r/show_check.result:
  Use 'mysqltest' as test database
mysql-test/t/create.test:
  Use 'mysqltest' as test database
mysql-test/t/ndb_basic.test:
  Use 'mysqltest' as test database
mysql-test/t/ndb_blob.test:
  Use 'mysqltest' as test database
mysql-test/t/ndb_transaction.test:
  Use 'mysqltest' as test database
mysql-test/t/ps_1general.test:
  Use 'mysqltest' as test database
mysql-test/t/rpl_charset.test:
  Use 'mysqltest' as test database
mysql-test/t/rpl_delete_all.test:
  Use 'mysqltest' as test database
mysql-test/t/show_check.test:
  Use 'mysqltest' as test database
sql/field.h:
  Mark functions that should be deleted as soon as we have a new prototype for store(longlong)
sql/lock.cc:
  Indentation fix
sql/sql_base.cc:
  Better comment.
  Break find_item_in_list in case of perfect match
sql/sql_prepare.cc:
  Simple optimization
sql/sql_select.cc:
  Portability fix
2004-08-31 14:35:04 +03:00
unknown
44b2807e4b Portability fixes
Fixed bug in end space handle for WHERE text_column="constant"


heap/hp_hash.c:
  Optimzations (no change of logic)
libmysql/libmysql.c:
  Added missing casts (portability fix)
myisam/mi_key.c:
  Changed macro to take arguments and not depend on local variables
  Simple indentation fixes ?
mysql-test/r/connect.result:
  Added test for setting empty password
mysql-test/r/create_select_tmp.result:
  TYPE -> ENGINE
mysql-test/r/ctype_utf8.result:
  Combine drop's
mysql-test/r/endspace.result:
  Added more tests to test end space behaviour
mysql-test/r/having.result:
  Added missing DROP TABLE
mysql-test/r/type_blob.result:
  Added more tests to ensure that fix for BLOB usage is correct
mysql-test/r/type_timestamp.result:
  Add test from 4.0
mysql-test/t/connect.test:
  Added test for setting empty password
mysql-test/t/create_select_tmp.test:
  TYPE -> ENGINE
mysql-test/t/ctype_utf8.test:
  Combine drop's
mysql-test/t/endspace.test:
  Added more tests to test end space behaviour
mysql-test/t/having.test:
  Added missing DROP TABLE
mysql-test/t/type_blob.test:
  Added more tests to ensure that fix for BLOB usage is correct
mysql-test/t/type_timestamp.test:
  Add test from 4.0
sql/field.cc:
  Removed not used variable
  Portability fix (cast)
  Simplified Field_str::double()
  Simple indentation cleanups
sql/field.h:
  Removed not needed class variable
sql/item_cmpfunc.cc:
  Indentation fix
sql/item_strfunc.cc:
  Use on stack variable for Item_str_func::val() instead of str_value.
  This makes it safe to use str_value inside the Item's val function.
  Cleaned up LEFT() usage, thanks to the above change
sql/item_sum.cc:
  Indentation cleanups
sql/protocol.cc:
  Added missing cast
sql/sql_acl.cc:
  Indentatin cleanups.
  Added missing cast
  Simple optimization of get_sort()
sql/sql_select.cc:
  Don't use 'ref' to search on text field that is not of type BINARY (use 'range' instead).
  The reson is that for 'ref' we use 'index_next_same' to read the next possible row. 
  For text fields, rows in a ref may not come in order, like for 'x', 'x\t' 'x ' (stored in this order) which causes a search for 'column='x ' to fail
sql/tztime.cc:
  Simple cleanup
strings/ctype-bin.c:
  Comment fixes
strings/ctype-mb.c:
  Changed variable names for arguments
2004-08-26 18:26:38 +03:00
unknown
b033e3dfbb BDB: Bug#4531: unique key prefix interacts poorly with utf8,
Bug#4594 column index make = failed for gbk


myisam/mi_key.c:
  cleanup
2004-08-24 15:32:57 +02:00
unknown
20dab90aad Fixed compiler warnings in sql/field.h.
sql/field.h:
  Fixed compiler warnings.
2004-08-20 13:11:14 +02:00
unknown
7fbc796d4a Bug#4521: unique key prefix interacts poorly with utf8.
Fix for binary collations for MyISAM and HEAP BTREE.
This patch also changes trailing spaces behaviour for
binary collations. Binary collations now have PAD 
characteristic too.
2004-08-19 15:15:10 +05:00
unknown
ae2bf6275e after merge fixes
strings/my_vsnprintf.c:
  %.#s support in my_vsnprintf
BitKeeper/etc/ignore:
  Added EXCEPTIONS-CLIENT to the ignore list
2004-08-19 03:02:09 +02:00
unknown
945625ebaa manually merged
BitKeeper/etc/logging_ok:
  auto-union
BitKeeper/deleted/.del-mytest-old.c~5237697b30cf59e4:
  Auto merged
Build-tools/Bootstrap:
  Auto merged
Build-tools/mysql-copyright:
  Auto merged
configure.in:
  Auto merged
BitKeeper/deleted/.del-mysql_fix_privilege_tables.sql:
  Auto merged
VC++Files/innobase/innobase.dsp:
  Auto merged
client/mysql.cc:
  Auto merged
include/my_global.h:
  Auto merged
innobase/dict/dict0crea.c:
  Auto merged
innobase/dict/dict0dict.c:
  Auto merged
innobase/include/mtr0log.h:
  Auto merged
innobase/include/mtr0log.ic:
  Auto merged
innobase/include/srv0srv.h:
  Auto merged
innobase/include/ut0dbg.h:
  Auto merged
innobase/lock/lock0lock.c:
  Auto merged
innobase/os/os0file.c:
  Auto merged
innobase/row/row0mysql.c:
  Auto merged
innobase/row/row0sel.c:
  Auto merged
innobase/srv/srv0srv.c:
  Auto merged
innobase/ut/ut0dbg.c:
  Auto merged
innobase/ut/ut0mem.c:
  Auto merged
libmysql/Makefile.am:
  Auto merged
libmysql/Makefile.shared:
  Auto merged
libmysql/conf_to_src.c:
  Auto merged
libmysql/dll.c:
  Auto merged
libmysql/errmsg.c:
  Auto merged
libmysql/manager.c:
  Auto merged
libmysql_r/Makefile.am:
  Auto merged
myisam/mi_key.c:
  Auto merged
mysql-test/Makefile.am:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/having.result:
  Auto merged
mysql-test/r/heap.result:
  Auto merged
mysql-test/r/type_date.result:
  Auto merged
mysql-test/r/type_float.result:
  Auto merged
mysql-test/t/having.test:
  Auto merged
mysql-test/t/heap.test:
  Auto merged
mysql-test/t/type_date.test:
  Auto merged
mysql-test/t/type_float.test:
  Auto merged
mysql-test/t/type_uint.test:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
scripts/make_win_src_distribution.sh:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_heap.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_analyse.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/share/czech/errmsg.txt:
  Auto merged
sql/share/danish/errmsg.txt:
  Auto merged
sql/share/dutch/errmsg.txt:
  Auto merged
sql/share/english/errmsg.txt:
  Auto merged
sql/share/estonian/errmsg.txt:
  Auto merged
sql/share/french/errmsg.txt:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/share/greek/errmsg.txt:
  Auto merged
sql/share/hungarian/errmsg.txt:
  Auto merged
sql/share/japanese/errmsg.txt:
  Auto merged
sql/share/korean/errmsg.txt:
  Auto merged
sql/share/norwegian-ny/errmsg.txt:
  Auto merged
sql/share/norwegian/errmsg.txt:
  Auto merged
sql/share/polish/errmsg.txt:
  Auto merged
sql/share/portuguese/errmsg.txt:
  Auto merged
sql/share/romanian/errmsg.txt:
  Auto merged
sql/share/russian/errmsg.txt:
  Auto merged
sql/share/slovak/errmsg.txt:
  Auto merged
sql/share/spanish/errmsg.txt:
  Auto merged
sql/share/swedish/errmsg.txt:
  Auto merged
sql/share/ukrainian/errmsg.txt:
  Auto merged
2004-08-18 19:57:55 +02:00
unknown
0c6b96658e Bug 4937: different date -> string conversion when using
SELECT ... UNION and INSERT ... SELECT ... UNION
2004-08-18 14:46:31 +02:00
unknown
b66a13eeb8 safemalloc always resets the free'd memory, not only when PEDANTIC_SAFEMALLOC 2004-07-26 21:33:42 +02:00
unknown
a23fbc060e New handler::index_flags() definition to make it easy to check the full used key and a specific key part.
Added key part to optimize_range() to fix problems when using fields in key parts.



sql/examples/ha_archive.h:
  New handler::index_flags() definition
sql/examples/ha_example.h:
  New handler::index_flags() definition
sql/field.cc:
  New optimize_range() definition
sql/field.h:
  New optimize_range() definition
sql/ha_berkeley.cc:
  New handler::index_flags() definition
sql/ha_berkeley.h:
  New handler::index_flags() definition
sql/ha_heap.h:
  New handler::index_flags() definition
sql/ha_innodb.h:
  New handler::index_flags() definition
sql/ha_isam.h:
  New handler::index_flags() definition
sql/ha_isammrg.h:
  New handler::index_flags() definition
sql/ha_myisam.h:
  New handler::index_flags() definition
sql/ha_myisammrg.h:
  New handler::index_flags() definition
sql/ha_ndbcluster.cc:
  New handler::index_flags() definition
sql/ha_ndbcluster.h:
  New handler::index_flags() definition
sql/handler.h:
  New handler::index_flags() definition
sql/log.cc:
  Fixed compiler warnings
sql/log_event.cc:
  Fixed compiler warnings (and renamed short variable name)
sql/opt_range.cc:
  New handler::index_flags() definition
sql/opt_sum.cc:
  New handler::index_flags() definition
sql/set_var.cc:
  Removed compiler warnings
sql/sql_db.cc:
  Removed compiler warnings
sql/sql_select.cc:
  New handler::index_flags() definition
sql/sql_show.cc:
  Removed compiler warnings
sql/sql_update.cc:
  Removed compiler warnings
sql/table.cc:
  New handler::index_flags() definition
2004-07-08 15:45:25 +03:00
unknown
c6e23c8549 Merge with 4.0 to get the latest bug patches to 4.1
BitKeeper/etc/ignore:
  added sql/mysql_tzinfo_to_sql
BitKeeper/etc/logging_ok:
  auto-union
acinclude.m4:
  Auto merged
extra/perror.c:
  Auto merged
include/mysql.h:
  Auto merged
innobase/include/mach0data.ic:
  Auto merged
innobase/include/mtr0log.h:
  Auto merged
innobase/include/mtr0log.ic:
  Auto merged
innobase/mem/mem0dbg.c:
  Auto merged
innobase/pars/lexyy.c:
  Auto merged
BitKeeper/deleted/.del-4.0.XX-gpl.ipr~f5909a9e9bd8094:
  Auto merged
BitKeeper/deleted/.del-Clients and Tools.fgl~bf0f776883577f02:
  Auto merged
BitKeeper/deleted/.del-Development.fgl~6392ce285e73f5fc:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/innodb_cache.result:
  Auto merged
mysql-test/r/lowercase_table2.result:
  Auto merged
mysql-test/t/innodb_cache.test:
  Auto merged
mysql-test/t/lowercase_table2.test:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/handler.cc:
  Auto merged
scripts/make_win_src_distribution.sh:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
libmysql/libmysql.c:
  Merge with 4.0
mysql-test/r/bdb.result:
  Merge with 4.0
mysql-test/r/range.result:
  Merge with 4.0
mysql-test/t/bdb.test:
  Merge with 4.0
mysys/hash.c:
  Merge with 4.0
scripts/mysql_install_db.sh:
  Merge with 4.0
sql/field.cc:
  Merge with 4.0
sql/field.h:
  Merge with 4.0
sql/mysql_priv.h:
  Merge with 4.0
sql/sql_handler.cc:
  Merge with 4.0
sql/sql_select.cc:
  Merge with 4.0
sql/sql_table.cc:
  Merge with 4.0
2004-06-25 20:13:05 +03:00
unknown
afe29967e0 bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
Added put_length() to get_length() and unpack_key() to pack_key().
Keys were packed with the minimum size of the length field for the key part and 
unpacked with length size of the base column. 
For the purpose of optimal key packing we have the method pack_key(), while rows are 
packed with pack(). Now keys are unpacked with unpack_key() and no longer with 
unpack() which is used for rows.


mysql-test/r/bdb.result:
  bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
  Added the test case results.
mysql-test/t/bdb.test:
  bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
  Added the test case.
sql/field.cc:
  bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
  Added put_length() to get_length() and unpack_key() to pack_key().
  Keys were packed with the minimum size of the length field for the key part and 
  unpacked with length size of the base column. 
  For the purpose of optimal key packing we have the method pack_key(), while rows are packed 
  with pack(). Now keys are unpacked with unpack_key() and no longer with unpack() which is 
  used for rows.
sql/field.h:
  bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
  Added put_length() to get_length() and unpack_key() to pack_key().
  The default implementation simply calls unpack() for those field types that don't need 
  a special key unpacking.
sql/ha_berkeley.cc:
  bug#2686 - index_merge select on BerkeleyDB table with varchar PK causes mysqld to crash.
  Now keys are unpacked with unpack_key() and no longer with unpack() which is used for rows.
  For most field types, however, this simply calls unpack().
2004-06-24 14:54:28 +02:00
unknown
19eb2ce4d6 Field_geom should have same max_length as Field_blob
Updated tests
After merge fix


mysql-test/r/func_time.result:
  Updated tests
sql/field.cc:
  After merge fix
  Removed compiler warning
sql/field.h:
  Field_geom should have same max_length as Field_blob
2004-06-21 11:27:40 +03:00