Bug 1011047: mysqld can't startup when a plugin was installed.
Move userstat initialization a bit earlier. It should be
initialized for the time when mysql.plugin table accessed.
Merge fix for bug 1011047 from 5.1 series.
Merge fix for bug 1011047 from 5.5 series.
Bug 1218417: errors in i_s.cc
i_s use symbols which defined in header files without including them
trx0trx.h:
TRX_QUE_STATE_STR_MAX_LEN
dict0load.h:
SYS_TABLES
SYS_INDEXES
SYS_COLUMNS
SYS_FIELDS
DICT_TABLE_LOAD_FROM_RECORD
DICT_TABLE_LOAD_FROM_CACHE
dict_process_sys_indexes_rec
dict_process_sys_fields_rec
dict_getnext_system
dict_startscan_system
buf0lru.h:
buf_LRU_file_dump
buf_LRU_file_restore
srv0srv.h:
srv_max_changed_pages
Bug is likely a merge regression.
Null merge from 5.5
Bug #1200788: InnoDB: Failing assertion: trx_sys->descr_n_used
              <= (trx_sys->rw_trx_list).count in file trx0trx.cc line
              1492

The problem was in a debug-only assertion introduced when merging the
trx descriptor patch from 5.5.

The assertion’s invariant is supposed to be enforced whenever
trx_sys->rw_trx_list is modified, i.e. when trx_sys->mutex is
locked. Which is already done earlier in the same function. The same
assertion later (with trx_sys->mutex released) is therefore redundant
and has been removed.
References: lp:1246257 - skipping replication for CREATE TEMPORARY TABLE LIKE...  constructs
Merge codership-5.6 upto revno 3996
Automerge lp:~akopytov/percona-server/bug1200788
Automerge lp:~sergei.glushchenko/percona-server/5.6-ps-bug1218417
Automerge lp:~sergei.glushchenko/percona-server/5.6-ST36241-ps-bug1011047
References lp:1201893 - support for mysqld-debug and external libevent
References lp:1247402 - integrated with wsrep API v25 (merged from 5.5 3913)
References lp:1072839 - merged r3914 from lp:~codership/codership-mysql/wsrep-5.5
References lp:1232789 - merge r3915 from 5.6
References lp:1243150 - added cleanup of IO cache for applier
References lp:1243150 - skipping binlog writes if emulated binlog and thread is either applier or replaying
References: lp:1243150 - IO cache cleanup is obsolete now with the extended fix where applier will not write binlogs in the first place
References: lp:1246921 - making saure CTAS is replicated even if select result set is empty, i.e. only create table remains in the binlog event buffer
References lp:1247980 - merged the fix from 5.5