Commit graph

30858 commits

Author SHA1 Message Date
unknown
de5de7c319 ndb - bug#20406 multi-platform testing - not FIX 2006-06-14 00:38:34 +02:00
unknown
9237d65d33 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into moonbone.local:/home/evgen/bk-trees/mysql-4.1-opt
2006-06-13 22:53:30 +04:00
unknown
01c9fd31d7 Bug #20195: INSERT DELAYED with auto_increment is assigned wrong values
The INSERT DELAYED should not maintain its own private auto-increment
counter, because this is assuming that other threads cannot insert
into the table while the INSERT DELAYED thread is inserting, which is
a wrong assumption.

So the start of processing of a batch of INSERT rows in the 
INSERT DELAYED thread must be treated as a start of a new statement
and cached next_insert_id must be cleared.


mysql-test/r/delayed.result:
  test suite for the bug
mysql-test/t/delayed.test:
  test suite for the bug
sql/sql_insert.cc:
  Reset auto-increment cacheing before processing
  the next batch of inserts in the handler thread
2006-06-13 18:18:32 +03:00
unknown
6297d1ab38 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into moonbone.local:/work/16377-bug-4.1-opt-mysql
2006-06-13 19:10:27 +04:00
unknown
47311e8e87 Fixed bug#16377: result of DATE/TIME functions were compared as strings which
can lead to a wrong result.

All date/time functions has the STRING result type thus their results are
compared as strings. The string date representation allows a user to skip 
some of leading zeros. This can lead to wrong comparison result if a date/time 
function result is compared to such a string constant.

The idea behind this bug fix is to compare results of date/time functions
and data/time constants as ints, because that date/time representation is 
more exact. To achieve this the agg_cmp_type() is changed to take in the
account that a date/time field or an date/time item should be compared 
as ints.

This bug fix is partially back ported from 5.0.

The agg_cmp_type() function now accepts THD as one of parameters. 
In addition, it now checks if a date/time field/function is present in the
list. If so, it tries to coerce all constants to INT to make date/time
comparison return correct result. The field for the constant coercion is
taken from the Item_field or constructed from the Item_func. In latter case
the constructed field will be freed after conversion of all constant items.
Otherwise the result is same as before - aggregated with help of the
item_cmp_type() function.

From the Item_func_between::fix_length_and_dec() function removed the part
which was converting date/time constants to int if possible. Now this is 
done by the agg_cmp_type() function.

The new function result_as_longlong() is added to the Item class. 
It indicates that the item is a date/time item and result of it can be
compared as int. Such items are date/time fields/functions.

Correct val_int() methods are implemented for classes Item_date_typecast, 
Item_func_makedate, Item_time_typecast, Item_datetime_typecast. All these
classes are derived from Item_str_func and Item_str_func::val_int() converts
its string value to int without regard to the date/time type of these items.

Arg_comparator::set_compare_func() and Arg_comparator::set_cmp_func()
functions are changed to substitute result type of an item with the INT_RESULT
if the item is a date/time item and another item is a constant. This is done
to get a correct result of comparisons like date_time_function() = string_constant.


mysql-test/r/cast.result:
  Fixed wrong test case result after bug fix#16377.
sql/item_timefunc.h:
  Fixed bug#16377: result of DATE/TIME functions were compared as strings which
  can lead to a wrong result.
  The result_as_longlong() function is set to return TRUE for these classes:
  Item_date, Item_date_func, Item_func_curtime, Item_func_sec_to_time,
  Item_date_typecast, Item_time_typecast, Item_datetime_typecast,
  Item_func_makedate.
sql/item_timefunc.cc:
  Fixed bug#16377: result of DATE/TIME functions were compared as strings which
  can lead to a wrong result.Correct val_int() methods are implemented for classes Item_date_typecast, 
  Item_func_makedate, Item_time_typecast, Item_datetime_typecast.
