Commit graph

65242 commits

Author SHA1 Message Date
Elena Stepanova
138e7bffaf Follow up for disabling encrypt_tmp_files and encrypt_binlog by default 2015-09-23 19:06:21 +03:00
Jan Lindström
5c62dd21e8 MDEV-8832: Encryption meta data should not be stored when ENCRYPTED=DEFAULT and innodb-encrypt-tables=OFF 2015-09-23 17:34:36 +03:00
Alexander Barkov
212698b152 MDEV-8253 EXPLAIN SELECT prints unexpected characters
Item_string::clone_item() creates a new Item_string that
points exactly to the same buffer that the original one does.
Later, Item_string::print() uses c_ptr() for the original Item_string,
which reallocs the original buffer, and the clone remain with
the old freed buffer.
Refactoring the code not to use c_ptr() in Item_string::print().
2015-09-23 13:04:28 +04:00
Jan Lindström
180c44e0f6 MDEV-8817: Failing assertion: new_state->key_version != ENCRYPTION_KEY_VERSION_INVALID
Folloup: Made encryption rules too strict (and incorrect). Allow creating
table with ENCRYPTED=OFF with all values of ENCRYPTION_KEY_ID but create
warning that nondefault values are ignored. Allow creating table with
ENCRYPTED=DEFAULT if used key_id is found from key file (there was
bug on this) and give error if key_id is not found.
2015-09-23 10:20:05 +03:00
Sergey Vojtovich
7cbecadf9b MDEV-8664 - plugins.show_all_plugins --embedded fails in buildbot
Failed attempt to load dynamic library with STB_GNU_UNIQUE symbol may corrupt
internal dynamic linker data sructures. This looks like libdl bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=14577

In embedded mode "show plugins soname" fails to dlopen ha_mroonga.so (which
has STB_GNU_UNIQUE) due to undefined reference to wsrep_forced_binlog_format.
It crashes later in subsequent call to dlopen() from  pthread_exit().

Disabled plugins.show_all_plugins until dlopen() bug is fixed.
2015-09-22 16:37:26 +04:00
Jan Lindström
0cf39f401c MDEV-8817: Failing assertion: new_state->key_version != ENCRYPTION_KEY_VERSION_INVALID
Analysis: Problem sees to be the fact that we allow creating or altering
table to use encryption_key_id that does not exists in case where
original table is not encrypted currently. Secondly we should not
do key rotation to tables that are not encrypted or tablespaces
that can't be found from tablespace cache.

Fix: Do not allow creating unencrypted table with nondefault encryption key
and do not rotate tablespaces that are not encrypted (FIL_SPACE_ENCRYPTION_OFF)
or can't be found from tablespace cache.
2015-09-22 15:13:48 +03:00
Alexander Barkov
5c9c8ef1ea MDEV-3929 Add system variable explicit_defaults_for_timestamp for compatibility with MySQL 2015-09-22 14:01:54 +04:00
Jan Lindström
89af0f11a8 MDEV-8770: Incorrect error message when importing page compressed tablespace
Added decompression and after page update recompression support for
import.
2015-09-22 07:35:00 +03:00
Sergei Petrunia
9b9e36ed49 MDEV-8779: mysqld got signal 11 in sql/opt_range_mrr.cc:100(step_down_to)
The crash was caused by range optimizer using RANGE_OPT_PARAM::min_key
(and max_key) to store keys. Buffer size was a good upper bound for
range analysis and partition pruning, but not for EITS selectivity
calculations.

Fixed by making these buffers variable-size. The sizes are calculated
from [pseudo]indexes used for range analysis.
2015-09-21 17:08:27 +03:00
Oleksandr Byelkin
139ce6cb18 fix for 32bit system. Not meaninful for this test but volatile parameters replaced. 2015-09-21 15:17:06 +02:00
Jan Lindström
161db7c18f MDEV-8773: InnoDB innochecksum does not work with encrypted or page compressed tables 2015-09-19 11:31:39 +03:00
Alexander Barkov
b75c003372 MDEV-8816 Equal field propagation is not applied for WHERE varbinary_column>=_utf8'a' COLLATE utf8_general_ci AND varbinary_column='A';
1. Removing the legacy code that disabled equal field propagation in cases
   when comparison is done as VARBINARY. This is now correctly handled by
   the new propagation code in Item_xxx::propagate_equal_fields() and
   Field_str::can_be_substituted_to_equal_item (the bug fix).
2. Also, removing legacy (pre-MySQL-4.1) Arg_comparator methods
   compare_binary_string() and compare_e_binary_string(), as VARBINARY
   comparison is correcty handled in compare_string() and compare_e_string() by
   the corresponding VARBINARY collation handler implemented in my_charset_bin.
   (not really a part of the bug fix)
