Commit graph

63898 commits

Author SHA1 Message Date
Bjorn Munch
db4ed17587 merge from 5.1-mtr 2011-05-13 13:04:01 +02:00
Bjorn Munch
dca22eb6f3 merge from 5.1 main 2011-05-12 14:08:47 +02:00
Tatjana Azundris Nuernberg
25abeed586 auto-merge 2011-05-12 05:43:53 +01:00
Tatjana Azundris Nuernberg
2683078d28 auto-merge Bug#11762799/Bug#55436 2011-05-12 03:41:51 +01:00
Serge Kozlov
f978c103bb automerge 2011-05-10 17:50:30 +04:00
Georgi Kodinov
ef2d701c00 weave merge mysql-5.0->mysql-5.1 2011-05-10 16:21:44 +03:00
Serge Kozlov
e8b54a7ce9 WL#5867
Replaced the error code by error name
2011-05-09 23:14:24 +04:00
Sunanda Menon
78e73ec219 Merge from mysql-5.0.93-release 2011-05-06 10:36:30 +02:00
Karen Langford
74afcca8f2 Merge from mysql-5.1.57-release 2011-05-06 10:03:02 +02:00
Luis Soares
8cc75b2d1e BUG#12354268
Automerged bzr bundle from bug report:
luis.soares@oracle.com-20110505224815-6ob90n7suxsoizvs.bundle
2011-05-06 00:54:36 +01:00
Luis Soares
ed6aae83c3 BUG#11762616: BUG#55229: 'POSTION'
Fix for all "postion" in Oracle files (s/postion/position). 
Updated the copyright notices where needed.
2011-05-06 00:46:53 +01:00
Luis Soares
e367a789d1 BUG#12354268: MYSQLBINLOG --BASE64-OUTPUT=DECODE-ROWS DOES NOT
WORK WITH --START-POSITION
      
If setting --start-position to start after the FD event, mysqlbinlog
will output an error stating that it has not found an FD event.
However, its not that mysqlbinlog does not find it but rather that it
does not processes it in the regular way (i.e., it does not print it).
Given that one is using --base64-output=DECODE-ROWS then not printing
it is actually fine.
      
To fix this, we make mysqlbinlog not to complain when it has not
printed the FD event, is outputing in base64, but is decoding the
rows.
2011-05-05 23:48:15 +01:00
Tatiana Azundris Nurnberg
4e9e69e5f8 auto-merge conservative fix for Bug#55436/Bug#11762799 2011-05-05 06:39:38 +01:00
Alexander Nozdrin
ca6e7781ef Patch for Bug#12394306: the sever may crash if mysql.event is corrupted.
The problem was that wrong structure of mysql.event was not detected and
the server continued to use wrongly-structured data.

The fix is to check the structure of mysql.event after opening before
any use. That makes operations with events more strict -- some operations
that might work before throw errors now. That seems to be Ok.

