Commit graph

177845 commits

Author SHA1 Message Date
Vicențiu Ciorbaru
cb248f8806 Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
Vicențiu Ciorbaru
5543b75550 Update FSF Address
* Update wrong zip-code
2019-05-11 21:29:06 +03:00
Vicențiu Ciorbaru
c0ac0b8860 Update FSF address 2019-05-11 19:25:02 +03:00
Vicențiu Ciorbaru
f177f125d4 Merge branch '5.5' into 10.1 2019-05-11 19:15:57 +03:00
Vicențiu Ciorbaru
15f1e03d46 Follow-up to changing FSF address
Some places didn't match the previous rules, making the Floor
address wrong.

Additional sed rules:

sed -i -e 's/Place.*Suite .*, Boston/Street, Fifth Floor, Boston/g'
sed -i -e 's/Suite .*, Boston/Fifth Floor, Boston/g'
2019-05-11 18:30:45 +03:00
Michal Schorm
17b4f99928 Update FSF address
This commit is based on the work of Michal Schorm, rebased on the
earliest MariaDB version.

Th command line used to generate this diff was:

find ./ -type f \
  -exec sed -i -e 's/Foundation, Inc., 59 Temple Place, Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \
  -exec sed -i -e 's/Foundation, Inc. 59 Temple Place.* Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \
  -exec sed -i -e 's/MA.*.....-1307.*USA/MA 02110-1335 USA/g' {} \; \
  -exec sed -i -e 's/Foundation, Inc., 59 Temple/Foundation, Inc., 51 Franklin/g' {} \; \
  -exec sed -i -e 's/Place, Suite 330, Boston, MA.*02111-1307.*USA/Street, Fifth Floor, Boston, MA 02110-1335 USA/g' {} \; \
  -exec sed -i -e 's/MA.*.....-1307/MA 02110-1335/g' {} \;
2019-05-10 20:52:00 +03:00
Thirunarayanan Balathandayuthapani
3e8cab51cb MDEV-13893 encryption.innodb-redo-badkey failed in buildbot with page cannot be decrypted
buf_dblwr_process(): Remove the useless warning that a copy of a page
in the doublewrite buffer is corrupted. We already report an error if a
corrupted page cannot be recovered from the doublewrite buffer.

Note: In MariaDB 10.1, the original bug reported in MDEV-13893 could
still be easily repeatable. In MariaDB 10.2.24, MDEV-12699 should
have reduced the probability considerably.
2019-05-10 07:57:01 +03:00
Marko Mäkelä
542f32649b MDEV-18220: race condition in fts_get_table_name()
fts_get_table_name(): Add the parameter bool dict_locked=false.
2019-05-10 07:57:01 +03:00
Marko Mäkelä
f3718a112a MDEV-18220: Backport some code from MariaDB 10.2
fts_get_table_name(): Output to a caller-allocated buffer.

fts_get_table_name_prefix(): Use the lower-overhead allocation
ut_malloc() instead of mem_alloc().

This is based on mysql/mysql-server@d1584b9f38
in MySQL 5.7.4.
2019-05-10 07:57:01 +03:00
Marko Mäkelä
f92749ed36 MDEV-18220: heap-use-after-free in fts_get_table_name_prefix()
fts_table_t::parent: Remove the redundant field. Refer to
table->name.m_name instead.

fts_update_sync_doc_id(), fts_update_next_doc_id(): Remove
the redundant parameter table_name.

fts_get_table_name_prefix(): Access the dict_table_t::name.
FIXME: Ensure that this access is always covered by
dict_sys->mutex.
2019-05-10 07:57:01 +03:00
Marko Mäkelä
5b3f7c0c33 MDEV-18220: Remove some redundant data structures
fts_state_t, fts_slot_t::state: Remove. Replaced by fts_slot_t::running
and fts_slot_t::table_id as follows.

FTS_STATE_SUSPENDED: Removed (unused).

FTS_STATE_EMPTY: Removed. table_id=0 will denote empty slots.

FTS_STATE_RUNNING: Equivalent to running=true.

FTS_STATE_LOADED, FTS_STATE_DONE: Equivalent to running=false.

fts_slot_t::table: Remove. Tables will be identified by table_id.
After opening a table, we will check fil_table_accessible() before
accessing the data.

fts_optimize_new_table(), fts_optimize_del_table(),
fts_optimize_how_many(), fts_is_sync_needed():
Remove the parameter tables, and use the static variable fts_slots
(which was introduced in MariaDB 10.2) instead.
2019-05-10 07:56:55 +03:00
Eugene Kosov
06442e3e9f MDEV-19399 do not call slow my_timer_init() several times
No functional change.

Call my_timer_init() only once and then reuse it from InnoDB and
perfschema storage engines.

This patch speeds up empty test for me like this:
./mtr -mem innodb.kevg,xtradb  1.21s user 0.84s system 34% cpu 5.999 total
./mtr -mem innodb.kevg,xtradb  1.12s user 0.60s system 31% cpu 5.385 total
2019-05-10 07:56:55 +03:00
Vladislav Vaintroub
d0ee3b5500 MDEV-19427 mysql_upgrade_service throws exception upgrading from 10.0 to 10.3
The crash happens when writing into log file.
The reason is likely that the call to WriteFile() was missing a valid
parameter for lpNumberOfBytesWritten. This seems only to happen on ancient
version of Windows.

