Commit graph

36312 commits

Author SHA1 Message Date
dfischer/mysqldev@mysql.com/production.mysql.com
c4cbae6eef Raise version number after cloning 5.0.42 2007-05-14 14:59:23 +02:00
ibabaev@bk-internal.mysql.com
7d006ee538 Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-opt
2007-05-12 23:42:36 +02:00
igor@olga.mysql.com
11d5f7ee1c Fixed bug #28375: a query with an NOT IN subquery predicate may cause
a crash when the left operand of the predicate is evaluated to NULL.
It happens when the rows from the inner tables (tables from the subquery)
are accessed by index methods with key values obtained by evaluation of
the left operand of the subquery predicate. When this predicate is
evaluated to NULL an alternative access with full table scan is used
to check whether the result set returned by the subquery is empty or not.
The crash was due to the fact the info about the access methods used for
regular key values was not properly restored after a switch back from the
full scan access method had occurred.
The patch restores this info properly.
The same problem existed for queries with IN subquery predicates if they
were used not at the top level of the queries.
2007-05-11 19:37:32 -07:00
evgen@moonbone.local
e3bd20b6a2 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/27878-bug-5.0-opt-mysql
2007-05-12 00:46:36 +04:00
evgen@moonbone.local
6c8f547644 grant.result, grant.test:
Corrected test case for the bug#27878.
2007-05-12 00:46:07 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
6fe0f52de1 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/27957/my50-27957
2007-05-12 00:22:14 +05:00
evgen@moonbone.local
9a427d8dd8 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/27878-bug-5.0-opt-mysql
2007-05-11 23:22:13 +04:00
evgen@moonbone.local
34f478121f Bug#27878: Unchecked privileges on a view referring to a table from another
database.

If a user has a right to update anything in the current database then the 
access was granted and further checks of access rights for underlying tables
wasn't done correctly. The check is done before a view is opened and thus no
check of access rights for underlying tables can be carried out.
This allows a user to update through a view a table from another database for
which he hasn't enough rights.

Now the mysql_update() and the mysql_test_update() functions are forces
re-checking of access rights after a view is opened.
2007-05-11 23:19:11 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
17265468ac merging fixes 2007-05-11 20:56:22 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
069314eaf3 Merge mysql.com:/home/hf/work/27921/my50-27921
into  mysql.com:/home/hf/work/27957/my50-27957
2007-05-11 18:13:06 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
8df08a2de2 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/27957/my50-27957
2007-05-11 17:42:50 +05:00
gshchepa/uchum@gleb.loc
848f56b046 Fixed bug #28000.
Bug occurs in INSERT IGNORE ... SELECT ... ON DUPLICATE KEY UPDATE
statements, when SELECT returns duplicated values and UPDATE clause
tries to assign NULL values to NOT NULL fields.
NOTE: By current design MySQL server treats INSERT IGNORE ... ON
DUPLICATE statements as INSERT ... ON DUPLICATE with update of
duplicated records, but MySQL manual lacks this information.
After this fix such behaviour becomes legalized.

The write_record() function was returning error values even within
INSERT IGNORE, because ignore_errors parameter of
the fill_record_n_invoke_before_triggers() function call was
always set to FALSE. FALSE is replaced by info->ignore.
2007-05-11 03:17:05 +05:00
tomas@whalegate.ndb.mysql.com
ee6a1bc5f9 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-4.1-ndb
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
2007-05-10 15:09:38 +02:00
igor@olga.mysql.com
53888b4282 Fixed bug #28189: in some rare cases optimizer preferred a more expensive
ref access to a less expensive range access. 
This occurred only with InnoDB tables.
2007-05-10 00:06:24 -07:00
tomas@whalegate.ndb.mysql.com
681ef616ed Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  whalegate.ndb.mysql.com:/home/tomas/mysql-4.1-ndb
2007-05-10 09:04:05 +02:00
tomas@whalegate.ndb.mysql.com
fd5f5d0abd Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-opt
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
2007-05-10 07:15:46 +02:00
holyfoot/hf@mysql.com/hfmain.(none)
d535add013 bug 27921 (Views ignore precision for CAST)
test result fixed
2007-05-10 08:14:53 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
d99b4c6a1a Bug #27921 View ignores precision for CAST()
Item_decimal_typecast::print properly implemented
2007-05-10 00:17:21 +05:00
tomas@whalegate.ndb.mysql.com
ef1fdd3017 enable setting api reg req frequency to be higher than heartbeat setting to ensure we have reasonably up-to-date info from ndb nodes
+ do this for management server
2007-05-09 15:03:01 +02:00
tomas@whalegate.ndb.mysql.com
9b1157537b Bug #28287 Sign problem in test "ndb_restore_print"
- corrected previous patch
  - some platforms do strange things with char... use Int8 to be sure of signedness
