~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/info_schema_table.cc

  • Committer: Monty Taylor
  • Date: 2009-12-21 03:44:51 UTC
  • mto: (1253.2.3 out-of-tree)
  • mto: This revision was merged to the branch mainline in revision 1250.
  • Revision ID: mordred@inaugust.com-20091221034451-hmztoep4qbaqne8w
Trims more out of server_includes.h.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include "drizzled/session.h"
25
25
#include "drizzled/lex_string.h"
26
26
 
 
27
#include <cstring>
27
28
#include <vector>
28
29
 
29
30
using namespace std;
36
37
vector<plugin::InfoSchemaTable *> all_schema_tables;
37
38
 
38
39
 
 
40
plugin::InfoSchemaRecord::InfoSchemaRecord()
 
41
  : record(NULL),
 
42
    rec_len(0),
 
43
    checksum(0)
 
44
{}
 
45
 
 
46
plugin::InfoSchemaRecord::InfoSchemaRecord(unsigned char *buf, size_t in_len)
 
47
  : record(new unsigned char[in_len]),
 
48
    rec_len(in_len),
 
49
    checksum(0)
 
50
{
 
51
  memcpy(record, buf, rec_len);
 
52
  checksum= drizzled::hash::crc32((const char *) record, rec_len);
 
53
}
 
54
 
 
55
plugin::InfoSchemaRecord::InfoSchemaRecord(const plugin::InfoSchemaRecord &rhs)
 
56
  : record(new(std::nothrow) unsigned char[rhs.rec_len]),
 
57
    rec_len(rhs.rec_len)
 
58
{
 
59
  memcpy(record, rhs.record, rec_len);
 
60
  checksum= drizzled::hash::crc32((const char *) record, rec_len);
 
61
}
 
62
 
39
63
bool plugin::InfoSchemaTable::addPlugin(plugin::InfoSchemaTable *schema_table)
40
64
{
41
65
  if (schema_table->getFirstColumnIndex() == 0)