Commit graph

57603 commits

Author SHA1 Message Date
Matthias Leich
2f935906f8 Merge 5.0 -> 5.1, no conflicts, no changes 2009-06-19 18:57:42 +02:00
Matthias Leich
584c1fb3de Merge of latest changes into local tree, no conflicts 2009-06-19 18:53:10 +02:00
Matthias Leich
ff317bf8f5 Merge of latest changes into local tree 2009-06-19 18:34:49 +02:00
Matthias Leich
c788e763fc Merge 5.0 -> 5.1 of fixes for various funcs_1 related bugs 2009-06-19 17:44:29 +02:00
Georgi Kodinov
2a1166128d automerge 2009-06-19 18:32:10 +03:00
Matthias Leich
a4dec0aab1 Merge of fix for bug 40545, 40209, 40618, 38346 into tree 2009-06-19 17:21:20 +02:00
Matthias Leich
eb91084540 Fix for Bug#40545, Bug#40209, Bug#40618, Bug#38346
Details:
  - Limit the queries to character sets and collations
    which are most probably available in all build types.
    But try to preserve the intention of the tests.
  - Remove the variants adjusted to some build types.

  Note:
  1. The results of the review by Bar are included.
  2. I am not able to check the correctness of this patch
     on any existing build type and any MySQL version.
     So it could happen that the new test fails somewhere.
2009-06-19 17:04:25 +02:00
Georgi Kodinov
c5d904ebbe Bug #36654: mysqld_multi cannot start instances with different versions
occasionally.

mysql_multi can call mysqld_safe. In doing this it's not changing the 
current working directory. This may cause confusion in the case where 
mysqld_multi is handling instances of servers of different versions 
and the current working directory is the installation directory of one 
of these servers.

Fixed by enhancing the meaning of basedir in [mysqldN] sections of 
mysqld_multi. If specified, mysqld_multi will change the current 
working directory to the basedir directory before starting the server 
in mysqld_multi ... start ... and then change it back to what it was.
2009-06-19 15:52:20 +03:00
V Narayanan
81dbbd68c1 merging with mysql-5.0-bugteam 2009-06-19 17:58:46 +05:30
V Narayanan
728d3c39de Bug#43572 Handle failures from hash_init
Failure to allocate memory for the hash->array element,
caused hash_init to return without initializing the other
members of the hash. Thus although the dynamic array
buffer may be allocated at a later point in the code, the
incompletely initialized hash caused fatal failures.

This patch moves the initialization of the other members
of the hash above the array allocation, so that the usage
of this hash will not result in fatal failures.
2009-06-19 17:29:21 +05:30
Alfranio Correia
5289e1a9e2 Post-fix for BUG#43929. 2009-06-19 12:27:24 +01:00
Sergey Glukhov
cf66632d5e null merge 2009-06-19 14:31:09 +05:00
Staale Smedseng
c3ef506a02 Null-merge from 5.0-bugteam 2009-06-19 11:29:21 +02:00
Staale Smedseng
2b48caa42d Bug #32223 SETting max_allowed_packet variable
Inconsistent behavior of session variable max_allowed_packet 
(and net_buffer_length); only assignment to the global variable 
has any effect, without this being obvious to the user.
      
The patch for Bug#22891 is backported to 5.0, making the two
session variables read-only. As this is a backport to GA 
software, the error used when trying to assign to the read-
only variable is ER_UNKNOWN_ERROR. The error message is the 
same as in 5.1+.
2009-06-19 11:27:19 +02:00
Sergey Glukhov
c92abdc2a0 Bug#44834 strxnmov is expected to behave as you'd expect
The problem: described in the bug report.
The fix:
--increase buffers where it's necessary
  (buffers which are used in stxnmov)
