~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

  • Committer: Brian Aker
  • Date: 2009-07-29 18:35:48 UTC
  • mfrom: (1101.1.12 merge)
  • Revision ID: brian@gaz-20090729183548-yp36iwoaemfc76z0
Merging Monty (which includes new replication)

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
#include <drizzled/sql_base.h>
42
42
#include <drizzled/show.h>
43
43
#include <drizzled/item/cmpfunc.h>
44
 
#include <drizzled/transaction_services.h>
 
44
#include <drizzled/replication_services.h>
45
45
#include <drizzled/check_stack_overrun.h>
46
46
#include <drizzled/lock.h>
47
47
#include <drizzled/listen.h>
49
49
 
50
50
using namespace std;
51
51
 
52
 
extern drizzled::TransactionServices transaction_services;
 
52
extern drizzled::ReplicationServices replication_services;
53
53
 
54
54
/**
55
55
  @defgroup Data_Dictionary Data Dictionary
2197
2197
        end= query;
2198
2198
        end+= sprintf(query, "DELETE FROM `%s`.`%s`", share->db.str,
2199
2199
                      share->table_name.str);
2200
 
        transaction_services.rawStatement(session, query, (size_t)(end - query)); 
 
2200
        replication_services.rawStatement(session, query, (size_t)(end - query)); 
2201
2201
        free(query);
2202
2202
      }
2203
2203
      else
4607
4607
  Item *value, *fld;
4608
4608
  Item_field *field;
4609
4609
  Table *table= 0;
4610
 
  List<Table> tbl_list;
 
4610
  vector<Table*> tbl_list;
4611
4611
  bool abort_on_warning_saved= session->abort_on_warning;
4612
 
  tbl_list.empty();
4613
4612
 
4614
4613
  /*
4615
4614
    Reset the table->auto_increment_field_not_null as it is valid for
4652
4651
  }
4653
4652
  /* Update virtual fields*/
4654
4653
  session->abort_on_warning= false;
4655
 
  if (tbl_list.head())
 
4654
  if (tbl_list.empty() == false)
4656
4655
  {
4657
 
    List_iterator_fast<Table> t(tbl_list);
4658
4656
    Table *prev_table= 0;
4659
 
    while ((table= t++))
 
4657
    for (vector<Table*>::iterator it= tbl_list.begin(); it != tbl_list.end(); ++it)
4660
4658
    {
4661
4659
      /*
4662
4660
        Do simple optimization to prevent unnecessary re-generating
4663
4661
        values for virtual fields
4664
4662
      */
 
4663
      table= *it;
4665
4664
      if (table != prev_table)
4666
4665
        prev_table= table;
4667
4666
    }
4704
4703
  Item *value;
4705
4704
  Table *table= 0;
4706
4705
  Field *field;
4707
 
  List<Table> tbl_list;
 
4706
  vector<Table*> tbl_list;
4708
4707
  bool abort_on_warning_saved= session->abort_on_warning;
4709
4708
 
4710
 
  tbl_list.empty();
4711
4709
  /*
4712
4710
    Reset the table->auto_increment_field_not_null as it is valid for
4713
4711
    only one row.
4733
4731
  }
4734
4732
  /* Update virtual fields*/
4735
4733
  session->abort_on_warning= false;
4736
 
  if (tbl_list.head())
 
4734
  if (tbl_list.empty() == false)
4737
4735
  {
4738
 
    List_iterator_fast<Table> t(tbl_list);
4739
4736
    Table *prev_table= 0;
4740
 
    while ((table= t++))
 
4737
    for (vector<Table*>::iterator it= tbl_list.begin(); it != tbl_list.end(); ++it)
4741
4738
    {
4742
4739
      /*
4743
4740
        Do simple optimization to prevent unnecessary re-generating
4744
4741
        values for virtual fields
4745
4742
      */
 
4743
      table= *it;
4746
4744
      if (table != prev_table)
4747
4745
      {
4748
4746
        prev_table= table;