2015-09-18 23:03:35 +04:00
Oleksandr Byelkin
da3ec3d421 MDEV-7970: EXPLAIN FORMAT=JSON does not print HAVING
Printing non-trivial HAVING added.
2015-09-18 16:08:13 +02:00
Alexander Barkov
79140b0383 MDEV-8793 Wrong result set for SELECT ...
WHERE COALESCE(time_column)=TIME('00:00:00')
            AND COALESCE(time_column)=DATE('2015-09-11')
MDEV-8814 Wrong result for WHERE datetime_column > TIME('00:00:00')
2015-09-18 13:30:44 +04:00
Jan Lindström
c83810f402 Fix test failures seen on buildbot where file_key_management plugin
is linked statically and dynamic plugin is not available.
2015-09-17 16:40:31 +03:00
Oleksandr Byelkin
7dd137c4ac MDEV-6756: map a linux pid (child pid) to a connection id shown in the output of SHOW PROCESSLIST
Added tid (thread ID) for system where it is present.

 ps -eL -o tid,pid,command

shows the thread on Linux
2015-09-17 14:30:58 +02:00
Alexander Barkov
d9b25ae3db MDEV-8466 CAST works differently for DECIMAL/INT vs DOUBLE for empty strings
MDEV-8468 CAST and INSERT work differently for DECIMAL/INT vs DOUBLE for a string with trailing spaces
2015-09-17 11:05:07 +04:00
Nirbhay Choubey
31cf362c21 MDEV-7873: rpl.rpl_domain_id_filter fails sporadically in buildbot #2
Fix the test case : switch to save_master_gtid.inc &
sync_with_master_gtid.inc to sync slave with master.
2015-09-15 08:49:55 -04:00
Jan Lindström
6cc1befcf2 Fix test to do proper cleanup. 2015-09-15 14:11:33 +03:00
Jan Lindström
4d3f680c95 MDEV-8772: Assertion failure in file ha_innodb.cc line 20027 when importing page compressed and encrypted tablespace using incorrect keys
Add error handling to decryp function when decrypt fails during
import.
2015-09-14 14:11:23 +03:00
Jan Lindström
ddaddf1019 MDEV-8769: Server crash at file btr0btr.ic line 122 when defragmenting encrypted table using incorrect keys
Add error handling when getting block from encrypted table and decryption
fails.
2015-09-14 12:15:27 +03:00
Jan Lindström
71b1444601 MDEV-8768: Server crash at file btr0btr.ic line 122 when checking encrypted table using incorrect keys
Add error handling to btr_validate_index when index root block
can't be read because block decryption fails.
2015-09-14 11:01:14 +03:00
Jan Lindström
d581ef5b2c MDEV-8764: Wrong error when encrypted table can't be decrypted.
Add a new error message when table is encrypted but decryption
fails. Use this new error message on InnoDB/XtraDB.
2015-09-14 08:27:36 +03:00
Elena Stepanova
80089a60e5 Follow-up for MDEV-8675 and MDEV-8676
type_spatial_indexes test is now be re-enabled, and the new result file
can be used for creating engine-specific rdiffs
2015-09-14 03:12:54 +03:00
Alexander Barkov
6cc2e7ea5d MDEV-8795 Equal expression propagation does not work for temporal literals 2015-09-13 23:32:10 +04:00
Jan Lindström
9b577edd50 MDEV-8577: With enforce-storage-engine mysql_upgrade corrupts the schema:
ALTER TABLE should either bypass enforce-storage-engine, or mysql_upgrade
should refuse to run

Allow user to alter contents of existing table without enforcing
storage engine. However, enforce storage engine on ALTER TABLE
x ENGINE=y;
2015-09-12 13:16:05 +03:00
Kristian Nielsen
1e9ab68e4a Merge. 2015-09-12 00:44:20 +02:00
Kristian Nielsen
528729fc5d MDEV-8193: UNTIL clause in START SLAVE is sporadically disobeyed by parallel replication
Adjust the test case to try and avoid some sporadic failures on loaded test
hosts.

The wait for SQL thread to stop may complete before worker threads
have completed.
2015-09-12 00:42:21 +02:00
Alexander Barkov
96f4a906ce MDEV-8675 Different results of GIS functions on NULL vs NOT NULL columns 2015-09-11 23:26:02 +04:00
Alexander Barkov
aaf6334b64 MDEV-8709 Row equality elements do not get propagated
The problem was fixed earlier by one of the MDEV-8728 subtasks.
Adding a test case only.
2015-09-11 15:48:34 +04:00
Alexander Barkov
9158212a27 MDEV-8369 Unexpected impossible WHERE for a condition on a ZEROFILL field
Disable IDENTITY_SUBST propagation for ZEROFILL columns,
as discussed with Sergei.
2015-09-11 15:41:53 +04:00
Kristian Nielsen
df9b8aee58 Merge MDEV-8193 into 10.1
Conflicts:
	sql/rpl_rli.cc