--decrease buffer lengths which are used
2009-06-19 13:24:43 +05:00
Davi Arnaut
f6ea8b7675 Bug#42599: error: `pthread_setschedprio' was not declared in this scope
The problem was that a pthread.h header used by gcc did not
declare the pthread_setscheprio, yet the function is implemented
by the function is implemented, causing a autoconf check to pass
and compilation with C++ to fail. The solution is to add a
autoconf check to ensure that the function is properly declared.
2009-06-18 20:21:47 -03:00
Alfranio Correia
56b6f1b691 auto-merge mysql-5.1-bugteam (local) --> mysql-5.1-bugteam 2009-06-18 19:25:14 +01:00
Alfranio Correia
2cf77a8ea8 merge mysql-5.0-bugteam --> mysql-5.1-bugteam 2009-06-18 18:58:56 +01:00
Alfranio Correia
9069e110d4 auto-merge mysql-5.0-bugteam (local) --> mysql-5.0-bugteam 2009-06-18 18:28:47 +01:00
Alfranio Correia
16ead29710 auto-merge mysql-5.1-bugteam (local) --> mysql-5.1-bugteam 2009-06-18 15:16:14 +01:00
Alfranio Correia
ac1b464a33 BUG#43929 binlog corruption when max_binlog_cache_size is exceeded
Large transactions and statements may corrupt the binary log if the size of the
cache, which is set by the max_binlog_cache_size, is not enough to store the
the changes.

In a nutshell, to fix the bug, we save the position of the next character in the
cache before starting processing a statement. If there is a problem, we simply
restore the position thus removing any effect of the statement from the cache.
Unfortunately, to avoid corrupting the binary log, we may end up loosing changes
on non-transactional tables if they do not fit in the cache. In such cases, we
store an Incident_log_event in order to stop the slave and alert users that some
changes were not logged.

Precisely, for every non-transactional changes that do not fit into the cache,
we do the following:
  a) the statement is *not* logged
  b) an incident event is logged after committing/rolling back the transaction,
  if any. Note that if a failure happens before writing the incident event to
  the binary log, the slave will not stop and the master will not have reported
  any error.
  c) its respective statement gives an error

For transactional changes that do not fit into the cache, we do the following:
  a) the statement is *not* logged
  b) its respective statement gives an error

To work properly, this patch requires two additional things. Firstly, callers to
MYSQL_BIN_LOG::write and THD::binlog_query must handle any error returned and
take the appropriate actions such as undoing the effects of a statement. We
already changed some calls in the sql_insert.cc, sql_update.cc and sql_insert.cc
modules but the remaining calls spread all over the code should be handled in
BUG#37148. Secondly, statements must be either classified as DDL or DML because
DDLs that do not get into the cache must generate an incident event since they
cannot be rolled back.
2009-06-18 14:52:46 +01:00
Martin Hansson
0a214a42d1 Merge 2009-06-18 09:25:46 +02:00
Alexey Kopytov
880dbcce38 Automerge. 2009-06-17 21:03:01 +04:00
Alexey Kopytov
7433b19aa5 Automerge. 2009-06-17 21:00:39 +04:00
Alexey Kopytov
1827a979fc Automerge. 2009-06-17 20:58:46 +04:00
Alexey Kopytov
e0f0ad4c92 Automerge. 2009-06-17 20:12:50 +04:00
Alexey Kopytov
4ecfe5772c Disabled embedded server for the test case for bug #45236. 2009-06-17 20:10:48 +04:00
Staale Smedseng
347b483b73 Merge from 5.1-bugteam upstream 2009-06-17 17:50:27 +02:00
Martin Hansson
6585cba822 Merge 2009-06-17 17:34:53 +02:00
Staale Smedseng
ced5d5397c Merge from upstream 5.1-bugteam 2009-06-17 17:33:22 +02:00
Kristofer Pettersson
84978d9df9 Automerge 2009-06-17 17:07:20 +02:00
Martin Hansson
e33e01e516 Bug#44684: valgrind reports invalid reads in
Item_func_spatial_collection::val_str
        
When the concatenation function for geometry data collections
reads the binary data it was not rigorous in checking that there
is data available, leading to invalid reads and crashes.
Fixed by making checking stricter.
2009-06-17 16:58:33 +02:00
Staale Smedseng
c429fac63c Merge from 5.0-bugteam 2009-06-17 16:56:44 +02:00
Kristofer Pettersson
be07cbe230 Bug#43758 Query cache can lock up threads in 'freeing items' state
This patch corrects a misstake in the test case for bug patch 43658.

