Raise version number after cloning 5.6.15
Bug #12917164 DROP USER CAN'T DROP USERS WITH LEGACY 
    UPPER CASE HOST NAME ANYMORE
Null merge from mysql-5.5 to mysql-5.6
Bug#17280176 TRANSACTIONS SKIPPED ON SLAVE AFTER
"STOP/START SLAVE" USING GTID REPLICATION

Fixing post push solaris compiler warning
"last_retrieved_gtid hides Relay_log_info::last_retrieved_gtid."
Fix for Bug#17077305 GENERAL ERROR #1356 WHEN QUERYING VIEW WITH AN
ORDER BY CLAUSE USING AN ALIAS
Before the fix for Bug #11923239 ERROR WITH CORRELATED SUBQUERY IN
VIEW WITH ONLY_FULL_GROUP_BY SQL MODE,
this statement:
CREATE VIEW v1 AS SELECT 2*a AS z FROM t1 ORDER BY z;
produced this definition (written to the view's FRM file):
CREATE VIEW v1 AS SELECT 2*a AS z FROM t1 ORDER BY 2*a;
in other words, the alias in ORDER BY was rewritten to its expression.
The same was done for an alias in GROUP BY.
The fix removed this rewriting. It was a good fix because:
– using the alias made only_full_group_by logic work better
– staying close to the original query "feels better".
However, this introduced a regression. Indeed, if we select from
the view above without selecting 'z':
SELECT 1 FROM v1;
After view merging, this query becomes
SELECT 1 FROM t1 ORDER BY z;
and the resolver fails to find what 'z' is (ORDER item 'z', created
during mysql_make_view(), is searched in the top query's SELECT
list and then in the name resolution context of the item i.e. {t1}).
In this patch, we partially undo the changes of Bug #11923239:
if the view is merge-able, we write the expression instead of
the alias, again. This corrects the regression. It does not
reintroduce any problem for only_full_group_by, because the
merge-able view never has GROUP BY.
Bug#17231940: THE OPTIMIZER STILL USES FIXED LENGTH TEMPORARY TABLES ON DISK
In order to create tmp table in the packed format, the HA_OPTION_PACK_RECORD
flag should be specified in table-s>->db_create_options. This flag was set
by the create_tmp_field_from_field function if a VAR_STRING/VARCHAR field
was created. This, however, wasn't covering other cases:
*) when a field in tmp table was created from an item, e.g a function or a
union's type holder, or a Item field from derived table's select list
*) when result field for GROUP_CONCAT was created.
To cover all possible cases and avoid modifying all functions that could be
involved in a tmp field creation, create_tmp_table now sets
HA_OPTION_PACK_RECORD flag if a VAR_STRING/VARCHAR was created.
Raise version number after cloning 5.1.73
Cloning the branch and raising the version number for 5.5.35 build
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
BUG#17640261 - LONG STRING IN MATCH() ... AGAINST() QUERY CRASHES MYSQLD

The root cause is that we have memory overflow when a term is greater
than FTS_MAX_WORD_LEN when we do a wildcard search in boolean mode.

The solution is that we ignore the term in this case following myisam's
behavior.

rb#3780 approved by Jimmy.Yang
Bug#17713388 RPL.RPL_SLAVE_LOAD_REMOVE_TMPFILE TEST
IS FAILING ON WINDOWS ON PB2

Analysis: 
On a MTS enabled slave, in case a worker fails to
apply an event the slave applier (SQL thread +
workers) stops. An error that the worker faced is
printed in error log file. However the format of
the error in MTS enabled slave case is different
from a NON-MTS case( a prefix with worker id is
added)
Eg: Slave SQL: Worker 3 failed executing transaction 
The existing suppression in the mentioned test
script was not consider this prefix which gets added
in MTS enabled case

Fix: Changed the suppression to consider the prefix.
Removed non gpl file mysql.info from uln community package
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.
Bug#17733393: BACKPORT BUG#16354789 TO 5.6 

Backport from mysql-trunk to mysql-5.6 of:
------------------------------------------------------------
revno: 5793
committer: Thayumanavar <thayumanavar.x.sachithanantha@oracle.com>
branch nick: mysql-trunk
timestamp: Fri 2013-05-17 16:50:00 +0530
message:
  BUG#16354789 RPL_SLAVE_SYSVAR_DEADLOCK CRASHING OCCASIONALLY
               ON OS X 10.7
  PROBLEM DESCRIPTION AND FIX:
  i_rpl.rpl_slave_sysvar_deadlock test case crashes most of
  time on OS X 10.7 on PB2. The crash is due to race condition
  involving vio_shutdown and select based implementation of
  vio_io_wait. If vio_shutdown sets the file descriptor of the
  vio.fd to INVALID_SOCKET which is negative one in one thread
  after which the select-based implementation of vio_io_wait use
  this fd value with FD_* macros in another thread of control, it
  segfaults. The reason for segfault is because FD_* macros use
  this fd value as an index into a static buffer or array.
    The fix checks the copied fd from mysql_socket_getfd is not
  INVALID_SOCKET so that FD_SET doesn't incorrect index which avoids the 
  segfault.
merge 5.5 => 5.6
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]
-
Bug#17588348: INDEX MERGE USED ON PARTITIONED TABLE 
               CAN RETURN WRONG RESULT SET

[Merge from 5.5]
-
Bug #17250787 CANNOT DECREASE AUTO_INCREMENT VALUE EVEN WHEN TABLE IS EMPTY
Problem:
  There is a difference in behaviour between copy algorithm and inplace
  algorithm in alter statement for decreasing the auto increment value.
  In alter table statement, inplace algorithm is not able to decrease 
  the auto increment value.

Solution:
  Inplace algorithm will first check the maximum of existing auto_increment
  value from table. If this value is greater than or equal to user-defined
  value then maximum of existing auto_increment value + 1 will be set as
  autoincrement value, else user-defined value will be set as autoincrement
  value.
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.
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.