Commit graph

63345 commits

Author SHA1 Message Date
Marko Mäkelä
a8f2f7af32 Bug #56680 wrong InnoDB results from a case-insensitive covering index
row_search_for_mysql(): When a secondary index record might not be
visible in the current transaction's read view and we consult the
clustered index and optionally some undo log records, return the
relevant columns of the clustered index record to MySQL instead of the
secondary index record.

REC_INFO_DELETED_FLAG: Move the definition from rem0rec.ic to rem0rec.h.

ibuf_insert_to_index_page_low(): New function, refactored from
ibuf_insert_to_index_page().

ibuf_insert_to_index_page(): When we are inserting a record in place
of a delete-marked record and some fields of the record differ, update
that record just like row_ins_sec_index_entry_by_modify() would do.

mysql_row_templ_t: Add clust_rec_field_no.

row_sel_store_mysql_rec(), row_sel_push_cache_row_for_mysql(): Add the
flag rec_clust, for returning data at clust_rec_field_no instead of
rec_field_no. Resurrect the debug assertion that the record not be
marked for deletion. (Bug #55626)

buf_LRU_free_block(): Refactored from
buf_LRU_search_and_free_block(). This is needed for the
innodb_change_buffering_debug diagnostics.

[UNIV_DEBUG || UNIV_IBUF_DEBUG] ibuf_debug, buf_page_get_gen(),
buf_flush_page_try():
Implement innodb_change_buffering_debug=1 for evicting pages from the
buffer pool, so that change buffering will be attempted more
frequently.
2010-10-19 08:58:53 +03:00
Davi Arnaut
5aa81e380c Bug#45288: pb2 returns a lot of compilation warnings on linux
Enable the MySQL maintainer-specific development environment
(which add various warning related options to the compiler
flags) if debugging support is enabled.

config/ac-macros/maintainer.m4:
  Enable the maintainer mode if debug support is enabled.
configure.in:
  Move debug argument to before the maintainer mode check.
2010-10-18 14:27:10 -02:00
Dmitry Shulga
cdddc7bfd5 Follow up for bug#36742. Changed test case for bug#19828
because currently hostname stored in db in lowercase.
2010-10-18 21:03:53 +07:00
Tor Didriksen
9074307102 Bug#52172 test binlog.binlog_index needs --skip-core-file to avoid leaving core files
For crash testing: kill the server without generating core file.

include/my_dbug.h
  Use kill(getpid(), SIGKILL) which cannot be caught by signal handlers.
  All DBUG_XXX macros should be no-ops in optimized mode, do that for DBUG_ABORT as well.
sql/handler.cc
  Kill server without generating core.
sql/log.cc
  Kill server without generating core.
2010-10-18 13:24:34 +02:00
Vasil Dimov
78804bc8bd Fix Bug#57252 disabling innobase_stats_on_metadata disables ANALYZE
This is a merge from 5.1/builtin to 5.1/plugin of:

  --------------
  revision-id: vasil.dimov@oracle.com-20101018104811-nwqhg9vav17kl5s1
  committer: Vasil Dimov <vasil.dimov@oracle.com>
  timestamp: Mon 2010-10-18 13:48:11 +0300
  message:
    Fix Bug#57252 disabling innobase_stats_on_metadata disables ANALYZE
    
    In order to fix this bug we need to distinguish whether ha_innobase::info()
    has been called from ::analyze() or not. Rename ::info() to ::info_low()
    and add a boolean parameter that tells whether the call is from ::analyze()
    or not. Create a new simple ::info() that just calls
    ::info_low(false => not called from analyze). From ::analyze() instead of
    ::info() call ::info_low(true => called from analyze).
    
    Approved by:	Jimmy (rb://487)
  --------------
2010-10-18 14:20:16 +03:00
Vasil Dimov
902b13fa57 Fix Bug#57252 disabling innobase_stats_on_metadata disables ANALYZE
In order to fix this bug we need to distinguish whether ha_innobase::info()
has been called from ::analyze() or not. Rename ::info() to ::info_low()
and add a boolean parameter that tells whether the call is from ::analyze()
or not. Create a new simple ::info() that just calls
::info_low(false => not called from analyze). From ::analyze() instead of
::info() call ::info_low(true => called from analyze).

Approved by:	Jimmy (rb://487)
2010-10-18 13:48:11 +03:00
unknown
211552ccee Bug#56118 STOP SLAVE does not wait till trx with CREATE TMP TABLE ends,
replication aborts

When recieving a 'SLAVE STOP' command, slave SQL thread will roll back the
transaction and stop immidiately if there is only transactional table updated,
even through 'CREATE|DROP TEMPOARY TABLE' statement are in it. But These
statements can never be rolled back. Because the temporary tables to the user
session mapping remain until 'RESET SLAVE', Therefore it will abort SQL thread
with an error that the table already exists or doesn't exist, when it restarts
and executes the whole transaction again.

After this patch, SQL thread always waits till the transaction ends and then stops,
if 'CREATE|DROP TEMPOARY TABLE' statement are in it.

mysql-test/extra/rpl_tests/rpl_stop_slave.test:
  Auxiliary file which is used to test this bug.
mysql-test/suite/rpl/t/rpl_stop_slave.test:
  Test case for this bug.
sql/slave.cc:
  Checking if OPTION_KEEP_LOG is set. If it is set, SQL thread should wait
  until the transaction ends.
sql/sql_parse.cc:
  Add a debug point for testing this bug.
2010-10-16 20:03:44 +08:00
Vasil Dimov
ef858cc463 Remove leftover conflict marker
It was added in jimmy.yang@oracle.com-20100902004302-m5ax9qo0ne2msdfx
2010-10-15 17:50:45 +03:00
Vasil Dimov
3e56680632 Merge mysql-5.1-bugteam -> mysql-5.1-innodb 2010-10-15 17:38:39 +03:00
Vasil Dimov
74b42d8daa Add InnoDB Plugin ChangeLog entry for Bug#56143 2010-10-15 17:30:32 +03:00
Vasil Dimov
3ce802d5d8 Fix the formatting in storage/innodb_plugin/ChangeLog 2010-10-15 17:26:58 +03:00
Jimmy Yang
27c80dd424 Remove an unused counter variable in io_handler_thread(). 2010-10-14 04:19:52 -07:00
Vasil Dimov
c8163ef1dc Tune the test for Bug#56143 too many foreign keys causes output of show create table to become invalid
Use a CREATE statement with all the FKs instead of ALTERing the table many
times because it is faster (11 seconds vs 3 seconds).
2010-10-14 12:33:56 +03:00
Vasil Dimov
f918ad4381 Fix Bug#56143 too many foreign keys causes output of show create table to become invalid
This is a port of the following changeset from
5.1/storage/innobase to 5.1/storage/innodb_plugin:

  ------------------------------------------------------------
  revno: 3626
  revision-id: vasil.dimov@oracle.com-20101013171859-gi9n558yj89x9v3w
  parent: klewis@mysql.com-20101012175933-ce9kkgl0z8oeqffa
  committer: Vasil Dimov <vasil.dimov@oracle.com>
  branch nick: mysql-5.1-innodb
  timestamp: Wed 2010-10-13 20:18:59 +0300
  message:
    Fix Bug#56143 too many foreign keys causes output of show create table to become invalid
    
    Just remove the check whether the file is "too big".
    A similar code exists in ha_innobase::update_table_comment() but that
    method does not seem to be used.

Also use a CREATE statement with all the FKs instead of ALTERing the
table 550 times because it is faster.
2010-10-14 12:28:25 +03:00
Vasil Dimov
4c14da7975 Fix Bug#56143 too many foreign keys causes output of show create table to become invalid
Just remove the check whether the file is "too big".
A similar code exists in ha_innobase::update_table_comment() but that
method does not seem to be used.
2010-10-13 20:18:59 +03:00
Jimmy Yang
d5055f4e8a Fix Bug #57397 io_handler_thread() will never cleanup
rb://483 approved by Inaam
2010-10-13 21:17:00 -07:00
unknown
895506247d Bug#55632 - Fix testcase for 5.1 plugin 2010-10-13 13:32:10 -05:00
Luis Soares
54c308d37d BUG 55263: automerged bzr bundle from bug report into
latest mysql-5.1-bugteam.
2010-10-13 08:26:50 +01:00
Luis Soares
6739a84529 BUG 38718: automerged bzr bundle from bug report into
latest mysql-5.1-bugteam.
2010-10-13 08:25:43 +01:00
Dmitry Shulga
8169faec27 Fixed bug#36742 - GRANT hostname case handling inconsistent.
mysql-test/r/grant.result:
  It was added result for test case for bug#36742.
mysql-test/t/grant.test:
  It was added test case for bug#36742.
sql/sql_yacc.yy:
  It was added convertation of host name part of user name to lowercase.
2010-10-13 12:28:58 +07:00
unknown
891bbf224a Bug#56632 - The warning code related to KEY_BLOCK_SIZE and ROW_FORMAT when innodb_strict_mode=OFF is improved in order to take into account whether the KEY_BLOCK_SIZE is specified on the current ALTER statement or the previous CREATE statement.
The testcase shows the expected results of 12 different combinations of these settings.
2010-10-12 12:59:33 -05:00
unknown
498ee6bd19 Fix bug #57345 2010-10-11 22:13:47 +02:00
Jimmy Yang
820e1bc6f4 A more complete fix for bug #57345 btr_pcur_store_position abort for load
with concurrent lock/unlock tables

Approved by Marko
2010-10-11 05:36:13 -07:00
unknown
42f8d2f249 Bug#56226 Table map set to 0 after altering MyISAM table
After ALTER TABLE which changed only table's metadata, row-based
binlog sometimes got corrupted since the tablemap was unexpectedly
set to 0 for subsequent updates to the same table.

ALTER TABLE which changed only table's metadata always reset
table_map_id for the table share to 0. Despite the fact that
0 is a valid value for table_map_id, this step caused problems
as it could have created situation in which we had more than
one table share with table_map_id equal 0. If more than one
table with table_map_id are 0 were updated in the same statement,
updates to these different tables were written into the same
rows event. This caused slave server to crash.

This bug happens only on 5.1. It doesn't affect 5.5+.

This patch solves this problem by ensuring that ALTER TABLE
statements which change metadata only never reset table_map_id
to 0. To do this it changes reopen_table() to correctly use
refreshed table_map_id value instead of using the old one/
resetting it.


mysql-test/suite/rpl/r/rpl_alter.result:
  Add test for BUG#56226
mysql-test/suite/rpl/t/rpl_alter.test:
  Add test for BUG#56226
2010-10-11 11:08:49 +08:00
Sunny Bains
7ee98d4fea Bug# 56982 Assertion Failure from ha_innobase::innobase_peek_autoinc() when auto_inc > 0
Print an error message to stderr an get rid of the assertion.

Approved by: Jimmy Yang (over IM)
2010-10-11 11:26:49 +11:00
Alfranio Correia
eec585f143 merge mysql-5.1-bugteam (local) --> mysql-5.1-bugteam 2010-10-10 20:13:25 +01:00
unknown
10812c0782 Bug#55375 Transaction bigger than max_binlog_cache_size crashes slave
When slave executes a transaction bigger than slave's max_binlog_cache_size,
slave will crash. It is caused by the assert that server should only roll back
the statement but not the whole transaction if the error ER_TRANS_CACHE_FULL 
happens. But slave sql thread always rollbacks the whole transaction when
an error happens.
            
Ather this patch, we always clear any error set in sql thread(it is different
from the error in 'SHOW SLAVE STATUS') and it is cleared before rolling back
the transaction.


mysql-test/suite/rpl/r/rpl_binlog_max_cache_size.result:
  SET binlog_cache_size and max_binlog_cache_size for all test cases.
  Add test case for bug#55375.
mysql-test/suite/rpl/t/rpl_binlog_max_cache_size-master.opt:
  binlog_cache_size and max_binlog_cache_size can be set in the client connection.
  so remove this option file.
mysql-test/suite/rpl/t/rpl_binlog_max_cache_size.test:
  SET binlog_cache_size and max_binlog_cache_size for all test cases.
  Add test case for bug#55375.
sql/log_event.cc:
  Some functions don't return the error code, so it is a wrong error code.
  The error should always be set into thd->main_da. So we use 
  slave_rows_error_report to report the right error.
sql/slave.cc:
  exec_relay_log_event() need call cleanup_context() to clear context. 
  clearup_context() will call end_trans().
          
  Clear thd's error before cleanup_context. It avoid to trigger the assert
  which cause this bug.
2010-10-09 15:05:43 +08:00
unknown
58279a011e Null-merge from mysql-5.1.49sp1-release 2010-10-07 21:44:09 +02:00
Georgi Kodinov
ec830356d7 bumped the version to 5.1.53 2010-10-07 17:28:17 +03:00
Martin Hansson
30f57b3323 Bug#56423: Different count with SELECT and CREATE SELECT queries
This is a regression from the fix for bug no 38999. A storage engine capable
of reading only a subset of a table's columns updates corresponding bits in
the read buffer to signal that it has read NULL values for the corresponding
columns. It cannot, and should not, update any other bits. Bug no 38999
occurred because the implementation of UPDATE statements compare the NULL bits
using memcmp, inadvertently comparing bits that were never requested from the
storage engine. The regression was caused by the storage engine trying to
alleviate the situation by writing to all NULL bits, even those that it had no
knowledge of. This has devastating effects for the index merge algorithm,
which relies on all NULL bits, except those explicitly requested, being left
unchanged.

The fix reverts the fix for bug no 38999 in both InnoDB and InnoDB plugin and
changes the server's method of comparing records. For engines that always read
entire rows, we proceed as usual. For engines capable of reading only select
columns, the record buffers are now compared on a column by column basis. An
assertion was also added so that non comparable buffers are never read. Some
relevant copy-pasted code was also consolidated in a new function.
2010-10-07 10:13:11 +02:00
Luis Soares
c93eecdf0a 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
Jimmy Yang
cf2c8701b4 Fix Bug #57255 Cascade Delete results in "Got error -1 from storage engine".
rb://477 approved by Marko
2010-10-06 03:41:26 -07:00
Alfranio Correia
9665bee50c BUG#57098 RBR breaks on changing user password on 5.1 master -> 5.5 slave
Backported the patch for BUG#55452.
2010-10-06 11:19:51 +01:00
Georgi Kodinov
6f9839d965 merge of 5.1-bugteam into 5.1-security 2010-10-06 11:58:31 +03:00
Vasil Dimov
81c78fb6c2 Enable partition_innodb_plugin after Bug#53307 has been fixed 2010-10-05 18:03:48 +03:00
Georgi Kodinov
19a7cf49cc merge 2010-10-05 17:24:01 +03:00
Georgi Kodinov
67cbe257f7 Bug #56428: Replace copyright notice removed from SHA1 code (.h) 2010-10-05 17:05:37 +03:00
Georgi Kodinov
56dfe7295f Bug #56427 : Replace copyright notice removed from SHA1 code 2010-10-05 17:03:04 +03:00
Georgi Kodinov
6ef0f109ee merged 2010-10-05 11:47:03 +03:00
Georgi Kodinov
9d40ad4975 merged 5.0-bugteam into 5.1-bugteam 2010-10-05 11:24:45 +03:00
Georgi Kodinov
292a72a043 merged mysql-5.1 into mysql-5.1-bugteam 2010-10-05 11:11:56 +03:00
Georgi Kodinov
cb49825d10 Disable NDB tests to run by default. 2010-10-05 11:03:14 +03:00
Georgi Kodinov
58a8c4b36e merge 2010-10-05 10:25:19 +03:00
Vasil Dimov
d9f88e64f1 Merge mysql-5.1-innodb -> mysql-5.1-bugteam 2010-10-04 14:26:56 +03:00
Marko Mäkelä
190ebda206 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ä
678bc90ed8 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
282eee8879 Merge mysql-5.1-bugteam -> mysql-5.1-innodb 2010-10-04 12:49:58 +03:00
Sergey Glukhov
bd09e49843 result fix 2010-10-04 12:51:26 +04:00
Bjorn Munch
c443ee4333 Small test fix after 56753 2010-10-03 19:39:28 +02:00
Bjorn Munch
64e189c37c merge from 5.1-mtr 2010-10-03 19:37:58 +02:00