Commit graph

71733 commits

Author SHA1 Message Date
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
Hery Ramilison
c8cc4fc7e5 Empty version change upmerge 2013-08-27 00:15:43 +02:00
hery.ramilison@oracle.com
242c82b61a Raise version number after cloning 5.1.72 2013-08-27 00:02:22 +02:00
Dmitry Lenev
4582478214 Fix for bug #17356954 "CANNOT USE SAVEPOINTS AFTER ER_LOCK_DEADLOCK OR
ER_LOCK_WAIT_TIMEOUT".

The problem was that after changes caused by fix bug 14188793 "DEADLOCK
CAUSED BY ALTER TABLE DOEN'T CLEAR STATUS OF ROLLBACKED TRANSACTION"/
bug 17054007 "TRANSACTION IS NOT FULLY ROLLED BACK IN CASE OF INNODB
DEADLOCK implicit rollback of transaction which occurred on ER_LOCK_DEADLOCK
(and ER_LOCK_WAIT_TIMEOUT if innodb_rollback_on_timeout option was set)
didn't start new transaction in @@autocommit=1 mode.

Such behavior although consistent with behavior of explicit ROLLBACK has
broken expectations of users and backward compatibility assumptions.

This patch fixes problem by reverting to starting new transaction
in 5.5/5.6.

The plan is to keep new behavior in trunk so the code change from this
patch is to be null-merged there.
2013-08-26 14:43:12 +04:00
Praveenkumar Hulakund
45daf55a55 Bug#11765252 - READ OF FREED MEMORY WHEN "USE DB" AND
"SHOW PROCESSLIST"

Follow up path, addressing pb2 test failure.
2013-08-23 18:56:31 +05:30
Praveenkumar Hulakund
561f68eccd Correcting file ids of newly added files in bug#11765252 2013-08-23 18:19:54 +05:30
mysql-builder@oracle.com
d8d64f90ad 2013-08-23 17:13:44 +05:30
Neeraj Bisht
0cf9f5e773 Bug#17029399 - CRASH IN ITEM_REF::FIX_FIELDS WITH TRIGGER ERRORS
Problem:-
In a Procedure, when we are comparing value of select query 
with IN clause and they both have different collation, cause 
error on first time execution and assert second time.
procedure will have query like
set @x = ((select a from t1) in (select d from t2));<---proc1
              sel1                   sel2

Analysis:-
When we execute this proc1(first time)
While resolving the fields of user variable, we will call 
Item_in_subselect::fix_fields while will resolve sel2. There 
in Item_in_subselect::select_transformer, we evaluate the 
left expression(sel1) and store it in Item_cache_* object 
(to avoid re-evaluating it many times during subquery execution) 
by making Item_in_optimizer class.
While evaluating left expression we will prepare sel1.
After that, we will put a new condition in sel2  
in Item_in_subselect::select_transformer() which will compare 
t2.d and sel1(which is cached in Item_in_optimizer).

Later while checking the collation in agg_item_collations() 
we get error and we cleanup the item. While cleaning up we cleaned 
the cached value in Item_in_optimizer object.

When we execute the procedure second time, we have condition for 
sel2 and while setup_cond(), we can't able to find reference item 
as it is cleanup while item cleanup.So it assert.


Solution:-
We should not cleanup the cached value for Item_in_optimizer object, 
if we have put the condition to subselect.
2013-08-23 16:56:17 +05:30
Neeraj Bisht
4f0e7c036d Bug#17029399 - CRASH IN ITEM_REF::FIX_FIELDS WITH TRIGGER ERRORS
Problem:-
In a Procedure, when we are comparing value of select query 
with IN clause and they both have different collation, cause 
error on first time execution and assert second time.
procedure will have query like
set @x = ((select a from t1) in (select d from t2));<---proc1
              sel1                   sel2

Analysis:-
When we execute this proc1(first time)
While resolving the fields of user variable, we will call 
Item_in_subselect::fix_fields while will resolve sel2. There 
in Item_in_subselect::select_transformer, we evaluate the 
left expression(sel1) and store it in Item_cache_* object 
(to avoid re-evaluating it many times during subquery execution) 
by making Item_in_optimizer class.
While evaluating left expression we will prepare sel1.
After that, we will put a new condition in sel2  
in Item_in_subselect::select_transformer() which will compare 
t2.d and sel1(which is cached in Item_in_optimizer).

Later while checking the collation in agg_item_collations() 
we get error and we cleanup the item. While cleaning up we cleaned 
the cached value in Item_in_optimizer object.

When we execute the procedure second time, we have condition for 
sel2 and while setup_cond(), we can't able to find reference item 
as it is cleanup while item cleanup.So it assert.


Solution:-
We should not cleanup the cached value for Item_in_optimizer object, 
if we have put the condition to subselect.
2013-08-23 16:54:25 +05:30
mysql-builder@oracle.com
29342a3c01 2013-08-23 14:13:30 +05:30
mysql-builder@oracle.com
5e2694ea0e 2013-08-23 10:56:05 +05:30
Ashish Agarwal
d75c58e11f WL#7076: Backporting wl6715 to support both formats
in 5.5, 5.6, 5.7.
2013-08-23 09:07:09 +05:30
Balasubramanian Kandasamy
f7e0cc8204 Corrected Date in the changelog 2013-08-22 16:51:30 +02:00
Balasubramanian Kandasamy
e5a055bd5c Removed bugnumber from the changelog and updated description 2013-08-22 14:58:13 +02:00
Sneha Modi
4ac15b22a8 Bug#16995954 : PLUGIN_AUTH TESTS FAIL ON SYSTEMS WITH NO HOSTNAME OTHER
THAN LOCALHOST

      This is a test bug and the explanation for the behaviour can be found
on the bug page.Modifying the select to select user where user!=root for the line where
failure is encountered on machines with no hostname other than the localhost.
2013-08-21 15:24:38 +05:30
Marko Mäkelä
6abedaea6d (Null) merge from mysql-5.1 to mysql-5.5. 2013-08-21 11:55:22 +03:00
Marko Mäkelä
36db646fd5 Merge working copy to mysql-5.1. 2013-08-21 11:54:09 +03:00
Marko Mäkelä
18ffc97058 (Null) merge mysql-5.1 to mysql-5.5. 2013-08-21 10:04:48 +03:00
Marko Mäkelä
2e7ef2cbae Merge mysql-5.1 to working copy. 2013-08-21 10:03:31 +03:00
Marko Mäkelä
c6177ded7e Merge mysql-5.1 to mysql-5.5. 2013-08-21 08:48:04 +03:00
Marko Mäkelä
6a3bb3c07c Bug#12560151 61132: infinite loop in buf_page_get_gen() when handling
compressed pages

After loading a compressed-only page in buf_page_get_gen() we allocate a new
block for decompression. The problem is that the compressed page is neither
buffer-fixed nor I/O-fixed by the time we call buf_LRU_get_free_block(),
so it may end up being evicted and returned back as a new block.

buf_page_get_gen(): Temporarily buffer-fix the compressed-only block
while allocating memory for an uncompressed page frame.
This should prevent this form of the infinite loop, which is more likely
with a small innodb_buffer_pool_size.

rb#2511 approved by Jimmy Yang, Sunny Bains
2013-08-21 08:22:05 +03:00