~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_insert.cc

  • Committer: Mark Atwood
  • Date: 2011-08-03 15:44:55 UTC
  • mfrom: (2318.8.15 refactor2)
  • Revision ID: me@mark.atwood.name-20110803154455-jqg3gnxofkq8wetv
mergeĀ lp:~olafvdspek/drizzle/refactor2

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
#include <drizzled/session/transactions.h>
42
42
#include <drizzled/open_tables_state.h>
43
43
#include <drizzled/table/cache.h>
 
44
#include <drizzled/create_field.h>
44
45
 
45
46
namespace drizzled {
46
47
 
690
691
  if (not table)
691
692
    table= table_list->table;
692
693
 
693
 
  if (not select_insert)
 
694
  if (not select_insert && unique_table(table_list, table_list->next_global, true))
694
695
  {
695
 
    TableList *duplicate;
696
 
    if ((duplicate= unique_table(table_list, table_list->next_global, true)))
697
 
    {
698
 
      my_error(ER_UPDATE_TABLE_USED, MYF(0), table_list->alias);
699
 
 
700
 
      return true;
701
 
    }
 
696
    my_error(ER_UPDATE_TABLE_USED, MYF(0), table_list->alias);
 
697
    return true;
702
698
  }
703
699
 
704
700
  if (duplic == DUP_UPDATE || duplic == DUP_REPLACE)