Commit graph

32 commits

Author SHA1 Message Date
Marko Mäkelä
55f4e4800b MDEV-15325 fixup: Disable test for --embedded 2018-03-29 22:00:07 +03:00
Thirunarayanan Balathandayuthapani
73af8af094 MDEV-15325 Incomplete validation of missing tablespace during recovery
Problem:
=======
	During validation of missing tablespace, missing tablespace id is
being compared with hash table of redo logs (recv_sys->addr_hash). But if the
hash table ran out of memory then there is a possibility that it will not contain
the redo logs of all tablespace. In that case, Server will load the InnoDB
even though there is a missing tablespace.

Solution:
========
	If the recv_sys->addr_hash hash table ran out of memory then InnoDB needs
to scan the remaining redo log again to validate the missing tablespace.
2018-03-27 13:47:56 +05:30
Marko Mäkelä
e9d2f37abd MDEV-13626 Merge InnoDB test cases from MySQL 5.7 (part 2)
Import the changes to innodb.innodb-index innodb.innodb-index-debug

Note: As noted in MDEV-13613, due to the behaviour change in MDEV-11114,
DROP COLUMN will not imply DROP/ADD PRIMARY/UNIQUE KEY, like it does
in MySQL. The tests have been adjusted accordingly.
2017-09-14 16:07:10 +03:00
Marko Mäkelä
08413254b7 Remove references to innodb_file_format.
innodb_file_format=Barracuda is the default in MariaDB 10.2.
Do not set it, because the option will be removed in MariaDB 10.3.

Also, do not set innodb_file_per_table=1 because it is the default.

Note that MDEV-11828 should fix the test innodb.innodb-64k
already in 10.1.
2017-01-18 08:43:11 +02:00
Sergei Golubchik
72c20282db 10.0-base merge 2014-02-03 15:22:39 +01:00
Sergei Golubchik
ffa8c4cfcc Percona-Server-5.6.14-rel62.0 merge
support ha_innodb.so as a dynamic plugin.
* remove obsolete *,innodb_plugin.rdiff files
* s/--plugin-load=/--plugin-load-add=/
* MYSQL_PLUGIN_IMPORT glob_hostname[]
* use my_error instead of push_warning_printf(ER_DEFAULT)
* don't use tdc_size and tc_size in a module

update test cases (XtraDB is 5.6.14, InnoDB is 5.6.10)
* copy new tests over
* disable some tests for (old) InnoDB
* delete XtraDB tests that no longer apply

small compatibility changes:
* s/HTON_EXTENDED_KEYS/HTON_SUPPORTS_EXTENDED_KEYS/
* revert unnecessary InnoDB changes to make it a bit closer to the upstream

fix XtraDB to compile on Windows (both as a static and a dynamic plugin)

disable XtraDB on Windows (deadlocks) and where no atomic ops are available (e.g. CentOS 5)


storage/innobase/handler/ha_innodb.cc:
  revert few unnecessary changes to make it a bit closer to the original InnoDB
storage/innobase/include/univ.i:
  correct the version to match what it was merged from
2013-12-22 17:06:50 +01:00
unknown
61ba356a9d Innodb tests innodb_file_format cleanup. 2013-09-25 14:19:25 +03:00
Sergei Golubchik
b7b5f6f1ab 10.0-monty merge
includes:
* remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING"
* introduce LOCK_share, now LOCK_ha_data is strictly for engines
* rea_create_table() always creates .par file (even in "frm-only" mode)
* fix a 5.6 bug, temp file leak on dummy ALTER TABLE
2013-07-21 16:39:19 +02:00
Sergei Golubchik
e1c76b80d9 Fixes for innodb suite, merging tests from 5.6.
Includes 5.6 changesets for:
*****
Fix for BUG#13489996 valgrind:conditional jump or move depends on uninitialised values-field_blob.
blob_ptr_size was not initialized properly: remove this variable.
*****
Bug#14021323 CRASH IN FIELD::SET_NULL WHEN INSERTING ROWS TO NEW TABLE
*****
2013-07-15 18:01:22 +02:00
Sergei Golubchik
3ad01d00f2 error messages: name the storage engine explicitly,
instead of "used storage engine" and similar changes.
2013-04-09 23:27:07 +02:00
Sergei Golubchik
37f5632212 merged with XtraDB 1.1.8-26.0 2012-06-15 14:54:23 +02:00
Sergei Golubchik
1185420da0 5.3 merge 2012-05-21 20:54:41 +02:00
Marko Mäkelä
567a422cf9 Merge mysql-5.1 to mysql-5.5. 2012-02-02 13:50:54 +02:00
Bjorn Munch
dc265dc4a1 Bug #12844282 62075: MTR TESTS SHOULD NOT HAVE TO SAVE & RESET INNODB_FILE_FORMAT_CHECK
This is a redo for 5.5
  Added 'innodb_file_format_max' as variable to ignore change to.
  Tests that had to restore this amended
  Two tests assumed it to be Antelope, make sure these run on a freshly
    started server
