Raise version number after cloning 5.1.73
--BZR--
revision-id: murthy.narkedimilli@oracle.com-20131104102937-y2lpwu83lqwe69y6
property-audit-revid: murthy.narkedimilli@oracle.com-20131104102937-kfibutjolbi4v8sr
property-authors: murthy.narkedimilli@oracle.com
property-branch-nick: mysql-5.1
testament3-sha1: f198da4ec0eee3c4eda93586263cd4d6fb810650
Cloning the branch and raising the version number for 5.5.35 build
--BZR--
revision-id: murthy.narkedimilli@oracle.com-20131104105638-4p8x1l0rza25hsv9
property-audit-revid: murthy.narkedimilli@oracle.com-20131104105638-otwbbfxg7usdmybk
property-branch-nick: mysql-5.5
testament3-sha1: eb7d4f09f59d450ec718288d365af6412bfda4fa
--BZR--
revision-id: mysql-builder@oracle.com-20131104133257-7v2qxa0xfp606g0o
property-audit-revid: venkata.sidagam@oracle.com-20131104133257-5nwr8nadsjb9yq2c
property-branch-nick: clone
testament3-sha1: c5440d02b27c7868744e3dabb89283cf566e803a
Bug #12917164 DROP USER CAN'T DROP USERS WITH LEGACY 
    UPPER CASE HOST NAME ANYMORE
Null merge from mysql-5.1 to mysql-5.5
--BZR--
revision-id: venkata.sidagam@oracle.com-20131104133504-invjb2964wanniey
property-audit-revid: venkata.sidagam@oracle.com-20131104133504-k1kg1z4awzcj2v16
property-branch-nick: 5.5
testament3-sha1: 50e2e151bb7a836ff64ba48bcd43f4e1b1f48b94
Bug#12368495 CRASH AND/OR VALGRIND ERRORS WITH REVERSE FUNCTION AND CHARSET CONVERTS

Item_func_trim::val_str: we were using the non-mb algorithm for skipping leading spaces
in a multibyte-charset string.

--BZR--
revision-id: tor.didriksen@oracle.com-20131105090257-p7pfzgf7wgs8eau1
property-audit-revid: tor.didriksen@oracle.com-20131105090257-u32ac5e2n3ben8db
property-branch-nick: 5.5-bug12368495reverse
testament3-sha1: f0c7a0372a913754a9df4c6fa56ae3aaf19e25a4
Bug#17588348: INDEX MERGE USED ON PARTITIONED TABLE 
               CAN RETURN WRONG RESULT SET

PROBLEM
-------
In ha_partition::cmp_ref() we were only calling the 
underlying cmp_ref() of storage engine if the records
are in the same partiton,else we sort by partition and
returns the result.But the index merge intersect 
algorithm expects first to sort by row-id first and 
then by partition id.

FIX
---
Compare the refernces first using storage engine cmp_ref
and then if references are equal(only happens if 
non clustered index is used) then sort it by partition id.

