diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-03-28 01:04:46 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-03-28 01:04:46 +0200 |
commit | 20e706689df1eb87c696304797e9d6184c0a75bb (patch) | |
tree | ff3eab8fa3e060b34687c6e9819cb559ac67d5c5 /sql/sql_table.cc | |
parent | 3d0775e9af2fcf3fe92b7f19e299ea23068eca1e (diff) | |
parent | bfaebe3f5e4b917c4498e234bad7a9d45d07ca62 (diff) | |
download | mariadb-git-20e706689df1eb87c696304797e9d6184c0a75bb.tar.gz |
mysql-5.5.22 merge
mysql-test/suite/innodb/t/group_commit_crash.test:
remove autoincrement to avoid rbr being used for insert ... select
mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test:
remove autoincrement to avoid rbr being used for insert ... select
mysys/my_addr_resolve.c:
a pointer to a buffer is returned to the caller -> the buffer cannot be on the stack
mysys/stacktrace.c:
my_vsnprintf() is ok here, in 5.5
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index cf0e0e4c0ef..75f430b451e 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1,6 +1,6 @@ /* - Copyright (c) 2000, 2011, Oracle and/or its affiliates. - Copyright (c) 2010, 2011 Monty Program Ab + Copyright (c) 2000, 2012, Oracle and/or its affiliates. + Copyright (c) 2010, 2011, Monty Program Ab This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -3144,6 +3144,15 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info, DBUG_RETURN(TRUE); } + /* + CREATE TABLE[with auto_increment column] SELECT is unsafe as the rows + inserted in the created table depends on the order of the rows fetched + from the select tables. This order may differ on master and slave. We + therefore mark it as unsafe. + */ + if (select_field_count > 0 && auto_increment) + thd->lex->set_stmt_unsafe(LEX::BINLOG_STMT_UNSAFE_CREATE_SELECT_AUTOINC); + /* Create keys */ List_iterator<Key> key_iterator(alter_info->key_list); |