Commit graph

16844 commits

Author SHA1 Message Date
lars/lthalmann@dl145h.mysql.com
b53b448d45 Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl
into  mysql.com:/nfsdisk1/lars/MERGE/mysql-5.0-merge
2007-06-05 01:14:10 +02:00
mhansson@dl145s.mysql.com
d9fcc304d9 Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/dev/shm/mhansson/my50-bug27741
2007-06-04 09:26:54 +02:00
igor@olga.mysql.com
44b46b73f2 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug28728
2007-06-03 07:58:07 -07:00
evgen@moonbone.local
27d956b5e9 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/test-5.0-opt-mysql
2007-06-03 16:00:04 +04:00
evgen@moonbone.local
88147d5cfe user_var.result:
Corrected test case result for the bug#28494.
item_func.h, item_func.cc:
  Corrected function names after fix for the bug#28494.
2007-06-03 15:56:48 +04:00
igor@olga.mysql.com
cc0eff3e63 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug28728
2007-06-03 00:21:42 -07:00
gkodinov/kgeorge@macbook.gmz
8fd809bfd8 Merge bk-internal:/home/bk/mysql-5.0-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B26162-5.0-opt
2007-06-03 10:03:37 +03:00
gkodinov/kgeorge@macbook.gmz
9a1d8adc9d Bug #26162: Trigger DML ignores low_priority_updates setting
The value of "low-priority-updates" option and the LOW PRIORITY
prefix was taken into account at parse time.
This caused triggers (among others) to ignore this flag (if
supplied for the DML statement).
Moved reading of the LOW_PRIORITY flag at run time.
Fixed an incosistency when handling
SET GLOBAL LOW_PRIORITY_UPDATES : now it is in effect for
delayed INSERTs.
Tested by checking the effect of LOW_PRIORITY flag via a 
trigger.
2007-06-03 09:40:00 +03:00
igor@olga.mysql.com
91da3132b5 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug28728
2007-06-02 14:37:42 -07:00
evgen@moonbone.local
f4e20490a4 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/test-5.0-opt-mysql
2007-06-03 01:25:24 +04:00
evgen@moonbone.local
162a6b42ec item_func.cc:
Post fix for bug#28494.
  The Item_func_set_user_var::check method now silently doesn't use result_field
  if it isn't defined.
2007-06-03 01:24:56 +04:00
igor@olga.mysql.com
55fea25de4 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug28728
2007-06-02 12:46:48 -07:00
evgen@moonbone.local
294ead9ac9 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/test-5.0-opt-mysql
2007-06-02 23:20:54 +04:00
evgen@moonbone.local
4934646764 Bug#28494: Grouping by Item_func_set_user_var produces incorrect result.
This is an additional fix.
Item::val_xxx methods are supposed to use original data source and
Item::val_xxx_result methods to use the item's result field. But for the
Item_func_set_user_var class val_xxx_result methods were mapped to val_xxx
methods. This leads, in particular, to producing bad sort keys and thus
wrong order of the result set of queries with group by/order by clauses.

The set of val_xxx_result methods is added to the Item_func_set_user_var
class. It's the same as the val_xxx set of method but uses the result_field
to return a value.
2007-06-02 23:17:46 +04:00
igor@olga.mysql.com
5cbebf0a18 Fixed bug #28728: a crash when executing EXPLAIN EXTENDED for a query
using a derived table over a grouping subselect.

This crash happens only when materialization of the derived tables 
requires creation of auxiliary temporary table, for example when
a grouping operation is carried out with usage of a temporary table.

The crash happened because EXPLAIN EXTENDED when printing the query
expression made an attempt to use the objects created in the mem_root
of the temporary table which has been already freed by the moment
when printing is called.

