Commit graph

63203 commits

Author SHA1 Message Date
Luis Soares
5109d5401e BUG#38718: slave sql thread crashes when reading relay log
Suprisingly, a Slave_log_event would show up in the binary
log. This event is never used and should not appear in the
logs. As such, when the slave (or the mysqlbinlog tool) reads the
event, it will hit an invalid pointer (reference to the
descriptor event when deserializing the Slave_log_event was
purposodely set to NULL).
      
The presence of the Slave_log_event denotes a corrupted log, but
we cannot tell how the log got corrupted in the first
place. However, we can make the server cope with such events when
it reads them - in case of log corruption - and fail gracefully.
     
This patch makes the server/mysqlbinlog to report that it has
found an invalid log event when Slave_log_event is read.
2010-10-06 12:23:46 +01:00
Georgi Kodinov
58995280cc merge 2010-10-05 17:24:01 +03:00
Georgi Kodinov
43533495c4 Bug #56428: Replace copyright notice removed from SHA1 code (.h) 2010-10-05 17:05:37 +03:00
Georgi Kodinov
216deccd85 Bug #56427 : Replace copyright notice removed from SHA1 code 2010-10-05 17:03:04 +03:00
Georgi Kodinov
4be6e11591 merged 2010-10-05 11:47:03 +03:00
Georgi Kodinov
d616a7a31f merged 5.0-bugteam into 5.1-bugteam 2010-10-05 11:24:45 +03:00
Georgi Kodinov
539291cde9 merged mysql-5.1 into mysql-5.1-bugteam 2010-10-05 11:11:56 +03:00
Georgi Kodinov
743d916a51 Disable NDB tests to run by default. 2010-10-05 11:03:14 +03:00
Georgi Kodinov
9f38cc0faf merge 2010-10-05 10:25:19 +03:00
Vasil Dimov
babfc48c6e Merge mysql-5.1-innodb -> mysql-5.1-bugteam 2010-10-04 14:26:56 +03:00
Marko Mäkelä
fe0b669416 Bug#56716 InnoDB locks a record gap without locking the table
row_search_for_mysql(): Acquire an intention lock on the table
before locking the first record gap.
2010-10-04 13:06:41 +03:00
Marko Mäkelä
484e61a778 Bug#56716 InnoDB locks a record gap without locking the table
row_search_for_mysql(): Acquire an intention lock on the table
before locking the first record gap.
2010-10-04 13:05:21 +03:00
Vasil Dimov
6d46ba951f Merge mysql-5.1-bugteam -> mysql-5.1-innodb 2010-10-04 12:49:58 +03:00
Bjorn Munch
d1fb8a8606 Small test fix after 56753 2010-10-03 19:39:28 +02:00
Bjorn Munch
687696a97a merge from 5.1-mtr 2010-10-03 19:37:58 +02:00
Alexey Kopytov
e1e838169a Automerge. 2010-10-01 23:56:55 +04:00
Mattias Jonsson
c0c524c3c5 merge 2010-10-01 18:29:40 +02:00
Mattias Jonsson
cddd0d685f merge 2010-10-01 15:41:27 +02:00
Vasil Dimov
1ca8c7b5ef Merge mysql-5.1-innodb -> mysql-5.1-bugteam 2010-10-01 15:39:44 +03:00
Mattias Jonsson
460fcf7c5e merge 2010-10-01 13:39:49 +02:00
Mattias Jonsson
a01773dbee Bug#51851: Server with SBR locks mutex twice on
LOAD DATA into partitioned MyISAM table

Problem was that both partitioning and myisam
used the same table_share->mutex for different protections
(auto inc and repair).

Solved by adding a specific mutex for the partitioning
auto_increment.

Also adding destroying the ha_data structure in
free_table_share (which is to be propagated
into 5.5).

