~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

  • Committer: Monty Taylor
  • Date: 2008-12-08 10:42:44 UTC
  • mfrom: (667 drizzle)
  • mto: This revision was merged to the branch mainline in revision 670.
  • Revision ID: monty@inaugust.com-20081208104244-fan1pe90li9df3ym
MergedĀ inĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
#include <drizzled/sql_base.h>
43
43
#include <drizzled/show.h>
44
44
#include <drizzled/item/cmpfunc.h>
 
45
#include <drizzled/replicator.h>
45
46
 
46
47
 
47
48
/**
3245
3246
      uint32_t query_buf_size= 20 + share->db.length + share->table_name.length +1;
3246
3247
      if ((query= (char*) malloc(query_buf_size)))
3247
3248
      {
3248
 
        /* this DELETE FROM is needed even with row-based binlogging */
 
3249
        /* 
 
3250
          "this DELETE FROM is needed even with row-based binlogging"
 
3251
 
 
3252
          We inherited this from MySQL. TODO: fix it to issue a propper truncate
 
3253
          of the table (though that may not be completely right sematics).
 
3254
        */
3249
3255
        end = strxmov(strcpy(query, "DELETE FROM `")+13,
3250
3256
                      share->db.str,"`.`",share->table_name.str,"`", NULL);
3251
 
        session->binlog_query(Session::STMT_QUERY_TYPE,
3252
 
                          query, (ulong)(end-query), false, false);
 
3257
        (void)replicator_statement(session, query, (size_t)(end - query));
3253
3258
        free(query);
3254
3259
      }
3255
3260
      else