Commit graph

178558 commits

Author SHA1 Message Date
Alexey Botchkov
1f6ada8da8 MDEV-13306 JSON_CONTAINS returns wrong value.
The 'value' state should be saved to be compared against the
        next array item.
2017-10-05 23:23:39 +04:00
Sergei Golubchik
08c493c62a Merge branch '10.1' into 10.2 2017-10-04 18:36:58 +02:00
Sergei Golubchik
8898c1614d cleanup: remove test include file, clarify the comment 2017-10-04 18:36:30 +02:00
Sergei Golubchik
a62ebf2590 cppcheck harmless warnings
MDEV-13953 mariadb-10.2.9/storage/innobase/row/row0import.cc:3602: possible cut'n'paste error ?
MDEV-13955 mariadb-10.2.9/sql/log_event.cc:7671: possible wrong operator ?
2017-10-04 18:36:30 +02:00
Sergei Golubchik
ebda6e958f enable MongoDB support in CONNECT 2017-10-04 18:36:30 +02:00
Marko Mäkelä
6ca35c1428 Replace a non-ASCII character in a comment 2017-10-04 08:07:41 +03:00
Vladislav Vaintroub
8d413c32dc Fix several truncation and formatting warnings. 2017-10-03 19:43:43 +00:00
Vladislav Vaintroub
4732767981 Fix Windows warnings : fix server_audit not to use my_win_open and Co
functions.

There is no reason to export IO this functionality from server, if it can
be easily implemented with CRT.

