Commit graph

2075 commits

Author SHA1 Message Date
Jan Lindström
e1978234eb MDEV-8588: Assertion failure in file ha_innodb.cc line 21140 if at least one encrypted table exists and encryption service is not available
Analysis: Problem was that in fil_read_first_page we do find that
table has encryption information and that encryption service
or used key_id is not available. But, then we just printed
fatal error message that causes above assertion.

Fix: When we open single table tablespace if it has encryption
information (crypt_data) store this crypt data to the table
structure. When we open a table and we find out that tablespace
is not available, check has table a encryption information
and from there is encryption service or used key_id is not available.
If it is, add additional warning for SQL-layer.
2015-09-04 20:19:33 +03:00
Sergei Golubchik
bc12d5fd43 MDEV-6066: Merge new defaults from 5.6 and 5.7
cosmetic fixes. test fixes.
2015-09-04 10:33:56 +02:00
Sergei Golubchik
530a6e7481 Merge branch '10.0' into 10.1
referenced_by_foreign_key2(), needed for InnoDB to compile,
was taken from 10.0-galera
2015-09-03 12:58:41 +02:00
Monty
4f0255cbf9 Fixed errors and bugs found by valgrind:
- If run with valgrind, mysqltest will now wait longer when syncronizing slave with master
- Ensure that we wait with cleanup() until slave thread has stopped.
- Added signal_thd_deleted() to signal close_connections() that all THD's has been freed.
- Check in handle_fatal_signal() that we don't use variables that has been freed.
- Increased some timeouts when run with --valgrind

Other things:
- Fixed wrong test in one_thread_per_connection_end() if galera is used.
- Removed not needed calls to THD_CHECK_SENTRY() when we are calling 'delete thd'.
2015-09-01 18:42:02 +03:00
Monty
6b20342651 Ensure that fields declared with NOT NULL doesn't have DEFAULT values if not specified and if not timestamp or auto_increment
In original code, sometimes one got an automatic DEFAULT value in some cases, in other cases not.

For example:
create table t1 (a int primary key)      - No default
create table t2 (a int, primary key(a))  - DEFAULT 0
create table t1 SELECT ....              - Default for all fields, even if they where defined as NOT NULL
ALTER TABLE ... MODIFY could sometimes add an unexpected DEFAULT value.

The patch is quite big because we had some many test cases that used
CREATE ... SELECT or CREATE ... (...PRIMARY KEY(xxx)) which doesn't have an automatic DEFAULT anymore.

Other things:
- Removed warnings from InnoDB when waiting from semaphore (got this when testing things with --big)
2015-08-18 11:18:57 +03:00
Jan Lindström
9a5787db51 Merge commit '96badb16afcf' into 10.0
Conflicts:
	client/mysql_upgrade.c
	mysql-test/r/func_misc.result
	mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
	mysql-test/suite/innodb/r/innodb-fk.result
	mysql-test/t/subselect_sj_mat.test
	sql/item.cc
	sql/item_func.cc
	sql/log.cc
	sql/log_event.cc
	sql/rpl_utility.cc
	sql/slave.cc
	sql/sql_class.cc
	sql/sql_class.h
	sql/sql_select.cc
	storage/innobase/dict/dict0crea.c
	storage/innobase/dict/dict0dict.c
	storage/innobase/handler/ha_innodb.cc
	storage/xtradb/dict/dict0crea.c
	storage/xtradb/dict/dict0dict.c
	storage/xtradb/handler/ha_innodb.cc
	vio/viosslfactories.c
2015-08-03 23:09:43 +03:00
Elena Stepanova
2ebedfa998 MDEV-8532 MTR cannot run with --embedded on Windows on a source build
Do not attempt to run unix-specific code on Windows
2015-07-25 00:58:36 +03:00
Jan Lindström
7a9670218b MDEV-8474: InnoDB sets per-connection data unsafely
Analysis: At check_trx_exists function InnoDB allocates
a new trx if no trx is found from thd but this newly
allocated trx is not registered to thd. This is unsafe,
because nothing prevents InnoDB plugin from being uninstalled
while there's active transaction. This can cause crashes, hang
and any other odd behavior. It may also corrupt stack, as
functions pointers are not available after dlclose.

