Commit graph

174742 commits

Author SHA1 Message Date
Monty
c33c638f39 MDEV-7558 analyze_stmt_slow_query_log fails sporadically in buildbot
The reason was that the test was reusing the same log file without deleting it between tests.
Fixed by creating a new log file as part of the test
2016-12-21 22:40:52 +02:00
Sachin Setiya
9e032d6150 MDEV-11490 Galera_3nodes test suite does not suppress Warnings.
Problem:- While running individual tests of Galera_3nodes ,
  We get warnings like '[Warning] WSREP: Could not open state file
  for reading: '. And because of this individual tests fails.

  Solution:- We change suite.pm of Galera_3nodes to supress these warnings.
2016-12-21 09:37:58 +05:30
Nirbhay Choubey
75ab65aece Fix failing galera tests. 2016-12-20 15:31:18 -05:00
Marko Mäkelä
195241e125 Port the test innodb.doublewrite from MySQL 5.7. 2016-12-20 15:03:56 +02:00
Marko Mäkelä
44da95e5ed Merge branch '10.0' into 10.1 2016-12-19 17:15:25 +02:00
Marko Mäkelä
9f863a15b0 MDEV-11602 InnoDB leaks foreign key metadata on DDL operations
Essentially revert MDEV-6759, which addressed a double free of memory
by removing the freeing altogether, introducing the memory leaks.
No double free was observed when running the test suite -DWITH_ASAN.