Since the fix to MDEV-16430 in 141bc58ac9, null pointer was passed
instead of valid pointer.

The fix is to provide a valid lpNumberOfBytesWritten parameter.
2019-05-09 17:41:37 +02:00
Sergey Vojtovich
410585ca63 Removed dead code 2019-05-09 11:13:44 +04:00
Sergey Vojtovich
d0b73fb8d3 MDEV-16060 - InnoDB: Failing assertion: ut_strcmp(index->name, key->name)
A sequel to 9180e86 and 149b754.

ALTER TABLE ... ADD FOREIGN KEY may crash if parent table is updated
concurrently.

Block FK parent table updates even earlier, before intermediate child
table is created.

Use proper charset info for my_casedn_str() and don't update original
identifiers so that lower_cast_table_names == 2 is honoured.
2019-05-09 11:13:44 +04:00
Daniel Bartholomew
3e5526b0df bump the VERSION 2019-05-08 09:54:26 -04:00
Marko Mäkelä
4ad720282d Null merge mariadb-10.1.40 into 10.1 2019-05-08 16:50:51 +03:00
Thirunarayanan Balathandayuthapani
7b93d71a4b MDEV-19387 innodb_ft_result_cache_limit_32 fails on s390x
Fix:
====
1) Combined innodb_ft_result_cache_limit_32.test and
innodb_ft_result_cache_limit_64.test test case in sys_vars suite.

2) Use word_size.inc for combinations of innodb_ft_result_cache_limit test case.
2019-05-08 12:49:08 +05:30
Daniel Bartholomew
f92f313368 bump the VERSION 2019-05-07 16:41:07 -04:00
Sergei Golubchik
101144f279 MDEV-17640 UMASK_DIR configuration for mysql_install_db is not applied to mysql database
regression after 3db6de33b2

in RPMs continue creating the $datadir outside of mysql_install_db.
RPMs put the socket in there, so it cannot be chmod 0700.
2019-05-07 15:25:57 +02:00
Jan Lindström
db9622f1f5 MDEV-19405: Galera test failure on galera_parallel_autoinc_largetrx
Test case was not stable. Fixed also galera_parallel_autoinc_manytrx
as it has the same problem.
2019-05-07 12:51:59 +03:00
Marko Mäkelä
0573744a83 Revert "MDEV-19399 do not call slow my_timer_init() several times"
This reverts commit 8dc670a5e8.

The symbol sys_timer_info was not being exported correctly,
which caused linking failures on some platforms.
2019-05-06 17:15:32 +03:00
Sergei Golubchik
147c1239f1 MDEV-17640 UMASK_DIR configuration for mysql_install_db is not applied to mysql database
regression after 3db6de33b2

in RPMs continue creating the $datadir outside of mysql_install_db.
RPMs put the socket in there, so it cannot be chmod 0700.
2019-05-06 15:57:52 +02:00
Eugene Kosov
c83f837053 MDEV-18214 remove some duplicated MONITOR counters
MONITOR_PENDING_LOG_WRITE
MONITOR_PENDING_CHECKPOINT_WRITE
MONITOR_LOG_IO: read values from log_t members instead of updating own
monitor variables
2019-05-06 16:00:15 +03:00
Eugene Kosov
8dc670a5e8 MDEV-19399 do not call slow my_timer_init() several times
No functional change.

Call my_timer_init() only once and then reuse it from InnoDB and
perfschema storage engines.