sql/item_cmpfunc.h:
  Fixed bug#16377: result of DATE/TIME functions were compared as strings which
  can lead to a wrong result.
  Arg_comparator::set_compare_func() and Arg_comparator::set_cmp_func()
  functions are changed to substitute result type of an item with the INT_RESULT
  if the item is a date/time item and another item is a constant.
sql/field.cc:
  Fixed bug#16377: result of DATE/TIME functions were compared as strings which
  can lead to a wrong result.
  Field::set_warning(), Field::set_datetime_warning() now use current_thd to get thd if table isn't set.
sql/item_cmpfunc.cc:
  Fixed bug#16377: result of DATE/TIME functions were compared as strings which
  can lead to a wrong result.
  The agg_cmp_type() function now accepts THD as one of parameters. 
  In addition, it now checks if a date/time field/function is present in the
  list. If so, it tries to coerce all constants to INT to make date/time
  comparison return correct result. The field for the constant coercion is
  taken from the Item_field or constructed from the Item_func. In latter case
  the constructed field will be freed after conversion of all constant items.
  Otherwise the result is same as before - aggregated with help of the
  item_cmp_type() function.
sql/item.h:
  The new function result_as_longlong() is added to the Item class. 
  It indicates that the item is a date/time item and result of it can be
  compared as int. Such items are date/time fields/functions.
mysql-test/t/func_time.test:
  Added test case fot bug#16377: result of DATE/TIME functions were compared as strings which
  can lead to a wrong result.
mysql-test/r/func_time.result:
  Added test case fot bug#16377: result of DATE/TIME functions were compared as strings which
  can lead to a wrong result.
2006-06-13 19:09:24 +04:00
unknown
05750704a8 Fix for bug #12728: Very strange behaviour of ELT
mysql-test/r/func_str.result:
  Fix for bug #12728: Very strange behaviour of ELT
    - test case
mysql-test/t/func_str.test:
  Fix for bug #12728: Very strange behaviour of ELT
    - test result