Note: for the sake of compatibility, we do not use _open() on Windows,
but open file with CreateFile, with FILE_SHARE_DELETE flag,
so it can be renamed or deleted when open. Also atomic append flag is used.
2017-10-03 19:42:16 +00:00
Vladislav Vaintroub
35a4591e12 Update C/C
Fixes some warnings.
2017-10-03 19:38:28 +00:00
Marko Mäkelä
b716231238 MDEV-13901 Assertion `!space->stop_new_ops' failed in TRUNCATE TABLE with many indexes
fil_space_extend_must_retry(): If the table is being truncated,
do not call fil_flush_low(). The operation is covered by the
truncate log. File extension during TRUNCATE only occurs
if there are many indexes on the table. With smaller innodb_page_size,
the file extension occurs already with fewer indexes on the table.
2017-10-03 20:14:18 +03:00
Sergei Petrunia
ebc2f0dad3 Avoid using HA_POS_ERROR constant when passing around values of type double.
This is error-prone and causes warnings on Windows
2017-10-03 16:23:39 +03:00
Jan Lindström
325e071c11 Merge pull request #457 from smtalk/10.2
wrep_sst_common and wsrep_sst_xtrabackup-v2 bugfixes to read sst parameters from configs
2017-10-03 15:52:27 +03:00
Marko Mäkelä
770231f355 Remove dict_disable_redo_if_temporary()
The function dict_disable_redo_if_temporary() was supposed to
disable redo logging for temporary tables. It was invoked
unnecessarily for two read-only operations:
row_undo_search_clust_to_pcur() and
dict_stats_update_transient_for_index().

When a table is not temporary and not in the system tablespace,
the tablespace should be flagged for MLOG_FILE_NAME logging.
We do not need this overhead for temporary tables. Therefore,
either mtr_t::set_log_mode() or mtr_t::set_named_space() should
be invoked.

dict_table_t::is_temporary(): Determine if a table is temporary.

dict_table_is_temporary(): Redefined as a macro wrapper for
dict_table_t::is_temporary().

dict_disable_redo_if_temporary(): Remove.
2017-10-03 11:37:38 +03:00
Marko Mäkelä
387bdf07ae Remove MYSQL_REPLACE_TRX_IN_THD
The method handlerton::replace_native_transaction_in_thd was added
into MySQL 5.7 in WL#6860, Binlogging XA-prepared transaction.
In MariaDB we do not have that change yet.
2017-10-02 12:51:01 +03:00
Marko Mäkelä
cc3057fde7 Remove dict_table_t::big_rows
The field dict_table_t::big_rows was only used for determining if
the adaptive hash index should be used when the internal InnoDB SQL
parser is used. That parser is only used for modifying the InnoDB
data dictionary, updating persistent tables, and for fulltext indexes.
2017-10-02 11:43:30 +03:00
sachin
bcda03b4fa MDEV-13950 mysqld_safe could not start Galera node after upgrade ...
This is regression caused by patch of mdev-10767.

1st problem :- mktmp is invoked without '-t' or specifing tmp directory.
2nd problem :- Since eval_log_error redirect stderr to stdout  '2>' will
return nothing. and hence $wr_logfile will be empty.

Patch Credit:- Andrii Nikitin
2017-10-02 14:07:22 +05:30
Marko Mäkelä
d6f857ddbc Remove a constant parameter commit=false 2017-10-02 11:27:53 +03:00
Marko Mäkelä
3c4cff3357 Merge 10.1 into 10.2 2017-10-02 11:16:53 +03:00
Marko Mäkelä
ac0b5a2e79 Merge 10.0 into 10.1 2017-10-02 10:45:55 +03:00
Marko Mäkelä
de4a00d4f7 Merge 5.5 into 10.0 2017-10-02 10:42:55 +03:00
Marko Mäkelä
028d253dd7 MDEV-13980 InnoDB fails to discard record lock when discarding an index page
btr_cur_pessimistic_delete(): Discard a possible record lock also in
the case when the record was the only one in the page. Failure to
do this would corrupt the record lock data structures in a partial
rollback (ROLLBACK TO SAVEPOINT or rolling back a row operation due
to some error, such as a duplicate key in a unique secondary index).
2017-10-02 10:38:35 +03:00
Marko Mäkelä
76953c0e45 Remove remaining InnoDB references to the TABLESPACE keyword
MySQL 5.7 allows the creation of InnoDB tables in a user-created
tablespace, but MariaDB does not. Remove the remaining references.

This is a non-functional change.
2017-10-02 10:03:47 +03:00
Martynas Bendorius
36ef89c999 wrep_sst_common: Setting "-c ''" for my_print_defaults just takes no values from config at all. $MY_PRINT_DEFAULTS is already set at the top of the script to have --defaults-file and --defaults-extra-file. If WSREP_SST_OPT_CONF if set to "--defaults-file=/etc/my.cnf --defaults-extra-file=/etc/my.extra.cnf", then "my_print_defaults -c "" --defaults-file=/etc/my.cnf" succeeds, but if WSREP_SST_OPT_CONF is empty - no default values are taken at all.
wsrep_sst_xtrabackup-v2: innobackupex does not support --defaults-extra-file, so ${WSREP_SST_OPT_CONF} cannot be used as an argument, it has been changed to ${WSREP_SST_OPT_DEFAULT}. Removed --defaults-file= from INNOMOVE line, because WSREP_SST_OPT_CONF already includes it (INNOBACKUP was fine, INNOMOVE - not).
2017-10-01 15:50:25 +02:00
Vladislav Vaintroub
157d130a87 Fix some conversion warnings. 2017-09-30 09:26:58 +00:00
Vladislav Vaintroub
298c56cd6a Fix "ib::fatal::~fatal': destructor never returns, potential memory leak"
warning
2017-09-29 18:15:57 +00:00
Vladislav Vaintroub
a3835fad0c Correct definition of ATTRIBUTE_NORETURN on Windows.
Only microsoft compiler, which can be correctly
tested with #ifdef _MSC_VER) has __declspec(noreturn)
2017-09-29 18:15:20 +00:00
Vladislav Vaintroub
96b9c61787 MDEV-13941 Fix high NTFS fragmentation on 10.2
Prior to this patch, creating or even opening any innodb file in 10.2
would set a sparse flag on file. The file extension was done by setting
end of file, without writing zeros. This technique is fine, however
due to sparsedness, it created a hole at the end of the file, which
lead to much higher fragmentation subsequently.

The fix is only to use sparse flag for compressed tables, where holes
are actually wanted, but not for normal tables.
2017-09-29 17:29:21 +00:00
Vladislav Vaintroub
24d9664ad0 In table cache code, fix casts from longlong to long for
'version' variables.

The warnings occur on Windows build, yet they are also are valid
on 32bit Unix.

Fix is to consistently use 64bit integer on all platforms.
2017-09-29 17:27:21 +00:00
Vladislav Vaintroub
8e8a7f85a9 Fix DBUG_PRINT formatting in query cache.
some ulonglong variables were printed as %lu
2017-09-29 17:26:55 +00:00
Marko Mäkelä
7cd4a66de6 Remove unused parameters and dead code
upd_field_set_field_no(): Remove the unused parameter trx, and
remove a debug message. In debug builds, the out-of-bounds access
would still be caught by dict_index_get_nth_col().

trx_undo_update_rec_get_update(): Remove the unnecessary parameter trx.
2017-09-29 16:19:28 +03:00
Marko Mäkelä
358ab5d6b1 Remove remaining references to InnoDB native partitioning
The InnoDB native partitioning (ha_innopart) is a MySQL 5.7
code refactoring exercise that was not merged to MariaDB.
2017-09-29 15:45:58 +03:00
Jan Lindström
b8488e5cf5 MDEV-13932: fil0pagecompress.cc fails to compile with lzo 2.10
Patch contibuted by Gordon Fisher. Thank you for your contribution!
2017-09-29 14:14:22 +03:00
Vladislav Vaintroub
ccf21c9962 fix some conversion warnings 2017-09-28 17:20:46 +00:00
Vladislav Vaintroub
7354dc6773 MDEV-13384 - misc Windows warnings fixed 2017-09-28 17:20:46 +00:00
Vladislav Vaintroub
509928718d MDEV-13384 Fix Windows warnings. thd_alloc functions now use size_t parameters
Fixes some warnings in popular headers.
2017-09-28 17:20:46 +00:00
Vladislav Vaintroub
eba44874ca MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT.
- Fix win64 pointer truncation warnings
(usually coming from misusing 0x%lx and long cast in DBUG)

- Also fix printf-format warnings

Make the above mentioned warnings fatal.

- fix pthread_join on Windows to set return value.
2017-09-28 17:20:46 +00:00
Marko Mäkelä
de7c2e5e54 Avoid implicit conversion from unsigned to signed 2017-09-28 15:12:00 +03:00
Jan Lindström
4d01dd79a1 MDEV-12634: Uninitialised ROW_MERGE_RESERVE_SIZE bytes written to temporary file
After review cleanup.
2017-09-28 12:38:51 +03:00
Monty
5a0cd753be Added missing test if table is transactional or not in Aria
- The line was accidently removed by dd8474b1dc
- The effect of the missing test was just a few extra malloc when creating
  internal temporary tables. Nothing critical, but better got get fixed.
2017-09-28 11:59:28 +03:00
Daniel Bartholomew
4aeec7275f bump the VERSION 2017-09-27 18:27:39 -04:00
Daniel Bartholomew
8d006b9b12 bump the VERSION 2017-09-27 18:25:32 -04:00
Monty
06f7a7620f Fixed compiler warning 2017-09-27 22:19:39 +03:00
Monty
2fdbe15032 Correct test output after variable comment change 2017-09-27 22:19:26 +03:00
Vladislav Vaintroub
c6e8d66e59 Fix buildbot error on windows.
Update.rdiff fle

Also, introduce my_popen()/my_fgets() wrapper function for popen()/fgets()
in mysqltest to workaround a popen() bug in Windows C runtime,
mentioned in MDEV-9409

This workaround was used previously for "exec". From now on, it is also
used are used also for "perl" snippets.
2017-09-27 19:06:06 +00:00
Eugene Kosov
fd2c5d19d0 fix a data race
reapply 6192f0bffa

TSAN warnings count decreased from 206 to 195
2017-09-27 13:47:56 +04:00
Sergei Golubchik
f0e9bebd27 MDEV-13897 SELECT @a := MAX(col) FROM t requires full index scan
fix some old bad merge
2017-09-27 10:22:15 +02:00
Sergei Golubchik
5b01b88e2b update test results on 32-bit 2017-09-27 10:22:15 +02:00
Sergei Golubchik
f7628ca3c2 cleanup: remove useless "inline" keywords
avoid a function call for a commonly used one-liner.
followup for 0627929f62
2017-09-27 10:22:14 +02:00
Sergei Golubchik
7dc1815d5c cleanup: reduce code duplication
remove copy-pasted code, fix meaningless comparison.
followup for ea2162b6aa
2017-09-27 10:18:06 +02:00
Sachin Setiya
0627929f62 MDEV-13787 Crash in persistent stats wsrep_on (thd=0x0)
Problem:- This crash happens because of thd = NULL , and while checking
for wsrep_on , we no longer check for thd != NULL (MDEV-7955). So this
problem is regression of MDEV-7955. However this patch not only solves
this regression , It solves all regression caused by MDEV-7955 patch.

To get all possible cases when thd can be null , assert(thd)/
assert(trx->mysql_thd) is place just before all wsrep_on and innodb test
suite is run. And the assert which caused failure are removed with a physical
check for thd != NULL. Rest assert are removed. Hopefully this method will
remove all current/potential regression of MDEV-7955.
2017-09-27 10:15:08 +05:30