Commit graph

1472 commits

Author SHA1 Message Date
Luis Soares
7e889a8dc9 BUG 53621: automerged bzr bundle from bug report. 2010-05-20 00:52:03 +01:00
Luis Soares
779241bc94 BUG 52868: automerged bzr bundle from bug report. 2010-05-20 00:50:42 +01:00
Luis Soares
3b8cae37cc BUG 49522: automerged bzr bundle from bug report. 2010-05-20 00:49:18 +01:00
Andrei Elkin
59b4dfccb5 pushing bug#50942 fixes to 5.1-bt 2010-05-16 20:03:32 +03:00
Alfranio Correia
cf7bac11ec BUG#50410: rpl_ndb tests should run with binlog_format=row
Post-fix: Updated a test case after the patch for BUG#50410,
because the patch makes ndb to run in the row format and as
such unsafe warning messages are not printed out.
2010-05-16 12:45:21 +01:00
Luis Soares
fc11ce658f BUG#53621: check_testcase fails for rpl_do_grant in mysql-5.1-bugteam
MTR sporadically reported that rpl_do_grant does not
clean up after itself.

We fix this by backporting BUG 50984 fix. This deploys
missing synchronization between master and slave.

Additionally, it also fixes the check_testcase for
rpl_tmp_table_and_DDL.
2010-05-13 16:40:31 +01:00
Sven Sandberg
29c8c152b2 BUG#50410: rpl_ndb tests should run with binlog_format=row
Problem: The rpl_ndb did not set binlog_format explicitly. Since
the default is binlog_format=statement, it means that the suite
ran with that. ndb does not support binlog_format=statement,
and many tests were skipped because they sourced
include/have_binlog_format_row_or_mixed.inc
Fix: set binlog_format=row explicitly in the configuration file
for the rpl_ndb suite.


Makefile.am:
  Removed duplicate run of rpl_ndb suite with binlog_format=row.
  Now that rpl_ndb is run with binlog_format=row by default, this
  run that explicitly changes to binlog_format=row is not needed,
  because it is covered by the following run.
mysql-test/suite/rpl_ndb/my.cnf:
  cluster only supports binlog_format=row.
mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result:
  updated result file
mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test:
  This test is supposed to use binlog_format=STATEMENT on
  master. It uses innodb on master, so statement format is
  supported.
2010-05-12 12:29:02 +02:00
Mattias Jonsson
6fa04cad8f merge 2010-05-10 15:17:06 +02:00
Alfranio Correia
209cccf55d BUG#49019 Mixing self-logging eng. and regular eng. does not switch to row in mixed mode
Backport of the patch for 5.1-bugteam.
2010-05-09 23:45:25 +01:00
Luis Soares
2646306cc9 BUG#49522: Replication problem with mixed MyISAM/InnoDB
When using a non-transactional table (t1) on the master 
and with autocommit disabled, no COMMIT is recorded 
in the binary log ending the statement. Therefore, if 
the slave has t1 in a transactional engine, then it will 
be as if a transaction is started but never ends. This is
actually BUG#29288 all over again.

We fix this by cherrypicking the cset for BUG#29288 which
was pushed to a later mysql version. The revision picked
was: mats@sun.com-20090923094343-bnheplq8n95opjay .

Additionally, a test case for covering the scenario depicted
in the bug report is included in this cset.
2010-05-07 18:48:35 +01:00
Omer BarNir
fb47b30384 Updates to README file of the 'engines' test suites 2010-05-04 14:24:36 -07:00
Andrei Elkin
efcc90b6eb Bug #50942 mix_innodb_myisam_side_effects.test is not deterministic
The test was used to fail because of 
 UPDATE t3,t4 SET t3.a=t4.a + bug27417(1);
did not prescribe the order of two row operations implied by the update.

Fixed with forcing the order with adding a where condition w/o
affecting the former bug fixes logics.

mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test:
  implemented the bug page suggestion to make a test deterministic.
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
  results are updated and (!) corrected.
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
  results are updated
