Commit graph

71853 commits

Author SHA1 Message Date
mysql-builder@oracle.com
84484d29c1 2013-09-27 18:30:46 +05:30
Shivji Kumar Jha
2ccb5370c9 BUG#16580366- MTR TESTS FAILING SPORADICALLY ON PB2 (5.5, 5.6 AND 5.7)
DURING INNODB RECOVERY

Problem:
=======
The connection 'master' is dropped by mysqltest after
rpl_end.inc. At this point, dropping temporary tables
at the connection 'master' are not synced at slave.
So, the temporary tables replicated from master remain
on slave leading to an inconsistent close of the test.
The following test thus complains about the presence of
temporary table(s) left over from the previous test.

Fix:
===
- Put explicit drop commands in replication tests so
  that the temporary tables are dropped at slave as well.
- Added the check for Slave_open_temp_tables in
  mtr_check.sql to warn about the remaining temporary
  table, if any, at the close of a test.
2013-09-27 01:24:16 +05:30
Sujatha Sivakumar
5a5024a6bd Bug#17327454:SEMI-SYNC REPLICATION MASTER CRASH WHEN SET
RPL_SEMI_SYNC_MASTER_ENABLED OFF.

Problem:
=======
If master is waiting for a reply from slave, at this time
set global rpl_semi_sync_master_enabled=OFF, the master
server will crash.

Analysis:
========
When master is waiting for a reply from slave, at this time
if semi sync is switched off on master, during switch off if
active transactions are present the transactions will be
cleared and "active_tranxs_" variable will be set to NULL.

When the waiting master connection finds that semi sync is
switched of it tries to access "active_tranxs_" without
checking if the transaction list exists or not. Accessing
NULL transaction list causes the crash.

Fix:
===
A check has been added to see a valid list exists before
accessing the "active_tranxs_".
2013-09-23 12:13:37 +05:30
Hery Ramilison
d0941fbc4c Upmerge of the 5.1.72 build 2013-09-20 21:42:40 +02:00
hery.ramilison@oracle.com
b6c6c3bdfb Merge from mysql-5.1.72-release 2013-09-20 21:08:08 +02:00
Tor Didriksen
faf495e9c0 Bug#17435338 ADD A -DWITH_ASAN SWITCH/OPTION TO OUR CMAKE SCRIPTS
Tested with:
gcc (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1)

clang version 3.1 (tags/RELEASE_31/final)
Target: x86_64-apple-darwin10.8.0
2013-09-20 16:10:31 +02:00
balasubramanian.kandasamy@oracle.com
849b1f6492 Merge from mysql-5.5.34-release 2013-09-20 11:34:06 +02:00
Vinay Fisrekar
d54a95d11a Making rpl.rpl_spec_variables experimental for solaris till bug#17337114 is fixed. 2013-09-19 13:52:01 +05:30
Tor Didriksen
16fa82fdd5 Bug#16765410 FTS: STACK AROUND THE VARIABLE 'MYSTR' WAS CORRUPTED IN INNOBASE_STRNXFRM
my_strnxfrm_win1250ch could write into dest[destlen]
i.e. write a byte to the past-the-end of dest.
2013-09-17 12:43:34 +02:00
Mattias Jonsson
cd04135d7d post-push fix for bug#53947
test change only.

Removed --source include/not_windows_embedded.inc
which was added due to that bug.
2013-09-12 21:26:15 +02:00
Satya Bodapati
7a2d321751 Fix FreeBSD build failure due to BUG#16752251 (only in 5.5) 2013-09-12 17:59:14 +05:30
Satya Bodapati
5cb7a31fb5 Merge additional fix for BUG#16752251 from mysql-5.1 to mysql-5.5 2013-09-12 12:48:31 +05:30
Satya Bodapati
b904197361 Additional Fix to BUG#16755251 for 5.1 build failure and
disable testcase due to BUG#17446090
2013-09-12 12:28:16 +05:30
Satya Bodapati
f166ec71b7 Bug#16752251 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE OPERATION IF
IT IS DONE IN-PLACE

With change buffer enabled, InnoDB doesn't write a transaction log
record when it merges a record from the insert buffer to an secondary
index page if the insertion is performed as an update-in-place.

