Commit graph

167244 commits

Author SHA1 Message Date
Sergey Vojtovich
6c0e231c02 MDEV-9945 - main.kill_processlist-6619 fails sporadically
SHOW PROCESSLIST output can be affected by not completed concurrent queries.
Removed this affected SHOW PROCESSLIST since it doesn't seem to affect original
problem.
2016-04-19 14:05:52 +04:00
Sergey Vojtovich
18ff6f654b MDEV-9944 - main.events_2 fails sporadically
Fixed wait condition in test case to actually wait for get_lock() completion
(not for lock acquisition as it was before). This removes sporadic extra row in
subsequent processlist queries.
2016-04-19 12:38:00 +04:00
Alexander Barkov
6fd54c01bb MDEV-9521 Least function returns 0000-00-00 for null date columns instead of null
Item_func_ifnull::date_op() and Item_func_coalesce::date_op() could
erroneously return 0000-00-00 instead of NULL when get_date()
was called with the TIME_FUZZY_DATES flag, e.g. from LEAST().
2016-04-18 23:15:15 +04:00
Alexander Barkov
777c2131dd MDEV-9862 Illegal mix of collation, when comparing column with CASE expression 2016-04-02 00:04:47 +04:00
Sergei Golubchik
11b77e9b18 MDEV-9527 build FAILs with GCC 5.1 with release supported "-std=c+11"
5.5 part of the fix
2016-03-18 16:55:11 +01:00
Sergei Golubchik
fc2c1e4385 MDEV-9733 Server crashes in lf_pinbox_real_free on replication slaves
don't allocate all the stack, leave some stack for
function calls.

To test I added the following line:
  alloca_size = available_stack_size() - X
at X=4096 or less mysqld crashed, at 8192 mtr test passed.
2016-03-17 21:30:33 +01:00
Sergei Golubchik
0b9fb9aea9 MDEV-9568 mysqlcheck crashes with nonexistent table name
remove erroneous free() call
2016-03-17 11:04:40 +01:00
Elena Stepanova
c29e450e37 MDEV-4070 sys_vars.secure_file_priv fails sporadically if it's executed with --mem
The test created a file in location relative to the datadir
(a few levels above datadir).
The file was created by MariaDB server (via INTO OUTFILE), and
later removed by mysqltest (via remove_file). The problem is that
when the vardir is a symlink, MariaDB server and mysqltest can
resolve such paths differently. MariaDB server would return back
to where the symlink is located, while mysqltest would go above
the real directory. For example, if the test is run with --mem,
and /bld/5.5/mysql-test/var points at /dev/shm/var_auto_X, then
SELECT INTO OUTFILE created a file in /bld/5.5/mysql-test , but
remove_file would look for it in /dev/shm/.

The test is re-written so that all paths are resolved in perl,
the logic itself hasn't changed.
2016-02-26 03:02:07 +02:00
Sergei Golubchik
ceba41c095 MDEV-9299 Test main.events_2 incompatible with Debian reproducibility testing framework
Debian tests are run in 2017, update the test to
use 2027 as a "future".
2016-02-17 20:58:32 +01:00
Vladislav Vaintroub
e1385f2083 fix buffer overrun 2016-02-15 13:02:57 +01:00
Sergei Golubchik
3889b19f54 more strict ipv6_ok check in mtr
don't use ipv6 is the check fails for any reason. for example, an
ancient solaris perl didn't have sockaddr_in6() in Socket at all.
2016-02-15 12:51:35 +01:00
Sergei Golubchik
8f5030ea86 fix my_gethwaddr() for solaris
it caused feedback plugin tests to fail
2016-02-15 12:51:35 +01:00
Sergei Golubchik
95740bc5c5 dtrace in cmake
1. ignore generated dtrace files
2. don't rewrite probes_mysql_nodtrace.h in-place
2016-02-15 12:51:35 +01:00
Sergei Golubchik
a5d9597e97 better inline check
1. check that unused inline functions are removed
2. only allow compilation if they are or if the check if overridden
3. with CMAKE_GENERATOR=Makefiles, use all flags when testing
   (e.g. both CMAKE_C_FLAGS and CMAKE_C_FLAGS_DEBUG if
   CMAKE_BUILD_TYPE=Debug). This is because
 - on Solaris with the SunPro compiler, default CMAKE_C_FLAGS_xxx
   values contain -xO2 (for Release and RelWithDebInfo)
   and -g (for RelWithDebInfo and Debug)
 - proper inlining only works at -xO4 without -g
 - so if CMAKE_C_FLAGS has -xO4, inlining would work in
   configure.cmake (before this fix) and fail during actual compilation

also remove the outdated check for inline from myu_global.h
2016-02-15 12:51:35 +01:00
Sergei Golubchik
5f078cc8ff compilation errors on sparc sun studio 10
1. unused static inline functions are only removed at -xO4,
   otherwise test binaries will depend on various mysys
   symbols that they don't use. Link test with libmysys.

