Commit graph

167532 commits

Author SHA1 Message Date
Daniel Bartholomew
2718225b26 bump the VERSION 2016-12-24 09:47:55 -05:00
Sergei Golubchik
ec6d8dadc0 reduce code duplication a little 2016-12-22 13:02:32 +01:00
Sergei Golubchik
e7d7910b7a add an assert
and use is_supported_parser_charset() instead of direct check
2016-12-22 12:49:37 +01:00
Sergei Golubchik
48655ce698 test case for Bug #23303485 : HANDLE_FATAL_SIGNAL (SIG=11) IN SUBSELECT_UNION_ENGINE::NO_ROWS 2016-12-22 12:49:27 +01:00
Sergei Golubchik
9fefe97336 Merge branch 'mysql/5.5' into 5.5 2016-12-22 12:49:06 +01:00
Sergei Golubchik
8fcdd6b0ec Numerous issues in mysqld_safe 2016-12-22 12:25:10 +01:00
Sergei Golubchik
c8e49f2f57 move check_user/set_user from mysqld.cc to mysys 2016-12-22 12:25:10 +01:00
Varun Gupta
706fb790bc MDEV-10927: Crash When Using sort_union Optimization
In file sql/filesort.cc,when merge_buffers() is called then
- queue_remove(&queue,0) is called
- For the function queue_remove there is assertion states that the element to be removed should have index >=1
- this is causing the assertion to fail.

Fixed by removing the top element.
2016-12-22 15:51:37 +05:30
Alexander Barkov
5e051bfa15 MDEV-10386 Assertion `fixed == 1' failed in virtual String* Item_func_conv_charset::val_str(String*)
The patch b96c196f1c added a new call for
safe_charset_converter() without a corresponding fix_fields().
In case of a sub-query the created Item remained in non-fixed state.
The problem did not show up with literal derived expressions, only
subselects were affected. This patch adds a corresponding fix_fields()
to the previously added safe_charset_converter().
2016-12-21 15:39:45 +04:00
Sergey Vojtovich
ef82fd8ca3 MDEV-11353 - Identical logical conditions
Added test case.
2016-12-20 17:42:08 +04:00
Ronak Jain
cbd7548aff MDEV-11353: fixes Identical logical conditions 2016-12-20 17:36:44 +04:00
Vladislav Vaintroub
e025ebcdb5 Fix pointer formatting in crash handler output.
Do not use 0x%p to output thd address, use %p
2016-12-20 12:45:48 +00:00
Oleksandr Byelkin
aaff3d6c35 MDEV-10172: UNION query returns incorrect rows outside conditional evaluation
count duplicate of UNION SELECT separately to awoid influence on lokal LIMIT clause.
2016-12-20 11:25:47 +01:00
Sergei Petrunia
f23b41b9b8 MDEV-10148: Database crashes in the query to the View
Fix st_select_lex::is_merged_child_of to work across merged views or
derived tables.
2016-12-19 17:57:43 +03:00
Sergei Petrunia
268bb69bea MDEV-7691: Assertion `outer_context || !*from_field || *from_field == not_found_field' ...
The bug occurred when a subquery
- has a reference to outside, to grand-parent query or further up
- is converted to a semi-join (i.e. merged into its parent).

Then the reference to outside had form Item_ref(Item_field(...)).
- Conversion to semi-join would call item->fix_after_pullout() for the
  outside reference.
- Item_ref::fix_after_pullout would call Item_field->fix_after_pullout
- The Item_field would construct a new Name_resolution_context object
  This process ignored the fact that the Item_field does not belong to
  any of the subselects being flattened.
The result was crash in the next call to Item_field::fix_fields(), where
we would try to use an invalid Name_resolution_context object.

Fixed by not creating Name_resolution_context object if the Item_field's
context does not belong to the subselect(s) that were flattened.
2016-12-19 17:57:43 +03:00
Alexey Botchkov
19896d4b3a MDEV-10274 Bundling insert with create statement for table with unsigned Decimal primary key issues warning 1194.
Flags are important for key_length calculations, so them should
        be set before it, not after.
