Commit graph

167168 commits

Author SHA1 Message Date
Vladislav Vaintroub
e669a5fd87 MDEV-7588 Add thd_wait_begin/end to notify threadpool of binlog waits 2015-11-17 18:33:08 +01:00
Oleksandr Byelkin
7e4da9b370 DEV-8632 Segmentation fault on INSERT
View/derived fields should be taken into account when we build ref_pointer_array constructed.

DBUG_ASSERTs added to avoid memory overrun.
2015-11-09 16:08:06 +01:00
Jan Lindström
5d754fce95 MDEV-8854: New warning messages are unreadable
Improved warning messages by quote marks.
2015-11-09 09:24:52 +02:00
Harin Vadodaria
40ae1b9b61 Bug#21973610: BUFFER OVERFLOW ISSUES
post push fix : Fixing test failures
2015-11-07 22:03:47 +05:30
Oleksandr Byelkin
c88ca2c227 MDEV-8701 Crash on derived query
MDEV-8938 Server Crash on Update with joins

Make unique table check after setup_fields of update because unique table can materialize table and we do not need field resolving after materialization.
2015-11-06 17:56:56 +01:00
Harin Vadodaria
0dbd5a8797 Bug#21973610: BUFFER OVERFLOW ISSUES
Description : Incorrect usage of sprintf/strcpy caused
              possible buffer overflow issues at various
              places.

Solution : - Fixed mysql_plugin and mysqlshow
           - Fixed regex library issues

Reviewed-By : Georgi Kodinov <georgi.kodinov@oracle.com>
Reviewed-By : Venkata S Murthy Sidagam <venkata.sidagam@oracle.com>
2015-11-06 16:41:55 +05:30
Balasubramanian Kandasamy
fd9831410d BUG#21950975 - MYSQL RPM INSTALLER(NEW STYLE) FAILS TO CREATE 'MYSQL' USER FOR EL5
- Remove -N option in useradd for EL5 platforms
2015-11-05 16:33:47 +05:30
Balasubramanian Kandasamy
5f2d3479ff BUG 22005375 - DEVEL PACKAGES INSTALL FAILS IF MYSQL-CONNECTOR-C-DEVEL-6.1.6 IS INSTALLED
As MySQL Connector C 6.1 is end of life, added conflict with mysql-connector-c-devel dependencies
2015-11-04 16:12:27 +05:30
Sreeharsha Ramanavarapu
75bfdea40f Bug #22123583: MYSQL 5.5: MAIN.SP HAS VALGRIND ISSUES
Issue:
-----
When a varchar column is used to fill the record in an
internal temporary table, the length of the string stored
in the column is not taken into account. Instead the
default length of packed data is used to copy with memmove.
This will cause valgrind issues since some bytes are
uninitialized.

SOLUTION:
---------
The solution is to take into account the length of the
string stored in the column while filling the record.

This fix is a backport of BUG#13389854.
2015-11-03 07:59:57 +05:30
Sreeharsha Ramanavarapu
5e9a50efc3 Bug #22023218: MYSQL 5.5: MAIN.FULLTEXT HAS VALGRIND ISSUES.
Issue
-----
This problem occurs when varchar columns are used in a
internal temporary table. The type of the field is set
incorrectly to the generic FIELD_NORMAL type. This in turn
results in an inaccurate calculation of the record length.
Valgrind issues will occur since initialization has not
happend for some bytes.

Fix
----
While creating the temporary table, the type of the field
needs to be to set FIELD_VARCHAR. This will allow myisam
to calculate the record length accurately.

This fix is a backport of BUG#13350136.
2015-11-03 07:43:54 +05:30
Chaithra Gopalareddy
9b6ac73419 Bug#20755389 SERVER CRASHES IN ITEM_FUNC_GROUP_CONCAT::FIX_FIELDS ON
2ND EXECUTION OF PS

Description:
------------
When MySQL calls 'EXECUTE stmt' firstly to deal with ORDER BY clause which is
similar with 'ORDER BY 1,(t2a.f2+1)' in find_order_in_list(), it believes the
first expression is a position, the function replaces the pointer of the first
expression with Item_field object associated with a temporary table field,
then releases it after the end of the execution, that behavior destroys the
pointer of first expression.

After that, when MySQL calls 'EXECUTE stmt' once more, the first expression
points to an invalid pointer, so it crashed.

Fix:
----
If an item of ORDER clause is a location, reset 'args' with a original value.
2015-11-02 16:30:57 +05:30
Shishir Jaiswal
1942506b82 DESCRIPTION
===========
When doing an upgrade, you execute mysql_upgrade. If
mysql_upgrade fails to connect or it connects with a user
without the proper privileges, it will return the error:

    FATAL ERROR: Upgrade failed

