MDEV-6247: Merge 10.0-galera to 10.1.

Merged lp:maria/maria-10.0-galera up to revision 3879.

Added a new functions to handler API to forcefully abort_transaction,
producing fake_trx_id, get_checkpoint and set_checkpoint for XA. These
were added for future possiblity to add more storage engines that
could use galera replication.
This commit is contained in:
Jan Lindström 2014-08-06 15:39:15 +03:00
commit df4dd593f2
327 changed files with 28128 additions and 333 deletions

View file

@ -2769,7 +2769,19 @@ void Item_func_rand::seed_random(Item *arg)
TODO: do not do reinit 'rand' for every execute of PS/SP if
args[0] is a constant.
*/
uint32 tmp= (uint32) arg->val_int();
uint32 tmp;
#ifdef WITH_WSREP
if (WSREP(current_thd))
{
if (current_thd->wsrep_exec_mode==REPL_RECV)
tmp= current_thd->wsrep_rand;
else
tmp= current_thd->wsrep_rand= (uint32) arg->val_int();
}
else
#endif /* WITH_WSREP */
tmp= (uint32) arg->val_int();
my_rnd_init(rand, (uint32) (tmp*0x10001L+55555555L),
(uint32) (tmp*0x10000001L));
}