Commit graph

167807 commits

Author SHA1 Message Date
Alexey Botchkov
7e44eabdad MDEV-11205 UDF_ARGS "attribute_lengths" incorrect value.
Set name_length properly in Item_idnet constructors.
2017-07-18 13:19:34 +04:00
Daniel Black
c9883b7591 ma_check/mi_check: maria_repair_parallel initialization for !quick
end_io_call uses uninitialized values from the new_data_cache

As such we the buffer 0 and check this before calling end_io_cache on it.

Thanks Sergey Vojtovich for the review and for this solution.

Found by Coverity (ref 972481).
2017-07-18 10:09:16 +04:00
Elena Stepanova
7d309b5f74 Add storage_engine/parts overlay for MyISAM 2017-07-18 01:38:13 +03:00
Gipson Pulla
bed4252c15 Merge branch 'mysql-5.5.57-release' into mysql-5.5 2017-07-17 16:47:22 +05:30
Alexander Barkov
d023156782 MDEV-8692 prefschema test failures on ARM (on Debian build system)
A few tests assumes that the CYCLE timer is always available,
which is not true on some platforms (e.g. ARM).
Fixing the tests not to reply on the CYCLE availability.
2017-07-17 12:34:58 +02:00
Sergei Golubchik
6efee22541 change flags as it was done in MyISAM
in ab785bfe5b
2017-07-15 08:44:14 +02:00
Daniel Black
ec4e39558e ma_recovery: unintentional order of operations
Coverity report this as:
CID 971840 (#1 of 1): Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
result_independent_of_operands: 4 | (flags & 1) is always true regardless of the values of its operands. This occurs as the logical first operand of "?:".

The C order of precidence has | of higher precidence than ?:. The
intenting implies an | of the 3 terms.

Adjust to intented meaning.
2017-07-15 08:44:14 +02:00
Sergei Golubchik
0375f2e273 MDEV-12144 Signal 6 crash corrupts ibd files
Avoid using STDERR_FILENO. The server uses freopen(stderr),
so stderr can be on any file descriptor.
2017-07-15 08:44:14 +02:00
Daniel Black
7338d3f221 client: mysql - fix type
field_names[x][y] is a pointer

client/mysql.cc: In function 'void build_completion_hash(bool, bool)':
client/mysql.cc:2855:37: error: invalid conversion from 'char' to 'char*' [-fpermissive]
       field_names[i][num_fields*2]= '\0';

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2017-07-14 10:57:57 +04:00
Sergei Golubchik
27bc13b7a2 MDEV-12136 SELECT COUNT(DISTINCT) returns the wrong value when tmp_table_size is limited
Same MDEV, second bug.
Merge buffer must fit at least MERGEBUFF2 (that is, 15) key values.
Because merge_index() can merge that many buffers, and
merge_many_buff() leaves that many buffers unmerged.
2017-07-13 11:23:54 +02:00
Sergei Golubchik
e7f51e5d26 MDEV-12136 SELECT COUNT(DISTINCT) returns the wrong value when tmp_table_size is limited
use the correct value for the merge_buffer size, max_in_memory_size
is too small and merge_walk() fails.

also: remove a cast.
2017-07-12 19:20:52 +02:00
Sergei Golubchik
181d9d2892 MDEV-13180 Unused left join causes server crash
already fixed by be55bbc2b2
just add a test case
2017-07-12 17:46:27 +02:00
Sergei Golubchik
05b678bc8c MDEV-12489 The select stmt may fail due to "having clause is ambiguous" unexpected
only compare field references with an alias (from the SELECT clause)
when this reference doesn't specify an explicit table name part.
2017-07-12 17:46:19 +02:00
Sergei Golubchik
c83d6ff881 compiler warning
remove unused variable
2017-07-12 13:55:04 +02:00
Sergei Golubchik
d2e66a6f19 MDEV-7828 Assertion `key_read == 0' failed in TABLE::enable_keyread with SELECT SQ and WHERE SQ
already fixed by a7ed4644a6.
just add a test case,
2017-07-12 13:46:15 +02:00
Sergei Golubchik
be55bbc2b2 MDEV-7826 Server crashes in Item_subselect::enumerate_field_refs_processor
upper->item can be NULL if we're referring to an aggregate function
2017-07-12 12:49:29 +02:00
Sergei Golubchik
c5975eaea1 MDEV-7339 Server crashes in Item_func_trig_cond::val_int
Item_in_subselect::pushed_cond_guards[] array is allocated only when
left_expr->maybe_null. And it is used (for row expressions) when
left_expr->element_index(i)->maybe_null.

For left_expr being a multi-column subquery, its maybe_null is
always false when the subquery doesn't use tables (see
Item_singlerow_subselect::fix_length_and_dec()
and subselect_single_select_engine::fix_length_and_dec()),
otherwise it's always true.

But row elements can be NULL regardless, so let's always allocate
pushed_cond_guards for multi-column subqueries, no matter whether
its maybe_null was forced to true or false.
2017-07-12 10:39:02 +02:00
Balasubramanian Kandasamy
790770c264 Bug#26400146 - 5.5 AND 5.6 DOCKER PACKAGES MISSING MYSQLCHECK UPGRADE NOT POSSIBLE
- Add mysqlcheck tool to docker rpms for upgrade
2017-07-07 17:43:40 +05:30
Sergei Golubchik
f305a7ce4b bugfix: long partition names 2017-07-06 19:09:47 +02:00
Oleksandr Byelkin
a7ed4644a6 MDEV-10146: Wrong result (or questionable result and behavior) with aggregate function in uncorrelated SELECT subquery
When outer reference resolved in a VIEW it still should mark aggregate function resolving border.
2017-07-05 09:07:50 +02:00
Daniel Black
23ac2dd2a4 sql_class: incorrect assignment in Security_context::destroy
Found by Coverity (id 971843).

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2017-07-04 10:26:29 +04:00
Daniel Black
89b81a9a24 ma_pagecache: release lock in pagecache_read
make_lock_and_pin didn't release the lock so we should.

Found by Coverity (id 972095).
2017-07-03 13:31:09 +04:00
Daniel Black
2328860379 ma_loghandler: translog_set_only_in_buffers failed to release lock
Release the lock for the error path.

Found by Coverity (id 972093).
2017-07-03 13:14:05 +04:00
Daniel Black
051f90a534 ma_loghandler: release file_header_lock on error
translog_stop_writing doesn't release a lock (though
does to a DBUG_ASSERT).

Better to just release the lock.

Found by Coverity id 972092
2017-07-03 13:05:35 +04:00
Daniel Black
623c3f6731 thread_group_close: release mutex in all branches
Found by Coverity scan - id 92087
2017-07-03 12:51:30 +04:00
Daniel Black
cb870674d4 ha_archive::info remove hidden assignment
max_data_file_size is overwritten in next statement
so this assignment didn't ever get used.

Found by Coverity (ID 1409644)
2017-07-03 11:47:44 +04:00
Daniel Black
9fc71eebb6 item_timefunc: identical operands
CID 971836 (#1 of 1): Same on both sides (CONSTANT_EXPRESSION_RESULT)
pointless_expression: The expression val != end && val != end does not
accomplish anything because it evaluates to either of its identical
operands, val != end.
2017-07-03 11:15:44 +04:00
Sergei Golubchik
4db6e1e4a5 uninitialized variable 2017-06-29 20:47:08 +02:00
Sergei Golubchik
d5cd334504 MDEV-13187 incorrect backslash parsing in clients
cover ANSI_QUOTES and NO_BACKSLASH_ESCAPES in mysqltest
2017-06-27 14:00:37 +02:00
Sergei Golubchik
39385ff7b2 MDEV-13187 incorrect backslash parsing in clients
don't do backslash escapes inside backticks
2017-06-27 13:25:50 +02:00
Sergei Golubchik
ded614d7db MDEV-12778 mariadb-10.1 FTBFS on GNU/Hurd due to use of PATH_MAX 2017-06-19 16:34:50 +02:00
Sergei Golubchik
48429359d6 MDEV-4646 No mysqld-debug or debuginfo in MariaDB-Server RPM 2017-06-18 21:53:45 +02:00
Daniel Black
e548e2184b Use CPACK_RPM_FILE_NAME="RPM-DEFAULT"
This has been implemented in for cmake-3.6 to match distro version
of what the filename should look like.

Thanks to Domen Vranka for the suggestion.
2017-06-18 21:53:45 +02:00
Sergei Golubchik
c7141fa75d MDEV-13002 mysqltest regex replace results in incorrect result
regex didn't replace lines that were split by 16K chunk reads.
2017-06-18 21:53:45 +02:00
Sergei Golubchik
c661b4d0fb MDEV-13017 LOCK TABLE fails with irrelevant error while working with tables affected by ANSI_QUOTES 2017-06-14 13:22:37 +02:00
Sergei Golubchik
5cbbfe9f54 cleanup: remove duplicate code 2017-06-14 11:31:02 +02:00
Sergei Golubchik
918e47030b MDEV-13063 Server crashes in intern_plugin_lock or assertion `plugin_ptr->ref_count == 1' fails in plugin_init
if a forced plugin is disabled (for any reason, e.g. invalid command-line
option) - it's an error
2017-06-14 11:30:32 +02:00
Sergei Golubchik
70b94c35d7 cleanup: move common test into a function 2017-06-14 11:27:36 +02:00
Igor Babaev
b850fc66ca Fixed the bug mdev-12855.
This is actually a legacy bug:
SQL_SELECT::test_quick_select() was called
with SQL_SELECT::head not set.
It looks like that this problem can be
reproduced only on queries with ORDER BY
that use IN predicates converted to semi-joins.
2017-06-07 22:54:57 -07:00
Igor Babaev
151f4e9b4a Fixed the bug mdev-12963.
This patch corrects the fix for bug mdev-7599.
When the min/max optimization of the function
opt_sum_query() optimizes away all tables of
a subquery it should not ever be rolled back.
2017-06-07 16:29:55 -07:00
Igor Babaev
c258ca2463 Fixed the bug mdev-12838.
If the optimizer chose an execution plan where
a semi-join nest were materialized and the
result of materialization was scanned to access
other tables by ref access it could build a key
over columns of the tables from the nest that
were actually inaccessible.
The patch performs a proper check whether a key
that uses columns of the tables from a materialized
semi-join nest can be employed to access outer tables.
2017-06-07 12:45:32 -07:00
Piotr Obrzut
34cd74e521 Bug#26171638 MYSQL 5.5.57 - MSI COMMUNITY PACKAGES NOT GETTING INSTALLED
Corrected the revert.

(cherry picked from commit f637e524bf9b692c3ed46d856e2beac193b42a3e)
2017-06-05 08:33:48 +02:00
Piotr Obrzut
b5258c7134 Bug#26171638 MYSQL 5.5.57 - MSI COMMUNITY PACKAGES NOT GETTING INSTALLED
Corrected the revert.
2017-06-05 08:09:37 +02:00
Piotr Obrzut
c3e6a032c3 Bug#26171638 MYSQL 5.5.57 - MSI COMMUNITY PACKAGES NOT GETTING INSTALLED
Temporary revert of the VS2008 redist check.

(cherry picked from commit 36ec550fe5fa6b2a997cb39d3b9e33988f525c96)
2017-06-02 23:08:48 +05:30
Piotr Obrzut
88915a3090 Bug#26181622 MSI BUILD FAIL DUE TO DUPLICATED FILE ID
Fixed generated mysql_server.wxs not to contain duplicates, or too long ids

(cherry picked from commit bf47fb74dcc3e84057314817c56e6f8e05af094c)
2017-06-02 23:08:32 +05:30
Piotr Obrzut
1bb43334fc Bug#26171638 MYSQL 5.5.57 - MSI COMMUNITY PACKAGES NOT GETTING INSTALLED
Temporary revert of the VS2008 redist check.
2017-06-02 19:17:30 +02:00
Piotr Obrzut
def68691ce Bug#26181622 MSI BUILD FAIL DUE TO DUPLICATED FILE ID
Fixed generated mysql_server.wxs not to contain duplicates, or too long ids
2017-06-01 16:08:27 +02:00
Marko Mäkelä
2cb94aa1b7 MDEV-11626 innodb.innodb-change-buffer-recovery fails for xtradb
buf_page_get_gen(): Remove the error log messages about
page flushing and eviction when
innodb_change_buffering_debug=1 is in effect.
2017-05-29 13:07:23 +03:00
Balasubramanian Kandasamy
58e2ca68bb Raise version number after cloning 5.5.57 2017-05-29 14:52:50 +05:30
Venkatesh Duggirala
bb9e547a86 Bug#18950197 RPL_SEMI_SYNC_UNINSTALL_PLUGIN FAILS BECAUSE
RPL_SEMI_SYNC_MASTER_CLIENTS=1

Analysis: Uninstalling rpl_semi_sync_slave on slave
          will trigger removing the slave logic on Master which
          will reduce Rpl_semi_sync_master_clients by one number.
          But it happens asynchronously on Master. Having assert
          to check this value with zero will have problems on
          slow pb2 machines.

Fix: Change assert into wait_for_status_var condition.
2017-05-25 12:39:20 +05:30