All pages
Powered by GitBook
1 of 1

Loading...

RAND_EVENT

The RAND_EVENT records the two seed values used for the random number generator, ensuring that calls to the RAND() function produce identical results on replicas.

The SQL function RAND() generates a random number.

A RAND_EVENT contains two seed values that set the rand_seed1 and rand_seed2 system variables that are used to compute the random number.

It is written only before a QUERY_EVENT , and not used with row-based logging.

Header

  • Event Type is 13 (0x0d).

Fields

  • The value for the first seed.

  • The value for the second seed.

Example From mysqlbinlog Utility, No CRC32

Example Event as Written to the Binlog File

c0 e6 27 5a 0d 84 27 00 00 23 00 00 00 a8 01 00 ..'Z..'..#...... 00 00 00 b5 ab d6 28 00 00 00 00 41 23 3b 2d 00 ......(......... 00 00 00 ....

This page is licensed: CC BY-SA / Gnu FDL

uint<8>
uint<8>
# at 389
#171206 13:46:56 server id 10116  end_log_pos 424 	Rand
SET @@RAND_SEED1=685157301, @@RAND_SEED2=758850369/*!*/;
# at 424