2016-12-19 16:09:20 +04:00
Alexander Barkov
2f6fede8d5 MDEV-10524 Assertion `arg1_int >= 0' failed in Item_func_additive_op::result_precision()
This change is a backport from 10.0 to 5.5 for:
1. The full patch for:
     MDEV-4841 Wrong character set of ADDTIME() and DATE_ADD()
     9adb6e991e

2. A small fragment of:
     MDEV-5298 Illegal mix of collations on timestamp
     03f6778d61
   which overrides Item_temporal_hybrid_func::cmp_type(),
   and adds a new line into cache_temporal_4265.result.
2016-12-19 14:28:08 +04:00
iangilfillan
c4d9dc705b Typo, update limit in comment 2016-12-17 09:49:47 +04:00
Sergei Golubchik
b2b210b891 MDEV-11543 Buildbot tests fail with warnings on server shutdown after rpl.rpl_row_mysqlbinlog
double the timeout for threads to die on shutdown
2016-12-17 00:16:15 +01:00
Sergei Golubchik
b03b38dd65 cleanup: rpl.rpl_row_mysqlbinlog
some trivial simplifications. drinking the ocean,
one drop at a time
2016-12-17 00:16:15 +01:00
Sergei Golubchik
e86580c3dd MDEV-11552 Queries executed by event scheduler are written to slow log incorrectly or not written at all
because thd->update_server_status() is used to measure the query time
for the slow log (not only to set protocol level flags),
it needs to be called also when the server isn't going to send
anything to the client.
2016-12-17 00:16:15 +01:00
Alexey Botchkov
211cf9321a MDEV-11510 Audit plugin sometimes causes server to crash when using with MySQL.
MySQL has a bug failing to handle
           MYSQL_THDVAR_STR(...  PLUGIN_VAR_NOSYSVAR |
                                 PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_MEMALLOC)
        so fall back to just PLUGIN_VAR_READONLY | PLUGIN_VAR_MEMALLOC
        whem MySQL started.
2016-12-16 18:37:11 +04:00
Elena Stepanova
14e1f32894 Follow-up for 02d153c7b9 (str2decimal: don't return a negative zero) 2016-12-11 00:50:00 +02:00
Sergei Golubchik
03dabfa84d MDEV-10713: signal 11 error on multi-table update - crash in handler::increment_statistics or in make_select or assertion failure pfs_thread == ((PFS_thread*) pthread_getspecific((THR_PFS)))
Different fix. Don't allow Item_func_sp to be evaluated unless
all tables are prelocked.

Extend the test case to make sure Item_func_sp::val_str is called
(the table must have at least one row for that).
2016-12-08 23:19:55 +01:00
Sergei Golubchik
ab65db6d3f Revert "MDEV-10713: signal 11 error on multi-table update - crash in handler::increment_statistics or in make_select or assertion failure pfs_thread == ((PFS_thread*) pthread_getspecific((THR_PFS)))"
This reverts commit 035a5ac62a.

Two minor problems and one regression:
1. caching the value in str_result. Other Item methods may use it,
   destroying the cache. See, for example, Item::save_in_field, where
   str_result is moved to use a local buffer (this failed main.grant)
2. Item_func_conv_charset::safe is now set too late, it's initialized
   only in val_str() but checked before that, this failed many tests
   in optimized builds.

to fix 1 - use tmp_result instead of str_result, to fix 2, use
the else branch in the Item_func_conv_charset constructor to set
safe purely from charset properties.

But this introduces a regression, constant strings can no longer be
converted, say, from utf8 to latin1 (because 'safe' will be false).
This fails few tests too. There is no way to fix it without reverting
the commit and converting constants, as before, in the constructor.
2016-12-08 23:15:09 +01:00
Sergei Golubchik
f5e0522d92 MDEV-10388 MariaDB 10.1.x keeps (deleted) ML* files in tmpdir after LOAD DATA completes
truncate unused IO_CACHE backing store files in binlog_cache_data
to release the disk space they were occupying
2016-12-07 13:32:11 +01:00
Alexey Botchkov
1d702ff07c MDEV-8329 MariaDB crashes when replicate_wild_ignore_table is set to NULL.
Rpl_filter::parse_filter_rule() made NULL-safe.
2016-12-07 14:42:08 +04:00
Oleksandr Byelkin
d67ef7a2fb MDEV-10663: Use of Inline table columns in HAVING clause throws 1463 Error
check for VIEW/DERIVED fields
2016-12-06 19:34:25 +01:00
Oleksandr Byelkin
035a5ac62a MDEV-10713: signal 11 error on multi-table update - crash in handler::increment_statistics or in make_select or assertion failure pfs_thread == ((PFS_thread*) pthread_getspecific((THR_PFS)))
Move expression execution out of Item constructor.
2016-12-06 18:53:46 +01:00
Oleksandr Byelkin
f988bcecfd MDEV-10776: Server crash on query
Exclude untouched in prepare phese subqueries from the select/unit tree
because they became unreachable by execution.
2016-12-06 16:14:56 +01:00
Alexander Barkov
46dee0d184 MDEV-10717 Assertion `!null_value' failed in virtual bool Item::send(Protocol*, String*)
The problem was that null_value was not set to "false" on a well-formed row.
If an ill-formed row was followed by a well-forned row, null_value remained
"true" in the call of Item::send() for the well-formed row.
2016-12-06 06:54:52 +04:00
Sergei Golubchik
18cdff6765 MDEV-10293 'setupterm' was not declared in this scope
Check for readline before checking for curses headers, because
MYSQL_CHECK_READLINE fails when curses is not found, but
CHECK_INCLUDE_FILES simply remembers the fact and continues.  So if
there's no curses, MYSQL_CHECK_READLINE will abort, the user will then
installs curses and continue the build. Thus, CHECK_INCLUDE_HEADERS
will remember that there is no curses, but other checks from
MYSQL_CHECK_READLINE will remember that curses are there. It will
result in inconsistent HAVE_xxx defines.
2016-12-05 14:27:45 +01:00
Sergei Golubchik
02d153c7b9 str2decimal: don't return a negative zero 2016-12-05 10:28:20 +01:00
Sergei Golubchik
4a3acbcfd0 MDEV-11241 Certain combining marks cause MariaDB to crash when doing Full-Text searches
Don't assume that a word of n bytes can match a word of
at most n * charset->mbmaxlen bytes, always go for the worst.
2016-12-03 22:03:38 +01:00
Sergei Golubchik
0a4b508173 MDEV-11242 MariaDB Server releases contains promotion of MariaDB Corporation 2016-12-03 22:02:00 +01:00
Sergei Golubchik
f640527e65 typo fixed: s/MSYQL/MYSQL/ 2016-12-03 22:02:00 +01:00
Alexander Barkov
9976223c00 MDEV-11171 Assertion `m_cpp_buf <= ptr && ptr <= m_cpp_buf + m_buf_length' failed in Lex_input_stream::body_utf8_append(const char*, const char*) 2016-11-28 17:28:37 +04:00
Balasubramanian Kandasamy
c8f0eeb9c8 Bug#25159791 BASEDIR: COMMAND NOT FOUND ERROR WHILE STARTING SERVER WITH INIT SCRIPTS
(cherry picked from commit 7a39efab8a59ebdcd562fb788bc004ff338796ea)
2016-11-28 17:26:28 +05:30
Balasubramanian Kandasamy
64cc76bbf8 Followup fix for Bug#25088048 - ADDITIONAL ISSUES IN MYSQLD_SAFE
- Removed mysql.conf, mysqld.service and mysql-systemd-start from sles spec file

(cherry picked from commit 35c1adc17c1a99b2c256d374500437a6ce21339e)
2016-11-26 22:26:40 +05:30
mysql-builder@oracle.com
202355104f 2016-11-25 14:55:15 +05:30
Dyre Tjeldvoll
42732cc195 Bug#25092566: CREATE TABLE WITH DATA DIRECTORY CLAUSE DOES NOT REQUIRE SPECIAL
PRIVILEGES

Require FILE privilege when creating tables using external data directory or
index directory.
2016-11-25 14:55:01 +05:30
Terje Rosten
53230ba274 Bug#25088048 ADDITIONAL ISSUES IN MYSQLD_SAFE
Don't read --ledir option from config file.
Ignore current working for finding location of mysqld
Remove use of chown/chmod in scripts.
Be helpful only when basedir is /var/log or /var/lib.
Removed unused systemd files for SLES.
Set explicit basedir in scripts.
2016-11-25 14:54:08 +05:30
Vladislav Vaintroub
adc38ed811 Restore MY_WME flag for my_pread in read_ddl_log_entry, fix errors in buildbot 2016-11-14 08:02:35 +01:00
Igor Babaev
96b62b5514 Fixed bug mdev-11161.
The flag TABLE_LIST::fill_me must be reset to false at the prepare
phase for any materialized derived table used in the executed query.
Otherwise if the optimizer decides to generate a key for such a table
it is generated only for the first execution of the query.
2016-11-11 20:55:25 -08:00
Vladislav Vaintroub
10aee66896 MDEV-11248 Fix passing offset parameter to my_file_pread in read_ddl_log_file_entry 2016-11-10 23:47:42 +00:00
Vladislav Vaintroub
e0f48e5ce9 MDEV-11214 Windows : MSI installation fails, if run by a service user (e.g LocalSystem)
Skip  permission for data directory for LogonUser, if installation
runs by one of the service accounts (determined from their well-known SID).
There is no real LogonUser in this case.
2016-11-03 16:21:48 +00:00
Thayumanavar S
c3cf7f47f0 BUG#24487120 - SLAVE'S SLAVE_SQL_RUNNING IS STOPPED DURING
LOAD DATA AT MASTER.

Revert "BUG#23080148 - BACKPORT BUG 14653594 AND BUG 20683959 TO"

This reverts commit 1d31f5b3090d129382b50b95512f2f79305715a1.
The commit causes replication incompatibility between minor revisions
and based on discussion with Srinivasarao, the patch is reverted.
2016-10-28 14:45:03 +02:00
Vladislav Vaintroub
2a2e79b702 MDEV-11157 Windows - Upgrade installer to use HeidiSQL 9.4 2016-10-27 19:45:44 +00:00
Vladislav Vaintroub
d8cb6822bc VS2015 build fixes
- new location of signtool
- silence a nonsensical warning from stl  header
(complain about noexcept() function attribute, if /EHsc is not set)
2016-10-27 19:45:44 +00:00
Vladislav Vaintroub
aec43216c8 MDEV-9409 Windows - workaround VS2015 CRT bug that makes
mysqldump/mysql_install_db.exe fail

The bug is described in
https://connect.microsoft.com/VisualStudio/Feedback/Details/1902345

When reading from a pipe in text mode, using CRT function such as fread(),
some newlines may be lost. Workaround is to use binary mode on reading side
and if necessary, replace \r\n with \n.
2016-10-27 19:45:44 +00:00