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.
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
Bug #1248505: innodb_log_checksum_algorithm has effect only when set
              dynamically

Fixed innodb_init() so that log_checksum_algorithm_ptr is properly
updated on startup.
Automerge lp:~akopytov/percona-server/bug1248505