Commit graph

36557 commits

Author SHA1 Message Date
unknown
b98be8f696 Merge perch.ndb.mysql.com:/home/jonas/src/41-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-4.1-ndb
2007-05-18 10:16:16 +02:00
unknown
051c96f29d Merge perch.ndb.mysql.com:/home/jonas/src/41-work
into  perch.ndb.mysql.com:/home/jonas/src/50-work


ndb/src/common/transporter/Packer.cpp:
  Auto merged
ndb/src/common/transporter/TCP_Transporter.hpp:
  Auto merged
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Auto merged
ndb/src/common/transporter/TransporterRegistry.cpp:
  merge
ndb/test/ndbapi/testNdbApi.cpp:
  merge
ndb/test/run-test/daily-basic-tests.txt:
  merge
2007-05-18 09:56:00 +02:00
unknown
9bfed5190a ndb - bug#28443
Make sure that data can not e left lingering in receive buffer


ndb/src/common/transporter/Packer.cpp:
  test, make MAX_RECEIVED_SIGNALS an variable
ndb/src/common/transporter/TCP_Transporter.hpp:
  add new method for checking of data in receive buffer
ndb/src/common/transporter/TransporterRegistry.cpp:
  Make sure that 
  1) poll_TCP return true if any transporter has data in receiveBuffer
     (previously only if socket had data)
  2) performReceive executes signals if TCP transporter has data in receiveBuffer
     (previously only if data was recevied)
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  test, make MAX_RECEIVED_SIGNALS an variable
ndb/test/ndbapi/testNdbApi.cpp:
  testcase
ndb/test/run-test/daily-basic-tests.txt:
  testcase
2007-05-18 09:48:52 +02:00
unknown
2018978eb4 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/50
2007-05-18 06:27:07 +02:00
unknown
9548a0757a my_time.c:
in number_to_datetime(), zero out the MYSQL_TIME structure
  before setting values, to ensure that all fields are initialized; in
  particular, ensure that ->neg is set to zero (fixes valgrind warning
  "Conditional jump ... depends on uninitialised value" in make_date_time)


sql-common/my_time.c:
  in number_to_datetime(), zero out the MYSQL_TIME structure
  before setting values, to ensure that all fields are initialized; in
  particular, ensure that ->neg is set to zero (fixes valgrind warning
  "Conditional jump ... depends on uninitialised value" in make_date_time)
2007-05-18 06:14:37 +02:00
unknown
c2d3fb6b20 Bug #27119 server crash with integer division by zero during filesort on huge result
Fixed a problem and compiler warning on 64bit platforms so that they only allocated UINT_MAX number of BUFFPEKS.


sql/filesort.cc:
   Fixed a problem and compiler warning on 64bit platforms so that they only allocated UINT_MAX number of BUFFPEKS.
2007-05-17 20:45:33 -04:00
unknown
042b1717c4 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug28337
2007-05-17 16:06:57 -07:00
unknown
8494cd5bb6 Merge damien-katzs-computer.local:/Users/dkatz/mysql50
into  damien-katzs-computer.local:/Users/dkatz/50_div_zero
2007-05-17 18:02:03 -04:00
unknown
9d3e7ea664 Bug #27119 server crash with integer division by zero during filesort on huge result
Fixed a compiler warning on platforms where uint != ulong from the first pushed fix.


sql/filesort.cc:
  fixed a compiler warning on platforms where uint != ulong
2007-05-17 17:54:31 -04:00
unknown
2738ca5621 Merge siva.hindu.god:/home/tsmith/m/bk/maint/41
into  siva.hindu.god:/home/tsmith/m/bk/maint/50
2007-05-17 14:26:04 -06:00
unknown
82db6cc68c Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  siva.hindu.god:/home/tsmith/m/bk/maint/50
2007-05-17 14:24:52 -06:00
unknown
ce5f0d1bc3 Merge siva.hindu.god:/home/tsmith/m/bk/50
into  siva.hindu.god:/home/tsmith/m/bk/maint/50


mysql-test/r/type_datetime.result:
  Auto merged
mysql-test/t/outfile.test:
  Auto merged
mysql-test/t/type_datetime.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/my_decimal.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
2007-05-17 14:17:50 -06:00
unknown
fde76b7e54 Merge siva.hindu.god:/home/tsmith/m/bk/41
into  siva.hindu.god:/home/tsmith/m/bk/maint/41
2007-05-17 14:16:33 -06:00
unknown
1155afffc6 Merge damien-katzs-computer.local:/Users/dkatz/mysql50
into  damien-katzs-computer.local:/Users/dkatz/50_div_zero
2007-05-17 16:07:44 -04:00
unknown
c4a4df5aa4 Bug#28261: Wrong DATETIME comparison result when the GET_USER_VAR function
is involved.

