Commit graph

167271 commits

Author SHA1 Message Date
Sergei Golubchik
b069d19284 Merge branch 'mysql/5.5' into 5.5 2016-04-20 15:25:55 +02:00
Sergei Golubchik
1bc0b0b524 fix a couple of dbug tests not to write to /tmp 2016-04-19 11:27:00 +02:00
Sergei Golubchik
cc04a9fc0f MDEV-9835 Valid password is not working after server restart
On SET PASSWORD if the plugin is mysql_native_password
or mysql_old_password, do reset plugin and auth_str
fields.
2016-04-19 11:27:00 +02:00
Sergei Golubchik
608c0e1c22 MDEV-5982 make fail @ ".../libmysql_versions.ld:155:9: invalid use of VERSION in input file"
add a workaround for gold
2016-04-19 11:27:00 +02:00
Sergei Golubchik
ce355304e6 MDEV-9885 Client doesn't start if 'TERM' unknown
1. don't exit if setupterm() failed
2. don't use vidattr() if setupterm() failed
2016-04-19 11:27:00 +02:00
Sergei Golubchik
95fe71afa6 MDEV-9707 MAX(timestamp(6) column) in correlated sub-query returns non-existent row data in original table
special treatment for  temporal values in
create_tmp_field_from_item().

old code only did it when result_type() was STRING_RESULT,
but Item_cache_temporal::result_type() is INT_RESULT
2016-04-19 11:27:00 +02:00
Sergei Golubchik
3294cd11f8 MDEV-9929 MariaDB segfaults on command "mysqld --version" with ignore-db-dir option on /etc/my.cnf
don't put command-line arguments into opt_ignore_db_dirs -
it is supposed to contain a malloc()'ed accumulated
list of all ignored dirs
2016-04-19 11:27:00 +02:00
Sergei Golubchik
4f133fbf79 MDEV-9493 --tc-heuristic-recover option values off by one
fix typelib to match defines:
#define TC_HEURISTIC_RECOVER_COMMIT   1
#define TC_HEURISTIC_RECOVER_ROLLBACK 2
2016-04-19 11:27:00 +02:00
Sergei Golubchik
edf71fd1d7 MDEV-9928 LC_TIME_NAMES=de_AT; unusual name for february
s/Feber/Februar/
2016-04-19 11:27:00 +02:00
Sergei Golubchik
9c64735986 MDEV-9748 Include Twin (mysys_err.h is included twice in mysys/my_copy.c) 2016-04-19 11:27:00 +02: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
Yashwant Sahu
e7061f7e5a Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. 2016-02-26 11:53:56 +05:30
Venkatesh Duggirala
29cc2c2883 BUG#20574550 MAIN.MERGE TEST CASE FAILS IF BINLOG_FORMAT=ROW
The main.merge test case was failing when tested using row based
binlog format.

While analyzing the issue it was found the following issues:

a) The server is calling binlog related code even when a statement will
   not be binlogged;
b) The child table list was not present into table structure by the time
   to generate the create table statement;
c) The tables in the child table list will not be opened yet when
   generating table create info using row based replication;
d) CREATE TABLE LIKE TEMP_TABLE does not preserve original table storage
   engine when using row based replication;

This patch addressed all above issues.

@ sql/sql_class.h

Added a function to determine if the binary log is disabled to
  the current session. This is related with issue (a) above.

@ sql/sql_table.cc

Added code to skip binary logging related code if the statement
  will not be binlogged. This is related with issue (a) above.

Added code to add the children to the query list of the table that
  will have its CREATE TABLE generated. This is related with issue (b)
  above.

Added code to force the storage engine to be generated into the
  CREATE TABLE. This is related with issue (d) above.

@ storage/myisammrg/ha_myisammrg.cc

Added a test to skip a table getting info about a child table if the
  child table is not opened. This is related to issue (c) above.
2016-02-26 09:01:49 +05:30
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
Arun Kuruvila
4ed09d54f5 2016-02-23 12:10:41 +05:30
Arun Kuruvila
447eaa5bc0 2016-02-23 11:54:59 +05:30
Arun Kuruvila
83d20ca3fb 2016-02-23 11:41:03 +05:30
Ramil Kalimullin
b3e9211e48 WL#9072: Backport WL#8785 to 5.5 2016-02-19 23:31:10 +04: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
Nisha Gopalakrishnan
d9c541cb1b BUG#22037930: INSERT IGNORE FAILS TO IGNORE FOREIGN KEY
CONSTRAINT.

Analysis
=======

INSERT and UPDATE operations using the IGNORE keyword which
causes FOREIGN KEY constraint violations reports an error
despite using the IGNORE keyword.

Foreign key violation errors were not ignored and reported
as errors instead of warnings even when IGNORE was set.

Fix
===
Added code to ignore the foreign key violation errors and
report them as warnings when the IGNORE keyword is used.
2016-02-11 14:20:50 +05:30
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
Jon Olav Hauglid
1fb6d4e6bf Bug#22680706: 5.5 DOES NOT BUILD WITH GCC5
Fix the following two build warnings so that 5.5 can be compiled
with GCC5.

storage/innobase/dict/dict0crea.c:1143:21: error: logical not is only applied
to the left hand side of comparison [-Werror=logical-not-parentheses]
   ut_a(!node->index == (err != DB_SUCCESS));
                     ^
storage/innobase/log/log0recv.c:1770:20: error: logical not is only applied
to the left hand side of comparison [-Werror=logical-not-parentheses]
  ut_ad(!allow_ibuf == mutex_own(&log_sys->mutex));
                    ^
2016-02-08 13:08:50 +01: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