2011-10-05 15:14:14 +02:00
unknown
d27d267ee7 Bug 12963823 - Crash in Purge thread under unusual circumstances.
The problem occurred when indexes are added between the time that an
UNDO record is created and the time that the purge thread comes around
and deletes the old secondary index entries.  The purge thread would
hit an assert when trying to build a secondary index entry for
searching.  The problem was that the old value of those fields were not
in the UNDO record since they were not part of an index when the UPDATE
occured. 
A test case was added to innodb-index.test.
2011-09-20 18:17:36 -06:00
Marko Mäkelä
247ada63af Bug#12547647 UPDATE LOGGING COULD EXCEED LOG PAGE SIZE
This fix was accidentally pushed to mysql-5.1 after the 5.1.59 clone-off in
bzr revision id marko.makela@oracle.com-20110829081642-z0w992a0mrc62s6w
with the fix of Bug#12704861 Corruption after a crash during BLOB update
but not merged to mysql-5.5 and upwards.

In the Barracuda formats, the clustered index record no longer
contains a prefix of off-page columns. Because of this, the undo log
must contain these prefixes, so that purge and multi-versioning will
continue to work. However, this also means that an undo log record can
become too big to fit in an undo log page. (It is a limitation of the
undo log that undo records cannot span across multiple pages.)

In case the checks for undo log size fail when CREATE TABLE or CREATE
INDEX is executed, we need a fallback that blocks a modification
operation when the undo log record would exceed the maximum size.

trx_undo_free_last_page_func(): Renamed from trx_undo_free_page_in_rollback().
Define the trx_t parameter only in debug builds.

trx_undo_free_last_page(): Wrapper for trx_undo_free_last_page_func().
Pass the trx_t parameter only in debug builds.

trx_undo_truncate_end_func(): Renamed from trx_undo_truncate_end().
Define the trx_t parameter only in debug builds. Rewrite a for(;;) loop
as a while loop for clarity.

trx_undo_truncate_end(): Wrapper for from trx_undo_truncate_end_func().
Pass the trx_t parameter only in debug builds.

trx_undo_erase_page_end(): Return TRUE if the page was non-empty
to begin with. Refuse to erase empty pages.

trx_undo_report_row_operation(): If the page for which the undo log
was too big was empty, free the undo page and return DB_TOO_BIG_RECORD.

rb:749 approved by Inaam Rana
2011-09-01 21:48:04 +03:00
unknown
438d21189c Null Merge from mysql-5.1 with second fix for Bug#12637786
Bug#12637786 was fixed with rb:692 by marko.  But that fix has a remaining
bug.  It added this assert;
    ut_ad(ind_field->prefix_len);
before a section of code that assumes there is a prefix_len.  

The patch replaced code that explicitly avoided this with a check for
prefix_len.  It turns out that the purge thread can get to that assert
without a prefix_len because it does not use a row_ext_t* .
When UNIV_DEBUG is not defined, the affect of this is that the purge thread
sets the dfield->len to zero and then cannot find the entry in the index to
purge.  So secondary index entries remain unpurged.

This patch does not do the assert.  Instead, it uses
    'if (ind_field->prefix_len) {...}'
around the section of code that assumes a prefix_len.  This is the way the
patch I provided to Marko did it.

The test case is simply modified to do a sleep(10) in order to give the
purge thread a chance to run. Without the code change to row0row.c, this
modified testcase will assert if InnoDB was compiled with UNIV_DEBUG.
I tried to sleep(5), but it did not always assert.
2011-07-08 08:16:23 -05:00
unknown
7d605ec45f Merge from mysql-5.5.14-release 2011-07-06 01:13:50 +02:00
Georgi Kodinov
54729bbc60 merged mysql-5.5->mysql-5.5-security 2011-06-06 16:17:58 +03:00
Jimmy Yang
9e2b7fa7d5 Implement worklog #5743 InnoDB: Lift the limit of index key prefixes.
With this change, the index prefix column length lifted from 767 bytes
to 3072 bytes if "innodb_large_prefix" is set to "true".

rb://603 approved by Marko
2011-05-31 02:12:32 -07:00
Marko Mäkelä
b2df322877 Merge mysql-5.1-security to mysql-5.5-security. 2011-05-19 17:01:47 +03:00
Marko Mäkelä
eaa2a0a9c0 Merge mysql-5.1 to mysql-5.5. 2011-06-30 13:23:34 +03:00
Marko Mäkelä
d09b999fb3 Bug#11753728 45225: Locking: hang if drop table with no timeout
Fix a failure of the re-enabled innodb-index.test in the embedded server.
Apparently, the embedded server does not default to ENGINE=InnoDB when
copying an InnoDB table by CREATE TABLE t2 SELECT * FROM t1;
2011-06-23 12:40:19 +03:00
Marko Mäkelä
e1aa1f874e Bug#11753728 45225: Locking: hang if drop table with no timeout
Re-enable a test that was disabled as collateral damage.