Fix: The fix is to use thd_set_ha_data() when
manipulating per-connection handler data. It does appropriate
plugin locking.
2015-07-21 12:12:58 +03:00
Monty
f195f93903 Cleanups, fixed warnings from valgrind, fixed failing tests (because on changes in WSREP initialization) 2015-07-10 12:49:05 +03:00
Sergei Golubchik
e20be69ecc update test results and 32-bit rdiffs 2015-06-27 09:40:42 +02:00
Sergei Golubchik
d602574542 Merge remote-tracking branch 'github/10.1' into 10.1 2015-06-01 16:01:42 +02:00
Sergei Golubchik
5091a4ba75 Merge tag 'mariadb-10.0.19' into 10.1 2015-06-01 15:51:25 +02:00
Jan Lindström
528378920b Fix test warnings by adding global supression to InnoDB warnings. 2015-05-31 08:10:07 +03:00
Sergei Golubchik
ab8415d983 move encryption tests to a dedicate suite
remove few tests for variables that never existed (merge error)
2015-05-13 14:27:16 +02:00
Sergei Golubchik
49c853fb94 Merge branch '5.5' into 10.0 2015-05-04 22:00:24 +02:00
Daniel Black
574227c90c /run/shm is the general replacement for /dev/shm in newer distros 2015-04-27 21:15:23 +10:00
Kristian Nielsen
0c6904258b Merge MDEV-7975 into 10.1 2015-04-14 14:10:37 +02:00
Kristian Nielsen
5d2b85a297 MDEV-7975: sporadic failure in test case rpl.rpl_gtid_startpos
Add some suppressions that were missing. They are for if a STOP SLAVE is
executed early during IO thread startup, when it is negotiating with the
master. The master connection may be killed in the middle of a
mysql_real_query(), which is not a test failure if it is a network error.

This also caught one real code error, fixed with this commit: The I/O thread
would fail to automatically reconnect if a network error happened while
fetching the value of @@GLOBAL.gtid_domain_id.
2015-04-14 13:03:11 +02:00
Elena Stepanova
34f37aa0c0 MDEV-7643 MTR creates nested links when tests are run with --mem
1) fix 5.5.42 vs 5.5.41 problem, nested links;
2) fix older MariaDB vs MySQL problem, var_auto_** dirs were not
   removed from the tmpfs location.
Both problems were caused by vardir being expanded to real path
too early, in two different places in the script code
2015-03-09 15:27:58 +02:00
Sergei Golubchik
d8c1165c28 fix failing innodb.innodb-page_encryption_log_encryption again
adjust suppression rules after warning message format change
2015-03-03 11:46:44 +01:00
Sergei Golubchik
1f1f977167 Fix test failing when file_key_management_plugin doesn't load
* remove useless suppressions from the test file, when a plugin doesn't
  load, the file isn't executed anyway
* add the suppression to mysql-test-run.pl instead
2015-03-01 16:53:31 +01:00
Kristian Nielsen
41cfdc838e Add error handling on realpath() call.
(Without this, it happened for me that realpath() failed returning
undef for the default vardir. This in turn caused mysql-test-run.pl to
delete the source mysql-test/ directory.)

Backport from 10.1, it's not nice to get one's source directory nuked
by a rouge mysql-test-run.
2015-02-23 13:36:52 +01:00
Kristian Nielsen
734c4c0143 Add error handling on realpath() call.
(Without this, it happened for me that realpath() failed returning
undef for the default vardir. This in turn caused mysql-test-run.pl to
delete the source mysql-test/ directory.)
2015-02-07 09:42:57 +01:00
Sergei Golubchik
4b21cd21fe Merge branch '10.0' into merge-wip 2015-01-31 21:48:47 +01:00
Sergei Golubchik
d9c01e4b4a 5.5 merge 2015-01-21 12:03:02 +01:00
Sergei Golubchik
5d0d6cb129 MDEV-7294 MTR does not use /dev/shm with a out-of-source build
mtr internally does the following:
1. $default_vardir=....
2. $opt_vardir=$default_vardir unless $opt_vardir;
3. $opt_vardir=realpath $opt_vardir unless IS_WINDOWS
4. if ($opt_vardir eq $default_vardir) { .... use /dev/shm ... }