2. Sphinx - don't instantiate (explicitly) templates before
   they're defined. Or, rather, don't instantiate them explicitly at
   all.

3. GIS - don't use anonymous unions and structs.
2016-02-15 12:51:35 +01:00
Vicențiu Ciorbaru
2a47817896 MDEV-9225 mysql_upgrade segfault due to missing /etc/my.cnf.d
In case of missing includedir file, we would attempt to free a NULL
pointer. Make sure to guard against that.
2016-02-14 18:33:20 +02:00
Vicențiu Ciorbaru
b7dc830274 Fix memory leak when failing to read config file
In the case of error during my_load_defaults, we would not free the
args array.
2016-02-14 18:31:48 +02:00
Alexey Botchkov
93e9d81efa Errorneous PSI declaration line fixed. 2016-02-12 12:04:11 +04:00
Alexander Barkov
a9a08b1e2f MDEV-9371 select insert('a',2,1,'b') doesn't return expected 'a' 2016-02-10 10:03:47 +04:00
Vicențiu Ciorbaru
3c5c04bd2b MDEV-7122: Assertion `0' failed in subselect_hash_sj_engine::init
Fix test failure when using maria small-block size. We need to query
the max_key_length and max_key_parts based on the the tmp table engine.
2016-02-10 04:00:08 +02:00
Oleksandr Byelkin
6b614c620e MDEV-7765: Crash (Assertion `!table || (!table->write_set || bitmap_is_set(table->write_set, field_index) || bitmap_is_set(table->vcol_set, field_index))' fails) on using function over not created table
Problem was that created table was not marked as used (not set query_id) and so opening tables for stored function pick it up (as opened place holder for it) and used changing TABLE internals.
2016-02-09 18:58:54 +01:00
Vicențiu Ciorbaru
775cccca9f MDEV-7122: Assertion `0' failed in subselect_hash_sj_engine::init
The select mentioned in the bug attempted to create a temporary table
using the maria storage engine. The table needs to have primary keys such that
duplicates can be removed. Unfortunately this use case has a longer
than allowed key and the tmp table got created without a temporary key.
We must not allow materialization for the subquery if the total key
length and key parts is greater than what the storage engine supports.
2016-02-09 19:02:25 +02:00
Sergei Golubchik
01628ce35a Merge branch 'bb-5.5-serg' into 5.5 2016-02-09 14:08:36 +01:00
Sergei Golubchik
afce5415de Merge branch 'merge-xtradb-5.5' into 5.5
5.5.47-37.7
2016-02-09 14:06:45 +01:00
Sergei Golubchik
5d478f5339 Bug#19817021
test case for ALTER TABLE view CHECK PARTITION
2016-02-09 11:29:06 +01:00
Sergei Golubchik
6703e5b6da Bug#20691429 ASSERTION `CHILD_L' FAILED IN STORAGE/MYISAMMRG/HA_MYISAMMRG.CC:631
test case
2016-02-09 11:28:59 +01:00
Sergei Golubchik
dece4bc57a cleanup: make assert more readable 2016-02-09 11:28:44 +01:00
Sergei Golubchik
63d3ccdfee Bug#21205695 DROP TABLE MAY CAUSE SLAVES TO BREAK
Correct fix. Generate the query in the client charset,
not in the system one.
2016-02-09 11:28:13 +01:00
Sergei Golubchik
f3444df415 Merge branch 'mysql/5.5' into 5.5
reverted about half of commits as either not applicable or
outright wrong
2016-02-09 11:27:40 +01:00
Alexey Botchkov
ea0c3fc87b MDEV-9438 backport feedback-http-proxy to 5.5 and 10.0.
The http-proxy option to the FEEDBACK plugin backported.
2016-02-09 05:19:56 +04:00
Sergei Petrunia
b17a435069 MDEV-6859: scalar subqueries in a comparison produced unexpected result
When one evaluates row-based comparison like (X, Y) = (A,B), one should
first call bring_value() for the Item that returns row value. If you
don't do that and just attempt to read values of X and Y, you get stale
values.
Semi-join/Materialization can take a row-based comparison apart and
make ref access from it. In that case, we need to call bring_value()
to get the index lookup components.
2016-02-09 02:31:47 +03:00
Sergei Golubchik
3cfd36bbe2 5.5.47-37.7 2016-02-09 00:13:25 +01:00
Sergei Petrunia
d443d70d06 MDEV-7823: Server crashes in next_depth_first_tab on nested IN clauses with SQ inside
Consider a query with subquery in form t.key=(select ...). Suppose, the
parent query uses this equality for ref access.
It will attempt to evaluate the subquery in get_best_combination(),
right before the join->join_tab[...] array is filled.  The problem was
that subquery optimization will attempt to look at parent's join->join_tab
to check how many times subquery will be executed (and crash).

Fixed by not doing that when the subquery is constant (non-constant
subqueries are only be evaluated during join execution, so they are not
affected)
2016-02-09 01:46:53 +03:00
Sergei Golubchik
c4cb240061 MDEV-9024 Build fails with VS2015
cherry-pick f1daf9ce from 10.0 branch
-------------------------------------