Another side-effect of the patch is that if mysql.event is corrupted,
unrelated DROP DATABASE statements issue an SQL warning about inability
to open mysql.event table.
2011-05-04 16:59:24 +04:00
Bjorn Munch
b8fe42d127 Bug #11752142 43247: SUITE/<SUITE NAME>/INCLUDE: NO SUCH FILE OR DIRECTORY
The originally reported dirs have been removed
But found suite/bugs, removed from mysql-test/Makefile.am
2011-05-03 16:08:25 +02:00
Kent Boortz
4f666e8e81 Remove soft links in the build directory, not the source directory (Bug#43312) 2011-05-03 16:02:31 +02:00
Vasil Dimov
bc7bf937c5 Merge mysql-5.1-innodb -> mysql-5.1 2011-05-02 12:49:19 +03:00
Nirbhay Choubey
39f71a296a Bug#11757855 - 49967: built-in libedit doesn't read
.editrc on linux.

MySQL client when build with libedit support ignores
.editrc at startup.

The reason for this regression was the incluison of a
safety check, issetugid(), which is not available on
some linux platforms.

Fixed by adding an equivalent check for platforms which
have get[e][u|g]id() set of functions.
2011-04-29 18:52:46 +05:30
Bjorn Munch
c17ec079a2 merge from 5.1-mtr 2011-04-29 13:48:57 +02:00
Vasil Dimov
2e0e518f39 Sync 5.1 .inc file with 5.5 due to a missing changeset
Add extra codes to wait_until_disconnected.inc that are present in 5.5,
but not in 5.1. The missing codes cause innodb_bug59641 to fail in 5.1 on
Windows PB2 runs. The addition of those codes in 5.5 was done in
luis.soares@sun.com-20090930233215-aup3kxy4j6ltvjfp
2011-04-29 14:04:28 +03:00
Bjorn Munch
cc78ab77c9 merge from 5.1 main 2011-04-29 10:55:08 +02:00
Mattias Jonsson
3980482fd0 removed dead obsolete code 2011-04-29 09:48:26 +02:00
Mattias Jonsson
aefbea7d0b Post push fix for bug#11766249 bug#59316
Partitions can have different ref_length (position data length).
Removed DBUG_ASSERT which crashed debug builds when using
MAX_ROWS on some partitions.
2011-04-27 17:51:06 +02:00
Nirbhay Choubey
c08c4e1fd7 BUG#12329909 - BUILDING MYSQL WITH DEBUG SUPPORT
FAILS WITH LIBEDIT

Fixed by checking the return value of the write()
function calls and handling the open files and fd
appropriately.
2011-04-27 17:24:10 +05:30
Sergey Glukhov
735bab72c5 Bug#11889186 60503: CRASH IN MAKE_DATE_TIME WITH DATE_FORMAT / STR_TO_DATE COMBINATION
calc_daynr() function returns negative result
if malformed date with zero year and month is used.
Attempt to calculate week day on negative value
leads to crash. The fix is return NULL for
'W', 'a', 'w' specifiers if zero year and month is used.
Additional fix for calc_daynr():
--added assertion that result can not be negative
--return 0 if zero year and month is used
2011-04-27 11:35:57 +04:00
Guilhem Bichot
a014fd9367 merge from 5.1 2011-04-26 13:06:44 +02:00
Mattias Jonsson
1a352b8ecd merge 2011-04-26 12:07:14 +02:00
Mattias Jonsson
0ef0c541af post fix for werror build for bug#11766249. 2011-04-26 10:21:09 +02:00
Serge Kozlov
e7079a3235 BUG#12371924. Fxi test case 2011-04-25 23:49:56 +04:00
Mattias Jonsson
1f617e7418 merge 2011-04-23 16:57:24 +02:00
Sergey Glukhov
76f37a0235 Bug#11756928 48916: SERVER INCORRECTLY PROCESSING HAVING CLAUSES WITH AN ORDER BY CLAUSE
Before sorting HAVING condition is split into two parts,
first part is a table related condition and the rest of is
HAVING part. Extraction of HAVING part does not take into account
the fact that some of conditions might be non-const but
have 'used_tables' == 0 (independent subqueries)
and because of that these conditions are cut off by
make_cond_for_table() function.
The fix is to use (table_map) 0 instead of used_tables in
third argument for make_cond_for_table() function.
It allows to extract elements which belong to sorted
table and in addition elements which are independend
subqueries.
2011-04-22 11:20:55 +04:00
Vasil Dimov
b4a98699be Merge mysql-5.1 -> mysql-5.1-innodb 2011-04-21 11:08:05 +03:00
Mattias Jonsson
482c0b7d42 merge 2011-04-20 18:10:15 +02:00
Mattias Jonsson
002426a9eb merge 2011-04-20 18:00:50 +02:00
Mattias Jonsson
f6641998be Bug#11766249 bug#59316: PARTITIONING AND INDEX_MERGE MEMORY LEAK
Update for previous patch according to reviewers comments.

Updated the constructors for ha_partitions to use the common
init_handler_variables functions

Added use of defines for size and offset to get better readability for the code that reads
and writes the .par file. Also refactored the get_from_handler_file function.
2011-04-20 17:52:33 +02:00
Bjorn Munch
5cc7844b5c Bug #12379923 60907: MYSQL-TEST/LIB/MY/SAFEPROCESS/SAFE_PROCESS.PL USES HARDCODED SIGNAL NUMBE
Replaced the hardcoded 9 with 'KILL'
2011-04-20 14:58:53 +02:00
Jon Olav Hauglid
73ecffdb2f BUG#12377872 ASSERTION FAILED: !_ENTERED WHEN GETHOSTBYADDR_R
FAILS ON SOLARIS

This assertion was triggered if gethostbyaddr_r cannot do a
reverse lookup on an ip address. The reason was a missing
DBUG_RETURN macro. The problem affected only debug versions of
the server.

This patch fixes the problem by replacing return with DBUG_RETURN.
No test case added.
2011-04-20 11:32:28 +02:00
Sergey Glukhov
71bb332aa3 Bug#11765923 58937: MANY VALGRIND ERRORS AFTER GROUPING BY RESULT OF DECIMAL COLUMN FUNCTION
Bug#11764671  57533: UNINITIALISED VALUES IN COPY_AND_CONVERT (SQL_STRING.CC) WITH CERTAIN CHA
When ROUND evaluates decimal result it uses Item::decimal
value as fraction value for the result. In some cases
Item::decimal is greater than real result fraction value
and uninitialised memory of result(decimal) buffer can be
used in further calculations. Issue is introduced by
Bug33143 fix. The fix is to remove erroneous assignment.
2011-04-20 11:39:20 +04:00
Serge Kozlov
410ee93cde BUG#12371924
Update test case
2011-04-18 23:59:15 +04:00
Bjorn Munch
c346b0a483 Bug #12365486 MTR FAILS TO FIND WARNINGS IN SERVER LOG WITH --VALGRIND COMBINED WITH --DEBUG
With this combination, outoput was directed to .trace but not all
      parts of MTR was aware of this.
Replace .err with .trace at the earliest possible place
2011-04-18 15:35:14 +02:00
Sven Sandberg
5038060b3b test fails on more platforms, removed @freebsd from default.experimental. 2011-04-18 14:42:14 +02:00
Martin Hansson
7b4cafe9b9 Bug 11758558 - 50774: WRONG RESULTSET WHEN TIMESTAMP VALUES ARE APPENDED WITH
.0

The bug was fixed by the patch for bug number BUG 11763109 - 55779: SELECT
DOES NOT WORK PROPERLY IN MYSQL SERVER VERSION "5.1.42 SUSE MYSQL (Exact same
fix as was proposed for this bug.) Since the motivation for the two bug
reports was completely different, however, it still makes sense to push the
test case.