thus we have to realpath $default_datadir too, otherwise
the comparison logic might be broken
2015-01-19 16:28:58 +01:00
Sergei Golubchik
f78078a840 mtr+valgrind: fix jemalloc check to work correctly for bundler and system jemalloc 2015-01-19 14:07:22 +01:00
Jan Lindström
2877c5ecc2 MDEV-7477: Make innochecksum work on compressed tables
This patch ports the work that facebook has performed
to make innochecksum handle compressed tables.
the basic idea is to use actual innodb-code to perform
checksum verification rather than duplicating in innochecksum.cc.
to make this work, innodb code has been annotated with
lots of #ifndef UNIV_INNOCHECKSUM so that it can be
compiled outside of storage/innobase.

A new testcase is also added that verifies that innochecksum
works on compressed/non-compressed tables.

Merged from commit fabc79d2ea976c4ff5b79bfe913e6bc03ef69d42 
from https://code.google.com/p/google-mysql/

The actual steps to produce this patch are:

    take innochecksum from 5.6.14
    apply changes in innodb from facebook patches needed to make innochecksum compile
    apply changes in innochecksum from facebook patches
    add handcrafted testcase

The referenced facebook patches used are:

    91e25120e7
    847fe76ea5
    1135628a5a
    4dbf7c240c
2015-01-19 12:39:17 +02:00
Sergey Vojtovich
ca6b86f420 MDEV-7448 - mtr may leave stale mysqld
Let mtr handle SIGHUP the same way as SIGINT. This solves stale mysqld processes
left after broken/closed ssh connection.
2015-01-14 17:50:38 +04:00
Kristian Nielsen
00649525ee MDEV-7189: main.processlist fails sporadically in buildbot
The test case tried to trigger a DEBUG_SYNC point at the end of a SELECT
SLEEP(5) statement. It did this by using EXECUTE 2, intending to trigger first
at the end of SET DEBUG_SYNC, and second at the end of the SELECT SLEEP(5).

However, in --ps-protocol mode, this does not work, because the SELECT is
executed in two steps (Prepare followed by Execute). Thus, the DEBUG_SYNC got
triggered too early, during the Prepare stage rather than Execute, and the
test case could race and information_schema.processlist see the thread in the
wrong state.

This patch fixes by changing the way the DEBUG_SYNC point is triggered. Now we
add a DBUG injection inside the code for SLEEP(5). This ensures that the
DEBUG_SYNC point is not activated until the SLEEP(5) is running, ensuring
that the following wait for completion will be effective.
2015-01-06 16:32:41 +01:00
Sergei Golubchik
a978bdda1e mysql-5.5.41 merge 2014-12-19 11:35:44 +01:00
Sergei Golubchik
853077ad7e Merge branch '10.0' into bb-10.1-merge
Conflicts:
	.bzrignore
	VERSION
	cmake/plugin.cmake
	debian/dist/Debian/control
	debian/dist/Ubuntu/control
	mysql-test/r/join_outer.result
	mysql-test/r/join_outer_jcl6.result
	mysql-test/r/null.result
	mysql-test/r/old-mode.result
	mysql-test/r/union.result
	mysql-test/t/join_outer.test
	mysql-test/t/null.test
	mysql-test/t/old-mode.test
	mysql-test/t/union.test
	packaging/rpm-oel/mysql.spec.in
	scripts/mysql_config.sh
	sql/ha_ndbcluster.cc
	sql/ha_ndbcluster_binlog.cc
	sql/ha_ndbcluster_cond.cc
	sql/item_cmpfunc.h
	sql/lock.cc
	sql/sql_select.cc
	sql/sql_show.cc
	sql/sql_update.cc
	sql/sql_yacc.yy
	storage/innobase/buf/buf0flu.cc
	storage/innobase/fil/fil0fil.cc
	storage/innobase/include/srv0srv.h
	storage/innobase/lock/lock0lock.cc
	storage/tokudb/CMakeLists.txt
	storage/xtradb/buf/buf0flu.cc
	storage/xtradb/fil/fil0fil.cc
	storage/xtradb/include/srv0srv.h
	storage/xtradb/lock/lock0lock.cc
	support-files/mysql.spec.sh