There was a race in the test case when the thread id was retrieved from the processlist.
The result was that the same thread id was signalled twice and one thread id wasn't
signalled at all.

The affected platforms appears to be limited to linux.
2009-06-17 16:28:11 +02:00
Staale Smedseng
30fccdaaae Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2
      
Compiling MySQL with gcc 4.3.2 and later produces a number of 
warnings, many of which are new with the recent compiler
versions.
                  
This bug will be resolved in more than one patch to limit the
size of changesets. This is the second patch, fixing more
of the warnings.
2009-06-17 15:54:01 +02:00
Alexey Kopytov
388183a8a4 Automerge. 2009-06-17 16:38:19 +04:00
Alexey Kopytov
edc46f9bba Automerge. 2009-06-17 16:37:10 +04:00
Alexey Kopytov
9c1e2bbcf6 Automerge. 2009-06-17 16:36:45 +04:00
Alexey Kopytov
8297782e32 Automerge. 2009-06-17 15:50:50 +04:00
Alfranio Correia
376a73c079 BUG#45511 rpl.rpl_binlog_corruption fails with warning messages in Valgrind
This is a backport of BUG#43076.
2009-06-16 16:04:30 +01:00
Martin Hansson
acc642c87c Bug#45168: assertion with convert() and empty set value
The assertion in String::copy was added in order to avoid
valgrind errors when the destination was the same as the source.
Eased restriction to allow for the case when str == NULL.
2009-06-16 16:36:15 +02:00
Georgi Kodinov
de713f7e1b Addendum to the fix for bug #44821: move partition dependent test
to a test file that guarantees the presence of partition code
2009-06-16 12:59:57 +03:00
Kristofer Pettersson
7d98d2408d Automerge 2009-06-16 10:49:04 +02:00
Kristofer Pettersson
5f205e1ad6 Automerge 2009-06-16 10:44:36 +02:00
Martin Hansson
94723b4922 Merge 2009-06-16 10:43:13 +02:00
Kristofer Pettersson
ccfd18de12 Automerge 2009-06-16 10:42:54 +02:00
Georgi Kodinov
3e56e6b7a4 automerge 2009-06-16 10:35:42 +02:00
Kristofer Pettersson
b22d02ad42 Bug#43758 Query cache can lock up threads in 'freeing items' state
Early patch submitted for discussion.

It is possible for more than one thread to enter the condition
in query_cache_insert(), but the condition predicate is to
signal one thread each time the cache status changes between
the following states: {NO_FLUSH_IN_PROGRESS,FLUSH_IN_PROGRESS,
TABLE_FLUSH_IN_PROGRESS}

Consider three threads THD1, THD2, THD3

   THD2: select ... => Got a writer in ::store_query
   THD3: select ... => Got a writer in ::store_query
   THD1: flush tables => qc status= FLUSH_IN_PROGRESS;
                      new writers are blocked.
   THD2: select ... => Still got a writer and enters cond in
                       query_cache_insert
   THD3: select ... => Still got a writer and enters cond in
                       query_cache_insert
   THD1: flush tables => finished and signal status change.
   THD2: select ... => Wakes up and completes the insert.
   THD3: select ... => Happily waiting for better times. Why hurry?

This patch is a refactoring of this lock system. It introduces four new methods:
   Query_cache::try_lock()
   Query_cache::lock()
   Query_cache::lock_and_suspend()
   Query_cache::unlock()

This change also deprecates wait_while_table_flush_is_in_progress(). All threads are
queued and put on a conditional wait. On each unlock the queue is signalled. This resolve
the issues with left over threads. To assure that no threads are spending unnecessary
time waiting a signal broadcast is issued every time a lock is taken before a full
cache flush.
2009-06-16 10:34:47 +02:00
Martin Hansson
4c4c7ccc24 Merge 2009-06-16 10:34:32 +02:00
Georgi Kodinov
47ca83f248 automerge 2009-06-16 10:33:13 +02:00