This patch contains only the test case.
2011-04-18 10:44:41 +02:00
Bjorn Munch
786ccb331f merge from 5.1-mtr 2011-04-16 16:46:51 +02:00
Bjorn Munch
19add93d3a merge from 5.1 main 2011-04-15 15:51:31 +02:00
Sergey Glukhov
12a6e0d90e Bug#11765139 58069: LOAD DATA INFILE: VALGRIND REPORTS INVALID MEMORY READS AND WRITES WITH U
Some multibyte sequences could be considered by my_mbcharlen() functions
as multibyte character but more exact my_ismbchar() does not think so.
In such a case this multibyte sequences is pushed into 'stack' buffer which
is too small to accommodate the sequence.
The fix is to allocate stack buffer in
compliance with max character length.
2011-04-15 12:51:34 +04:00
Bjorn Munch
331058bc91 Bug #12360195 MTR DOES NOT IGNORE TABS IN EXPERIMENTAL FILE
Instead of just filtering space, filter white space (\s)
I left the default.experimental file as is, with tabs.
2011-04-15 10:30:52 +02:00
Tor Didriksen
2af655c2e5 Bug#11765713 58705: OPTIMIZER LET ENGINE DEPEND ON UNINITIALIZED VALUES CREATED BY OPT_SUM_QU
Valgrind warnings were caused by comparing index values to an un-initialized field.
2011-04-14 16:35:24 +02:00
Bjorn Munch
a23276c5c1 Bug #12351213 MTR --VS-CONFIG DOES NOT WORK LIKE MTR_VS_CONFIG
Fix for --vs-config applied
Find.pm incorrectly tested an unitialized local variable instead
  of the global, corrected.
Find.pm is also wrong in 5.5: uses a non-existent global variable. Fix when
  merging up.
2011-04-14 16:17:58 +02:00
Serge Kozlov
c65d5b7610 WL#5867, postfix for binlog_bug23533 2011-04-14 15:24:11 +04:00
Sergey Glukhov
3f3318c34e Bug#11756242 48137: PROCEDURE ANALYSE() LEAKS MEMORY WHEN RETURNING NULL
There are two problems with ANALYSE():

1. Memory leak 
   it happens because do_select() can overwrite
   JOIN::procedure field(with zero value in our case) and
   JOIN destructor don't free the memory allocated for
   JOIN::procedure. The fix is to save original JOIN::procedure
   before do_select() call and restore it after do_select
   execution.

2. Wrong result
   If ANALYSE() procedure is used for the statement with LIMIT clause
   it could retrun empty result set. It happens because of missing 
   analyse::end_of_records() call. First end_send() function call
   returns NESTED_LOOP_QUERY_LIMIT and second call of end_send() with
   end_of_records flag enabled does not happen. The fix is to return
   NESTED_LOOP_OK from end_send() if procedure is active.
2011-04-14 12:11:57 +04:00