summaryrefslogtreecommitdiff
path: root/sql/item_create.cc
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-01-15 14:26:53 +0300
committerAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-01-15 14:26:53 +0300
commit82ba3e1dbc455cc63811dac5152949af6ac2acc8 (patch)
tree50764a5d381794b53bd844836e2ae9c962816860 /sql/item_create.cc
parent0807a23775be89356703819812dba92329aab2a2 (diff)
parent6d66e660300fd9af03aa7dcdec5c6999cec2ed41 (diff)
downloadmariadb-git-82ba3e1dbc455cc63811dac5152949af6ac2acc8.tar.gz
Manual merge from mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts: Text conflict in .bzr-mysql/default.conf Text conflict in mysql-test/suite/rpl/r/rpl_loaddata_fatal.result Text conflict in mysql-test/suite/rpl/r/rpl_stm_log.result Text conflict in mysql-test/t/mysqlbinlog.test Text conflict in sql/sql_acl.cc Text conflict in sql/sql_servers.cc Text conflict in sql/sql_update.cc Text conflict in support-files/mysql.spec.sh
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r--sql/item_create.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc
index c00b5ec1701..cdd87af4c37 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -4215,6 +4215,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:
{