Fixed by logging the 'update-in-place' operation on secondary index
pages.

Approved by Marko. rb#2429
2013-09-11 16:57:02 +05:30
mithun
d88c01d3ff Bug #16978278 : BUFFER OVERFLOW WHEN PRINTING A LARGE 64-BIT INTEGER
WITH MY_B_VPRINTF()
Issue         : In LP 64 machine max long value can be 20 digit
                decimal value. But in my_b_vprintf() the intermediate
                buffer storage used is 17 bytes length. This will lead to
                buffer overflow.
Solution      : Increased the buffer storage from 17 to 32 bytes.
                code is backported from 5.6
2013-09-10 15:32:27 +05:30
Tor Didriksen
d529544cbc Bug#16482467 ORDER BY IGNORED IN SOME SITUATIONS FOR UPDATE QUERY
For queries like
update t1 set ... where <unique key> order by ... limit ...
we need to handle the fact that unique keys allow NULL
values, and hence can return more than one row.
2013-09-10 11:20:29 +02:00
Satya Bodapati
9910b732a7 Merge fix for BUG#16752251 from mysql-5.1 to mysql-5.5 2013-09-11 17:02:18 +05:30
mithun
18b3f62e19 Bug #16978278 : BUFFER OVERFLOW WHEN PRINTING A LARGE 64-BIT INTEGER
WITH MY_B_VPRINTF()

[Merge from 5.1]
2013-09-10 15:42:50 +05:30
Libing Song
b00cd62829 Null Merge 2013-09-10 16:26:48 +08:00
Libing Song
9e91f479d2 Bug#17402313 DUMP THREAD SENDS SOME EVENTS MORE THAN ONCE
Postfix, suppress the new warning generated by the bug's fix.
2013-09-10 16:12:25 +08:00
Bjorn Munch
1f3994fac6 MTR: fix broken logic for ignoring missing ctest in Pushbuild 2013-09-10 07:25:01 +02:00
Libing Song
6f33e36e23 Null Merge 2013-09-10 09:47:29 +08:00
Libing Song
d5fdf9ef88 Bug#17402313 DUMP THREAD SENDS SOME EVENTS MORE THAN ONCE
Dump thread may encounter an error when reading events from the active binlog
file. However the errors may be temporary, so dump thread will try to read
the event again. But dump thread seeked to an wrong position, it caused some
events was sent twice.

To fix the bug, prev_pos is defined out the while loop and is set the correct
position after reading every event correctly.

This patch also make binlog_can_be_corrupted more accurate, only the binlogs
not closed normally are marked binlog_can_be_corrupted.

Finally, two warnings are added when dump threads encounter the temporary
errors.
2013-09-10 09:35:49 +08:00
Balasubramanian Kandasamy
9b87a53a10 Reverted the changes to spec file to ignore mysqld_safe.pid file, updated the logic to get the correct count of PID files 2013-09-09 20:07:12 +02:00
Balasubramanian Kandasamy
5da2ffc7c9 Reverted the changes to spec file, updated the logic to get the correct count of PID files 2013-09-09 19:49:44 +02:00
Hery Ramilison
efc72ecf40 Committing patch from venkata.sidagam@oracle.com for Bug#16776528 2013-09-09 18:58:08 +02:00
Venkata Sidagam
46c5e464c1 Bug #16776528 RACE CONDITION CAN CAUSE MYSQLD TO REMOVE SOCKET FILE ERRANTLY
Merging from 5.1 to 5.5
2013-09-09 21:31:50 +05:30
Venkata Sidagam
cdec34bcd0 Bug #16776528 RACE CONDITION CAN CAUSE MYSQLD TO REMOVE SOCKET FILE ERRANTLY
Reverting the patch. Because this change is not to me made for GA versions.
2013-09-09 20:32:50 +05:30
Venkata Sidagam
8550e69391 Bug #16776528 RACE CONDITION CAN CAUSE MYSQLD TO REMOVE SOCKET FILE ERRANTLY
Reverting the patch. Because this change is not to me made for GA versions.
2013-09-09 20:21:02 +05:30
Tor Didriksen
a50170dd0c Bug#17296644 CONV(X, INT_MIN, INT_MIN) SEGFAULTS THE SERVER
Do not call abs(INT_MIN) as the result is undefined.
2013-09-09 14:20:50 +02:00
Tor Didriksen
90ecf4eba3 Bug#16870783 RECENT REGRESSION: CRASH WITH GROUP_CONCAT AND INVALID SEPARATOR
Add missing initialization in lex_start()
2013-09-09 12:43:08 +02:00
Raghav Kapoor
e4bb3dc1c6 Post push fix of openssl_1.test failure 2013-09-06 12:38:11 +05:30
Venkata Sidagam
dd46dc823a Bug #17168602 MYSQL_PLUGIN REMOVES NON-DIRECTORY TYPE
FILES SPECIFIED WITH THE BASEDIR OPTION