The Arg_comparator::compare_datetime() comparator caches its arguments if
they are constants i.e. const_item() returns true. The
Item_func_get_user_var::const_item() returns true or false based on
the current query_id and the query_id where the variable was created.
Thus even if a query can change its value its const_item() still will return
true. All this leads to a wrong comparison result when an object of the
Item_func_get_user_var class is involved.

Now the Arg_comparator::can_compare_as_dates() and the
get_datetime_value() functions never cache result of the GET_USER_VAR()
function (the Item_func_get_user_var class).


mysql-test/t/type_datetime.test:
  A test case is added for the bug#28261: Wrong DATETIME comparison result when the GET_USER_VAR function
  is involved.
mysql-test/r/type_datetime.result:
  A test case is added for the bug#28261: Wrong DATETIME comparison result when the GET_USER_VAR function
  is involved.
sql/item_cmpfunc.cc:
  Bug#28261: Wrong DATETIME comparison result when the GET_USER_VAR function
  is involved.
  Now the Arg_comparator::can_compare_as_dates() and the
  get_datetime_value() functions never cache result of the GET_USER_VAR()
  function (the Item_func_get_user_var class).
2007-05-17 23:09:45 +04:00
unknown
db18dc9da0 ps_6bdb.result:
Fix bad merge of test results


mysql-test/r/ps_6bdb.result:
  Fix bad merge of test results
2007-05-17 12:55:59 -06:00
unknown
455352b0b8 Bug#22855:
Conversion errors when constructing the condition for an
IN predicates were treated as if the affected column contains
NULL. If such a IN predicate is inside NOT we get wrong 
results.
Corrected the handling of conversion errors in an IN predicate 
that is resolved by unique_subquery (through 
subselect_uniquesubquery_engine).


mysql-test/r/subselect3.result:
  Bug#22855: test case
mysql-test/t/subselect3.test:
  Bug#22855: test case
sql/item_subselect.cc:
  Bug#22855: corrected the handling of conversion errors and
  NULL key values in IN predicate that is resolved by index
  lookup.
2007-05-17 19:38:34 +03:00
unknown
32e868239d Merge mysql.com:/home/svoj/devel/mysql/BUG25712/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG25712/mysql-5.0-engines


mysys/my_seek.c:
  Auto merged
2007-05-17 15:27:56 +05:00
unknown
a656c71e8a Addition to fix for
BUG#25712 - insert delayed and check table run together report crashed
            tables
Fixed wrongly applied patch.
2007-05-17 15:23:59 +05:00
unknown
28d896ba04 Merge mysql.com:/home/svoj/devel/mysql/BUG25712/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG25712/mysql-5.0-engines


include/my_sys.h:
  Manual merge.
2007-05-17 12:48:10 +05:00
unknown
6e09887f5d Addition to fix for
BUG#25712 - insert delayed and check table run together report
            crashed tables

Let MY_THREADSAFE have distinct value. Some functions call my_seek
passing MyFlags argument directly to it. This may cause unnecessary
locks, which may finally lead to a dead-lock (specifically see my_lock).


include/my_sys.h:
  Addition to fix for
  BUG#25712 - insert delayed and check table run together report
              crashed tables
  
  Let MY_THREADSAFE have distinct value. Some functions call my_seek
  passing MyFlags argument directly to it. This may cause unnecessary
  locks, which may finally lead to a dead-lock (specifically see my_lock).
  
  Also it doesn't affect my_pread/my_pwrite in any way. So the comment was
  updated.
2007-05-17 12:43:52 +05:00
unknown
dd1a118000 Fixed bug #28337: wrong results for grouping queries with correlated
subqueries in WHERE conditions.
This bug was introduced by the patch for bug 27321.


mysql-test/r/subselect.result:
  Added a test case for bug #28337.
mysql-test/t/subselect.test:
  Added a test case for bug #28337.
sql/item.cc:
  Fixed bug #28337: wrong results for grouping queries with correlated
  subqueries in WHERE conditions.
  This bug was introduced by the patch for bug 27321.
  
  Now in the Item_field::fix_outer_field function we create an Item_outer_ref
  object for an outer reference only if it is used in the SELECT list or
  in the HAVING clause of the subquery against which the reference is resolved.