sql/item_strfunc.cc:
  Fix for bug #12728: Very strange behaviour of ELT
    - Item_func_elt::eq() introduced: check 'item' member as well
      (to distinguish for instance elt(1, 'a', 'b') and elt(2, 'a', 'b')
sql/item_strfunc.h:
  Fix for bug #12728: Very strange behaviour of ELT
    - Item_func_elt::eq() introduced: check 'item' member as well
      (to distinguish for instance elt(1, 'a', 'b') and elt(2, 'a', 'b')
2006-06-13 16:01:54 +05:00
unknown
31ed3fd396 Merge mysql.com:/home/kgeorge/mysql/5.0/clean
into  mysql.com:/home/kgeorge/mysql/5.0/B20363
2006-06-12 18:28:04 +03:00
unknown
e7daa49761 Bug #20363: Create view on just created view is now denied
There was a wrong determination of the DB name (witch is 
not always the one in TABLE_LIST because derived tables
may be calculated using temp tables that have their db name
set to "").
The fix determines the database name according to the type 
of table reference, and calls the function check_access() 
with the correct db name so the correct set of grants is found.


mysql-test/r/view_grant.result:
  testsuite for the bug
mysql-test/t/view_grant.test:
  testsuite for the bug
sql/sql_parse.cc:
  correct determination of the db name.
2006-06-12 18:15:08 +03:00
unknown
3f19b05bb0 Added order by 2006-06-12 15:36:12 +02:00
unknown
7e3fe0fc91 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/marty/MySQL/mysql-5.0


ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.hpp:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
2006-06-12 15:36:10 +02:00
unknown
17a0c389cc Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-main
2006-06-12 15:36:09 +02:00
unknown
b10b25fbb5 Added order by 2006-06-12 15:35:47 +02:00
unknown
7b207a8301 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/home/marty/MySQL/mysql-4.1
2006-06-12 15:35:46 +02:00
unknown
1d522eb77d Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-main
2006-06-12 15:35:45 +02:00
unknown
8d33265571 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into moonbone.local:/home/evgen/bk-trees/mysql-4.1-opt
2006-06-12 15:56:21 +04:00
unknown
ce8b60b4f9 Merge moonbone.local:/work/16716-bug-4.1-mysql
into moonbone.local:/work/16716-bug-4.1-opt-mysql
2006-06-12 15:50:59 +04:00
unknown
00f4ef1280 Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-main


ndb/src/mgmsrv/Services.cpp:
  Auto merged
2006-06-12 13:11:37 +02:00
unknown
f4fcc2397e Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
into  poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-main
2006-06-12 13:09:04 +02:00
unknown
ce450e501a Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.0


ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
ndb/src/mgmsrv/Services.cpp:
  Auto merged
2006-06-12 13:08:04 +02:00
unknown
40d687eb43 Bug #20336 CLUSTERLOG commands have no effect
- always calculate max log level on node start
- send event subscribe uncond


ndb/src/mgmsrv/Services.cpp:
  Bug #20336 CLUSTERLOG commands have no effect
  - always send log level update
2006-06-12 13:06:56 +02:00
unknown
55d554bd1d Fix for Bug #18184 SELECT ... FOR UPDATE does not work..: Skipped lock check for full table scan due to bug #20390 SELECT FOR UPDATE does not release locks of untouched rows in full table scans 2006-06-12 10:40:56 +02:00
unknown
d043b5ea39 Fix for Bug #18184 SELECT ... FOR UPDATE does not work..: Added missing parameter for readTuples in index scan 2006-06-12 10:22:32 +02:00
unknown
8ea1058455 Merge mysql.com:/home/marty/MySQL/mysql-4.1
into  mysql.com:/home/marty/MySQL/mysql-5.0


sql/ha_ndbcluster.cc:
  Merge (using local)
2006-06-12 09:42:20 +02:00
unknown
e3a975c5d6 Fix for Bug #18184 SELECT ... FOR UPDATE does not work..: Adapted to 5.0 code changes 2006-06-12 09:37:19 +02:00
unknown
a3f3696697 Added lock test on index scan 2006-06-12 09:28:27 +02:00
unknown
fc9da88227 Moved back comment to correct method 2006-06-12 09:27:04 +02:00
unknown
86334edf2e Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  rurik.mysql.com:/home/igor/mysql-5.0-opt
2006-06-11 13:45:18 -07:00
unknown
a182963cc0 ndb - bug#18781 (5.0) handle rolling upgrade, minor fixes, logging, docs
ndb/src/kernel/blocks/dbdict/DictLock.txt:
  NR signals
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  call removeStaleDictLocks at right place, comment why it works
  more checks, better logging
ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
  call removeStaleDictLocks at right place, comment why it works
  more checks, better logging
ndb/include/kernel/signaldata/DictLock.hpp:
  2 more REFs
ndb/include/ndb_version.h.in:
  DICT LOCK appeared in 5.0.23
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  DICT LOCK rolling upgrade from version < 5.0.23
ndb/src/kernel/blocks/ERROR_codes.txt:
  more DICT LOCK related testing
ndb/test/ndbapi/testDict.cpp:
  more DICT LOCK related testing
2006-06-11 20:46:47 +02:00
unknown
2dd1dc6246 Merge mysql.com:/home/mydev/mysql-5.0
into  mysql.com:/home/mydev/mysql-5.0-amerge


mysql-test/r/lock_multi.result:
  Merging 5.0-engines to 5.0 master.
mysql-test/t/lock_multi.test:
  Merging 5.0-engines to 5.0 master.
2006-06-10 12:24:44 +02:00
unknown
a74154f4de Post-merge fixes 2006-06-09 19:29:39 -07:00
unknown
ddd55d4349 Merge rurik.mysql.com:/home/igor/tmp_merge
into  rurik.mysql.com:/home/igor/dev/mysql-5.0-0


VC++Files/client/mysql.dsp:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.hpp:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
client/mysqldump.c:
  Manual merge
mysql-test/r/func_time.result:
  Manual merge
2006-06-09 17:56:08 -07:00
unknown
ac7d73b004 Merge bk-internal:/home/bk/mysql-4.1
into  mysql.com:/data0/mysqldev/my/mysql-4.1
2006-06-09 22:42:34 +02:00
unknown
8e418820e9 Merge bk-internal:/home/bk/mysql-5.0
into  mysql.com:/data0/mysqldev/my/mysql-5.0
2006-06-09 22:34:21 +02:00
unknown
a6042ffbe9 Merge trift2.mysql.com:/M41/bug20303-4.1
into trift2.mysql.com:/M41/mysql-4.1


mysql-test/mysql-test-run.pl:
  Auto merged
2006-06-09 14:37:24 +02:00
unknown
9e9a14bac8 Merge trift2.mysql.com:/M50/bug20303-5.0
into trift2.mysql.com:/M50/mysql-5.0


mysql-test/mysql-test-run.pl:
  Auto merged
2006-06-09 14:13:01 +02:00
unknown
b2d3ac1b6b Merge mysql.com:/home/marty/MySQL/mysql-4.1
into  mysql.com:/home/marty/MySQL/mysql-5.0


ndb/src/ndbapi/ndberror.c:
  Auto merged
BitKeeper/deleted/.del-NdbResultSet.cpp~84d192cf3f42600d:
  Merge (keeping local)
BitKeeper/deleted/.del-NdbResultSet.hpp~e0042f4c18088ff6:
  Merge (keeping local)
ndb/include/ndbapi/NdbIndexScanOperation.hpp:
  Merge
ndb/include/ndbapi/NdbScanOperation.hpp:
  Merge
ndb/src/ndbapi/NdbScanOperation.cpp:
  Merge
sql/ha_ndbcluster.cc:
  Merge (using local, will fix manually)
sql/ha_ndbcluster.h:
  Merge
2006-06-09 12:07:04 +02:00
unknown
4f0935c4cb Merge mysql.com:/M41/bug20303-4.1 into mysql.com:/M50/bug20303-5.0
mysql-test/mysql-test-run.pl:
  Auto merged
2006-06-08 19:57:26 +02:00
unknown
f32d05f516 mysql-test/mysql-test-run.pl : Output the usage error if one is given. (Found when fixing bug#20303)
mysql-test/mysql-test-run.pl:
  Found when fixing bug#20303: The "usage()" function ignored the message it was given,
  so we got no real indication about the problem. Print it if one is given.
2006-06-08 19:55:22 +02:00
unknown
4f192a1e9e Merge mysql.com:/M41/bug20303-4.1 into mysql.com:/M50/bug20303-5.0
mysql-test/mysql-test-run.pl:
  Auto merged
2006-06-08 19:32:25 +02:00
unknown
ca38dcf17e Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.0-main


ndb/src/mgmsrv/Services.cpp:
  Auto merged
2006-06-08 17:57:55 +02:00
unknown
4a8c50850f Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.0


ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.hpp:
  Auto merged
ndb/src/mgmsrv/Services.cpp:
  Auto merged
2006-06-08 17:55:44 +02:00
unknown
2bb4b3445f Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
into  poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-main
2006-06-08 17:28:01 +02:00
unknown
96fe14dddc Bug #20336 CLUSTERLOG commands have no effect
ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp:
  Bug #20336 CLUSTERLOG commands have no effect
  - with signal sender the clock issuing the command and the revceiver of the events are not the same
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Bug #20336 CLUSTERLOG commands have no effect
  - make sure to actually send the update to ndb nodes, and wait for the reply
ndb/src/mgmsrv/Services.cpp:
  Bug #20336 CLUSTERLOG commands have no effect
  - make sure to compute max every time for log level
2006-06-08 17:26:56 +02:00
unknown
40f44b48b0 ndb - bug#18781 lock DICT during node restart
ndb/src/kernel/main.cpp:
  signal log from start (#if 0-ed)
ndb/test/ndbapi/testDict.cpp:
  test NF/NR + dict ops
ndb/src/kernel/vm/DLFifoList.hpp:
  add hasPrev
ndb/src/kernel/vm/pc.hpp:
  ERROR_INSERTED_CLEAR(x) test and clear if set
ndb/src/common/debugger/SignalLoggerManager.cpp:
  block no fix
ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
  spelling
ndb/include/kernel/GlobalSignalNumbers.h:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/include/kernel/signaldata/AlterTable.hpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/include/kernel/signaldata/CreateTable.hpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/include/kernel/signaldata/DictLock.hpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/include/kernel/signaldata/DropTable.hpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/src/common/debugger/signaldata/SignalNames.cpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/src/kernel/blocks/ERROR_codes.txt:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/src/kernel/blocks/dbdict/Dbdict.hpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/src/kernel/blocks/dbdih/Dbdih.hpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/src/kernel/blocks/dbdih/DbdihInit.cpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
  locking of master DICT against schema ops, used by slave DIH under NR
ndb/src/ndbapi/ndberror.c:
  locking of master DICT against schema ops, used by slave DIH under NR
2006-06-08 16:16:07 +02:00
unknown
20e54ae6c5 Fix for Bug #18184 SELECT ... FOR UPDATE does not work..: implemented ha_ndblcuster::unlock_row() and explicitly lock all rows that are not being unlocked 2006-06-08 16:12:38 +02:00
unknown
d0d69b7676 mysql-test/mysql-test-run.pl : A fix for bug#20303 "mysql-test-run.pl: Does not recognize -- argument"
mysql-test/mysql-test-run.pl:
  A fix for bug#20303 "mysql-test-run.pl: Does not recognize -- argument":
  Due to the use of 'pass_through' in option processing this lone '--' will remain
  as an argument, it must be ignored explicitly.
2006-06-08 14:52:33 +02:00
unknown
6474219467 Merge mysql.com:/home/kgeorge/mysql/5.0/teamclean
into  mysql.com:/home/kgeorge/mysql/5.0/B15355
2006-06-08 14:26:02 +03:00
unknown
a7566db788 Bug #15355: Common natural join column not resolved in prepared statement nested
query
Problem:
There was a wrong context assigned to the columns that were added in insert_fields()
when expanding a '*'. When this is done in a prepared statement it causes 
fix_fields() to fail to find the table that these columns reference.
Actually the right context is set in setup_natural_join_row_types() called at the 
end of setup_tables(). However when executed in a context of a prepared statement
setup_tables() resets the context, but setup_natural_join_row_types() was not
setting it to the correct value assuming it has already done so.

Solution:
The top-most, left-most NATURAL/USING join must be set as a 
first_name_resolution_table in context even when operating on prepared statements.


mysql-test/r/join.result:
  testsuite for the bug
mysql-test/t/join.test:
  testsuite for the bug
sql/sql_base.cc:
  The context must be set even when executed as prepared statement.
2006-06-08 13:34:03 +03:00
unknown
8a7e206d71 Merge mysql.com:/home/stewart/Documents/MySQL/5.0/jonas
into  mysql.com:/home/stewart/Documents/MySQL/5.0/merge-queue


ndb/include/mgmapi/mgmapi.h:
  Auto merged
ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
ndb/src/mgmclient/CommandInterpreter.cpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.hpp:
  Auto merged
ndb/src/mgmsrv/Services.cpp:
  Auto merged
ndb/src/mgmsrv/Services.hpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.cpp:
  hand merge bug fix by tomas with my fix for stop/shutdown behaviour
2006-06-08 02:40:16 +10:00
unknown
d1d2a7f694 Merge mysql.com:/home/stewart/Documents/MySQL/5.0/bug20016
into  mysql.com:/home/stewart/Documents/MySQL/5.0/merge-queue


ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
2006-06-08 02:33:25 +10:00