Replace some mem_heap_free(foreign->heap) with dict_foreign_free(foreign)
so that the calls can be located and instrumented more easily when needed.
2016-12-19 15:57:41 +02:00
Daniel Bartholomew
8e198336c2 bump the VERSION 2016-12-15 10:34:41 -05:00
Vladislav Vaintroub
c13b501162 Fix broken cmake -DBUILD_CONFIG=mysql_release on Windows.
mysql_release.cmake set WITH_JEMALLOC=static, which makes windows
builds fail since there is no jemalloc either static or shared there
2016-12-14 19:20:17 +00:00
Sachin Setiya
d93bbcad36 MDEV-11479 Improved wsrep_dirty_reads
Updated sysvars_wsrep.result file.
2016-12-14 20:13:36 +05:30
Varun Gupta
f41bd7e545 MDEV-11060 sql/protocol.cc:532: void Protocol::end_statement(): Assertion `0' failed
In file sql/opt_range.cc,when calculate_cond_selectivity_for_table() is called with optimizer_use_condition_selectivity=4 then
	- thd->no_errors is set to 1
	- the original value of thd->no_error is not restored to its original value
	- this is causing the assertion to fail in the subsequent queries

Fixed by restoring the original value of thd->no_errors
2016-12-14 12:45:50 +05:30
Sachin Setiya
0c79de2419 MDEV-11479 Improved wsrep_dirty_reads
Tasks:-
         Changes in wsrep_dirty_reads variable
         1.) Global + Session scope (Current: session-only)
         2.) Can be set using command line.
         3.) Allow all commands that do not change data (besides SELECT)
         4.) Allow prepared Statements that do not change data
         5.) Works with wsrep_sync_wait enabled
2016-12-14 09:30:43 +05:30
Sachin Setiya
25a9a3da34 Revert "MDEV-11016 wsrep_node_is_ready() check is too strict"
This reverts commit 7ed5563bbe.
2016-12-14 08:39:36 +05:30
Jan Lindström
72cc73cea2 MDEV-10368: get_latest_version() called too often
Reduce the number of calls to encryption_get_key_get_latest_version
when doing key rotation with two different methods:

(1) We need to fetch key information when tablespace not yet
have a encryption information, invalid keys are handled now
differently (see below). There was extra call to detect
if key_id is not found on key rotation.

(2) If key_id is not found from encryption plugin, do not
try fetching new key_version for it as it will fail anyway.
We store return value from encryption_get_key_get_latest_version
call and if it returns ENCRYPTION_KEY_VERSION_INVALID there
is no need to call it again.
2016-12-13 11:51:33 +02:00
Nirbhay Choubey
67b570af50 MDEV-10545: Server crashed in my_copy_fix_mb on querying I_S and P_S tables
After applying/replaying the transaction, the memory that
stored the query string was also wrongly freed.
2016-12-12 08:51:50 -05:00
Nirbhay Choubey
9c88a54c10 MDEV-11179: WSREP transaction excceded size limit in Galera cluster
... causes MariaDB to crash

On error, the wsrep replication buffer (binlog) is dumped to a file
to aid investigations. In order to also include the binlog header,
FDLE object is also needed. This object is only available for wsrep-
threads.
Fix: Instantiate an FDLE object for non-wsrep threads.
2016-12-12 08:51:50 -05:00
Nirbhay Choubey
dbb06d2eab MDEV-10954: MariaDB Galera: wsrep_sst_common: line 120: which: command not found
Add 'which' to REQUIRES list.
2016-12-12 08:51:50 -05:00
Elena Stepanova
5d9ca52219 Updated the list of unstable tests after the merge 2016-12-12 00:59:40 +02:00
Sergei Golubchik
2f20d297f8 Merge branch '10.0' into 10.1 2016-12-11 09:53:42 +01:00
Elena Stepanova
a629b5172e Updated the list of unstable tests 2016-12-10 23:04:41 +02:00
Vicențiu Ciorbaru
eb4f2e063c MDEV-11533: Roles with trailing white spaces are not cleared correctly
Role names with trailing whitespaces are truncated in length as of
956e92d908 to fix MDEV-8609. The problem
is that the code that creates role mappings expects the string to be null
terminated.

Add the null terminator to account for that as well. In the future
the rest of the code can be cleaned up to never assume c style strings
but only LEX_STRINGS.
2016-12-10 22:23:25 +02:00
Sergei Golubchik
3e8155c637 Merge branch '5.5' into 10.0 2016-12-09 16:33:48 +01:00
Alexey Botchkov
83f7151da5 MDEV-10435 crash with bad stat tables.
Functions from sql/statistics.cc don't seem to expect
        stat tables to fail or to have inadequate structure.
        Table open errors suppressed and some validity
        checks added. Invalid tables reported to the server
        log.
2016-12-09 17:13:43 +04:00
Sergei Golubchik
03dabfa84d MDEV-10713: signal 11 error on multi-table update - crash in handler::increment_statistics or in make_select or assertion failure pfs_thread == ((PFS_thread*) pthread_getspecific((THR_PFS)))
Different fix. Don't allow Item_func_sp to be evaluated unless
all tables are prelocked.

Extend the test case to make sure Item_func_sp::val_str is called
(the table must have at least one row for that).
2016-12-08 23:19:55 +01:00
Sergei Golubchik
ab65db6d3f Revert "MDEV-10713: signal 11 error on multi-table update - crash in handler::increment_statistics or in make_select or assertion failure pfs_thread == ((PFS_thread*) pthread_getspecific((THR_PFS)))"
This reverts commit 035a5ac62a.

Two minor problems and one regression:
1. caching the value in str_result. Other Item methods may use it,
   destroying the cache. See, for example, Item::save_in_field, where
   str_result is moved to use a local buffer (this failed main.grant)
2. Item_func_conv_charset::safe is now set too late, it's initialized
   only in val_str() but checked before that, this failed many tests
   in optimized builds.

to fix 1 - use tmp_result instead of str_result, to fix 2, use
the else branch in the Item_func_conv_charset constructor to set
safe purely from charset properties.

But this introduces a regression, constant strings can no longer be
converted, say, from utf8 to latin1 (because 'safe' will be false).
This fails few tests too. There is no way to fix it without reverting
the commit and converting constants, as before, in the constructor.
2016-12-08 23:15:09 +01:00
Elena Stepanova
870d7589c6 MDEV-11491 binlog_encryption.rpl_checksum fails sporadically in buildbot
The race condition happened if mark_xid_done was considerably delayed,
and an extra Binlog_checkpoint event was written into the binary log
which was later indicated in an error message. Fixed by ensuring
that the event is written before the binary log is rotated to the one
which is used in the output.
2016-12-08 20:49:54 +02:00
Elena Stepanova
8e702bce66 MDEV-11504 binlog_encryption.encrypted_master_switch_to_unencrypted fails sporadically in buildbot
The reason is a simple race condition. Initially the test was meant to synchronize with master
before showing tables, but it turned out that the slave IO thread should fail by this point,
and synchronization was removed along with a server bugfix. Now added an intermediate sync
instead, to make sure that slave has replicated events before the point of failure
2016-12-08 17:05:01 +02:00
Varun Gupta
106664f8e8 MDEV-11162 Assertion `num_records == m_idx_array.size()' failed in Filesort_buffer::alloc_sort_buffer(uint, uint)
Updating result for the group_by_innodb.test
2016-12-08 02:03:34 +05:30
Varun Gupta
822fb79799 MDEV-11162 Assertion `num_records == m_idx_array.size()' failed in Filesort_buffer::alloc_sort_buffer(uint, uint)
When JOIN::destroy() is called for a JOIN object that has
   - join->tmp_join != NULL
   - also has join->table[0]->sort

then the latter was not cleaned up.
This could cause a memory leak and/or asserts in the subsequent queries.

Fixed by adding a cleanup call.
2016-12-08 00:25:48 +05:30
Alexander Barkov
c32d3e16f3 MDEV-10787 Assertion `ltime->neg == 0' failed in void date_to_datetime(MYSQL_TIME*) 2016-12-07 18:05:13 +04:00
Sergei Golubchik
f5e0522d92 MDEV-10388 MariaDB 10.1.x keeps (deleted) ML* files in tmpdir after LOAD DATA completes
truncate unused IO_CACHE backing store files in binlog_cache_data
to release the disk space they were occupying
2016-12-07 13:32:11 +01:00
Alexey Botchkov
1d702ff07c MDEV-8329 MariaDB crashes when replicate_wild_ignore_table is set to NULL.
Rpl_filter::parse_filter_rule() made NULL-safe.
2016-12-07 14:42:08 +04:00
Sergey Vojtovich
e1e1fbc501 Merge pull request #272 from iangilfillan/10.1
Update mysqld_multi man page
2016-12-07 14:05:04 +04:00
iangilfillan
63edd27167 Update mysqld_multi man page 2016-12-07 11:58:40 +02:00
Sergey Vojtovich
2114aa4ac5 Merge pull request #270 from JRonak/MDEV-11354
fixes MDEV-11354 twin include
2016-12-07 13:37:16 +04:00
Sergey Vojtovich
52b590bcf9 Merge pull request #271 from iangilfillan/10.0
Update mysqldump man page
2016-12-07 10:04:10 +04:00
Oleksandr Byelkin
d67ef7a2fb MDEV-10663: Use of Inline table columns in HAVING clause throws 1463 Error
check for VIEW/DERIVED fields
2016-12-06 19:34:25 +01:00
Oleksandr Byelkin
035a5ac62a MDEV-10713: signal 11 error on multi-table update - crash in handler::increment_statistics or in make_select or assertion failure pfs_thread == ((PFS_thread*) pthread_getspecific((THR_PFS)))
Move expression execution out of Item constructor.
2016-12-06 18:53:46 +01:00
Oleksandr Byelkin
f988bcecfd MDEV-10776: Server crash on query
Exclude untouched in prepare phese subqueries from the select/unit tree
because they became unreachable by execution.
2016-12-06 16:14:56 +01:00
iangilfillan
3ada316969 Update mysqldump man page 2016-12-06 13:18:48 +02:00
Sergei Golubchik
74d52ded72 fix binlog_encryption.binlog_incident test 2016-12-06 09:45:51 +01:00
Sergei Golubchik
76546a099c MDEV-10382 Using systemd, mariadb doesn't restart on crashes
when crashing on a signal, don't exit(), but re-signal it, so that
the caller could check WIFSIGNALED()
2016-12-06 09:45:50 +01:00
Sergei Golubchik
5142cd55f4 MDEV-11052 mariadb-service-convert does not work after upgrading to 10.1.18
mysqld_safe: don't close stdout and stderr if --dry-run
2016-12-06 09:45:50 +01:00
Sergei Golubchik
b5aa0f437f MDEV-11319 mysqlbinlog crashes or fails with out of memory while reading some encrypted binlogs
support encrypted binlogs. Not decryption, but at least recognizing
that event are encrypted and prining them as such
2016-12-06 09:45:50 +01:00
Sergei Golubchik
952856c810 MDEV-11288 Server crashes in Binlog_crypt_data::init trying to feed encrypted log without decryption capabilities 2016-12-06 09:45:50 +01:00
Alexander Barkov
46dee0d184 MDEV-10717 Assertion `!null_value' failed in virtual bool Item::send(Protocol*, String*)
The problem was that null_value was not set to "false" on a well-formed row.
If an ill-formed row was followed by a well-forned row, null_value remained
"true" in the call of Item::send() for the well-formed row.
2016-12-06 06:54:52 +04:00
Ronak Jain
d036be7218 fixes MDEV-11354 twin include 2016-12-06 02:29:52 +05:30
Elena Stepanova
611f91605a MDEV-9038 Binlog encryption tests
- created binlog_encryption test suite and added it to the default list
- moved some tests from rpl, binlog and multisource suites to extra
  so that they could be re-used in different suites
- made minor changes in include files
2016-12-05 20:19:01 +02:00
Sergei Golubchik
18cdff6765 MDEV-10293 'setupterm' was not declared in this scope
Check for readline before checking for curses headers, because
MYSQL_CHECK_READLINE fails when curses is not found, but
CHECK_INCLUDE_FILES simply remembers the fact and continues.  So if
there's no curses, MYSQL_CHECK_READLINE will abort, the user will then
installs curses and continue the build. Thus, CHECK_INCLUDE_HEADERS
will remember that there is no curses, but other checks from
MYSQL_CHECK_READLINE will remember that curses are there. It will
result in inconsistent HAVE_xxx defines.
2016-12-05 14:27:45 +01:00
Marko Mäkelä
9199d72759 MDEV-11233 CREATE FULLTEXT INDEX with a token longer than 127 bytes
crashes server

This bug is the result of merging the Oracle MySQL follow-up fix
BUG#22963169 MYSQL CRASHES ON CREATE FULLTEXT INDEX
without merging the base bug fix:
Bug#79475 Insert a token of 84 4-bytes chars into fts index causes
server crash.

Unlike the above mentioned fixes in MySQL, our fix will not change
the storage format of fulltext indexes in InnoDB or XtraDB
when a character encoding with mbmaxlen=2 or mbmaxlen=3
and the length of a word is between 128 and 84*mbmaxlen bytes.
The Oracle fix would allocate 2 length bytes for these cases.

Compatibility with other MySQL and MariaDB releases is ensured by
persisting the used maximum length in the SYS_COLUMNS table in the
InnoDB data dictionary.

This fix also removes some unnecessary strcmp() calls when checking
for the legacy default collation my_charset_latin1
(my_charset_latin1.name=="latin1_swedish_ci").

fts_create_one_index_table(): Store the actual length in bytes.
This metadata will be written to the SYS_COLUMNS table.

fts_zip_initialize(): Initialize only the first byte of the buffer.
Actually the code should not even care about this first byte, because
the length is set as 0.

FTX_MAX_WORD_LEN: Define as HA_FT_MAXCHARLEN * 4 aka 336 bytes,
not as 254 bytes.

row_merge_create_fts_sort_index(): Set the actual maximum length of the
column in bytes, similar to fts_create_one_index_table().

row_merge_fts_doc_tokenize(): Remove the redundant parameter word_dtype.
Use the actual maximum length of the column. Calculate the extra_size
in the same way as row_merge_buf_encode() does.
2016-12-05 15:25:59 +02:00
Sergei Golubchik
02d153c7b9 str2decimal: don't return a negative zero 2016-12-05 10:28:20 +01:00