Fix build failures caused by new C runtime library
- isnan, snprintf, struct timespec are now defined, attempt to
redefine them leads
- P_tmpdir, tzname are no more defined
-  lfind() and lsearch() in lf_hash.c had to be renamed,  declaration
conflicts with some C runtime functions with the same name declared in
a header included by stdlib.h

 Also fix couple of annoying warnings :
- remove #define NOMINMAX from config.h to avoid "redefined" compiler
warnings(NOMINMAX is already in compile flags)

- disable incremental linker in Debug as well (feature not used much
and compiler crashes often)

Also simplify package building with Wix, require Wix 3.9 or later
(VS2015 is not compatible with old Wix 3.5/3.6)
2016-02-06 22:41:58 +01:00
Sergei Golubchik
1e361f286b MDEV-4664 mysql_upgrade crashes if root's password contains an apostrophe/single quotation mark
fix dynstr_append_os_quoted() to escape single quotes correctly
for a POSIX shell
2016-02-06 17:57:37 +01:00
Sergei Golubchik
9e4e4121b8 unit test for dynstr_append_os_quoted()
and a trivial cleanup to avoid manually-specified lengths
2016-02-06 17:57:37 +01:00
Oleksandr Byelkin
41021c0254 MDEV-9462: Out of memory using explain on 2 empty tables
Fixed adding derived tables items to outer one.
2016-02-06 13:36:17 +01:00
Sergei Golubchik
ad94790f46 MDEV-9453 mysql_upgrade.exe error when mysql is migrated to mariadb
mysqlcheck tool can be used even if opt_systables_only is true
(to upgrade views from mysql - that overrides opt_systables_only)
2016-02-06 11:45:23 +01:00
Sergei Golubchik
0a76ad5ffd MDEV-9175 Query parser tansforms MICROSECOND into SECOND_FRAC, which does not work 2016-02-06 11:45:23 +01:00
Sergei Golubchik
a90da6e053 MDEV-9314 fatal build error: viosslfactories.c:58:5: error: dereferencing pointer to incomplete type ‘DH {aka struct dh_st}
fixes for openssl that was built with -DOPENSSL_NO_DEPRECATED
2016-02-06 11:45:23 +01:00
Vicențiu-Marian Ciorbaru
db5f743c31 Merge pull request #148 from grooverdan/5.5-rpl_reporting-cppcheck-va_end
MDEV-9433: Add va_end to sql/rpl_reporting.cc to make cppcheck happy
2016-02-06 12:37:46 +02:00
Oleksandr Byelkin
6ecf6d8453 MDEV-7827: Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' failed in Field_long::val_str on EXPLAIN EXTENDED
(Solution by Sergei Petrunia)
It appeared that semijoin conditions was not iterated when we were updating used tables. So now they do.
2016-02-05 17:46:01 +01:00
Oleksandr Byelkin
9f3b53fb4a MDEV-9093 Persistent computed column is not updated when update query contains join
added lost virtual fields update call
2016-02-05 16:32:12 +01:00
Jan Lindström
a3d843d949 Fix function visibility as it is used on row0mysql.c in Windows. 2016-02-03 15:52:26 +02:00
Jan Lindström
f66d01610f MDEV-9471: Server crashes or returns an error while trying to alter partitioning on a table moved from Windows to Linux
At alter table when server renames the table to temporal name,
old name uses normal partioned table naming rules. However,
if tables are created on Windows and then transfered to Linux
and lower-case-table-names=1 we should modify the old name
on rename to lower case to be able to find it from the
InnoDB dictionary.
2016-02-03 12:22:31 +02:00
Vladislav Vaintroub
603c0960ba MDEV-9466 : Exception handler on Windows does not output any text,
if mysqld runs as service

The bug is caused by the attempt to write to filedescriptor 2
(STDERR_FILENO), however in case of a service stderr has different fd
(debugging shows fileno(stderr) is 4 after freopen, and -1 before it)

Fixed definition of STDERR_FILENO for Windows to be fileno(stderr).
2016-02-03 00:43:00 +01:00
Kristian Nielsen
0e84d54a1b Merge MDEV-9112 into 5.5 2016-02-01 16:27:12 +01:00
Georg Richter
8cf1f50967 MDEV-9112: Non-blocking client API missing on non-x86 platforms
The check for UCONTEXT in cmake was somehow become broken, disabling the
fallback to ucontext. This caused the non-blocking client API to not be
available for non-x86 platforms, on which no hand-crafted assembler
implementation of my_context is available.
2016-02-01 16:12:00 +01:00
Monty
d0c5efc4a7 If one compiled with too long MYSQL_SERVER_SUFFIX this caused a memory
overrun that caused some test to fail.

Fixed by ensuring we don't overwrite "server_version"
2016-01-29 23:53:44 +02:00
Monty
a1ddf01489 my_decimal didn't compile properly with debug 2016-01-29 23:52:15 +02:00