2015-09-11 12:01:48 +02:00
Kristian Nielsen
51eaa7fe53 MDEV-8193: UNTIL clause in START SLAVE is sporadically disobeyed by parallel replication
The code was using the wrong variable when comparing the binlog name
for the UNTIL position. This could cause the comparison to fail after
binlog rotation, in turn causing the UNTIL clause to not trigger slave
stop.
2015-09-11 10:51:56 +02:00
Alexander Barkov
6f302d9f6c MDEV-8755 Equal field propagation is not performed any longer for the IN list when multiple comparison types 2015-09-11 11:35:15 +04:00
Alexander Barkov
0302efca7f MDEV-8705 Wrong result for SELECT..WHERE latin1_bin_column='a' AND latin1_bin_column='A'
MDEV-8712 Wrong result for SELECT..WHERE latin1_bin_column=_latin1'a' AND latin1_bin_column='A'
2015-09-11 09:20:40 +04:00
Alexander Barkov
4aebba3aeb MDEV-8740 Wrong result for SELECT..WHERE year_field=10 AND NULLIF(year_field,2011.1)='2011'
MDEV-8754 Wrong result for SELECT..WHERE year_field=2020 AND NULLIF(year_field,2010)='2020'
Problems:
1. Item_func_nullif stored a copy of args[0] in a private member m_args0_copy,
   which was invisible for the inherited Item_func menthods, like
   update_used_tables(). As a result, after equal field propagation
   things like Item_func_nullif::const_item() could return wrong result
   and a non-constant NULLIF() was erroneously treated as a constant
   at optimize_cond() time.
   Solution: removing m_args0_copy and storing the return value item
   in args[2] instead.
2. Equal field propagation did not work well for Item_fun_nullif.
   Solution: using ANY_SUBST for args[0] and args[1], as they are in
   comparison, and IDENTITY_SUBST for args[2], as it's not in comparison.
2015-09-10 17:13:35 +04:00
Alexander Barkov
8e553c455c MDEV-8785 Wrong results for EXPLAIN EXTENDED...WHERE NULLIF(latin1_col, _utf8'a' COLLATE utf8_bin) IS NOT NULL 2015-09-10 15:01:44 +04:00
Alexander Barkov
4278d6d402 MDEV-8786 Wrong result for SELECT FORMAT=JSON * FROM t1 WHERE a=_latin1 0xDF 2015-09-10 14:04:52 +04:00
Alexander Barkov
39b46ae934 MDEV-8706 Wrong result for SELECT..WHERE time_column=TIMESTAMP'2015-08-30 00:00:00' AND time_column='00:00:00' 2015-09-09 15:39:09 +04:00
Alexander Barkov
3fcd84c289 MDEV-8741 Equal field propagation leaves some remainders after simplifying WH ERE zerofill_column=2010 AND zerofill_column>=2010 2015-09-09 08:11:43 +04:00
Nirbhay Choubey
4cb6edba78 Update failing galera tests 2015-09-08 17:46:03 -04:00
Nirbhay Choubey
28ad6a7f28 MDEV-8763: Galera tests failures with --ps-protocol
(MDEV-8617: Post-fix for 10.1)
* Reset THD's PS members before returning when node is
not ready
* Add CF_SKIP_WSREP_CHECK flag to COM_STMT_XXX commands
* Skip TO replication of COM_STMT_PREPAREs for MyISAM
* Updated tests
2015-09-08 17:43:48 -04:00
Sergei Golubchik
bbb238ce75 disable main.max_statement_time test 2015-09-08 15:47:28 +02:00
Sergei Golubchik
edb37ae3c7 disable encrypt_tmp_files and encrypt_binlog by default 2015-09-08 15:47:27 +02:00
Alexander Barkov
de269f2f1f MDEV-8766 Wrong result for SELECT..WHERE LENGTH(time_column)=8 AND time_column=TIMESTAMP'2001-01-01 10:20:31' 2015-09-08 16:02:29 +04:00
Jan Lindström
509b836623 MDEV-8708: InnoDB temp file encryption
Added encryption support for online alter table where InnoDB temporary
files are used. Added similar support also for tables containing
full text-indexes.

Made sure that table remains encrypted during discard and import
tablespace.
2015-09-08 08:38:12 +03:00
Alexander Barkov
42574427e6 MDEV-8699 Wrong result for SELECT..WHERE HEX(date_column)!='323030312D30312D3031' AND date_column='2001-01-01x' 2015-09-07 17:43:53 +04:00
Alexander Barkov
2029163999 MDEV-8742 Wrong result for SELECT..WHERE view_latin1_swedish_ci_field='a' COLLATE latin1_bin
The fix for MDEV-8749 also fixed MDEV-8742.
Just adding the test case from the bug report.
2015-09-07 11:07:40 +04:00
Alexander Barkov
bf7a2bb12c MDEV-8704 Wrong result for SELECT..WHERE LENGTH(double_column)!=6 AND double_column=100e0 2015-09-07 10:50:27 +04:00
Alexander Barkov
e7dcec5471 MDEV-8703 Wrong result for SELECT..WHERE LENGTH(decimal_10_1_column)!=3 AND decimal_10_1_column=1.10 2015-09-07 08:55:55 +04:00