2010-05-04 22:31:49 +03:00
Mattias Jonsson
f33075fd16 merge 2010-05-04 14:26:44 +02:00
Georgi Kodinov
e038b56dab merged 5.1-innodb 2010-05-01 19:12:12 +03:00
Vasil Dimov
3bffc40a24 Disable innodb.innodb, main.ps_3innodb and main.partition_innodb_plugin
mysql-tests because those emit (spurious?) valgrind warnings.
2010-04-30 13:02:36 +03:00
Vasil Dimov
c5ca0da1e8 Merge 3417..3421 from mysql-5.1-innodb 2010-04-27 09:16:45 +03:00
Vasil Dimov
777c194cda Split the innodb.innodb mysql-test.
Extract part of innodb.innodb into innodb.innodb_misc1

This is needed in order to be able to more easily debug this test,
under valgrind, it is too huge.
2010-04-27 09:09:08 +03:00
Marko Mäkelä
bd4a354c29 Add a test case for Bug #52745. 2010-04-26 14:08:56 +03:00
Marko Mäkelä
063928ba05 row_search_for_mysql(): Never try semi-consistent read in unique searches.
They are only useful in table scans. (Bug #52663)
2010-04-26 13:27:25 +03:00
Calvin Sun
44bac2ea9c mysql-5.1-innodb: add error codes to innodb_bug51920.test
kill of active connection yields different error code
depending on platform.
2010-04-22 14:16:14 -05:00
Luis Soares
fbe81e3c97 BUG#52868: Wrong handling of NULL value during update, replication out
of sync

In RBR, sometimes the table->s->last_null_bit_pos can be zero. This
has impact at the slave when it compares records fetched from the
storage engine against records in the binary log event. If
last_null_bit_pos is zero the slave, while comparing in
log_event.cc:record_compare function, would set all bits in the last
null_byte to 1 (assumed all 8 were unused) . Thence it would loose the
ability to distinguish records that were similar in contents except
for the fact that some field was null in one record, but not in the
other. Ultimately this would cause wrong matches, and in the specific
case depicted in the bug report the same record would be updated
twice, resulting in a lost update.

Additionally, in the record_compare function the slave was setting the
X bit unconditionally. There are cases that the X bit does not exist
in the record header. This could also lead to wrong matches between
records.

We fix both by conditionally resetting the bits: (i) unused null_bits
are set if last_null_bit_pos > 0; (ii) X bit is set if
HA_OPTION_PACK_RECORD is in use.

mysql-test/extra/rpl_tests/rpl_record_compare.test:
  Shared part of the test case for MyISAM and InnoDB.
mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test:
  InnoDB test case.
mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test:
  MyISAM test case. Added also coverage for Field_bits case.
sql/log_event.cc:
  Deployed conditional setting of unused bits at record_compare.
sql/log_event_old.cc:
  Same change as in log_event.cc.
2010-04-21 13:47:55 +01:00
Marko Mäkelä
66e1700bed dict_create_index_step(): Be strict about DYNAMIC and COMPRESSED tables.
Bug #50495 is about REDUNDANT and COMPACT tables, after all.
2010-04-21 13:27:23 +03:00
Marko Mäkelä
b7a6240c41 Adjust tests for the Bug #50495 fix. 2010-04-21 12:40:32 +03:00
Kristofer Pettersson
95da93d7ac Automerge 2010-04-16 16:56:16 +02:00
Kristofer Pettersson
794a441317 Bug#50373 --secure-file-priv=""
The server variable opt_secure_file_priv wasn't
normalized properly and caused the operations
LOAD DATA INFILE .. INTO TABLE ..
and
SELECT load_file(..)
to do different interpretations of the 
--secure-file-priv option.

The patch moves code to the server initialization
routines so that the path always is normalized
once and only once.

It was also intended that setting the option
to an empty string should be equal to 
lifting all previously set restrictions. This
is also fixed by this patch.


sql/mysqld.cc:
  * If --secure_file_option is an empty string then the option variable
    should be unset.
  * opt_secure_file_option should be normalized once when the server starts.
sql/sql_load.cc:
  * moved variable normalization code to fix_paths()
2010-04-16 16:10:47 +02:00
Luis Soares
8fa9a5861b automerge: merged bug clone into latest mysql-5.1-bugteam. 2010-04-16 01:59:21 +01:00
Vasil Dimov
84c41ecbff Remove unused file 2010-04-12 17:23:00 +03:00
Vasil Dimov
0ee2f371f5 Fix path to innodb-index.inc 2010-04-12 16:58:47 +03:00
Vasil Dimov
f5692f21f9 Remove outdated InnoDB Plugin tests from mysql-test/suite/innodb,
the InnoDB Plugin tests are now in mysql-test/suite/innodb_plugin.

Move InnoDB tests to the innodb suite at mysql-test/suite/innodb.
2010-04-12 14:56:24 +03:00
Vasil Dimov
666039be77 Convert InnoDB Plugin tests to include have_innodb_plugin.inc.
This also instructs mtr to transparently load the plugin.
2010-04-09 16:38:28 +03:00
Vasil Dimov
8b12f2cce9 Fix mtr warning in innodb-autoinc-44030.test 2010-04-09 16:33:42 +03:00
Vasil Dimov
be57311862 Fix a failure of innodb_plugin.innodb-autoinc-44030 now that
MySQL and InnoDB dictionaries do not get out of sync.
2010-04-09 16:29:13 +03:00
Vasil Dimov
70f40e39a1 Fix a mtr warning in innodb_plugin.innodb-autoinc 2010-04-09 16:25:17 +03:00
Vasil Dimov
65a401ec1f Merge from innodb-branches-zip 2010-04-09 16:07:41 +03:00
Vasil Dimov
5a0e20715d Move the InnoDB Plugin tests from storage/innodb_plugin/mysql-test/ where
they are ignored to a new test suite "innodb_plugin".

Remove a hack in mtr that was deployed to run the builtin InnoDB tests against
the InnoDB Plugin. Also detect if a test is an 'innodb plugin test' and if so
then transparently replace the builtin InnoDB with the InnoDB Plugin.
2010-04-09 15:56:51 +03:00
Vasil Dimov
6e24349e98 Adjust mysql-test/suite/binlog/t/binlog_killed.test after a change
in behavior in InnoDB. The change in behavior was introduced by this
changeset:

  ------------------------------------------------------------
  revno: 3370
  revision-id: vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457
  parent: vasil.dimov@oracle.com-20100331130440-l0y517y3mjsjqy4v
  parent: vasil.dimov@oracle.com-20100331113119-2kbgkaz1d426a43c
  committer: Vasil Dimov <vasil.dimov@oracle.com>
  branch nick: mysql-5.1-innodb
  timestamp: Wed 2010-03-31 16:06:13 +0300
  message:
    Merge from innodb-branches-5.1
      ------------------------------------------------------------
      revno: 0.1.819
      revision-id: vasil.dimov@oracle.com-20100331113119-2kbgkaz1d426a43c
      parent: vasil.dimov@oracle.com-20100331064722-9rc3wypzmer7d6jj
      parent: svn-v4:cee13dc7-1704-0410-992b-c9b4543f1246:branches/5.1:6918
      committer: Vasil Dimov <vasil.dimov@oracle.com>
      branch nick: innodb-branches-5.1
      timestamp: Wed 2010-03-31 14:31:19 +0300
      message:
        Merge from SVN
          ------------------------------------------------------------
          revno: 0.2.1
          revision-id: svn-v4:cee13dc7-1704-0410-992b-c9b4543f1246:branches/5.1:6918
          parent: svn-v4:cee13dc7-1704-0410-992b-c9b4543f1246:branches/5.1:6912
          committer: mmakela
          timestamp: Wed 2010-03-31 07:14:51 +0000
          message:
            branches/5.1: Obey KILL during a lock wait (Bug #51920).
  
            srv_suspend_mysql_thread(), srv_lock_timeout_and_monitor_thread():
            Check trx_is_interrupted() in addition to checking the lock wait timeout.
  
            rb://279 approved by Sunny Bains
2010-04-08 19:55:55 +03:00
Omer BarNir
1008fd89c4 Correction to the disabled.def file in engines/iuds that got overwritten by
mistake in previous push
2010-04-07 11:28:28 -07:00
Omer BarNir
9a5d2d63f9 Updates to test files in the 'engines' suite following changes in 5.1.46 2010-04-06 11:06:34 -07:00
Sergey Vojtovich
923d34a97f Applying InnoDB snapshot
Detailed revision comments:

r6800 | marko | 2010-03-11 12:02:57 +0200 (Thu, 11 Mar 2010) | 1 line
branches/zip: Add ut_ad(mtr->state == MTR_ACTIVE) to various places.
2010-04-01 16:27:13 +04:00
Sergey Vojtovich
eb450e18a5 Applying InnoDB snapshot
Detailed revision comments:

r6799 | jyang | 2010-03-11 09:59:42 +0200 (Thu, 11 Mar 2010) | 5 lines
branches/zip: Once change in bug #47621 merges into zip branch,
zip only test innodb_bug44571 needs to be updated to reflect the
column name change would be successful be done in InnoDB as well.
2010-04-01 16:22:36 +04:00
Sergey Vojtovich
1fb843587c Applying InnoDB snapshot, fixes BUG#51356.
Detailed revision comments:

r6790 | jyang | 2010-03-10 13:09:41 +0200 (Wed, 10 Mar 2010) | 7 lines
branches/zip: Fix bug #51356: "many valgrind errors in error messages
with concurrent ddl". Null terminate the name string returned
from innobase_convert_identifier() call when reporting DB_DUPLICATE_KEY
error in create_table_def().
rb://266 approved by Marko
2010-04-01 16:14:51 +04:00
Sergey Vojtovich
66acbbe41f Applying InnoDB snapshot
Detailed revision comments:

r6786 | vasil | 2010-03-10 09:16:50 +0200 (Wed, 10 Mar 2010) | 4 lines
branches/zip:

Fix typo in comment
2010-04-01 16:07:40 +04:00
Sergey Vojtovich
385df07603 Applying InnoDB snapshot
Detailed revision comments:

r6770 | marko | 2010-03-03 12:52:55 +0200 (Wed, 03 Mar 2010) | 12 lines
branches/zip: Disallow duplicate index name when creating an index.
This should fix Mantis Issue #461.

innodb.test, innodb.result, innodb-index.test, innodb-index.result:
Adjust the test result and mention that the introduced restriction
has been reported as MySQL Bug #51451.

innobase_check_index_keys(): Add a parameter for the InnoDB table and
check that no duplicate index name is added.  Report errors by
my_error() instead of sql_print_error().

rb://260 approved by Sunny Bains
2010-04-01 16:04:43 +04:00
Sergey Vojtovich
84d09ccc72 Applying InnoDB snapshot, fixes BUG#47622.
Detailed revision comments:

r6526 | jyang | 2010-01-28 18:12:40 +0200 (Thu, 28 Jan 2010) | 8 lines
branches/zip: Add index translation table to map mysql index
number to InnoDB index structure directly. Fix Bug #47622:
"the new index is added before the existing ones in MySQL,
but after one in SE".

rb://215, approved by Marko
2010-04-01 15:30:11 +04:00
Sergey Vojtovich
60e905a9b8 Applying InnoDB snapshot
Detailed revision comments:

r6472 | calvin | 2010-01-16 01:53:47 +0200 (Sat, 16 Jan 2010) | 12 lines
branches/zip: Merge revisions 6425:6471 from branches/5.1
to pick up the first part fix of bug49396.

    ------------------------------------------------------------------------
    r6471 | calvin | 2010-01-15 17:43:27 -0600 (Fri, 15 Jan 2010) | 4 lines

    branches/5.1: fix bug#49396: main.innodb test fails in embedded mode

    Change replace_result by using $MYSQLD_DATADIR. Tested in both embedded
    mode and normal server mode.
    ------------------------------------------------------------------------

r6473 | calvin | 2010-01-16 01:58:16 +0200 (Sat, 16 Jan 2010) | 6 lines
branches/zip: fix bug#49396: innodb.innodb-index test fails in
embedded mode

This is 2nd part of the fix for bug#49396. The 1st part is
innodb.test. Tested in both embedded mode and normal server mode.
2010-04-01 15:25:06 +04:00
unknown
454c003a5c Bug #50407 mysqlbinlog --database=X produces bad output for SAVEPOINTs
When mysqlbinlog was given the --database=X flag, it always printed
'ROLLBACK TO', but the corresponding 'SAVEPOINT' statement was not
printed. The replicated filter(replicated-do/ignore-db) and binlog
filter (binlog-do/ignore-db) has the same problem. They are solved
in this patch together.

After this patch, We always check whether the query is 'SAVEPOINT'
statement or not. Because this is a literal check, 'SAVEPOINT' and
'ROLLBACK TO' statements are also binlogged in uppercase with no
any comments.

The binlog before this patch can be handled correctly except one case
that any comments are in front of the keywords. for example:
 /* bla bla */ SAVEPOINT a;
 /* bla bla */ ROLLBACK TO a;
2010-03-28 19:57:33 +08:00
unknown
4775601012 Bug #50095 Multi statement including CREATE EVENT causes rotten binlog entry
The log event of 'CREATE EVENT' was being binlogged with garbage
at the end of the query if 'CREATE EVENT' is followed by another SQL statement
and they were executed as one command.
for example:
    DELIMITER |;
    CREATE EVENT e1 ON EVERY DAY DO SELECT 1; SELECT 'a';
    DELIMITER ;|
When binlogging 'CREATE EVENT', we always create a new statement with definer
and write it into the log event. The new statement is made from cpp_buf(preprocessed buffer).
which is not a c string(end with '\0'), but it is copied as a c string.

In this patch, cpp_buf is copied with its length.
2010-03-28 16:37:47 +08:00
Ramil Kalimullin
251be0170d An addition to fix for BUG#51866 - crash with repair
by sort and fulltext keys.

Min value for myisam_sort_buffer_size is 4096.
2010-03-25 20:35:07 +04:00
Sergey Vojtovich
5eff6aed0e Merge fix for BUG51866 to mysql-5.1-bugteam. 2010-03-25 16:11:16 +04:00
Sergey Vojtovich
412798658a BUG#51866 - crash with repair by sort and fulltext keys
Repairing MyISAM table with fulltext indexes and low
myisam_sort_buffer_size may crash the server.

Estimation of number of index entries was done incorrectly,
causing further assertion failure or server crash.

Docs note: min value for myisam_sort_buffer_size has been
changed from 4 to 4096.

mysql-test/r/fulltext.result:
  A test case for BUG#51866.
mysql-test/r/myisam.result:
  Min value for myisam_sort_buffer_size is 4096.
mysql-test/r/variables.result:
  Min value for myisam_sort_buffer_size is 4096.
mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_32.result:
  Min value for myisam_sort_buffer_size is 4096.
mysql-test/t/fulltext.test:
  A test case for BUG#51866.
sql/mysqld.cc:
  Min value for myisam_sort_buffer_size is 4096.
storage/myisam/mi_check.c:
  When estimating number of index entries for external
  fulltext parser, take into account that key_length may
  be bigger than myisam_sort_buffer_size. Reuse logic
  from _create_index_by_sort(): force MIN_SORT_BUFFER to
  be min value for myisam_sort_buffer_size.
  
  Another problem is that ftkey_nr has no other meaning
  than serial number of fulltext index starting with 1.
  We can't say if this key using built-in or external
  parser basing on it's value. In other words we always
  entered if-branch for external parser. At this point,
  the only way to check if we use default parser is to
  compare keyinfo::parser with &ft_default_parser.
storage/myisam/sort.c:
  Get rid of MIN_SORT_MEMORY, use MIN_SORT_BUFFER instead
  (defined in myisamdef.h, has the same value and purpose).
2010-03-25 16:08:21 +04:00