which is not very informative.

ANALYSIS
========

In main() and check_version_match(), the condition for
errors are clubbed together and throw the same error msg.
The functions need to be splitted up and the corresponding
error msgs have to be displayed.

FIX
===
Splitted the functions and added the specific error msg.
2015-10-29 13:35:32 +05:30
Srikanth B R
a60740607c BUG#22084221 : TEST IMPROVEMENT FOR MAIN.EVENTS_1
Issue: main.events_1 will fail after 10-10-2015 due
         to hardcoded dates specified with events.
 Fix: Replace harcoded dates with current dates and offset.
2015-10-26 16:19:11 +05:30
Mithun C Y
dea2340866 Bug #20447262: REPEATED EXECUTION OF PREPARED STATEMENTS FAILS, IF DEFAULT DATABASE IS CHANGED.
Issue:
======
While re-preparing the statement in
Prepared_statement::swap_prepared_statement for swapping
the database of PS we only swapped the db string but not
its length. This resulted in mismatch between the actual
string and its length. In one particular case where db
of PS was dropped, we have db as null pointer and length
as non-zero. strdup which used above values resulted in
invalid memory access.

Solution:
=========
In Prepared_statement::swap_prepared_statement also swap
db_length along with db variable. Also, remove
DBUG_ASSERT(db_length == copy->db_length) as this have
no meaning if they are 2 different entities.
2015-10-22 17:02:12 +05:30
Sergei Golubchik
df80420865 fix events_1 test for October 2015
cherry-picked 7454f1c5 from 10.1
2015-10-21 14:57:56 +02:00
Terje Røsten
74a503b4ce BUG#22024764 MAIN.EVENTS_1 FAILS BECAUSE IT USES ENDDATE OF 20151010
Move date 10 years forward to let test pass for some more years.
2015-10-16 09:56:09 +02:00
Arun Kuruvila
a86191c69c Bug #21235226 : THE --ENABLE-CLEARTEXT-PLUGIN IS NOT
IMPLEMENTED IN ALL CLIENT PROGRAMS

Description: Option "enable-cleartext-plugin" is not
available for the following client utilities:-
mysqldump
mysqlimport
mysqlshow
mysqlcheck

Analysis: The unavailability of this option limits the
features like PAM authentication from using the above
mentioned utilities.

Fix: Option "enable-cleartext-plugin" is implemented in the
above mentioned client utilities.
2015-10-14 12:00:39 +05:30
Arun Kuruvila
3846b08552 Bug #21602056 : CONCURRENT FLUSH PRIVILEGES + REVOKE/GRANT
CRASHES IN WILD_CASE_COMPARE!

Description:- Executing FLUSH PRIVILEGES and REVOKE/
GRANT concurrently crashes the server.

Analysis:- Concurrent FLUSH PRIVILEGES and REVOKE/GRANT
might trigger a small time frame in which REVOKE/GRANT
fetches the "acl_proxy_user" information as a part of
"acl_check_proxy_grant_access()". Meanwhile FLUSH PRIVILEGES
deletes the old acl structures as a part of "acl_reload()".
After which REVOKE/GRANT tries to access the hostname in
"wild_case_compare()" which leads to a crash because of the
invalid memory access.

Fix:- Mutex lock on "acl_cache" is acquired before fetching
"acl_proxy_user" information in
"acl_check_proxy_grant_access()".
2015-10-14 11:08:49 +05:30
Mithun C Y
f92dd6ae6f Bug #20007383: HANDLE_FATAL_SIGNAL (SIG=11) IN UPDATE_REF_AND_KEYS.
Issue:
======
The fulltext predicate is inside a subquery and involves
an outer reference; it thus cannot be used for FT index look-up,
but MySQL does not see it, which causes a illegal access.

