diff options
author | unknown <knielsen@knielsen-hq.org> | 2010-03-04 09:03:07 +0100 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2010-03-04 09:03:07 +0100 |
commit | 4bf849c23c2fe2174016da630705a362f76d3922 (patch) | |
tree | f39b89f218ff81ceb62349eb225a455d52c3ba78 /sql/item_create.cc | |
parent | f04cf03f75ffca0b99562c027c1c57340d375f66 (diff) | |
parent | 62db6839b82d824567979ef3e05caccd67ed11ec (diff) | |
download | mariadb-git-4bf849c23c2fe2174016da630705a362f76d3922.tar.gz |
Merge MySQL 5.1.44 into MariaDB.
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r-- | sql/item_create.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc index e2aacf9a27d..89dbdd98262 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -4178,6 +4178,16 @@ Create_func_rand::create_native(THD *thd, LEX_STRING name, if (item_list != NULL) arg_count= item_list->elements; + /* + When RAND() is binlogged, the seed is binlogged too. So the + sequence of random numbers is the same on a replication slave as + on the master. However, if several RAND() values are inserted + into a table, the order in which the rows are modified may differ + between master and slave, because the order is undefined. Hence, + the statement is unsafe to log in statement format. + */ + thd->lex->set_stmt_unsafe(); + switch (arg_count) { case 0: { |