Starting with MySQL 5.5, queries will acquire and hold a shared meta-data lock
(MDL) on tables they process, until the transaction is committed or
rolled back. This will prevent DDL operations on the tables, such as creating
an index.

innodb-index.test: Use a second table for creating the index. The index will
still be "too new" for the transaction that was started before the index
creation was started.
2011-06-22 11:20:19 +03:00
Jimmy Yang
0cbc668fc2 This change splits innodb_file_format_check into innodb_file_format_check
and innodb_file_format_max two system variables. And this also fixes
bug #53654 after 2nd shutdown innodb_file_format_check attains strange
values.

rb://366 approved by Marko
2010-06-17 02:13:53 -07:00
Vasil Dimov
eaadb377af Move InnoDB mysql-tests to the innodb suite. 2010-04-16 19:19:07 +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
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
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
Satya B
d813b43048 Applying InnoDB Plugin 1.0.6 snapshot, part 7
Fixes several test cases.

applied revisions: r6181, r6182, r6183, r6184

r6183 - changes are made only to tests in innodb suite which is only 
        innodb-consistent-master.opt

Detailed revision comments:

r6181 | vasil | 2009-11-17 12:21:41 +0200 (Tue, 17 Nov 2009) | 33 lines
branches/zip:

At the end of innodb-index.test: restore the environment as it was before
the test was started to silence this warning:

  MTR's internal check of the test case 'main.innodb-index' failed.
  This means that the test case does not preserve the state that existed
  before the test case was executed.  Most likely the test case did not
  do a proper clean-up.
  This is the diff of the states of the servers before and after the
  test case was executed:
  mysqltest: Logging to '/tmp/autotest.sh-20091117_033000-zip.btyZwu/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.log'.
  mysqltest: Results saved in '/tmp/autotest.sh-20091117_033000-zip.btyZwu/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.result'.
  mysqltest: Connecting to server localhost:13000 (socket /tmp/autotest.sh-20091117_033000-zip.btyZwu/mysql-5.1/mysql-test/var/tmp/mysqld.1.sock) as 'root', connection 'default', attempt 0 ...
  mysqltest: ... Connected.
  mysqltest: Start processing test commands from './include/check-testcase.test' ...
  mysqltest: ... Done processing test commands.
  --- /tmp/autotest.sh-20091117_033000-zip.btyZwu/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.result	2009-11-17 13:10:40.000000000 +0300
  +++ /tmp/autotest.sh-20091117_033000-zip.btyZwu/mysql-5.1/mysql-test/var/tmp/check-mysqld_1.reject	2009-11-17 13:10:54.000000000 +0300
  @@ -84,7 +84,7 @@
   INNODB_DOUBLEWRITE	ON
   INNODB_FAST_SHUTDOWN	1
   INNODB_FILE_FORMAT	Antelope
  -INNODB_FILE_FORMAT_CHECK	Antelope
  +INNODB_FILE_FORMAT_CHECK	Barracuda
   INNODB_FILE_PER_TABLE	OFF
   INNODB_FLUSH_LOG_AT_TRX_COMMIT	1
   INNODB_FLUSH_METHOD	
  
  mysqltest: Result content mismatch
  
  not ok

r6182 | marko | 2009-11-17 13:49:15 +0200 (Tue, 17 Nov 2009) | 1 line
branches/zip: Set svn:eol-style on mysql-test files.
r6183 | marko | 2009-11-17 13:51:16 +0200 (Tue, 17 Nov 2009) | 1 line
branches/zip: Prepend loose_ to plugin-only mysql-test options.
r6184 | marko | 2009-11-17 13:52:01 +0200 (Tue, 17 Nov 2009) | 1 line
branches/zip: innodb-index.test: Restore innodb_file_format_check.
2009-11-30 18:19:13 +05:30
Sergey Vojtovich
4e430bb4cf Make innodb test suite pass with INNODB_PLUGIN.
mysql-test/suite/innodb/my.cnf:
  Added temporary my.cnf for initial testing.
mysql-test/suite/innodb/t/disabled.def:
  Disabled innodb-index test until we know how to fix it.
  An error message appears in the error log, which is likely
  needs to be suppressed.
mysql-test/suite/innodb/t/innodb-analyze.test:
  Cleanup variables before returning.
mysql-test/suite/innodb/t/innodb-index.test:
  Include file from proper location.
mysql-test/suite/innodb/t/innodb-index_ucs2.test:
  Include file from proper location.
mysql-test/suite/innodb/t/innodb_bug36169.test:
  Cleanup variables before returning.
mysql-test/suite/innodb/t/innodb_bug36172.test:
  Cleanup variables before returning.
2009-06-11 17:57:44 +05:00
Satya B
098679e8f8 Add innodb plugin tests to a new mysql test suite 'innodb'.
Created a test suite 'innodb' under mysql-test/suite/innodb for the innodb plugin tests.
test suite 'innodb' has tests only which are not under any other mysql-test suites.

Total 14 testcases are added to the test suite.

Note: the patches in storage/innodb_plugin/mysql-test/patches are not applied yet
2009-06-10 19:21:20 +05:30