Commit graph

46213 commits

Author SHA1 Message Date
holyfoot/hf@hfmain.(none)
a475a84564 Merge mysql.com:/home/hf/work/27957/my50-27957
into  mysql.com:/home/hf/work/27957/my51-27957
2007-05-11 17:48:20 +05:00
holyfoot/hf@hfmain.(none)
5ad1d9fed7 Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/27957/my51-27957
2007-05-11 17:44:39 +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
holyfoot/hf@hfmain.(none)
7746cf066b Merge mysql.com:/home/hf/work/27957/my50-27957
into  mysql.com:/home/hf/work/27957/my51-27957
2007-05-11 13:13:29 +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
holyfoot/hf@mysql.com/hfmain.(none)
70ecc6fe86 bigint.test made ps-protocol consistent 2007-05-10 16:22:38 +05: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
holyfoot/hf@hfmain.(none)
39597b791b Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/28005/my51-28005
2007-05-10 11:30:50 +05:00
holyfoot/hf@hfmain.(none)
d76a3ef165 Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/28005/my51-28005
2007-05-10 08:16:20 +05:00
ibabaev@bk-internal.mysql.com
71b2667abd Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-opt
2007-05-09 17:07:11 +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
epotemkin@bk-internal.mysql.com
b0b4fecb99 Merge bk-internal.mysql.com:/data0/bk/mysql-5.0-opt
into  bk-internal.mysql.com:/data0/bk/mysql-5.1-opt
2007-05-09 12:55:05 +02:00
evgen@moonbone.local
b66298f455 loaddata.result, loaddata.test:
A test case is corrected.
2007-05-09 14:46:11 +04:00
igor@olga.mysql.com
e4af9fc790 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/mysql-5.1-opt
2007-05-08 17:50:19 -07: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
evgen@moonbone.local
fea4af6d49 item_cmpfunc.cc, type_datetime.result, type_datetime.test, item_cmpfunc.h:
After merge fix.
2007-05-08 22:28:24 +04:00
evgen@moonbone.local
df081a3a4f Merge moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql
2007-05-08 15:54:49 +04:00
jbruehe/mysqldev@mysql.com/production.mysql.com
7357712fda Raise version number after cloning 5.1.18-beta 2007-05-08 11:16:41 +02:00
holyfoot/hf@mysql.com/hfmain.(none)
e86643ec0f warning eliminated 2007-05-08 11:42:40 +05: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
acurtis/antony@ltamd64.xiphis.org
b8301263f3 Merge xiphis.org:/home/antony/work2/mysql-5.1-engines
into  xiphis.org:/home/antony/work2/mysql-5.1-merge
2007-05-07 12:32:09 -07: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)
f646fb0b11 merging fix 2007-05-07 17:33:28 +05:00
holyfoot/hf@hfmain.(none)
763d4bf22e Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt
into  mysql.com:/d2/hf/mrg/mysql-5.1-opt
2007-05-07 16:12:42 +05: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
holyfoot/hf@hfmain.(none)
41c2ee8723 Merge bk@192.168.21.1:mysql-5.1
into  mysql.com:/d2/hf/mrg/mysql-5.1-opt
2007-05-07 15:59:25 +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
tomas@whalegate.ndb.mysql.com
85f3d68a00 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-single-user
2007-05-07 11:11:09 +02:00
holyfoot/hf@mysql.com/hfmain.(none)
d61da11eab fixed Solaris compilation failure 2007-05-07 13:29:59 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
199857c11f bug #28005 (Partitions can't use -922337...)
one more test added
2007-05-07 11:15:59 +05:00
holyfoot/hf@mysql.com/hfmain.(none)
5b0c8f256d Bug #28005 Partitions: can't use -9223372036854775808
the Item_neg changes INT_RESULT with DECIMAL_RESULT when
it gets this border value, what is not necessary.
2007-05-06 23:40:16 +05:00
acurtis/antony@ltamd64.xiphis.org
a4dbc0990c Merge xiphis.org:/home/antony/work2/mysql-5.1-engines
into  xiphis.org:/home/antony/work2/mysql-5.1-engines.merge
2007-05-04 23:35:14 -07:00
acurtis/antony@xiphis.org/ltamd64.xiphis.org
0f0ef2fe14 WL#2936
Move copying of global variables into thd.variables into plugin_thdvar_init().
  plugin_thdvar_init() may be called multiple times when THD::change_user() is called.
  This fixes a plugin ref-count leak when running the test mysql_client_test
2007-05-04 16:44:07 -07: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
gkodinov/kgeorge@magare.gmz
306371a850 bug #27531: 5.1 part of the fix:
- added join cache indication in EXPLAIN (Extra column).
 - prefer filesort over full scan over 
   index for ORDER BY (because it's faster).
 - when switching from REF to RANGE because
   RANGE uses longer key turn off sort on
   the head table only as the resulting 
   RANGE access is a candidate for join cache
   and we don't want to disable it by sorting
   on the first table only.
2007-05-04 18:06:06 +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
19b9c7a8cd Merge magare.gmz:/home/kgeorge/mysql/work/B27531-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B27531-5.1-opt-after-merge
2007-05-04 17:46:13 +03:00
gkodinov/kgeorge@magare.gmz
5b4448ef70 post merge (5.0-opt -> 5.1-opt) fixes 2007-05-04 17:33:41 +03:00
istruewing@chilla.local
a57260dbfb WL#2936 - Falcon & MySQL plugin interface: server variables
Fix tests when InnoDB is not built-in. Innodb options would cause
mysqld to abort with an error indicating that the option is unknown.
Fix tests on Windows where mysql-test-run.pl was unable to probe
mysqld for version and variables information, caused by output
being redirected to a log file instead.
2007-05-04 16:10:09 +02: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