Commit graph

470 commits

Author SHA1 Message Date
unknown
9c71571f83 Merge with 4.1 to get fix for memory leak
client/mysql.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_base.cc:
  merge
2005-05-16 20:21:38 +03:00
unknown
4b2020c575 Some improvement in Item_int_with_ref class comment. 2005-05-16 14:06:52 +00:00
unknown
14920f416b Merge book.sanja.is.com.ua:/Users/bell/mysql/bk/mysql-5.0
into book.sanja.is.com.ua:/Users/bell/mysql/bk/work-bug-5.0


sql/item.h:
  Auto merged
2005-05-09 15:34:41 +03: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
e99c4c6cf2 Merge neptunus.(none):/home/msvensson/mysql/bug10241
into neptunus.(none):/home/msvensson/mysql/mysql-4.1


include/my_global.h:
  Auto merged
sql/item.h:
  Auto merged
2005-05-09 11:23:12 +02:00
unknown
a6b1546676 Item::fix_field need correct pointer on item reference to chnge it if itis need, so support of correct item address added to SP commands (BUG#5963)
some optimisation of IF/NOT IF ptomised to Pem


mysql-test/r/sp.result:
  test for bug#5963
mysql-test/t/sp.test:
  test for bug#5963
sql/item.cc:
  new method which return reference on Item for SP variables support
sql/item.h:
  comment fixed
  method added
sql/sp_head.cc:
  preparation of item made separate function
  we do not need new constant Item to check IF/IF NOT
  support of passing correct address of item for fix_fields method
sql/sp_rcontext.cc:
  support of Item address passing to fix_fields
sql/sp_rcontext.h:
  support of correct address passing to fix_fields
sql/sql_class.cc:
  support of correct item address passing to fix_field
2005-05-09 01:59:10 +03:00
unknown
54d57ffd2f Merge
BitKeeper/etc/logging_ok:
  auto-union
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/item.h:
  SCCS merged
2005-05-05 20:10:50 +05: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
7f33809731 Manual merge
BitKeeper/etc/logging_ok:
  auto-union
configure.in:
  Auto merged
include/my_sys.h:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/t/ndb_restore.test:
  Auto merged
ndb/test/src/NDBT_ResultRow.cpp:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
2005-05-05 13:47:09 +04:00
unknown
c758512a91 A fix and test case for Bug#9777 " Empty set returned by Prepared Statement when it
should return a non empty one"
(see comments for the changed files for details).


mysql-test/r/ps.result:
  A test case for Bug#9777: tests results fixed.
mysql-test/t/ps.test:
  A test case for Bug#9777
sql/item.cc:
  A fix for Bug#9777: when creating a constant item from within 
  Item_int_with_ref::new_item, create the item by value, not by name.
  This should work with prepared statements placeholders.
  Item_int_with_ref is a special optimization case used
   when we compare datetime constants with datetime value.
  Converting the item to integer early is OK as it is in line
  with the purpose of Item_int_with_ref - to speed up comparison by 
  using integers.
  Minor cleanups.
sql/item.h:
  Declaration for Item_int_with_ref::new_item
2005-05-05 12:55:09 +04: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
3c223a34cf Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/opt/local/work/mysql-5.0-root


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
2005-05-04 16:54:36 +04:00
unknown
a82865375e Post-merge fixes for Bug#9096 "select doesn't return all matched
records if prepared statements is used" (see comments to 
the changed files).


mysql-test/r/ps.result:
  Post-merge fix for Bug#9096: test results fixed.
mysql-test/r/type_datetime.result:
  Post-merge fix for Bug#9096: now we do better constants comparison,
  so the optimizer is able to guess from the index that we don't
  need to evaluate WHERE clause.
sql/item.cc:
  Post-merge fixes for Bug#9096: implement by-value comparison for
  new 5.0 DECIMAL type.
  Item_real is renamed to Item_float in 5.0
  Item_varbinary is renamed to Item_hex_string in 5.0
sql/item.h:
  Post-merge fixes for Bug#9096: declaration for Item_decimal::eq
2005-05-04 16:53:10 +04:00
unknown
3aa89efcdd Manual merge of Bug#9096 2005-05-03 19:32:29 +04:00
unknown
b883aebae0 Merge mysql.com:/opt/local/work/mysql-4.1-root
into mysql.com:/opt/local/work/mysql-4.1-9096-fresh


sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
2005-05-03 12:49:22 +04:00
unknown
9fcda7fcc5 A fix and test case for Bug#9096 "select doesn't return all matched
records if prepared statements is used".
This fix changes equality evaluation method of basic constants from
by-name to by-value, thus effectively enabling use of parameter markers
in some optimizations (constants propagation, evaluation of possible
keys for query).


mysql-test/r/ps.result:
  Test results for the test case for Bug#9096
mysql-test/t/ps.test:
  A short test case for Bug#9096 "select doesn't return all matched records if
   prepared statements is used". The is enough to reproduce the
  glitch in update_ref_and_keys causing the bug to occur.
sql/item.cc:
  Implement by-value equality evaluation of basic constants.
  This is needed to work with Item_param values. Until now
  Item_param was compared with other items by its name, which is always "?".
  The bug at hand showed up when an integer
  constant was created from one parameter marker (with value 200887 and
   name "?") and then compared by-name with another parameter marker
  (with value 860 and name "?"). True returned by this comparison resulted
  in a wrong table access method used to evaluate the query.
  Implement Item_param methods needed to emulate "basic constant" mode at 
  full.
sql/item.h:
  Change declaration of basic_const_item(): now it also widens its 
  argument from const Item * to Item * if the argument is a basic constant.
  Declare eq() for all basic constatns, as long as now they 
  are compared by value, not by name. Each constant needs its own
  comparison method.
  Declarations of Item_param methods needed to fully emulate 
  a basic constant when parameter value is set.
sql/item_func.cc:
  Fix wrong casts.
2005-05-03 12:47:27 +04:00
unknown
371b26e11c Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-test-5.0


sql/item.h:
  Auto merged
2005-04-30 19:32:45 +03:00
unknown
d45f95f04a postreview changes
sql/item.cc:
  changed parameters order
sql/item.h:
  changed parameters order
sql/sql_base.cc:
  fixed comment
  changed parameters order