2014-12-02 22:25:16 +01:00
Sergei Golubchik
3495801e2e 5.5 merge 2014-11-19 17:23:39 +01:00
Sergei Golubchik
cb8f837a3d MDEV-6975 Implement TLS protocol
change SSL methods to be SSLv23 (according to openssl manpage:
"A TLS/SSL connection established with these methods may understand
the SSLv2, SSLv3, TLSv1, TLSv1.1 and TLSv1.2 protocols") from
TLSv1 methods, that go back to the initial SSL implementation
in MySQL in 2001.

OpenSSL default ciphers are different if TLSv1.2 is enabled,
so tests need to take this into account.
2014-11-18 17:57:06 +01:00
Sergei Golubchik
2160646c1d 5.5 merge 2014-11-03 17:47:37 +01:00
Arun Kuruvila
349ac8c9b3 Bug #16581605: REPLACE.EXE UTILITY IS BROKEN IN 5.5
Description:- Replace, the string replacement utility fails
on the windows platform.

Analysis:- The utility takes files and multiple string
pairs as input. In the windows platform, the utility maps
the standard input incorrectly (Considers 0 as the fd for
standard input instead of 2048 on windows). Hence when the
input file is supplied to the utility due to the incorrect
mapping, a bad file descriptor error is generated causing
the utility to exit with an error.

Fix:- "my_fileno()" is used for getting the correct file
despscriptor for standard input.
2014-10-21 16:25:35 +05:30
Kristian Nielsen
5b99f4d330 Increase timeout for check-testcase and friends, in an attempt to cure some random buildbot test failures. 2014-10-28 12:45:39 +01:00
Sergei Golubchik
f62c12b405 Merge 10.0.14 into 10.1 2014-10-15 12:59:13 +02:00
Sergei Golubchik
7f5e51b940 MDEV-34 delete storage/ndb and sql/*ndb* (and collateral changes)
remove:
* NDB from everywhere
* IM from mtr-v1
* packaging/rpm-oel and packaging/rpm-uln
* few unused spec files
* plug.in file
* .bzrignore
2014-10-11 18:53:06 +02:00
Sergei Golubchik
93b50e64a0 cleanup: remove galera/wsrep magic from mtr 2014-10-01 23:38:27 +02:00
Sayantan Dutta
f44113583c Bug #18964545 - ADD MTR SUPPORT FOR DEBUGGING WITH LLDB revert 2014-09-26 11:50:07 +05:30
Sayantan Dutta
4afd7e9ff2 Bug #18964545 ADD MTR SUPPORT FOR DEBUGGING WITH LLDB 2014-09-11 14:48:21 +05:30
Sayantan Dutta
b1d88a21c2 Bug #19361317 - --MANUAL-GDB EFFECTIVELY TRUNCATES OPTION FILE ARGS AT FIRST SEMICOLON 2014-09-03 14:37:00 +05:30
Sayantan Dutta
863bcdfd89 Bug #19361402 - ADD --MANUAL-LLDB OPTION TO MYSQL-TEST-RUN.PL, contributed 2014-09-02 15:12:55 +05:30
Jan Lindström
df4dd593f2 MDEV-6247: Merge 10.0-galera to 10.1.
Merged lp:maria/maria-10.0-galera up to revision 3879.

Added a new functions to handler API to forcefully abort_transaction,
producing fake_trx_id, get_checkpoint and set_checkpoint for XA. These
were added for future possiblity to add more storage engines that
could use galera replication.
2014-08-26 15:43:46 +03:00
Sergei Golubchik
b5ebc21169 sanity
mysql-test/mysql-test-run.pl:
  fix the message
2014-08-10 14:36:17 +02:00
Sergei Golubchik
dc64ba2187 MDEV-6137 better help for SET/ENUM sysvars
Auto-generate the allowed list of values for enum/set/flagset options
in --help output. But don't do that when the help text already has them.

Also, remove lists of values from help strings of various options, where
they were simply listed without any additional information.
2014-06-19 12:02:23 +02:00
Sergei Golubchik
e22c3810f0 MDEV-6243 mysql_install_db or mysql_upgrade fails when default_engine=archive
don't use the default storage engine for mysql.gtid_slave_pos, prefer innodb.
but alter it to myisam in mtr, because many tests run without innodb.
2014-06-05 09:04:43 +02:00
Sergei Golubchik
edf1fbd25b MDEV-6153 Trivial Lintian errors in MariaDB sources: spelling errors and wrong executable bits 2014-05-13 11:53:30 +02:00
Sergei Golubchik
d3e2e1243b 5.5 merge 2014-05-09 12:35:11 +02:00