2007-05-16 23:42:10 -07:00
unknown
3770083b5b Bug #27119 server crash with integer division by zero during filesort on huge result
Added checks to detect integer overflow and fixed other bugs on the error path.


myisam/sort.c:
  Replaced a break statement with a goto statement so that a failure will instead break
sql/filesort.cc:
  Fixed an allocation routine to detect integer overflow, and as an optimization a check that prevents the number of buffpeks being larger than can possibly fit into memory.
      
  Fixed several unchecked error codes.
      
  Changed an index variable from int to uint to the match the type of the variable it's
  being compared with.
      
      Replaced a break statement with a goto statement so that a failure will instead break
  out of the higher level while-loop, instead of just the nested for-loop.
2007-05-16 16:14:13 -04:00
unknown
de0e4e0a2b Merge mysql.com:/home/svoj/devel/mysql/BUG25712/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG25712/mysql-5.0-engines


myisam/mi_check.c:
  Auto merged
mysys/my_seek.c:
  Manual merge.
2007-05-17 00:40:26 +05:00
unknown
867d346099 Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.0-build
into  trift2.:/MySQL/M50/push-5.0
2007-05-16 21:24:54 +02:00
unknown
2d38d4d6ff Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-05-16 21:23:15 +02:00
unknown
b015146e41 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/hf/work/8663/my50-8663
2007-05-17 00:10:39 +05:00
unknown
5e00d4b7f6 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/8663/my50-8663
2007-05-17 00:09:43 +05:00
unknown
e1e83a8b66 BUG#25712 - insert delayed and check table run together report crashed
tables

In case system doesn't have native pread/pwrite calls (e.g. Windows)
and there is CHECK TABLE runs concurrently with another statement that
reads from a table, the table may be reported as crashed.

This is fixed by locking file descriptor when my_seek is executed on
MyISAM index file and emulated pread/pwrite may be executed concurrently.

Affects MyISAM tables on platforms that do not have native
pread/pwrite calls (e.g. Windows).

No deterministic test case for this bug.


myisam/mi_check.c:
  Key file descriptor is shared among threads and mixed set of
  my_pread/my_pwrite and my_seek calls is possible. This is not
  a problem on systems that have native pread/pwrite calls.
  
  In case system doesn't have native pread/pwrite calls (e.g. Windows)
  we must ensure that my_pread/my_pwrite are not executed at the same
  time with my_seek. This is done by passing MY_THREADSAFE flag to
  my_seek.
mysys/my_seek.c:
  On platforms that do not have native pread/pwrite calls (e.g. Windows)
  these calls are emulated as follow: lock fd, lseek, read, unlock fd.
  
  In case file descriptor is shared among threads, where one thread
  executes my_pread and another thread executes my_seek, we may read
  from a wrong position. This may happen because my_seek doesn't lock
  fd and thus may be executed by another thread after emulated pread
  has done lseek and before it has done read.
  
  To fix problem mentioned above we introduce new flag MY_THREADSAFE to
  my_seek, which is meaningful only in case pread/pwrite calls are
  emulated. If this flag is set, lseek operation is performed as follow:
  lock fd, seek, unlock fd.
2007-05-16 23:42:32 +05:00
unknown
f106d396c0 Bug#28473 Does mysql-test-run.pl handle LD_LIBRARY_PATH wrong ?
- Fix spelling error


mysql-test/mysql-test-run.pl:
  Fix spelling error
2007-05-16 17:51:28 +02:00
unknown
b7cf6fcbba Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-build
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
2007-05-16 17:27:30 +02:00
unknown
42dae8f51d Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-build-work
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-build
2007-05-16 17:26:55 +02:00
unknown
2428326ff2 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
2007-05-16 17:26:18 +02:00
unknown
614135222f WL#2247 mysqltest: add option for sorting results
- Change from "query_sorted <query>" to "sorted_results"


client/mysqltest.c:
  Replace "query_sorted <query>" with the ability to turn
  on "one shot result sorting" with the command "sorted_results"
mysql-test/r/mysqltest.result:
  Update test and result
mysql-test/t/mysqltest.test:
  Update test and result
2007-05-16 17:19:36 +02:00
unknown
38553bcd92 Merge bk-internal:/home/bk/mysql-5.0-runtime
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
2007-05-16 17:13:42 +02:00
unknown
fe206129fa Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
2007-05-16 17:07:34 +02:00
unknown
bcae429e91 Merge pilot.blaudden:/home/msvensson/mysql/mysql-4.1-maint
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint


client/mysqltest.c:
  Auto merged
2007-05-16 16:31:05 +02:00
unknown
7e2ba658d4 Bug#28470 mysqltest scripts need to know protocol
client/mysqltest.c:
  Make it possible for test scripts to know what protocol is being used
2007-05-16 16:30:26 +02:00
unknown
edd8df1c8c Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work
2007-05-16 16:04:42 +02:00
unknown
7c70011e21 Merge kpettersson@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime
2007-05-16 14:54:47 +02:00
unknown
d9ce3033f5 Bug#27415 Text Variables in stored procedures
- Problem was reported as a SP variable using itself as 
   right value inside SUBSTR caused corruption of data. 
 - This bug could not be verified in either 5.0bk or 5.1bk
 - Added test case to prevent future regressions.


mysql-test/r/sp-vars.result:
  Added test case for a reported regression which couldn't be
  verified.
mysql-test/t/sp-vars.test:
  Added test case for a reported regression which couldn't be
  verified.
2007-05-16 14:25:38 +02:00
unknown
8ab53d5f4e Bug#21103: "DATE column not compared as DATE"
BDB results fixed (not p/o 5.1 fix)


mysql-test/r/ps_6bdb.result:
  Now we get a note when we insert a datetime value into a date column
2007-05-16 14:00:47 +02:00
unknown
9e30e54837 Merge pilot.blaudden:/home/msvensson/mysql/bk_fix/mysql-5.0-maint-patch4
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-05-16 12:49:15 +02:00
unknown
418a2983c0 Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  linux-st28.site:/home/martin/mysql/src/5.0o-bug27573


mysql-test/r/func_group.result:
  Auto merged
mysql-test/t/func_group.test:
  bug#27573: hand merged test case
2007-05-16 12:22:20 +03:00
unknown
b5e4f54a53 Backport of TIME->MYSQL_TIME / Y2K fixset
Made year 2000 handling more uniform
Removed year 2000 handling out from calc_days()
The above removes some bugs in date/datetimes with year between 0 and 200
Now we get a note when we insert a datetime value into a date column
For default values to CREATE, don't give errors for warning level NOTE
Fixed some compiler failures
Added library ws2_32 for windows compilation (needed if we want to compile with IOCP support)
Removed duplicate typedef TIME and replaced it with MYSQL_TIME

Better (more complete) fix for: Bug#21103 "DATE column not compared as DATE"
Fixed properly Bug#18997 "DATE_ADD and DATE_SUB perform year2K autoconversion magic on 4-digit year value"
Fixed Bug#23093 "Implicit conversion of 9912101 to date does not match cast(9912101 as date)"
 


include/my_time.h:
  Removed not used define YY_MAGIC_BELOW
  Added prototype for year_2000_handling()