2005-04-30 19:27:22 +03: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
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
ca119d390e if outer refernce (identifier) was resolved with help of cache all subqueries and resolved item itseld have to be correctly marked as dependent
(BUG#10041)


sql/item.cc:
  depended_from shoudl be cleaned
  layout fixed
  function to mark range of SELECTs as dependent (used if item was resolved with PS cache of resolving identifiers)
sql/item.h:
  function to mark range of SELECTs as dependent (used if item was resolved with PS cache of resolving identifiers)
sql/item_subselect.h:
  function to mark range of SELECTs as dependent (used if item was resolved with PS cache of resolving identifiers)
sql/sql_base.cc:
  if outer refernce (identifier) was resolved with help of cache all subqueries and resolved item itseld have to be correctly marked as dependent
2005-04-29 02:43:56 +03:00
unknown
e77860b7be Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0


sql/item.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-04-15 22:35:29 -07:00
unknown
2b92a78eb8 subselect.result, subselect.test:
Added a test case for bug #9338.
sql_select.cc:
  Fixed bug #9338.
  When an occurence of a field reference has to be replaced
  by another field reference the whole Item_field must be
  replaced.
item.cc:
  Fixed bug #9338.
  The method Item_field::replace_equal_field_processor was
  replaced by Item_field::replace_equal_field. The new method
  is used to replace the occurences of Item_field objects.
item.h:
  Fixed bug #9338.
  The virtual function replace_equal_field_processor was replaced
  by replace_equal_field. The latter is supposed to be used as a
  callback function in calls of the method transform.


sql/item.h:
  Fixed bug #9338.
  The virtual function replace_equal_field_processor was replaced
  by replace_equal_field. The latter is supposed to be used as a
  callback function in calls of the method transform.
sql/item.cc:
  The method Item_field::replace_equal_field_processor was
  replaced by Item_field::replace_equal_field The new method
  is used to replace the occurences of Item_field objects.
sql/sql_select.cc:
  Fixed bug #9338.
  When an occurence of a field reference has to be replaced
  by another field reference the whole Item_field must be
  replaced.
mysql-test/t/subselect.test:
  Added a test case for bug #9338.
mysql-test/r/subselect.result:
  Added a test case for bug #9338.
2005-04-15 20:43:45 -07:00
unknown
e0fdbeba7e Fixed BUG#9598: stored procedure call within stored procedure
overwrites IN variable
  and added error checking of variables for [IN]OUT parameters while
  rewriting the out parameter handling.


mysql-test/r/sp-error.result:
  New test case for non-variable argument for [IN]OUT parameters.
  (And changed to qualified names in some other error messages.)
mysql-test/r/sp.result:
  New test case for BUG#9598.
mysql-test/t/sp-error.test:
  New test case for non-variable argument for [IN]OUT parameters.
mysql-test/t/sp.test:
  New test case for BUG#9598.
sql/item.h:
  Need to distinguish between SP local variable items and other items,
  for error checking and [IN]OUT parameter handling.
sql/share/errmsg.txt:
  New error message for non-variable arguments for [IN]OUT parameters in stored procedures.
sql/sp_head.cc:
  Rewrote the [IN]OUT parameter handling in procedure invokation, to make
  it work properly when using user variables in sub-calls.
  Also added error checking for non-variable arguments for such parameters
  (and changed to qualified names for wrong number of arg. errors).
sql/sp_rcontext.cc:
  No need to keep track on the out index for an [IN]OUT parameter any more.
sql/sp_rcontext.h:
  No need to keep track on the out index for an [IN]OUT parameter any more.
2005-04-14 14:52:35 +02:00
unknown
5cdec5d6ba Merge
mysql-test/r/create.result:
  Auto merged
mysql-test/r/ctype_latin1_de.result:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/grant2.result:
  Auto merged
mysql-test/r/limit.result:
  Auto merged
mysql-test/r/order_by.result:
  Auto merged
mysql-test/r/rpl000001.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/r/strict.result:
  Auto merged
mysql-test/r/type_blob.result:
  Auto merged
mysql-test/r/type_ranges.result:
  Auto merged
mysql-test/r/warnings.result:
  Auto merged
mysql-test/t/ctype_latin1_de.test:
  Auto merged
mysql-test/t/limit.test:
  Auto merged
mysql-test/t/order_by.test:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/type_blob.test:
  Auto merged
mysql-test/t/type_ranges.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
mysql-test/t/strict.test:
  SCCS merged
2005-04-05 19:45:34 -07:00
unknown
0c9304fd6d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0


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


mysql-test/r/bigint.result:
  New warning added
mysql-test/r/cast.result:
  Added testing of wrong CAST's of strings to numbers and numbers to strings
mysql-test/r/create.result:
  Added test for wrong default values (#5902)
mysql-test/r/func_if.result:
  Changed tests to produce less warnings
mysql-test/r/func_misc.result:
  New warning
mysql-test/r/func_str.result:
  Added missing drop table
  Changed test to produce less warnings
  New warnings
mysql-test/r/ndb_index_unique.result:
  Removed wrong default usage
mysql-test/r/ps_1general.result:
  Changed tests to produce less warnings
mysql-test/r/row.result:
  New warnings
mysql-test/r/rpl_session_var.result:
  Changed tests to produce less warnings
mysql-test/r/strict.result:
  New tests for CAST() and zero date handling
mysql-test/r/subselect.result:
  Changed tests to produce less warnings
mysql-test/r/type_ranges.result:
  Changed tests to produce less warnings
mysql-test/t/cast.test:
  Added testing of wrong CAST's of strings to numbers and numbers to strings
mysql-test/t/create.test:
  Added test for wrong default values (#5902)
mysql-test/t/func_if.test:
  Changed tests to produce less warnings
mysql-test/t/func_str.test:
  Added missing drop table
  Changed test to produce less warnings
  New warnings
mysql-test/t/ndb_index_unique.test:
  Removed wrong default usage
mysql-test/t/ps_1general.test:
  Changed tests to produce less warnings
mysql-test/t/rpl_session_var.test:
  Changed tests to produce less warnings
mysql-test/t/strict.test:
  New tests for CAST() and zero date handling
mysql-test/t/subselect.test:
  Changed tests to produce less warnings
mysql-test/t/type_ranges.test:
  Changed tests to produce less warnings
sql/Makefile.am:
  Added new include file
sql/field.cc:
  Added warnings for zero dates for DATE, DATETIME and TIMESTAMP
  Moved Field_blob::max_length() to a more appropriate position
  Changed type for 'level' in set_warning() to avoid casts
sql/field.h:
  Changed type for 'level' in set_warning() to avoid casts
sql/field_conv.cc:
  Copy date and datetime fields through string in 'traditional' mode to detect zero dates
sql/item.cc:
  Removed compiler warnings
  Give warnings for wrong CAST of strings -> number
sql/item.h:
  Moved Item_string::val_real() and ::val_int() to item.cc
sql/item_row.cc:
  Better detection of null values (which doesn't produce warnings)
sql/item_sum.cc:
  Better detection of null values (which doesn't produce warnings)
sql/item_timefunc.cc:
  Give warnings for wrong CAST of number -> string
sql/my_decimal.cc:
  Fixed typo in comment
sql/mysql_priv.h:
  Removed prototype for static function
  Moved defines for error handling to sql_error.h (to be able to use these in field.h)
sql/mysqld.cc:
  Simplify code
sql/sql_class.h:
  Moved to sql_error.h
sql/sql_load.cc:
  Removed wrong cast
sql/sql_parse.cc:
  Fixed wrong printf()
sql/sql_table.cc:
  Made mysql_prepare_table() static
  Changed references to pointers to make code more readable
  ALTER TABLE now aborts if one gets warnings in STRICT mode
sql/time.cc:
  Fixed possible wrong call
sql/unireg.cc:
  Removed one call to current_thd
  Give errors if one uses a wrong DEFAULT value
2005-04-01 15:04:50 +03:00
unknown
5b0c75259c Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-union_merge-5.0


sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-04-01 02:15:40 +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
6ae390fd5d Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/mysql-4.1


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_subselect.h:
  Auto merged
2005-03-31 10:47:32 +02: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
f17bba4e2d Merge
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/ps_6bdb.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
sql/item.h:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/item.cc:
  SCCS merged
2005-03-30 14:32:53 +02:00
unknown
af2ab040cc BUG#8807 Select crash server
- Add function Item_param::fix_fields which will update any subselect they are part of and indicate that the subsleect is not const during prepare phase, and thus should not be executed during prepare.


mysql-test/include/ps_query.inc:
  Adde new test case
mysql-test/r/ps_2myisam.result:
  Update test result
mysql-test/r/ps_3innodb.result:
  Update test result
mysql-test/r/ps_4heap.result:
  Update test result
mysql-test/r/ps_5merge.result:
  Update test result
mysql-test/r/ps_6bdb.result:
  Update test result
mysql-test/r/ps_7ndb.result:
  Update test result
sql/item.cc:
  Add function Item_param::fix_fields, which will mark any subselects they are part of as not being a constant expression unless the param value is specified, ie. it will be not be constant during prepare phase.
sql/item.h:
  Adde Item_param::fix_fields
sql/item_subselect.h:
  Make Item_param::fix_field friend of Item_subselect
2005-03-30 12:14:37 +02:00
unknown
dddabc7edd Merge
mysql-test/r/metadata.result:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
mysql-test/r/union.result:
  SCCS merged
mysql-test/t/union.test:
  SCCS merged
2005-03-30 10:27:36 +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
0c0a2d5590 after merge fix 2005-03-17 18:44:24 +03:00
unknown
17791f9500 Merge 4.1 -> 5.0
heap/hp_create.c:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/r/olap.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/key.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_string.h:
  Auto merged
client/mysqldump.c:
  Manual merge
mysql-test/r/func_gconcat.result:
  Manual merge
mysql-test/r/func_str.result:
  Manual merge
mysql-test/t/func_gconcat.test:
  Manual merge
sql/ha_heap.cc:
  Manual merge
sql/sql_select.cc:
  Manual merge
2005-03-17 16:51:07 +03:00
unknown
a131e4d12d Merge rurik.mysql.com:/home/igor/mysql-4.1
into rurik.mysql.com:/home/igor/dev/mysql-4.1-0


sql/item.h:
  Auto merged
2005-03-16 17:50:03 -08:00
unknown
a5c87958a6 Fix for bug#8656: Crash with group_concat on alias in outer table
fixed result_field support of Item_ref
2005-03-16 16:44:28 +03:00
unknown
e16535ce19 olap.result, olap.test:
Added a test case for bug #8616.
item.h:
  Fixed bug #8616.
  Added class Item_null_result used in rollup processing.
sql_select.h, sql_select.cc:
  Fixed bug #8616.
  Added JOIN::rollup_write_data to cover rollup queries
  with DISTINCT. Modified other rollup methods.


sql/sql_select.cc:
  Fixed bug #8616.
  Added JOIN::rollup_write_data to cover rollup queries
  with DISTINCT. Modified other rollup methods.
sql/sql_select.h:
  Fixed bug #8616.
  Added JOIN::rollup_write_data to cover rollup queries
  with DISTINCT. Modified other rollup methods.
sql/item.h:
  Fixed bug #8616.
  Added class Item_null_result used in rollup processing.
mysql-test/t/olap.test:
  Added a test case for bug #8616.
mysql-test/r/olap.result:
  Added a test case for bug #8616.
2005-03-15 22:50:54 -08: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
e7eac0274b Merge
BitKeeper/etc/logging_ok:
  auto-union
innobase/trx/trx0trx.c:
  Auto merged
mysql-test/r/ctype_collate.result:
  Auto merged
mysql-test/r/func_system.result:
  Auto merged
mysql-test/r/type_blob.result:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_create.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/opt_sum.cc:
  Auto merged
innobase/ut/ut0mem.c:
  e
  merge from 4.1
mysql-test/r/func_group.result:
  merge from 4.1
mysql-test/r/func_str.result:
  merge from 4.1
mysql-test/t/func_group.test:
  merge from 4.1
2005-03-05 18:20:35 +04:00
unknown
c56d0283dd type_blob.result, func_system.result, func_str.result, ctype_collate.result:
fixing test results accordingly.
func_system.test:
  New test that illegal mix of collations does not happen anymore.
item_strfunc.h:
    safe_charset_converter() was added for system constants.
item_strfunc.cc:
  safe_charset_converter() was added for system constants.
item_func.cc, item.h, item.cc:
  Bug#8291: Illegal collation mix with USER() function.
  After discussion with PeterG and Serge, a new coercibility
  level for "system constants" was introduced, between
  COERRIBLE and IMPLICIT. Thus:
  SELECT col1 = USER() FROM t1; - is done according to col1 collation.
  SELECT 'string' = USER(); - is done according to USER() collation.
  At the same time, "nagg" and "strong" members were removed as unused.
item_create.cc:
  Version is a system constant too.


sql/item.cc:
  Bug#8291: Illegal collation mix with USER() function.
  After discussion with PeterG and Serge, a new coercibility
  level for "system constants" was introduced, between
  COERRIBLE and IMPLICIT. Thus:
  SELECT col1 = USER() FROM t1; - is done according to col1 collation.
  SELECT 'string' = USER(); - is done according to USER() collation.
  At the same time, "nagg" and "strong" members were removed as unused.
sql/item.h:
  Bug#8291: Illegal collation mix with USER() function.
  After discussion with PeterG and Serge, a new coercibility
  level for "system constants" was introduced, between
  COERRIBLE and IMPLICIT. Thus:
  SELECT col1 = USER() FROM t1; - is done according to col1 collation.
  SELECT 'string' = USER(); - is done according to USER() collation.
  At the same time, "nagg" and "strong" members were removed as unused.
sql/item_create.cc:
  Version is a system constant too.
sql/item_func.cc:
  Bug#8291: Illegal collation mix with USER() function.
  After discussion with PeterG and Serge, a new coercibility
  level for "system constants" was introduced, between
  COERRIBLE and IMPLICIT. Thus:
  SELECT col1 = USER() FROM t1; - is done according to col1 collation.
  SELECT 'string' = USER(); - is done according to USER() collation.
  At the same time, "nagg" and "strong" members were removed as unused.
sql/item_strfunc.cc:
  safe_charset_converter() was added for system constants.
sql/item_strfunc.h:
    safe_charset_converter() was added for system constants.
mysql-test/t/func_system.test:
  New test that illegal mix of collations does not happen anymore.
mysql-test/r/ctype_collate.result:
  fixing test results accordingly.
mysql-test/r/func_str.result:
  fixing test results accordingly.
mysql-test/r/func_system.result:
  fixing test results accordingly.
mysql-test/r/type_blob.result:
  fixing test results accordingly.
2005-03-04 14:20:49 +04:00
unknown
daaeeedb49 Merged from 4.1
innobase/os/os0file.c:
  Auto merged
innobase/srv/srv0start.c:
  Auto merged
mysql-test/r/bigint.result:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/symlink.result:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysql-test/t/symlink.test:
  Auto merged
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
ndb/test/ndbapi/testNodeRestart.cpp:
  Auto merged
ndb/test/run-test/daily-devel-tests.txt:
  Auto merged
sql/item.h:
  Auto merged
strings/ctype-win1250ch.c:
  Auto merged
mysql-test/r/grant2.result:
  Hand-merged new test
mysql-test/t/grant2.test:
  Hand-merged new test
ndb/include/ndbapi/NdbTransaction.hpp:
  Used 5.0 version per tomas
sql/sql_acl.cc:
  Merge fix for Bug #3309.
2005-03-03 15:01:46 -08:00
unknown
d88c56a637 Comments added 2005-03-03 05:03:21 +03:00
unknown
e1ba1632fb bug#8151 - truncate leaves a transaction open
deadlock in MYSQL_LOG::new_file()
style fixes


mysql-test/r/innodb.result:
  one more test for truncate
mysql-test/t/innodb.test:
  one more test for truncate
sql/ha_innodb.cc:
  bug#8151 - truncate leaves a transaction open
sql/handler.cc:
  bug#8151 - truncate leaves a transaction open
sql/item.h:
  style fix
sql/item_cmpfunc.cc:
  style fix
sql/item_cmpfunc.h:
  style fix
sql/item_func.cc:
  style fix
sql/item_func.h:
  style fix
sql/log.cc:
  let new_file() to lock LOCK_index,
  don't check for prepared_xids in rotate_and_purge()
  increase thread_safe_increment when LOCK_log is taken
sql/log_event.cc:
  mysqlbinlog now prints a warning if binlog was not closed properly
sql/sql_class.h:
  comments
sql/sql_repl.cc:
  DBUG_ENTER tag corrected
2005-03-02 10:38:25 +01:00
unknown
1b3ffb1bcb Fix for BUG#8562: In Item_int_with_ref::new_item() create Item_int or Item_uint
depending on ref->unsigned_flag. Item_int_with_ref can refer to both signed and 
unsigned integers.


mysql-test/r/bigint.result:
  Test case for BUG#8562
mysql-test/t/bigint.test:
  Test case for BUG#8562
2005-02-28 23:50:06 +03:00
unknown
cb8d9c3ad4 Backport my_strntod() from 5.0
Change string->float conversion to delay division as long as possible.
This gives us more exact integer->float conversion for numbers of type '123.45E+02' (Bug #7740)




client/mysql.cc:
  Fix wront usage of charset (found during review of pushed code)
include/m_string.h:
  Backported my_strtod() from 5.0
mysql-test/mysql-test-run.sh:
  Run also mysql_client_test with --debug
mysql-test/r/ps_1general.result:
  Safety fix (if mysql_client_test.test fails)
mysql-test/r/type_float.result:
  More test
mysql-test/t/mysql_client_test.test:
  Comments for what to do if this test fails
mysql-test/t/ps_1general.test:
  Safety fix (if mysql_client_test.test fails)
mysql-test/t/type_float.test:
  More test to better test new strtod() function
  Test also bug #7740 (wrong comparsion between integer and float-in-integer-range)
sql/field.cc:
  Backport my_strntod() from 5.0
sql/item.cc:
  Backport my_strntod() from 5.0
sql/item.h:
  Backport my_strntod() from 5.0
sql/item_func.h:
  Backport my_strntod() from 5.0
sql/item_strfunc.cc:
  Backport my_strntod() from 5.0
sql/item_sum.cc:
  Backport my_strntod() from 5.0
sql/item_sum.h:
  Backport my_strntod() from 5.0
sql/procedure.h:
  Backport my_strntod() from 5.0
strings/ctype-simple.c:
  Backport my_strntod() from 5.0
strings/ctype-ucs2.c:
  Backport my_strntod() from 5.0
strings/strtod.c:
  Backport my_strntod() from 5.0
  Change conversion to delay division as long as possible.
  This gives us more exact integer-> float conversion for numbers of type '123.45E+02'
2005-02-22 12:51:23 +02:00
unknown
a2bb52c748 Merge
sql/ha_ndbcluster.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
sql/sql_class.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-02-21 16:13:29 +01:00
unknown
3805001f7c use dbug_print_decimal instead of DBUG_EXECUTE
Portability fix
Note: rpl_trunc_binlog fails, but Sergei has promised to fix it, so I will ignore it for now


sql/field.cc:
  use dbug_print_decimal instead of DBUG_EXECUTE
sql/item.h:
  Portability fix
sql/my_decimal.cc:
  Fix error in last changeset (not pushed)
2005-02-20 00:24:30 +02:00