This bug appeared after the method Item_field::print() had been 
introduced.
2007-06-02 11:44:16 -07:00
igor@olga.mysql.com
5a5410e40e Post-merge fix. 2007-06-01 17:58:46 -07:00
ibabaev@bk-internal.mysql.com
4bc1738be0 Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-opt
2007-06-02 00:57:25 +02:00
gkodinov/kgeorge@magare.gmz
72a64f083b Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B28366-5.0-opt-win
2007-06-01 13:43:17 +03:00
aelkin/elkin@dsl-hkibras1-ff5dc300-70.dhcp.inet.fi
c762ec3a60 Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into  dsl-hkibras1-ff5dc300-70.dhcp.inet.fi:/home/elkin/MySQL/TEAM/FIXES/5.0/bug27716-multi_upd_no_binlog
2007-06-01 13:22:52 +03:00
aelkin/elkin@dsl-hkibras1-ff5dc300-70.dhcp.inet.fi
1c0ac63808 Bug #27716 multi-update did partially and has not binlogged
Implementation of mysql_multi_update did not call multi_update::send_error method in some cases 
(see the test reported on bug page and test cases in changeset).

Fixed with deploying the method, ::send_error() is refined to get binlogging code which works whenever 
there is modified non-transactional table.
thd->no_trans_update.stmt flag is set in to TRUE to ease testing though being the beginning of relative 
bug#27417 fix (addresses a part of those issues).
Eliminating two minor issues (small bugs) in multi_update methods.
This patch for multi-update also addresses a part of the issues reported in bug#13270,bug#23333.
2007-06-01 11:14:04 +03:00
gshchepa/uchum@gleb.loc
5d15377d2d Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/mysql-5.0-opt
2007-06-01 02:51:35 +05:00
gshchepa/uchum@gleb.loc
92737068ea Merge gleb.loc:/home/uchum/work/bk/mysql-5.0-opt-27827-fresh
into  gleb.loc:/home/uchum/work/bk/mysql-5.0-opt
2007-06-01 02:40:49 +05:00
gshchepa/uchum@gleb.loc
d6a0bbf241 sql_view.cc:
Additional patch for bug #28244 to workaround valgrind warnings.
2007-06-01 02:25:11 +05:00
evgen@moonbone.local
df3b70821b Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/28494-bug-5.0-opt-mysql
2007-06-01 01:18:45 +04:00
evgen@moonbone.local
f70ae3a6de Bug#28494: Grouping by Item_func_set_user_var produces incorrect result.
The end_update() function uses the Item::save_org_in_field() function to
save original values of items into the group buffer. But for the 
Item_func_set_user_var this method was mapped to the save_in_field method.
The latter function wrongly decides to use the result_field. This leads to
saving incorrect value in the grouping buffer and wrong result of the whole
query.

The can_use_result_field argument of the bool type is added to the
Item_func_set_user_var::save_in_field() function. If it is set to FALSE
then the item's result field won't be used. Otherwise it will be detected
whether the result field will be used (old behaviour).
Two wrapping functions for the function above are added to the 
Item_func_set_user_var class:
the save_in_field(Field *field, bool no_conversions) - it calls the above
function with the can_use_result_field set to TRUE.
the save_org_in_field(Field *field) - same, but the can_use_result_field
is set to FALSE.
2007-06-01 01:17:14 +04:00
gshchepa/uchum@gleb.loc
cab4ca9c33 Fixed bug #27827.
ON conditions from JOIN expression were ignored at CHECK OPTION
check when updating a multi-table view with CHECK OPTION.

The st_table_list::prep_check_option function has been
modified to to take into account ON conditions at CHECK OPTION check
It was also changed to build the check option condition only once
for any update used in PS/SP.
2007-06-01 02:15:40 +05:00
gshchepa/uchum@gleb.loc
55833d3a9d Merge gleb.loc:/home/uchum/work/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/mysql-5.0-opt-28244
2007-05-31 19:07:10 +05:00
gshchepa/uchum@gleb.loc
f690d759a0 sql_view.cc:
Patch to eliminate compilation warning.
2007-05-31 19:06:30 +05:00
gshchepa/uchum@gleb.loc
362449418c Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/mysql-5.0-opt
2007-05-31 18:19:38 +05:00
gshchepa/uchum@gleb.loc
19d513ded7 Merge gleb.loc:/home/uchum/work/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/mysql-5.0-opt-28244
2007-05-31 18:16:29 +05:00
gshchepa/uchum@gleb.loc
12d43d55b4 Fixed bug #28244.
When the same VIEW was created at the master side twice,
malformed (truncated after the word 'AS') query string 
was forwarded to client side, so error messages on the
master and client was different, and replication was
broken.