[Approved by Mattiasj #rb3755]
-

--BZR--
revision-id: aditya.a@oracle.com-20131105135526-agm7nxh5mbf6s6fn
property-audit-revid: aditya.a@oracle.com-20131105135526-ewm2t7lbwltlxyuk
property-branch-nick: mysql-5.5
testament3-sha1: 3e44a825efb4e4fe7cfeb72584cfab67e9de7eda
Bug#17702677 WRONG INSTRUMENTATION INTERFACE FOR MYSQL_COND_TIMEDWAIT

The pthread_cond_timedwait(3P) api
uses a const struct timespec for parameter 3.

The instrumentation api for the same, mysql_cond_timedwait,
which expands to inline_mysql_cond_timedwait,
should also take a const parameter for the timespec.

This fix add the missing const to inline_mysql_cond_timedwait.

--BZR--
revision-id: marc.alff@oracle.com-20131106092200-h240fcc0szzmv6mm
property-audit-revid: marc.alff@oracle.com-20131106092200-5cwzja26ssxohv5i
property-branch-nick: mysql-5.5-bug17702677
testament3-sha1: 3a6d55141904c1b31675fd976c1964c953f3b5df
Bug#16736412: THE SERVER WAS CRASHED WHILE EXECUTING
"SHOW BINLOG EVENTS"

Problem:
========
mysql was crashed after executing "show binlog events in
'mysql-bin.000005' from 99", the crash happened randomly.

Analysis:
========
During construction of LOAD EVENT or NEW LOAD EVENT object
if the starting offset is provided as incorrect value then
all the object members that are retrieved from the offset
are also invalid.  Some times it will lead to out of bound
address offsets.  In the bug scenario, the file name is
extracrated from an invalid address and the same is fed to
strlen(fname) function. Passing invalid address to strlen
will lead to crash.

Fix:
===
Validate if the given offset falls within the event boundary
or not.
--BZR--
revision-id: sujatha.sivakumar@oracle.com-20131106093049-dv6637eqmk7xwihs
property-audit-revid: sujatha.sivakumar@oracle.com-20131106093049-75hf1rr95lmva03s
property-branch-nick: Bug16736412_mysql-5.5
property-file-info: ld7:file_id65:sp1f-log_event.cc-19700101030959-msmqlflsngxosswid2hpzxly5vfqdddc7:message116:Added code to validate fname's address. "fname" should
property-file-info: be within event boundary. Added code to find invalid
property-file-info: invents.4:path16:sql/log_event.ccee
testament3-sha1: 57101e9c856cdd77f70294b7dd7b247ec7e5a56c
--BZR--
revision-id: mysql-builder@oracle.com-20131106115113-to5lisrxcllj6h69
property-audit-revid: sujatha.sivakumar@oracle.com-20131106115113-qdb1i4iio57to0iy
property-branch-nick: clone
testament3-sha1: c6fdcba6e9f68bded1e3619ad55dbd10f782a97a
Bug#16691598 - ORDER BY LOWER(COLUMN) PRODUCES OUT-OF-ORDER RESULTS

Problem:-
We have created a table with UTF8_BIN collation.
In case, when in our query we have ORDER BY clause over a function 
call we are getting result in incorrect order.
Note:the bug is not there in 5.5.

Analysis:
In 5.5, for UTF16_BIN, we have min and max multi-byte length is 2 and 4 
respectively.In make_sortkey(),for 2 byte character character we are 
assuming that the resultant length will be 2 byte/character. But when we 
use my_strnxfrm_unicode_full_bin(), we store sorting weights using 3 bytes 
per character.This result in truncated result.

Same thing happen for UTF8MB4, where we have 1 byte min multi-byte and 
4 byte max multi-byte.We will accsume resultant data as 1 byte/character, 
which result in truncated result.

Solution:-
use strnxfrm(means use of MY_CS_STRNXFRM macro) is used for sort, in 
which the resultant length is not dependent on source length.
--BZR--
revision-id: neeraj.x.bisht@oracle.com-20131107111624-4ixy2mbhvfi8zzta
property-audit-revid: neeraj.x.bisht@oracle.com-20131107111624-2c6dsi7tdegkzri6
property-branch-nick: 5.5
testament3-sha1: 4863d7eaa553a5319e087481e11c9b1d97d9ddd3
Bug#16736412: THE SERVER WAS CRASHED WHILE EXECUTING
"SHOW BINLOG EVENTS"

Fixing post push test issue. 
Changing the debug simulation.
--BZR--
revision-id: sujatha.sivakumar@oracle.com-20131107120057-o3nkw1mh9g4qb0bi
property-audit-revid: sujatha.sivakumar@oracle.com-20131107120057-pwi33s7jr7cjiglu
property-branch-nick: Bug16736412_mysql-5.5
testament3-sha1: 97190b6b41a0e7b392f40fd0b4113e97f103ab7f
Push to mysql-5.5
--BZR--
revision-id: marc.alff@oracle.com-20131107172943-m24ygjff73za97bw
property-audit-revid: marc.alff@oracle.com-20131107172943-n23u6btvzdlzuvr6
property-branch-nick: mysql-5.5-push
testament3-sha1: 25775f04edb0045a482934d9a99188856bd00e99
Bug#17702677 WRONG INSTRUMENTATION INTERFACE FOR MYSQL_COND_TIMEDWAIT

Fix Windows build break
--BZR--
revision-id: chris.powers@oracle.com-20131107214457-dztqhz2uztgijwp7
property-audit-revid: chris.powers@oracle.com-20131107214457-7i1cngyqfl7vl95n
property-branch-nick: mysql-5.5
testament3-sha1: 7330bcffb4e5a5b82e299970fa0e414910ecce2b
Bug #14057034 : WASTED CPU CYCLES IN MY_UTF8_UNI WHERE
                RESULTING MY_WC_T RESULT IS NOT USED
Issue         : handler functions my_ismbchar_utf8,
              my_well_formed_len_mb for charset utf8
              is calling unicode converion function
              to validate and to find the character
              length. Because of this, instructions
              which will convert the utf8 to unicode
              are executed for no use.
              A similar issue exist with charset utf8mb4
Solution      : reorganized the code such that character
              validation part of unicode conversion
              handler is extracted(duplicated) in to
              separate function. Hence
              my_ismbchar_utf8, my_well_formed_len_mb
              will call the new function which only
              validates and return the length of mb(utf8).
              A similar fix for charset utf8mb4.
--BZR--
revision-id: mithun.c.y@oracle.com-20131112111246-2646y112b936skhh
property-audit-revid: mithun.c.y@oracle.com-20131112111246-w0gxjqdgoje0ar3e
property-branch-nick: mysql-5.5
property-file-info: ld7:file_id64:sp1f-ctypeutf8.c-20020328133143-7ldgrkcon3ejrongwc7hy4m63qddjsal7:message109:New functions has been added for charset utf8 and utf8mb4
property-file-info: to validate and to get the length of the character.4:path20:strings/ctype-utf8.cee
testament3-sha1: 334b6b50df5dc971901f060580c66da976be574f
Bug#17641586 INCORRECTLY PRINTED BINLOG DUMP INFORMATION

Problem:
When log_warnings is greater than 1, master prints binlog
dump thread information in mysqld.1.err file.
The information contains slave server id, binlog file and
binlog position. The slave server id is uint32 and the print
format was wrongly specifified (%d instead of %u).
Hence a server id which is more than 2 billion is getting
printed with a negative value.
Eg: Start binlog_dump to slave_server(-1340259414),
pos(mysql-bin.001663, 325187493)

Fix: Changed the uint32 format to %u.
--BZR--
revision-id: venkatesh.duggirala@oracle.com-20131112163910-7oux31xnwjc3q46b
property-audit-revid: venkatesh.duggirala@oracle.com-20131112163910-pgfvfdaibus46l4b
property-branch-nick: mysql-5.5
testament3-sha1: 6a5467453ea8b637cb09c4b588a74e1d1abcad94
Bug #17049656 : MYSQLD --LOCAL-SERVICE PARAMETER DOES NOT WORK

Problem: The "--local-install" service does not perform as expected for, at least,
         Windows.

Fix: A NULL pointer was dereferenced due to which there was crash.A check was introduced
     for NULL string before dereferencing it.No test cases written as it is a bug during 
     installation.
--BZR--
revision-id: atanu.ghosh@oracle.com-20131114085731-d6jr9t19e0ipt53z
property-audit-revid: atanu.ghosh@oracle.com-20131114085731-dudoympg58p0v4i7
property-branch-nick: mysql-5.5
testament3-sha1: 5f10bd3bce2531c575f88c3890410b5f880292ce
--BZR--
revision-id: mysql-builder@oracle.com-20131114093008-p3eimjgw9wuhp78g
property-audit-revid: venkatesh.duggirala@oracle.com-20131114093008-ld6738r9zdjlft3u
property-branch-nick: clone
testament3-sha1: c246795cdc1e4e1934d2b2c3e50f73aeb1f4cb9d
Bug #17708621 : EXCEEDING SORT_BUFFER_SIZE (FILE SORT) 
                WITH SORT ABORTED LEAKS FILE DESCRIPTORS

ISSUE : IO_CACHE used for index_merge quick select
is freed only on successful retrieval of all rows
from index merge.
Suppose if there is a interrupt( or failure) to
this operation of row retrieval (let it be a
KILL_QUERY signal) then we are not freeing the IO_CACHE
resources allocated by index_merge quick select.
And hence temp file associated with it is also not closed.
This lead to a file descriptor leak.

SOLUTION : As part of file sort operation now we always 
free the IO_CACHE allocated by index_merge quick select.
--BZR--
revision-id: mithun.c.y@oracle.com-20131118124201-2dxeitlzx6t4kw0i
property-audit-revid: mithun.c.y@oracle.com-20131118124201-5w06byuxnywqt08c
property-branch-nick: mysql-5.5
property-file-info: ld7:file_id64:sp1f-filesort.cc-19700101030959-mfm2vmdgqqru7emm2meeecleb2q3zdso7:message117:In filesort function we try to free if any
property-file-info: IO_CACHE allocated by index_merge quick select
property-file-info: and if it is not yet freed.4:path15:sql/filesort.ccee
testament3-sha1: 3a0946d959f3137610dddc54a7d22daa45a32b89
backport of Bug#17401628

revid:mattias.jonsson@oracle.com-20131119103616-u6t82s8cpgp0q3ex

Use of uninitialized memory in the priority queue used for returning records
in sorted order.

It happens if no previous partition have returned a row since the
beginning of index_init + an index_read* call returned
HA_ERR_KEY_NOT_FOUND for all partitions (otherwise the record
buffer/priority queue would be initialized) + an index_next/prev
call where all partitions returns HA_ERR_END_OF_FILE.
--BZR--
revision-id: mattias.jonsson@oracle.com-20131120121318-s29dc91l1rjk8v1r
property-audit-revid: mattias.jonsson@oracle.com-20131120121318-8qqqg6g9lv5ux6pa
property-branch-nick: topush-5.5
testament3-sha1: ec6f0e9d177d6f010e3980b06096308d2acb9bd1
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.
--BZR--
revision-id: arun.kuruvila@oracle.com-20131125070109-issq2sy6r28cy6e1
property-audit-revid: arun.kuruvila@oracle.com-20131125070109-molyqyszm0z5giz9
property-branch-nick: mysql-5.5
testament3-sha1: ad8336696c67df223c65fc0f7933b16c5206cc00