Solution:
=========
Solution is backported from bug#21140088. Outer reference can
not be used as argument of the MATCH function. Added check for
outer reference.
2015-10-12 12:56:36 +05:30
Nirbhay Choubey
978c2a37c0 MDEV-7640: CHANGE MASTER TO doesn't work with prepared statements
When CHANGE MASTER was executed as a PS, its attributes were wrongly
getting reset toward the end of PREPARE. As a result, the subsequent
executions had no effect. Fixed by making sure that the CHANGE MASTER
attributes are preserved during the lifetime of the PS.
2015-10-11 17:21:51 -04:00
Sergei Golubchik
16c4b3c68b fixes for buildbot:
* OSX (mysqlimport freeing unallocated memory)
* Windows (didn't compile MSI)
* fulltest2 (innodb crashes in --embedded --big)
2015-10-09 16:43:59 +02:00
Sergei Golubchik
f41a41fd91 Merge branch 'merge-xtradb-5.5' into 5.5 2015-10-09 00:06:16 +02:00
Sergei Golubchik
db79f4cf61 5.5.45-37.4 2015-10-08 23:02:43 +02:00
Sergei Golubchik
82e9f6d948 Merge remote-tracking branch 'mysql/5.5' into 5.5 2015-10-08 22:54:24 +02:00
mysql-builder@oracle.com
ecfc7c2616 2015-10-08 15:58:03 +05:30
Sergei Golubchik
c8d511293a MDEV-8796 Delete with sub query with information_schema.TABLES deletes too many rows
make_cond_for_info_schema() does preserve outer fields
2015-10-08 10:01:43 +02:00
Oleksandr Byelkin
504802f333 MDEV-7846: postreview fix 2015-10-06 13:12:58 +02:00
Oleksandr Byelkin
54b998173b MDEV-7846: Server crashes in Item_subselect::fix_fields or fails with Thread stack overrun
Substitute into transformed subselects original left expression and than register its change in case it was substituted.
2015-10-06 13:12:58 +02:00
Oleksandr Byelkin
0ab93fd6f3 MDEV-7445:Server crash with Signal 6
MDEV-7565: Server crash with Signal 6 (part 2)

followup test suite and its fix.
2015-10-06 13:12:58 +02:00
Oleksandr Byelkin
2e3e818048 MDEV-7445: Server crash with Signal 6
Problem was in rewriting left expression which had 2 references on it. Solved with making subselect reference main.

Item_in_optimized can have not Item_in_subselect reference in left part so type casting with no check is dangerous.

Item::cols() should be checked after Item::fix_fields().
2015-10-06 13:12:58 +02:00
Oleksandr Byelkin
7ccde2cbd5 MDEV-7565: Server crash with Signal 6 (part 2)
Preparation of subselect moved earlier (before checks which needs it prepared).
2015-10-06 13:12:58 +02:00
Sreeharsha Ramanavarapu
130b5fbf91 Bug #19894161: FATAL SIGNAL 11 IN
CONVERT_CHARSET_PARTITION_CONSTANT:
               SQL/SQL_PARTITION..CC:202

Issue:
-----
This problem happens under the following conditions:
1) A table partitioned with a character column as the key.
2) The expressions specified in the partition definition
   requires a charset conversion. This can happen when the
   server's default collation is different from the
   expression's collation.
3) INSERT DELAYED is used to insert data into the table.

SOLUTION:
---------
While creating the delayed_insert object, initialize it
with the relevant select_lex.
2015-10-06 07:09:36 +05:30
Sreeharsha Ramanavarapu
415faa122b Bug #19434916: FATAL_SIGNAL IN ADD_KEY_EQUAL_FIELDS() WITH
UPDATE VIEW USING OUTER SUBQUERY

Issue:
-----
While resolving a column which refers to a table/view in an
outer query, it's respecitve item object is marked with the
outer query's select_lex object. But when the column refers
to a view or if the column is part of a subquery in the
HAVING clause, an Item_ref object is created. While the
reference to the outer query is stored by the Item_ref
object, the same is not stored in it's real_item.

This creates a problem with the IN-TO-EXISTS optmization.
When there is an index over the column in the inner query,
it will be considered since the column's real_item object
will be mistaken for a local field. This will lead to a
crash.

SOLUTION:
---------
Under the current design, the only way to fix this issue is
to check the reginfo.join_tab for a NULL value. If yes, the
query should not be worrying about the key use.

The testcase and comments added as part of the fix for
Bug#17766653 have been backported.
2015-10-01 07:45:27 +05:30
Gipson Pulla
f83d9e4217 Merge branch 'mysql-5.5.46-release' into mysql-5.5 2015-09-30 18:10:33 +05:30
Jan Lindström
006acf7454 Bug #68148: drop index on a foreign key column leads to missing table
MDEV-8845: Table disappear after modifying FK