The mysql_register_view function call failed
too early: fields of `view' output argument of this 
function was not filled yet with correct data required
for query replication.
The mysql_register_view function also copied pointers to 
local buffers into a memory allocated by the caller.
2007-05-31 17:30:56 +05:00
mhansson@dl145s.mysql.com
3ee1651861 bug#27741: udf test fails on AIX < 5.3
problem #1: udf_example.so does not get built on AIX

solution#1: build it yourself using
cd sql; gcc  -g -I ../include/ -I /usr/include/ -lpthread  \
-shared -o udf_example.so udf_example.c; mv udf_example.so \
.libs/ 

problem#2 (the bug): udf_example fails because it does not
recognize the variable LD_LIBRARY_PATH when doing dl_open(),
it looks at LIBPATH

solution#2: add the library path to LIBPATH

problem#3: udf_example returns the wrong result length since 
it relies on strmov to return a pointer to the end of the 
string that it copies. On AIX builds, where m_string.h is not
included (m_string defines a macro expanding strmov to stpcpy),
there is a macro expanding strmov to strcpy, which returns a 
pointer to the first character.

solution#3: define strmov as stpcpy.

problem#4: #2 applies on hp-ux as well, but this platform
looks at SHLIB_PATH

solution#4: added the library path to SHLIB_PATH
2007-05-31 14:22:21 +02:00
lars/lthalmann@dl145h.mysql.com
4e90009904 Merge lthalmann@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
into  mysql.com:/nfsdisk1/lars/bk/mysql-5.0-rpl
2007-05-31 10:20:58 +02:00
gshchepa/uchum@gleb.loc
be69f13dff Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/mysql-5.0-opt-28598
2007-05-31 12:43:59 +05:00
gshchepa/uchum@gleb.loc
e16953dfd8 Fixed bug #28598.
mysqld crashed when a long-running explain query was killed from
another connection.

When the current thread caught a kill signal executing the function
best_extension_by_limited_search it just silently returned to  
the calling function greedy_search without initializing elements of
the join->best_positions array.
However, the greedy_search function ignored thd->killed status
after a calls to the best_extension_by_limited_search function, and
after several calls the greedy_search function used an uninitialized
data from the join->best_positions[idx] to search position in the
join->best_ref array. 
That search failed, and greedy_search tried to call swap_variables
function with NULL argument - that caused a crash.
2007-05-31 12:10:21 +05:00
evgen@moonbone.local
85b6e3f00d Bug#28729: Field_enum wrongly reported an error while storing an empty string.
ENUM fields internally store their values as integers and may use integer
values as indexes to their values. Invalid values are mapped to zero value.
When storing an empty string the ENUM field fails to find an appropriate value
and tries to convert the provided string to integer. The conversion also
fails and error is returned even if the thd->count_cuted_fields is set to
CHECK_FIELD_IGNORE. This makes the range optimizer wrongly decide that an
impossible range is present.

Now the Field_enum::store() returns error while storing an empty string only
if the thd->count_cuted_fields isn't set to CHECK_FIELD_IGNORE.
2007-05-30 23:28:14 +04:00
mhansson@dl145s.mysql.com
d20a1977b5 Merge mhansson@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  dl145s.mysql.com:/users/mhansson/mysql/autopush/my50-bug28250
2007-05-30 14:43:59 +02:00
gluh@eagle.(none)
09a267852a Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-05-30 17:09:16 +05:00
gluh@mysql.com/eagle.(none)
cdbdc4e745 backport of Bug#11491 Misleading error message if not NULL column set to NULL, SQL mode TRADITIONAL 2007-05-30 17:04:04 +05:00
gshchepa/uchum@gleb.loc
7f63aab2e0 Merge gleb.loc:/home/uchum/work/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/mysql-5.0-opt-28716
2007-05-30 16:41:16 +05:00
gshchepa/uchum@gleb.loc
64ff9e4d6f sql_update.cc:
Fixed bug #28716: additional patch to eliminate compilation
  error under Windows.
2007-05-30 16:39:25 +05:00
gshchepa/uchum@gleb.loc
9f9d718561 Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/mysql-5.0-opt
2007-05-30 15:46:23 +05:00
gshchepa/uchum@gleb.loc
0362400f31 Merge gleb.loc:/home/uchum/work/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/mysql-5.0-opt-28716
2007-05-30 14:34:52 +05:00
gkodinov/kgeorge@magare.gmz
22c1bfbbc9 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B28492-5.0-opt
2007-05-30 11:23:39 +03:00
gshchepa/uchum@gleb.loc
83983221f5 Fixed bug #28716.
The result of the CHECK OPTION condition evaluation over an
updated record and records of merged tables was arbitrary and
dependant on the order of records in the merged tables during
the execution of SELECT statement.

The CHECK OPTION expression was evaluated over expired record
buffers (with arbitrary data in the fields).

Rowids of tables used in the CHECK OPTION expression were
added to temporary table rows. The multi_update::do_updates()
method was modified to restore necessary record buffers
before evaluation of the CHECK OPTION condition.
2007-05-30 12:21:39 +05:00
gkodinov/kgeorge@magare.gmz
a109df803f Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B28605-5.0-opt
2007-05-30 10:02:22 +03:00
gkodinov/kgeorge@magare.gmz
a5b04a3ba9 Bug #28492: subselect returns LONG in >5.0.24a and LONGLONG in <=5.0.24a
Integer values with 10 digits may or may not fit into an int column 
(e.g. 2147483647 vs 6147483647).
Thus when creating a temp table column for such an int we must
use bigint instead.
Fixed to use bigint.
Also subsituted a "magic number" with a named constant.
2007-05-30 09:55:38 +03:00
evgen@moonbone.local
268fdf5db3 Bug#28450: The Item_date_add_interval in select list may fail the field
type assertion.

The bug was introduced by the patch for bug #16377.
The "+ INTERVAL" (Item_date_add_interval) function detects its result type
by the type of its first argument. But in some cases it returns STRING
as the result type. This happens when, for example, the first argument is a 
DATE represented as string. All this makes the get_datetime_value()
function misinterpret such result and return wrong DATE/DATETIME value.
To avoid such cases in the fix for #16377 the code that detects correct result
field type on the first execution was added to the
Item_date_add_interval::get_date() function. Due to this the result
field type of the Item_date_add_interval item stored by the send_fields()
function differs from item's result field type at the moment when
the item is actually sent. It causes an assertion failure.

Now the get_datetime_value() detects that the DATE value is returned by
some item not only by checking the result field type but also by comparing
the returned value with the 100000000L constant - any DATE value should be
less than this value.
Removed result field type adjusting code from the
Item_date_add_interval::get_date() function.
2007-05-30 00:33:12 +04:00
aelkin/elkin@dsl-hkibras1-ff5dc300-70.dhcp.inet.fi
3b93001c25 Bug#22725 Replication outages from ER_SERVER_SHUTDOWN (1053) set in replication events
Refining the tests since pb revealed the older version's fragality - the error from SF() due to killed
may be different on different env:s.
DBUG_ASSERT instead of assert.
2007-05-29 16:27:55 +03:00
gkodinov/kgeorge@magare.gmz
a6ebd63479 Bug #28605: SHOW CREATE VIEW with views using stored_procedures no
longer showing SP names.
SHOW CREATE VIEW uses Item::print() methods to reconstruct the 
statement text from the parse tree.
The print() method for stored procedure calls needs allocate 
space to print the function's quoted name.
It was incorrectly calculating the length of the buffer needed 
(was too short).
Fixed to reflect the actual space needed.
2007-05-29 14:45:30 +03:00