This is a 5.1 ONLY patch, already fixed in 5.5+.
2010-10-01 13:39:04 +02:00
Bjorn Munch
ad7521df31 Bug #20304 mysqltest: reap with no preceding statement hangs forever
Added sanity check, similar to the one preventing send without reap
2010-10-01 11:00:18 +02:00
Mattias Jonsson
d7bfd59a5a Bug#55458: Partitioned MyISAM table gets crashed by multi-table update
Bug#57113: ha_partition::extra(ha_extra_function):
            Assertion `m_extra_cache' failed

Fix for bug#55458 included DBUG_ASSERTS causing
debug builds of the server to crash on
another multi-table update.

Removed the asserts since they where wrong.
(updated after testing the patch in 5.5).
2010-09-30 15:57:33 +02:00
Vasil Dimov
e9bd5900f5 Fix Bug#56340 innodb updates index stats too frequently after non-index updates
This is a simple optimization issue. All stats are related to only indexed
columns, index size or number of rows in the whole table. UPDATEs that touch
only non-indexed columns cannot affect stats and we can avoid calling the
function row_update_statistics_if_needed() which may result in unnecessary I/O.

Approved by:	Marko (rb://466)
2010-09-30 15:48:44 +03:00
Bjorn Munch
87234b74ca Bug #52828 Tests that use perl fail when perl is not in path
Trying to run perl fails, just like it does when perl is started but fails
Trap the case that perl was not found/could not be started, and skip test
Also force a restart of servers since test may already have done something
mtr now also appends path of current perl to PATH to aid mysqltest
2010-09-30 12:42:37 +02:00
Vasil Dimov
d70cbd6c61 Fix a potential bug when using __sync_lock_test_and_set()
TYPE __sync_lock_test_and_set (TYPE *ptr, TYPE value, ...)

it is not documented what happens if the two arguments are of different
type like it was before: the first one was lock_word_t (byte) and the
second one was 1 or 0 (int).

Approved by:	Marko (via IRC)
2010-09-30 13:26:18 +03:00
Bjorn Munch
b094cad9b0 Small test fix after 56753 2010-09-30 10:28:22 +02:00
Bjorn Munch
1a75a23ce1 merge from 5.1 2010-09-29 12:56:10 +02:00
Bjorn Munch
f643d1b6d3 Bug #56125 MTR2 start-and-exit removes server tmpdir, server becomes not operational
This happens when creating new tmpdir due to too long socket path
Don't delete it if --start-and-exit, but warn user to do it.
2010-09-28 15:58:01 +02:00
Vasil Dimov
3b0b15c5aa Increment InnoDB Plugin version to 1.0.13.
InnoDB Plugin 1.0.12 has been released with MySQL 5.1.51.
2010-09-28 15:31:33 +03:00
karen.langford@sun.com
a773c15b4b Merge from mysql-5.1.51-release 2010-09-28 10:33:22 +02:00
Vasil Dimov
68e34ab133 Silence a GCC warning about reaching the end of non-void func
Spotted by:	Marko
2010-09-28 11:12:34 +03:00
Vasil Dimov
7535f1eec9 Merge mysql-5.1-bugteam -> mysql-5.1-innodb 2010-09-28 09:38:33 +03:00
Davi Arnaut
d47e8991cb Bug#45288: pb2 returns a lot of compilation warnings on linux
Use UNINIT_VAR workaround instead of LINT_INIT. The former can
also be used to silence false-positives in non-debug builds as
it actually does not cause new code to be generated.
2010-09-24 19:13:51 -03:00
Davi Arnaut
77a0ae9a9a Bug#45288: pb2 returns a lot of compilation warnings on linux
Temporarily disable strict aliasing warnings in order to get
wider coverage for optimized builds. Once the violations are
fixed and false-positives silenced, this flag should be removed.
2010-09-24 09:36:31 -03:00
Dmitry Shulga
f14d8c2896 Follow-up for Bug#42503: fix a compilation warning. 2010-09-24 19:03:28 +07:00
Alexey Kopytov
a1f1e77c38 Bug #56709: Memory leaks at running the 5.1 test suite
Fixed a number of memory leaks discovered by valgrind.
2010-09-22 23:33:18 +04:00
Dmitry Shulga
c7ccc7265e Fixed bug#56821 - failure to start the MySQL Service. 2010-09-22 19:53:06 +07:00
Bjorn Munch
80d666bc21 Bug #56921 It should be possible to log connection statements in mysqltest
Added --enable-connect-log, somewhet similar to --enable-query-log
If query log is disabled, disable connect log too
Also some related cleanup in mysqltest.test: removing duplicate test loop
2010-09-22 10:57:10 +02:00
Ingo Struewing
386d50478c Bug#46339 - crash on REPAIR TABLE merge table USE_FRM
Merge from saved bundle.
2010-09-21 16:37:18 +02:00
Bjorn Munch
8102240ce9 test fixes after 56753 2010-09-21 11:16:20 +02:00
Bjorn Munch
c679e8dc80 Bug #55426 mysqltest crashes when trying to unlock not acquired mutex
Follow-up: don't call pthread_join() on Windows
This change only valid for 5.1
2010-09-20 11:21:27 +02:00
Alfranio Correia
6baf9d5a61 merge mysql-5.1-bugteam (local) --> mysql-5.1-bugteam 2010-09-17 14:55:23 +01:00
Sergey Glukhov
86d7cbd450 Bug#50402 Optimizer producing wrong results when using Index Merge on InnoDB
Subselect executes twice, at JOIN::optimize stage
and at JOIN::execute stage. At optimize stage
Innodb prebuilt struct which is used for the
retrieval of column values is initialized in.
ha_innobase::index_read(), prebuilt->sql_stat_start is true.
After QUICK_ROR_INTERSECT_SELECT finished his job it
restores read_set/write_set bitmaps with initial values
and deactivates one of the handlers used by
QUICK_ROR_INTERSECT_SELECT in JOIN::cleanup
(it's the case when we reuse original handler as one of
 handlers required by QUICK_ROR_INTERSECT_SELECT object).
On second subselect execution inactive handler is activated
in  QUICK_RANGE_SELECT::reset, file->ha_index_init().
In ha_index_init Innodb prebuilt struct is reinitialized
with inappropriate read_set/write_set bitmaps. Further
reinitialization in ha_innobase::index_read() does not
happen as prebuilt->sql_stat_start is false.
It leads to partial retrieval of required field values
and we get a mix of field values from different records
in the record buffer.
The fix is to reset
read_set/write_set bitmaps as these values
are required for proper intialization of
internal InnoDB struct which is used for
the retrieval of column values
(see build_template(), ha_innodb.cc)
2010-09-16 16:13:53 +04:00
Magne Mahre
f43d6c2b73 Bug #54606 innodb fast alter table + pack_keys=0 prevents
adding new indexes

A fast alter table requires that the existing (old) table
and indices are unchanged (i.e only new indices can be
added).  To verify this, the layout and flags of the old
table/indices are compared for equality with the new.

The PACK_KEYS option is a no-op in InnoDB, but the flag
exists, and is used in the table compare.  We need to
check this (table) option flag before deciding whether an 
index should be packed or not.  If the table has
explicitly set PACK_KEYS to 0, the created indices should
not be marked as packed/packable.
2010-09-16 12:51:08 +02:00
Dmitry Shulga
be794bc5eb Fixed bug#42503 - "Lost connection" errors when using
compression protocol.

The loss of connection was caused by a malformed packet
sent by the server in case when query cache was in use.
When storing data in the query cache, the query  cache
memory allocation algorithm had a tendency to reduce
the amount of memory block necessary to store a result
set, up to finally storing the entire result set in a single
block. With a significant result set, this memory block
could turn out to be quite large - 30, 40 MB and on.
When such a result set was sent to the client, the entire
memory block was compressed and written to network as a
single network packet. However, the length of the
network packet is limited by 0xFFFFFF (16MB), since
the packet format only allows 3 bytes for packet length.
As a result, a malformed, overly large packet
with truncated length would be sent to the client
and break the client/server protocol.

The solution is, when sending result sets from the query
cache, to ensure that the data is chopped into
network packets of size <= 16MB, so that there
is no corruption of packet length. This solution,
however, has a shortcoming: since the result set
is still stored in the query cache as a single block,
at the time of sending, we've lost boundaries of individual
logical packets (one logical packet = one row of the result
set) and thus can end up sending a truncated logical
packet in a compressed network packet.

As a result, on the client we may require more memory than 
max_allowed_packet to keep, both, the truncated
last logical packet, and the compressed next packet.
This never (or in practice never) happens without compression,
since without compression it's very unlikely that
a) a truncated logical packet would remain on the client
when it's time to read the next packet
b) a subsequent logical packet that is being read would be
so large that size-of-new-packet + size-of-old-packet-tail >
max_allowed_packet.
To remedy this issue, we send data in 1MB sized packets,
that's below the current client default of 16MB for
max_allowed_packet, but large enough to ensure there is no
unnecessary overhead from too many syscalls per result set.
2010-09-16 17:24:27 +07:00
Mikael Ronstrom
f601c035c5 Updated build_mccge.sh and added support for more cpu's in check-cpu 2010-09-16 08:53:58 +02:00
Vasil Dimov
d972a31ea8 Fix typo, should be UNIV_SYNC_DEBUG. 2010-09-15 19:58:36 +03:00
Vasil Dimov
e00e1aba61 (partially) Fix Bug#55227 Fix compiler warnings in innodb with gcc 4.6
Fix compiler warning:
trx/trx0undo.c: In function 'trx_undo_truncate_end':
trx/trx0undo.c:1069:14: error: variable 'rseg' set but not used [-Werror=unused-but-set-variable]
2010-09-15 19:50:05 +03:00
Vasil Dimov
c97283c207 (partially) Fix Bug#55227 Fix compiler warnings in innodb with gcc 4.6
Fix compiler warning:
trx/trx0undo.c: In function 'trx_undo_set_state_at_prepare':
trx/trx0undo.c:1871:16: error: variable 'page_hdr' set but not used [-Werror=unused-but-set-variable]
2010-09-15 19:49:25 +03:00