Reverting the patch. Because asked for second review.
2013-09-05 14:18:43 +05:30
Nisha Gopalakrishnan
3f1802a4c9 BUG#16032946 - PLEASE GIVE A MESSAGE FOR "THREAD_CONCURRENCY DOESN'T
DO WHAT YOU EXPECT"

Fix info:
--------

Backport of the deprecation bug fix (WL#5265) for global variable
'THREAD_CONCURRENCY' from mysql-5.6 to mysql-5.5

Note: With this backport, certain additional deprecation warnings
      would be reported under error conditions while setting the
      global/session variables.
2013-09-05 13:40:27 +05:30
Neeraj Bisht
6a23a44495 Bug#17222452 - SELECT COUNT(DISTINCT A,B) INCORRECTLY COUNTS ROWS
CONTAINING NULL

Problem:-
In MySQL, We can obtain the number of distinct expression
combinations that do not contain NULL by giving a list of 
expressions in COUNT(DISTINCT).
However rows with NULL values are
incorrectly included in the count when loose index scan is 
used.

Analysis:-
In case of loose index scan, we check whether the field is null or 
not and increase the count in Item_sum_count::add().
But there we are checking for the first field in COUNT(DISTINCT), 
not for every field. This is causing an incorrect result.

Solution:-
Check all field in Item_sum_count::add(), whether there values 
are null or not. Then only increment the count.
******
Bug#17222452 - SELECT COUNT(DISTINCT A,B) INCORRECTLY COUNTS ROWS 
	       CONTAINING NULL

Problem:-
In MySQL, We can obtain the number of distinct expression
combinations that do not contain NULL by giving a list of 
expressions in COUNT(DISTINCT).
However rows with NULL values are
incorrectly included in the count when loose index scan is 
used.

Analysis:-
In case of loose index scan, we check whether the field is null or 
not and increase the count in Item_sum_count::add().
But there we are checking for the first field in COUNT(DISTINCT), 
not for every field. This is causing an incorrect result.

Solution:-
Check all field in Item_sum_count::add(), whether there values 
are null or not. Then only increment the count.
2013-09-04 10:45:55 +05:30
Hery Ramilison
ba258c7590 Fixing sles11 build that /usr/lib/mysql/plugin is not owned by a package 2013-09-03 18:37:46 +02:00
Arun Kuruvila
5b333350a8 Bug #17168602 MYSQL_PLUGIN REMOVES NON-DIRECTORY TYPE FILES
SPECIFIED WITH THE BASEDIR OPTION

Description: The mysql_plugin client attempts to remove any
filename specified to the --basedir option. The problem is 
that if the filename does not end with a slash, it will 
attempt to unlink it, which succeeds for files, but not for 
directories.

Analysis: When we are starting mysql_plugin with basedir 
option and if we are giving path of a file as basedir, it 
deletes that file. It was because it uses a function 
my_delete which unlinks the file path given.

Fix:  As a fix we replace that line using another function 
my_free, which will only free the  pointer which is having 
that file path.
2013-09-02 14:53:45 +05:30
mysql-builder@oracle.com
b8c9a8a3d3 2013-09-01 18:51:52 +05:30
Igor Solodovnikov
730fb2881f Bug #17297012 MEMORY LEAK IN MYSQL_OPTIONS WHILE CALLING WITH OPTION MYSQL_SET_CLIENT_IP
Memory Leak in mysql_options() was caused by missing call
to my_free() in MYSQL_SET_CLIENT_IP branch. Fixed by adding
my_free() to cleanup mysql->options.client_ip value before
assigning new value.
2013-08-30 20:22:09 +03:00
Igor Solodovnikov
7ae6269ca0 Null-merge from mysql-5.1 2013-08-30 20:06:12 +03:00
Igor Solodovnikov
913f2296c5 Bug #17297012 MEMORY LEAK IN MYSQL_OPTIONS WHILE CALLING WITH OPTION MYSQL_SET_CLIENT_IP
Memory Leak in mysql_options() was caused by missing call
to my_free() in MYSQL_SET_CLIENT_IP branch. Fixed by adding
my_free() to cleanup mysql->options.client_ip value before
assigning new value.
2013-08-30 20:05:37 +03:00
Balasubramanian Kandasamy
01c83f0926 Fix to ignore mysqld_safe.pid 2013-08-30 17:14:46 +02:00
Balasubramanian Kandasamy
bab5007ae3 Fix to ignore mysqld_safe.pid 2013-08-30 15:02:16 +02:00
Balasubramanian Kandasamy
5b32f1b6fd Corrected the PID_FILE_PATT manipulation 2013-08-30 06:33:02 +02:00
Balasubramanian Kandasamy
52a3029df9 Fix for Bug#17377159, ignore mysqld_safe.pid file created by mysqld_safe script 2013-08-29 14:42:55 +02:00
Balasubramanian Kandasamy
587ae13b24 Fix for Bug#17377159, ignore mysqld_safe.pid file created by mysqld_safe script 2013-08-29 14:33:28 +02:00
Raghav Kapoor
efb6a1d070 BUG#17294150-POTENTIAL CRASH DUE TO BUFFER OVERRUN IN SSL
ERROR HANDLING CODE 

BACKGROUND:
There can be a potential crash due to buffer overrun in 
SSL error handling code due to missing comma in
ssl_error_string[] array in viosslfactories.c.

ANALYSIS:
Found by code Inspection.

FIX:
Added the missing comma in SSL error handling code
in ssl_error_string[] array in viosslfactories.c.
2013-08-28 15:19:30 +05:30
Raghav Kapoor
c53cad81f8 BUG#17294150-POTENTIAL CRASH DUE TO BUFFER OVERRUN IN SSL
ERROR HANDLING CODE 

BACKGROUND:
There can be a potential crash due to buffer overrun in 
SSL error handling code due to missing comma in
ssl_error_string[] array in viosslfactories.c.

ANALYSIS:
Found by code Inspection.

FIX:
Added the missing comma in SSL error handling code
in ssl_error_string[] array in viosslfactories.c.
2013-08-28 15:17:46 +05:30
Neeraj Bisht
d4b4c8274b Bug#16346241 - SERVER CRASH IN ITEM_PARAM::QUERY_VAL_STR
Problem:-
Second execution of prepared statement for query with 
parameter in limit clause, causes an assert when using 
connectors (e.g., Connector C).  


Analysis:-
In prepared statement, LIMIT parameters can be
specified using '?' markers. Value for the parameter can
be supplied while executing the prepared statement.

Passing string, float or double values for LIMIT clause
works well from command-line client. That's because, while 
setting the LIMIT parameter value from a user-variable,
the value is converted to integer value.

However, when prepared statement is executed from other
interfaces as J connectors, or C applications etc,
the value for the parameters are sent to the server
with execute command. Each item in command has value and
the data TYPE. So, while setting parameter values
from this log, value is set to all the parameters
with the same data type as passed.
Here, we have the logic to convert the value to change the 
state and item_type if it is part of LIMIT parameter and 
its item_type is not INT.
But when we reset this parameter we save the item_type but change 
state. So on second execution we have old item_type but our state 
has been changed, which make us to use string type variable 
in Item_param::query_str_val(). This cause an assert.

Fix:
Instead of checking the item_type of the parameter, check for 
the state of the parameter. As state value are reset everytime
we execute the statement.
2013-08-28 14:54:53 +05:30
balasubramanian.kandasamy@oracle.com
48d942e273 Raise version number after cloning 5.5.34 2013-08-27 09:08:49 +02:00