mysql-test/r/date_formats.result:
  Updated results (fixed bug in date_format() with year < 99
mysql-test/r/func_sapdb.result:
  Added more testing of make_date()
mysql-test/r/ps_2myisam.result:
  Now we get a note when we insert a datetime value into a date column
mysql-test/r/ps_3innodb.result:
  Now we get a note when we insert a datetime value into a date column
mysql-test/r/ps_4heap.result:
  Now we get a note when we insert a datetime value into a date column
mysql-test/r/ps_5merge.result:
  Now we get a note when we insert a datetime value into a date column
mysql-test/r/ps_7ndb.result:
  Now we get a note when we insert a datetime value into a date column
mysql-test/r/strict.result:
  zero-year in str_to_date() throws warning in strict
mysql-test/r/type_date.result:
  Added test for date conversions
mysql-test/r/type_datetime.result:
  Added testcase for datetime to date conversion.
mysql-test/t/date_formats.test:
  Added testing of dates < 200
mysql-test/t/func_sapdb.test:
  More testing of makedate()
mysql-test/t/type_date.test:
  Added test for date conversions
mysql-test/t/type_datetime.test:
  Added testcase for datetime to date conversion
sql/field.cc:
  Give note if we insert a datetime value in a date field
  Don't give notes if we are doing internal test conversions (like from convert_constant_item())
  More documentation (store functions can now return '3' to inform that the function did return a NOTE (not warning or error))
  Revert some changes in Field_newdate::store() to get more optimal code
  Field::set_warning() will now ignore notes if CHECK_FIELD_IGNORE is set.
  New parameters to make_truncated_value_warning()
sql/field.h:
  Give note if we insert a datetime value in a date field
  Don't give notes if we are doing internal test conversions (like from convert_constant_item())
  More documentation (store functions can now return '3' to inform that the function did return a NOTE (not warning or error))
  Revert some changes in Field_newdate::store() to get more optimal code
  Field::set_warning() will now ignore notes if CHECK_FIELD_IGNORE is set.
  New parameters to make_truncated_value_warning()
sql/item.cc:
  Give note if we insert a datetime value in a date field
  Don't give notes if we are doing internal test conversions (like from convert_constant_item())
  More documentation (store functions can now return '3' to inform that the function did return a NOTE (not warning or error))
  Revert some changes in Field_newdate::store() to get more optimal code
  Field::set_warning() will now ignore notes if CHECK_FIELD_IGNORE is set.
  New parameters to make_truncated_value_warning()
sql/item.h:
  TIME -> MYSQL_TIME
sql/item_cmpfunc.cc:
  Don't print notes in convert_constant_item()
sql/item_func.h:
  TIME -> MYSQL_TIME
sql/item_timefunc.cc:
  New parameters to make_truncated_value_warning()
  Moved year 2000 handling out from calc_days()
sql/item_timefunc.h:
  TIME -> MYSQL_TIME
sql/my_decimal.cc:
  TIME -> MYSQL_TIME
sql/my_decimal.h:
  TIME -> MYSQL_TIME
sql/mysql_priv.h:
  Added error level to make_truncated_value_warning()
sql/protocol.cc:
  TIME -> MYSQL_TIME
sql/protocol.h:
  TIME -> MYSQL_TIME
sql/sp.cc:
  TIME -> MYSQL_TIME
sql/sql_base.cc:
  Make testing of result value of save_in_field() uniform
sql/sql_class.h:
  TIME -> MYSQL_TIME
sql/sql_show.cc:
  TIME -> MYSQL_TIME
sql/structs.h:
  TIME -> MYSQL_TIME
sql/time.cc:
  Added error level to make_truncated_value_warning()
sql/tztime.cc:
  TIME -> MYSQL_TIME
sql/tztime.h:
  TIME -> MYSQL_TIME
sql/unireg.cc:
  For default values to CREATE, don't give errors for warning level NOTE
  (Fixed failed CREATE when we give a datetime value to a date field)
sql-common/my_time.c:
  Added year_2000_handling()
  Removed year 2000 handling from calc_daynr()
2007-05-16 10:44:59 +02:00
unknown
e4983a70f4 Merge pilot.blaudden:/home/msvensson/mysql/bk_fix/mysql-5.0-maint-patch3
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-05-16 10:17:26 +02:00
unknown
7703b67659 Merge bk-internal:/home/bk/mysql-5.0-maint
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-05-16 10:15:21 +02:00
unknown
e675d25771 Bug#28223: mysqldump --compact --routines restores from @OLD_SQL_MODE w/o ever setting it
- mysqldump generated output that set OLD_SQL_MODE twice, to different values
    (for triggers), or not at all (for routines) in some cases.


client/mysqldump.c:
  Only save SQL_MODE in dump_triggers if in --compact mode. Otherwise,
  it's already been saved in write_header(). Likewise for dumpe_routines,
  where it was never saved.
mysql-test/r/mysqldump.result:
  mysqldump output has subtly changed. Adjust test-results. This also shows
  OLD_SQL_MODE is always set exactly once now
2007-05-16 10:14:29 +02:00
unknown
9e1585ab8f Fix for bug #28240: "isinf()" cannot be used in C++ for lack of prototype
- Since isinf() portability across various platforms and
  compilers is a complicated question, we should not use
  it directly. Instead, the my_isinf() macro should be used,
  which is defined as an alias to the system-defined isinf()
  if it is safe to use, or a workaround implementation otherwise


configure.in:
  Added a check to define HAVE_ISINF only if it can be used
  in C++ code as well.
include/my_global.h:
  Define my_isinf() as an alias to isinf(), if it is available
  in both C and C++ code. Otherwise, define it to a workaround
  implementation.
sql/item_func.cc:
  Replaced isinf() with my_isinf().
strings/strtod.c:
  Replaced isinf() with my_isinf().
2007-05-16 10:10:02 +02:00
unknown
75392f3707 Fix a failing assert.
sql/sql_insert.cc:
  Do not access delayed thread memory without a mutex.
2007-05-16 11:49:15 +04:00