2007-05-09 14:31:22 +02:00
holyfoot/hf@mysql.com/hfmain.(none)
e3fa9c594d Bug #27957 cast as decimal does not check overflow, also inconsistent with group, subselect
Missing check for overflow added to the Item_decimal_typecast::val_decimal
2007-05-09 17:27:14 +05:00
evgen@moonbone.local
b66298f455 loaddata.result, loaddata.test:
A test case is corrected.
2007-05-09 14:46:11 +04:00
tomas@whalegate.ndb.mysql.com
aaeca5bda8 Bug #28287 Sign problem in test "ndb_restore_print"
- some platforms do strange things with char... use Int8 to be sure of signedness
2007-05-09 10:22:26 +02:00
evgen@moonbone.local
b45ef06e76 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/27670-bug-5.0-opt-mysql
2007-05-09 00:35:21 +04:00
evgen@moonbone.local
98fa542a08 Bug#27670: LOAD DATA does not set CURRENT_TIMESTAMP default value for a
TIMESTAMP field when no value has been provided.

The LOAD DATA sets the current time in the TIMESTAMP field with
CURRENT_TIMESTAMP default value when the field is detected as a null.
But when the LOAD DATA command loads data from a file that doesn't contain
enough data for all fields then the rest of fields are simply set to null
without any check. This leads to no value being inserted to such TIMESTAMP
field.

Now the read_sep_field() and the read_fixed_length() functions set current
time to the TIMESTAMP field with CURRENT_TIMESTAMP default value in all cases
when a NULL value is loaded to the field.
2007-05-09 00:23:16 +04:00
tomas@whalegate.ndb.mysql.com
482e56f199 increate hearbeat interval to avoid load related start up issues in mysql-test-run 2007-05-08 18:30:03 +02:00
jonas@perch.ndb.mysql.com
6b2819c47b Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
2007-05-08 12:57:37 +02:00
jonas@perch.ndb.mysql.com
dbf58f9781 ndb - bug#27437
redo extra verification code so that tupkeyref is reset just before tupkeyreq
2007-05-08 12:53:12 +02:00
jonas@perch.ndb.mysql.com
6415a8528a Merge perch.ndb.mysql.com:/home/jonas/src/50-work
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0-ndb
2007-05-08 08:24:21 +02:00
jonas@perch.ndb.mysql.com
e47e6f7931 ndb - bug#27437
bug in interpretedupdate (used for auto-increment) that made TUPKEYREF be sent twice
  this was however "normally" shadowed, but made LQH crash when LCP was about to start
2007-05-08 07:49:05 +02:00
gni/root@dev3-221.dev.cn.tlan
87b5c46df4 Merge dev3-221.dev.cn.tlan:/home/ngb/mysql/mysql-4.1/mysql-4.1-ndb-bj
into  dev3-221.dev.cn.tlan:/home/ngb/mysql/mysql-4.1/mysql-4.1-ndb
2007-05-08 10:02:55 +08:00
gni@dev3-221.dev.cn.tlan
db73bea313 Merge dev3-221.dev.cn.tlan:/home/ngb/mysql/mysql-5.0/mysql-5.0-ndb-bj
into  dev3-221.dev.cn.tlan:/home/ngb/mysql/mysql-5.0/mysql-5.0-ndb
2007-05-08 10:00:12 +08:00
igor@olga.mysql.com
efb13e1bfe Adjusted results after the latest addition of test cases. 2007-05-07 16:58:38 -07:00
evgen@moonbone.local
afbfcd8480 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/27759-bug-5.0-opt-mysql
2007-05-08 00:16:05 +04:00
evgen@moonbone.local
eddd02158b Additional fix for the bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions. 2007-05-08 00:08:00 +04:00
gshchepa/uchum@gleb.loc
59efb58ffb Merge gleb.loc:/home/uchum/work/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/mysql-5.0-opt-27954
2007-05-08 00:53:01 +05:00
gshchepa/uchum@gleb.loc
eb1f21f8b6 Fixed bug #27954.
This bug affects multi-row INSERT ... ON DUPLICATE into table
with PRIMARY KEY of AUTO_INCREMENT field and some additional UNIQUE indices.
If the first row in multi-row INSERT contains duplicated values of UNIQUE
indices, then following rows of multi-row INSERT (with either duplicated or
unique key field values) may me applied to _arbitrary_ records of table as
updates.
This bug was introduced in 5.0. Related code was widely rewritten in 5.1, and
5.1 is already free of this problem. 4.1 was not affected too.