Added test case.
2015-09-30 10:49:45 +03:00
Balasubramanian Kandasamy
8ea58c474f BUG 21900800 - ADD OBSOLETE ON MYSQL-CONNECTOR-C-SHARED AND MYSQL-CONNECTOR-C-DEVEL
As MySQL Connector C 6.1 is end of life, added conflict with mysql-connector-c-shared dependencies
2015-09-30 10:27:26 +05:30
Jan Lindström
a95711e45d MDEV-8855: innodb.innodb-fk-warnings fails on Windows
Fixed incorrect access to freed memory.
2015-09-29 08:39:54 +03:00
Oleksandr Byelkin
02a38fd27e MDEV-8624: MariaDB hangs on query with many logical condition
Made no_rows_in_result()/restore_to_before_no_rows_in_result() not looking
annecessary deep with walk() method.
2015-09-28 11:56:33 +02:00
Elena Stepanova
f804b74fd4 MDEV-8154 rpl.show_status_stop_slave_race-7126 sporadically causes internal check failure
The patch was pushed into 10.0, but it needs to be applied to 5.5 as well
2015-09-28 03:40:29 +03:00
Elena Stepanova
ce7d8c5ee8 MDEV-7330 plugins.feedback_plugin_send fails sporadically in buildbot
The test restarts the server and expects that the feedback plugin
will send a report on shutdown, and will write about it in the error
log. But the server is only given 10 sec to shut down properly,
which is not always enough.
Added a parameter to restart_mysqld.inc, and set it to a bigger
value in feedback_plugin_send
2015-09-27 18:01:47 +03:00
Elena Stepanova
bdcf370765 MDEV-7933 plugins.feedback_plugin_send depends on being executed after plugins.feedback_plugin_load
The culprit is the feedback_plugin_load test, which is run both separately
and from inside feedback_plugin_send.test. The test queries I_S.FEEDBACK,
and every time it does, 'FEEDBACK used' value is increased.
Fixed by checking that the value is increased instead of recording the actual
value in the result file.
2015-09-27 16:00:48 +03:00
Elena Stepanova
256360956f Increased the version number 2015-09-26 02:51:29 +03:00
Elena Stepanova
86ed494aef MDEV-8849 rpl.rpl_innodb_bug30888 sporadically fails in buildbot with testcase timeout
The test would take really long if it was run without --mem.
Fixed by adding --innodb-flush-log-at-trx-commit=2
2015-09-26 02:48:55 +03:00
Elena Stepanova
dca4ab92b8 MDEV-8841 innodb_zip.innodb-create-options fails in buildbot
The real problem is that when innodb.xa_recovery test intentionally
crashes the server, system tables can be opened and marked as crashed,
and the next test in line gets blamed for the error which appears
in the error log.
Fixed by flushing the tables before crashing the server
2015-09-24 21:24:28 +03:00
Oleksandr Byelkin
5cc149feba The compiler warnings fixed. 2015-09-24 10:28:47 +02:00
Aditya A
ea9dbef661 Bug#20755615 CREATING INDEX ON A RENAMED COLUMN WITH CASE CRASH .FRM
FILE

PROBLEM

In 5.5 when doing doing a rename of a column ,we ignore the case between
old and new column names while comparing them,so if the change is just
the case then we don't even mark the field FIELD_IS_RENAMED ,we just update
the frm file ,but don't recreate the table as is the norm when alter is
used.This leads to inconsistency in the innodb data dictionary which causes
index creation to fail.

FIX

According to the documentation any innodb column rename should trigger
rebuild of the table. Therefore for innodb tables we will do a strcmp()
between the column names and if there is case change in column name
we will trigger a rebuild.
2015-09-22 16:52:18 +05:30
Arun Kuruvila
86375f7fa6 Bug #21370329 : FLUSH DES_KEY_FILE MAY NOT WORK
Description: The command FLUSH DES_KEY_FILE is expected to
reload the DES keys from the file that was specified with
the "--des-key-file" option at server startup. But it is not
behaving as expected.

Analysis: The des file reload is defined within a wrong
conditional directive, rendering the command ineffective.
Macro "OPENSSL" was used instead of "HAVE_OPENSSL" macro.

Fix: "OPENSSL" macro is changed to "HAVE_OPENSSL".
2015-09-22 14:51:48 +05:30
Annamalai Gurusami
8ea80ecfeb Bug #19929435 DROP DATABASE HANGS WITH MALFORMED TABLE
Note: Backporting the patch from mysql-5.6.

Problem:

A CREATE TABLE with an invalid table name is detected
at SQL layer. So the table name is reset to an empty
string.  But the storage engine is called with this
empty table name.  The table name is specified as
"database/table".  So, in the given scenario we get
only "database/".

Solution:

Within InnoDB, detect this error and report it to
higher layer.

rb#9274 approved by jimmy.
2015-09-22 06:21:13 +02:00
Robert Golebiowski
b9768521bd Updated yassl to yassl-2.3.8
(cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
2015-09-18 16:13:38 +02:00
Robert Golebiowski
0243a2d432 Bug #21025377 CAN'T CONNECT TO SSL ENABLED SERVER FIRST 30 SEC AFTER
INITIAL STARTUP

Updated yassl to yassl-2.3.7e

(cherry picked from commit 6e21c8c04b922bdb60b6a7c174709d2e1bdd3618)
2015-09-18 16:13:18 +02:00