Raise version number after cloning for the 5.5.24 build.
--BZR--
revision-id: joerg.bruehe@oracle.com-20120416103621-7ipdzf07oymwtszg
property-branch-nick: mysql-5.5
testament3-sha1: bfe5655cd0dd99fa9081d75e7a8ef333b753bf3d
Raise version number after cloning 5.1.63

--BZR--
revision-id: georgi.kodinov@oracle.com-20120417102541-nscnerd4lrjowhut
property-branch-nick: mysql-5.1
testament3-sha1: 9d7a289e64677b41ac16be7bac8b7cc3edc568c8
empty merge of a version bump in mysql-5.1

--BZR--
revision-id: georgi.kodinov@oracle.com-20120417102803-bdlqt8d5z7q0b6ei
property-branch-nick: mysql-5.5
testament3-sha1: 8f14c7fac8199e46e2cb4d732cba551547b911d8
Bug #12902967 	CREATING SELF REFERENCING FK ON SAME INDEX 
UNHANDLED, CONFUSING ERROR

The main confusion with the error message is that "it 
implies that your data dictionary may now be out of 
sync".  This patch will remove the unwanted and the 
misleading error message by not doing an unnecessary 
operation in the error handling code.  

rb://980 approved by: Dmitry Lenev
--BZR--
revision-id: annamalai.gurusami@oracle.com-20120417112402-3q8ysebhou8tn8uw
property-branch-nick: mysql-5.5-bug12902967
testament3-sha1: aa7e5530d68c8a831ea2b5a33eb303a6ce20e1cf
Bug #12902967 Creating self referencing fk on same index unhandled,
confusing error. I have added the not_embedded.inc in the test file.

--BZR--
revision-id: annamalai.gurusami@oracle.com-20120418035123-596kuc7lj5vwcuk4
property-branch-nick: mysql-5.5-bug12902967
testament3-sha1: 4253ed649e0f43d452047d42cd7e4a1d6cc2fe71
Bug#12713907:STRANGE OPTIMIZE & WRONG RESULT UNDER
                   ORDER BY COUNT(*) LIMIT.

PROBLEM:
With respect to problem in the bug description, we
exhibit different behaviors for the two tables
presented, because innodb statistics (rec_per_key
in this case) are updated for the first table
and not so for the second one. As a result the
query plan gets changed in test_if_skip_sort_order
to use 'index' scan. Hence the difference in the
explain output. (NOTE: We can reproduce the problem
with first table by reducing the number of tuples
and changing the table structure)

The varied output w.r.t the query on the second table
is because of the result in the query plan change.
When a query plan is changed to use 'index' scan,
after the call to test_if_skip_sort_order, we set
keyread to TRUE immedietly. If for some reason
we drop this index scan for a filesort later on,
we fetch only the keys not the entire tuple.
As a result we would see junk values in the result set.

Following is the code flow:

Call test_if_skip_sort_order
-Choose an index to give sorted output
-If this is a covering index, set_keyread to TRUE
-Set the scan to INDEX scan

