Commit graph

57616 commits

Author SHA1 Message Date
Andrei Elkin
0ecf826a86 Bug #38240 Crash in safe_mutex_lock () thr_mutex.c line 97 on rotate_relay_log
The reason for the crash was rotate_relay_log (mi=0x0) did not verify
the passed value of active_mi.  There are more cases where active_mi
is supposed to be non-zero e.g change_master(), stop_slave(), and it's
reasonable to protect from a similar crash all of them with common
fixes.
            
Fixed with spliting end_slave() in slave threads release and slave
data clean-up parts (a new close_active_mi()). The new function is
invoked at the very end of close_connections() so that all users of
active_mi are proven to have left.
2009-06-23 12:10:04 +03:00
Martin Hansson
ecd470d190 Merge 2009-06-22 16:01:42 +02:00
Martin Hansson
2cc1134c2c Bug#44653: Server crash noticed when executing random queries with partitions.
When opening a table, it is imperative that the flag
TABLE::auto_increment_field_not_null be false. But if an error occured during
the creation of a table (e.g. the table exists already) with an auto_increment
column and a BEFORE trigger that used the INSERT ... SELECT construct, the
flag was not reset until after error checking. Thus if an error occured,
select_insert::send_data() returned immediately and it was not reset (see * in
pseudocode below).  Crash happened if the table was opened again. Fixed by
resetting the flag after error checking.

nested-loops_join():
  for each row in SELECT table {
    select_insert::send_data():
      if a values is supplied for AUTO_INCREMENT column
         table->auto_increment_field_not_null= TRUE
       else
         table->auto_increment_field_not_null= FALSE
       if (error)
         return 1; *
       if (table->auto_increment_field_not_null == FALSE)
         ...
       table->auto_increment_field_not_null == FALSE 
  }
<-- table returned to table cache and later retrieved by open_table: 
open_table():
  assert(table->auto_increment_field_not_null)
2009-06-22 14:51:33 +02:00
Georgi Kodinov
e16cdb29d4 automerge 2009-06-22 15:01:16 +03:00
Georgi Kodinov
f8c440d293 automerge 2009-06-22 14:57:51 +03:00
Georgi Kodinov
cafcd7094f automerge 2009-06-22 14:53:22 +03:00
V Narayanan
26d382f652 merging with mysql-5.1-bugteam 2009-06-22 17:23:02 +05:30
Georgi Kodinov
3acf5b887a automerge 2009-06-22 14:50:46 +03:00
Satya B
2c6d342149 Applying InnoDB snashot 5.1-ss5343, Fixes BUG#45357
1. BUG#45357 - 5.1.35 crashes with Failing assertion: index->type & DICT_CLUSTERED

2. Also fixes the compilation problem when the flag -DUNIV_MUST_NOT_INLINE

Detailed revision comments:

r5340 | marko | 2009-06-17 12:11:49 +0300 (Wed, 17 Jun 2009) | 4 lines
branches/5.1: row_unlock_for_mysql(): When the clustered index is unknown,
refuse to unlock the record.
(Bug #45357, caused by the fix of Bug #39320).
rb://132 approved by Sunny Bains.
r5339 | marko | 2009-06-17 11:01:37 +0300 (Wed, 17 Jun 2009) | 2 lines
branches/5.1: Add missing #include "mtr0log.h" so that the code compiles
with -DUNIV_MUST_NOT_INLINE.
2009-06-22 16:58:00 +05:30
V Narayanan
1b454e345c Bug#43572 Handle failures from hash_init
The merge from http://lists.mysql.com/commits/76678 caused the 
growth_size parameter to the my_init_dynamic_array function to
be ignored. This patch corrects the problem.
2009-06-22 16:40:34 +05:30
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