~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/log_event.cc

  • Committer: Monty Taylor
  • Date: 2008-12-06 07:22:02 UTC
  • mto: (656.1.7 devel) (660.1.5 codestyle)
  • mto: This revision was merged to the branch mainline in revision 665.
  • Revision ID: monty@inaugust.com-20081206072202-2g25o9doqr1l8euu
OOOh doggie. Got rid of my_alloca.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include <drizzled/sql_load.h>
34
34
 
35
35
#include <algorithm>
 
36
#include <string>
36
37
 
37
38
#include <mysys/base64.h>
38
39
#include <mysys/my_bitmap.h>
44
45
#include <drizzled/tztime.h>
45
46
#include <drizzled/slave.h>
46
47
 
 
48
using namespace std;
47
49
 
48
50
static const char *HA_ERR(int i)
49
51
{
5403
5405
  Table *table= m_table;  // pointer to event's table
5404
5406
  int error;
5405
5407
  int keynum;
5406
 
  auto_afree_ptr<char> key(NULL);
 
5408
  basic_string<unsigned char> key;
5407
5409
 
5408
5410
  /* fill table->record[0] with default values */
5409
5411
 
5483
5485
        return(my_errno);
5484
5486
      }
5485
5487
 
5486
 
      if (key.get() == NULL)
5487
 
      {
5488
 
        key.assign(static_cast<char*>(my_alloca(table->s->max_unique_length)));
5489
 
        if (key.get() == NULL)
5490
 
        {
5491
 
          return(ENOMEM);
5492
 
        }
5493
 
      }
 
5488
      key.reserve(table->s->max_unique_length);
5494
5489
 
5495
 
      key_copy((unsigned char*)key.get(), table->record[0], table->key_info + keynum,
5496
 
               0);
 
5490
      key_copy(key, table->record[0], table->key_info + keynum, 0);
5497
5491
      error= table->file->index_read_idx_map(table->record[1], keynum,
5498
 
                                             (const unsigned char*)key.get(),
 
5492
                                             key.data(),
5499
5493
                                             HA_WHOLE_KEY,
5500
5494
                                             HA_READ_KEY_EXACT);
5501
5495
      if (error)