Call test_if_skip_sort_order second time
-Index is not chosen (note that we do not pass the
actual limit value second time. Hence we do not choose
index scan second time which in itself is a bug fixed
in 5.6 with WL#5558)
-goto filesort

Call filesort
-Create quick range on a different index
-Since keyread is set to TRUE, we fetch only the columns of
the index
-results in the required columns are not fetched

FIX:
Remove the call to set_keyread(TRUE) from
test_if_skip_sort_order. The access function which is
'join_read_first' or 'join_read_last' calls set_keyread anyways.

--BZR--
revision-id: chaithra.gopalareddy@oracle.com-20120418055501-wphuj3vhooeipsgn
property-branch-nick: mysql-5.1
property-file-info: ld7:file_id73:sp1f-func_group_innodb.re-20060522112752-jzcl2uuvlbohttdur3oawnh7jxxdhl4w7:message34:Added test result for Bug#127139074:path37:mysql-test/r/func_group_innodb.resulted7:file_id73:sp1f-func_group_innodb.te-20060522112752-qpwhp3dyn42s7cjdrhfsuo6myr6xampi7:message32:Added test case for Bug#127139074:path35:mysql-test/t/func_group_innodb.tested7:file_id66:sp1f-sql_select.cc-19700101030959-egb7whpkh76zzvikycs5nsnuviu4fdlb7:message103:Remove the call to set_keyread as we do it from access
property-file-info: functions 'join_read_first' and 'join_read_last'4:path17:sql/sql_select.ccee
testament3-sha1: 4c49f72a7a2ea01ce8690aea0ebfe4d6cae74104
Merge from 5.1 to 5.5
--BZR--
revision-id: chaithra.gopalareddy@oracle.com-20120418060436-daalftpci6naa300
property-branch-nick: mysql-5.5
property-file-info: ld7:file_id66:sp1f-select.result-20010103001548-znkoalxem6wchsbxizfosjhpfmhfyxuk7:message34:Added test result for Bug#127139074:path26:mysql-test/r/select.resulted7:file_id64:sp1f-select.test-20010103001548-tbl2ff7qehzh43qnsmf4ejhjqe66f46n7:message32:Added test case for Bug#127139074:path24:mysql-test/t/select.tested7:file_id66:sp1f-sql_select.cc-19700101030959-egb7whpkh76zzvikycs5nsnuviu4fdlb7:message104:Remove the call to set_keyread as we do it from access
property-file-info: functions 'join_read_first' and 'join_read_last'
property-file-info: 4:path17:sql/sql_select.ccee
testament3-sha1: c5568e50ec37c716f1ba59535d5ed8bc8855c913
WL#6236: Allow SHOW MASTER LOGS and SHOW BINARY LOGS with REPLICATION CLIENT

Currently SHOW MASTER LOGS and SHOW BINARY LOGS require the SUPER
privilege. Monitoring tools (such as MEM) often want to check this 
output - for instance MEM generates the SUM of the sizes of the logs 
reported here, and puts that in the Replication overview within the MEM
Dashboard.
However, because of the SUPER requirement, these tools often have an 
account that holds open the connection whilst monitoring, and can lock
out administrators when the server gets overloaded and reaches
max_connections - there is already another SUPER privileged account
connected, the "monitor". 

As SHOW MASTER STATUS, and all other replication related statements,
return with either REPLICATION CLIENT or SUPER privileges, this worklog 
is to make SHOW MASTER LOGS and SHOW BINARY LOGS be consistent with this
as well, and allow both of these commands with either SUPER or 
REPLICATION CLIENT. 
This allows monitoring tools to not require a SUPER privilege any more,
so is safer in overloaded situations, as well as being more secure, as 
lighter privileges can be given to users of such tools or scripts.
--BZR--
revision-id: nuno.carvalho@oracle.com-20120418090801-hn0hyt5buqnzvb8s
property-branch-nick: mysql-5.1
testament3-sha1: 1313f2bd6555ec769346373d3fd782387f8e02db
WL#6236: Allow SHOW MASTER LOGS and SHOW BINARY LOGS with REPLICATION CLIENT

Merge from 5.1 into 5.5.
--BZR--
revision-id: nuno.carvalho@oracle.com-20120418091219-f7nerybr17f5cp0t
property-branch-nick: mysql-5.5
testament3-sha1: e4477e1792f34c6e74094d0a40db78c492d522f4
Bug #12902967 Creating self referencing fk on same index unhandled,
confusing error. Updated the test script to work properly on
windows platform. 

--BZR--
revision-id: annamalai.gurusami@oracle.com-20120418094611-slbv8jckuyh12aro
property-branch-nick: mysql-5.5-bug12902967
testament3-sha1: 90951ef328ea3b4d29a5dcab7e1c642dd87a2606
Backport 5.5=>5.1 Patch for Bug#13805127: 
Stored program cache produces wrong result in same THD.

--BZR--
revision-id: tor.didriksen@oracle.com-20120418111405-g8ho5rh99f49cj4h
property-branch-nick: 5.1
testament3-sha1: 91800b31c2f5412bae469e6cca7ff700e6c57916
NULL merge 5.1 => 5.5
--BZR--
revision-id: tor.didriksen@oracle.com-20120418111527-rmtclsg2qv6gy05k
property-branch-nick: 5.5-merge
testament3-sha1: 3a731c3175f0b2ca2b74b4a0996f3872e16fc922
new header file must be listed in Makefile.am
--BZR--
revision-id: tor.didriksen@oracle.com-20120418121313-e6wllme6c179psu6
property-branch-nick: 5.1
testament3-sha1: 4a4b84200e8065c614e16d0de2a434599acd95d4
NULL merge 5.1 => 5.5
--BZR--
revision-id: tor.didriksen@oracle.com-20120418121420-zaym4iwk1qh02n44
property-branch-nick: 5.5-merge
testament3-sha1: 268273068129221f5387b817434ca78f4cec2221
BUG#12427262 : 60961: SHOW TABLES VERY SLOW WHEN NOT IN SYSTEM DISK CACHE

Reason:
 This is a regression happened because of changes done in code refactoring 
 in 5.1 from 5.0.

Issue: 
 While doing "Show tables" lex->verbose was being checked to avoid opening
 FRM files to get table type. In case of "Show full table", lex->verbose
 is true to indicate table type is required. In 5.0, this check was
 present which got missing in >=5.5.

Fix:
 Added the required check to avoid opening FRM files unnecessarily in case
 of "Show tables".
--BZR--
revision-id: mayank.prasad@oracle.com-20120419092734-r7zagrvqaf07bavy
property-branch-nick: show_table
testament3-sha1: 047a6271c2c2ed5d285b7d2676b117abd1b1c1e2
BUG#12427262 : 60961: SHOW TABLES VERY SLOW WHEN NOT IN SYSTEM DISK CACHE

Details:
- Merge : 5.1 -> 5.5
- Addded a new test case which was not added in 5.1 because PS was
  not there in 5.1.
--BZR--
revision-id: mayank.prasad@oracle.com-20120419102946-murf90at76dcsqnv
property-branch-nick: show_table_5.5
testament3-sha1: 0b12f7a9215d0ac892b48f32eba1b5c8bd24e855
BUG#11754117 incorrect logging of INSERT into auto-increment 
BUG#11761686 insert_id event is not filtered.
  
Two issues are covered.
  
INSERT into autoincrement field which is not the first part in the composed primary key 
is unsafe by autoincrement logging design. The case is specific to MyISAM engine
because Innodb does not allow such table definition.
  
However no warnings and row-format logging in the MIXED mode was done, and
that is fixed.
  
Int-, Rand-, User-var log-events were not filtered along with their parent
query that made possible them to screw up execution context of the following
query.
  
Fixed with deferring their execution until the parent query.

******
Bug#11754117 

Post review fixes.
--BZR--
revision-id: andrei.elkin@oracle.com-20120420164120-9puh1st1u5apc3b2
property-branch-nick: 5.1-bug11754117-45670-insert_id_gets_through
property-file-info: ld7:file_id54:rpl_auto_increment_b-20120410082700-z7h33az2sd5r8en3-17:message28:a new result file is added.
property-file-info: 4:path57:mysql-test/suite/rpl/r/rpl_auto_increment_bug45679.resulted7:file_id54:rpl_filter_tables_no-20080730094122-ywj30q70xy9542li-17:message16:results updated.4:path57:mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.resulted7:file_id54:rpl_auto_increment_b-20120410082653-otxz6j791aeqa7nx-17:message48:regression test for BUG#11754117-45670 is added.4:path55:mysql-test/suite/rpl/t/rpl_auto_increment_bug45679.tested7:file_id54:rpl_filter_tables_no-20080730094116-4veopgu0zx3i0dwt-27:message70:regression test for filtering issue of BUG#11754117 - 45670 is added.
property-file-info: 4:path55:mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.tested7:file_id65:sp1f-log_event.cc-19700101030959-msmqlflsngxosswid2hpzxly5vfqdddc7:message86:Logics are added for deferring and executing events associated 
property-file-info: with the Query event.
property-file-info: 4:path16:sql/log_event.cced7:file_id64:sp1f-log_event.h-19700101030959-clq6ett55tcqbpys2i4cpfrdccq7j4om7:message54:Interface to deferred events batch execution is added.4:path15:sql/log_event.hed7:file_id63:sp1f-rpl_rli.cc-20061031112305-25t7pxjrjm24qo5h65c7rml66xu3uw4p7:message44:initialization for new RLI members is added.4:path14:sql/rpl_rli.cced7:file_id62:sp1f-rpl_rli.h-20051222053448-bte4b72jikihtk3zbn5jyj2vbiawtwgc7:message150:New members to RLI are added to facilitate deferred events gathering
property-file-info: and execution control;
property-file-info: two general character RLI cleanup methods are constructed.4:path13:sql/rpl_rli.hed7:file_id67:sp1f-rpl_utility.cc-20060503130029-owknu72jo3254qe7gjoeh7oilfrz4atk7:message40:Deferred_log_events methods are difined.4:path18:sql/rpl_utility.cced7:file_id66:sp1f-rpl_utility.h-20060503130029-u44nzzcbdenh2gegnnyzro26kbk5quw77:message100:A new class Deferred_log_events is defined to implement
property-file-info: IRU events gathering, execution and cleanup.4:path17:sql/rpl_utility.hed7:file_id61:sp1f-slave.cc-19700101030959-a636aj3mjxgu7fnznrg5kt77p3u2bvhh7:message120:Necessary changes to initialize `rli->deferred_events' and prevent
property-file-info: deferred event deletion in the main read-exec branch.4:path12:sql/slave.cced7:file_id64:sp1f-sql_base.cc-19700101030959-w7tul2gb2n4jzayjwlslj3ybmf3uhk6a7:message105:A new safe-check function for multi-part pk with auto-increment is defined
property-file-info: and deployed in lock_tables().4:path15:sql/sql_base.cced7:file_id65:sp1f-sql_class.cc-19700101030959-rpotnweaff2pikkozh3butrf7mv3oero7:message81:Initialization for a new member and replication cleanups are added
property-file-info: to THD class.
property-file-info: 4:path16:sql/sql_class.cced7:file_id64:sp1f-sql_class.h-19700101030959-jnqnbrjyqsvgncsibnumsmg3lyi7pa5s7:message87:THD class receives a new member to hold a specific execution
property-file-info: context for slave applier.4:path15:sql/sql_class.hed7:file_id65:sp1f-sql_parse.cc-19700101030959-ehcre3rwhv5l3mlxqhaxg36ujenxnrcd7:message70:Execution of the deferred event in started prior to its parent query.
property-file-info: 4:path16:sql/sql_parse.ccee
testament3-sha1: 6384f0a945614c22c9d8e28281364c40f62bc066
BUG#13979418: SHOW BINLOG EVENTS MAY CRASH THE SERVER

The function mysql_show_binlog_events has a local stack variable
'LOG_INFO linfo;', which is assigned to thd->current_linfo, however
this variable goes out of scope and is destroyed before clean
thd->current_linfo.

The problem is solved by moving 'LOG_INFO linfo;' to function scope.
--BZR--
revision-id: nuno.carvalho@oracle.com-20120420212559-sc7z6cgorjnlff25
property-branch-nick: mysql-5.1
testament3-sha1: 3cf9cfe9a6081b87c9fbaa9534517cda7e062089
BUG#13979418: SHOW BINLOG EVENTS MAY CRASH THE SERVER

Merge from 5.1 into 5.5.

Conflicts:
 * sql/log.h
 * sql/sql_repl.cc
--BZR--
revision-id: nuno.carvalho@oracle.com-20120420223553-td5tlq4puxxozjd5
property-branch-nick: mysql-5.5
testament3-sha1: 8a884ff345de94c855e499eb4d54c6b242c63575
BUG#12427262 : 60961: SHOW TABLES VERY SLOW WHEN NOT IN SYSTEM DISK CACHE

Details:
 - test case bug12427262.test was failing on windows because
   on windows '/' was not recognized. And this was used in
   LIKE clause of the query being run in this test case.

Fix:
 - Windows needs '\\\\' for path seperater in mysql. I was 
   not sure how to keep a single query with two different 
   syntax based on platform. So modifying query to make sure
   it runs correctly on both platform.
--BZR--
revision-id: mayank.prasad@oracle.com-20120420235309-2l17uzi57eftrh79
property-branch-nick: show_table_5.5
testament3-sha1: e82b9ed3064515c6ff4d563af35387d4aaffa963