This patch speeds up empty test for me like this:
./mtr -mem innodb.kevg,xtradb  1.21s user 0.84s system 34% cpu 5.999 total
./mtr -mem innodb.kevg,xtradb  1.12s user 0.60s system 31% cpu 5.385 total
2019-05-06 15:38:02 +03:00
Jan Lindström
15f065599e MDEV-17883: CREATE TABLE IF NOT EXISTS locking changes in 10.3.10
Based on pull request https://github.com/MariaDB/server/pull/999
by mkaruza@galeracluster.com
2019-05-03 10:12:16 +03:00
Oleksandr Byelkin
b85aa20065 Merge branch '5.5' into 10.1 2019-05-02 17:23:36 +02:00
Daniel Bartholomew
8cda7ab6a2 bump the VERSION 2019-05-02 10:17:05 -04:00
Varun Gupta
ca94ce2a58 MDEV-19352: Server crash in alloc_histograms_for_table_share upon query from information schema
To read histograms for a table, we should check if the allocation of statistics was done or not,
if not done we should not try to read histograms for such a table.
2019-05-02 01:02:56 +05:30
Varun Gupta
57c37e6c3f Adjusting sql_command to align with higher version, this is an adjustment
to the patch for MDEV-17605
2019-05-02 01:02:56 +05:30
Aleksey Midenkov
aba9115426 MDEV-19349 mysql_install_db: segfault at tmp_file_prefix check 2019-05-01 10:15:29 +02:00
Elena Stepanova
e9da78ee92 Updated list of unstable tests for 10.1.39 release 2019-04-30 23:58:14 +03:00
Oleksandr Byelkin
5b035c8456 MDEV-14572: Assertion `! is_set()' failed in Diagnostics_area::set_eof_status upon EXPLAIN UPDATE in PS
Restore EXPAIN flag in SELECT_LEX before execution multi-update by flag in LEX
(the same but in other way made before INSERT/DELETE/SELECT)

Without it, mysql_update() didn't know that there will be EXPLAIN result set and was sending OK at the end of the update, which conflicted with the EOF sent later by EXPLAIN.
2019-04-30 11:38:41 +02:00
Vladislav Vaintroub
a8793a2c02 MDEV-19243 Fix timezone handling on Windows to report standard timezone names 2019-04-30 09:16:39 +02:00
Alexander Barkov
ba9f8776c2 Tests for MDEV-19359 ASAN heap-use-after-free in copy_if_not_alloced / make_sortkey
The patch for MDEV-18738 fixed this problem. Adding tests only.
2019-04-30 11:10:53 +04:00
Alexander Barkov
5fb6444a37 MDEV-18738 ASAN heap-use-after-free in copy_if_not_alloced / copy_fields
copy_if_not_alloced() did not handle situations when
"from" is a constant string pointing to a substring of "to",
so this code part freed "to" but then tried to copy its old (already freed)
content to a new buffer:

  if (to->realloc(from_length))
    return from;
  if ((to->str_length=MY_MIN(from->str_length,from_length)))
    memcpy(to->Ptr,from->Ptr,to->str_length);

Adding a new code piece that catches such constant substrings
and propery reallocs "to" to preserve its important part referenced
by "from".
2019-04-30 10:53:59 +04:00
Daniel Bartholomew
71a748d575 bump the VERSION 2019-04-29 12:18:18 -04:00
Alexander Barkov
021c7216c0 Tests for MDEV-11895 NO_ZERO_DATE affects timestamp values without any warnings
This problem was earlier fixed, possibly by f8a800bec8
and is not repeatable in 10.1-10.4 any more. Adding tests only.
2019-04-29 10:36:57 +04:00
Vladislav Vaintroub
e8778f1c7c MDEV-19265 Server should throw warning if event is created and event_scheduler = OFF 2019-04-28 12:49:59 +02:00
Vladislav Vaintroub
7590861779 MDEV-19276 during connect, write error log warning for ER_DBACCESS_DENIED_ERROR,
if log_warnings > 1.

This makes ER_DBACCESS_DENIED_ERROR handling the same as we do for other
"access denied"
2019-04-28 12:49:59 +02:00
Vladislav Vaintroub
6c9a6bad4f MDEV-19262 Server error message is unclear if event is created and event_scheduler = DISABLED
Change error message.
2019-04-28 12:49:59 +02:00
Vladislav Vaintroub
e116f11f0a MDEV-18131 MariaDB does not verify IP addresses from subject alternative
names

Added a call to X509_check_ip_asc() in case server_hostname represents
an IP address.
2019-04-28 12:49:59 +02:00
Alexander Barkov
eb9b03ab48 MDEV-13335 UTF8 escape wildcard LIKE match has different behavior in different collations
The fix for MDEV-17064 addressed this problem. Adding tests only.
2019-04-28 11:05:50 +04:00
Igor Babaev
d3534d5b45 MDEV-19351 statistics_for_command_is_needed: Conditional jump or move
depends on uninitialised value

Initialized THD::force_read_stats introduced in the patch for MDEV-17605.
Leaving this field uninitialized in the constructor of the THD class may
trigger reading statistical data that is not needed.
2019-04-27 21:31:04 -07:00
Sergei Golubchik
d88dfd8732 MDEV-19350 Server crashes in delete_tree_element / ... / Item_func_group_concat::repack_tree
Item_func_group_concat stores values in `tree`, which is often, but not
always the same as `&tree_base`.
2019-04-27 19:38:39 +02:00
Sergei Golubchik
3fe38574fb gis2 fails in embedded
move privilege specific part of gis2.test to gis_notembedded.test
and the rest to gis.test
2019-04-27 11:28:50 +02:00
Varun Gupta
0d5aabd632 MDEV-19334: bool is_eits_usable(Field*): Assertion `field->table->stats_is_read' failed.
Fixed the assert by making sure that not to use EITS if the column statistics was not allocated.
2019-04-27 14:27:02 +05:30
Alexander Barkov
f239fd5034 MDEV-11015 Assertion failed: precision > 0 in decimal_bin_size upon SELECT with DISTINCT, CAST and other functions
Item_func_min_max::fix_length_and_dec() erroneously set max_length
to UINT32_MAX.

Merge notes:
In 10.3 this problem had been fixed earlier.
During merge to 10.3, do a "null merge" in item_func.cc
2019-04-27 08:44:29 +04:00
Sergei Golubchik
5fe0087a72 CONNECT compilation failure 2019-04-26 20:50:31 +02:00
Sergei Golubchik
f22ed2779f Merge branch 'merge-tokudb-5.6' into 10.1 2019-04-26 18:26:23 +02:00