When updating the row during INSERT ON DUPLICATE KEY UPDATE, we called
restore_auto_increment(), which set next_insert_id back to 0, but we
forgot to set clear_next_insert_id back to 0.
restore_auto_increment() function has been fixed.
2007-05-08 00:24:25 +05:00
evgen@moonbone.local
6ec0bc24a7 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/28133-bug-5.0-opt-mysql
2007-05-07 22:22:51 +04:00
evgen@moonbone.local
7d473a1a37 Bug#28133: Wrong DATE/DATETIME comparison in IN() function.
The IN function was comparing DATE/DATETIME values either as ints or as
strings. Both methods have their disadvantages and may lead to a wrong
result.

Now IN function checks whether all of its arguments has the STRING result
types and at least one of them is a DATE/DATETIME item. If so it uses either
an object of the in_datetime class or an object of the cmp_item_datetime
class to perform its work. If the IN() function arguments are rows then
row columns are checked whether the DATE/DATETIME comparator should be used
to compare them.
The in_datetime class is used to find occurence of the item to be checked
in the vector of the constant DATE/DATETIME values. The cmp_item_datetime
class is used to compare items one by one in the DATE/DATETIME context.
Both classes obtain values from items with help of the get_datetime_value()
function and cache the left item if it is a constant one.
2007-05-07 22:20:43 +04:00
evgen@moonbone.local
6bef06edfa item_func.cc:
Fixed compiler warnings.
2007-05-07 18:24:46 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
6ca4db2607 Merge mysql.com:/d2/hf/mrg/mysql-4.1-opt
into  mysql.com:/d2/hf/mrg/mysql-5.0-opt
2007-05-07 16:09:05 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
37a9575b2e Merge bk@192.168.21.1:mysql-5.0
into  mysql.com:/d2/hf/mrg/mysql-5.0-opt
2007-05-07 16:08:29 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
e8d125d332 Merge bk@192.168.21.1:mysql-4.1
into  mysql.com:/d2/hf/mrg/mysql-4.1-opt
2007-05-07 16:07:52 +05:00
tomas@whalegate.ndb.mysql.com
35a0af3113 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
2007-05-07 11:12:52 +02:00
evgen@moonbone.local
68e5c1e622 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/27759-bug-5.0-opt-mysql
2007-05-04 21:38:05 +04:00
gkodinov/kgeorge@magare.gmz
13e55b8a21 bug #27531:
fixed coverage of out-of-mem errors
2007-05-04 18:55:01 +03:00
evgen@moonbone.local
239f727b7e Bug#27759: Wrong DATE/DATETIME comparison in LEAST()/GREATEST() functions.
The LEAST/GREATEST functions compared DATE/DATETIME values as
strings which in some cases could lead to a wrong result.

A new member function called cmp_datetimes() is added to the
Item_func_min_max class. It compares arguments in DATETIME context
and returns index of the least/greatest argument.
The Item_func_min_max::fix_length_and_dec() function now detects when
arguments should be compared in DATETIME context and sets the newly
added flag compare_as_dates. It indicates that the cmp_datetimes() function
should be called to get a correct result.
Item_func_min_max::val_xxx() methods are corrected to call the
cmp_datetimes() function when needed.
Objects of the Item_splocal class now stores and reports correct original
field type.
2007-05-04 18:57:10 +04:00
gkodinov/kgeorge@magare.gmz
cead246f7a Merge magare.gmz:/home/kgeorge/mysql/work/B27531-4.1-opt
into  magare.gmz:/home/kgeorge/mysql/work/B27531-5.0-opt
2007-05-04 16:47:58 +03:00
gkodinov/kgeorge@magare.gmz
d11e1f248b Bug #27531: the 4.1 fix.
When checking for applicability of join cache
we must disable its usage only if there is no
temp table in use.
When a temp table is used we can use join
cache (and it will not make the result-set 
unordered) to fill the temp table. The filesort() 
operation is then applied to the data in the temp 
table and hence is not affected by join cache
usage.
Fixed by narrowing the condition for disabling 
join cache to exclude the case where temp table
is used.
2007-05-04 16:43:29 +03:00
gluh@mysql.com/eagle.(none)
287ebed161 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-05-04 14:42:32 +05:00