~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/logging_stats/global_stats.cc

  • Committer: Brian Aker
  • Date: 2010-05-28 01:36:09 UTC
  • Revision ID: brian@gaz-20100528013609-lvsd6znyufrpmddk
Rollup patch for hiding tableshare.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2010 Joseph Daly <skinny.moey@gmail.com>
 
2
 * Copyright (c) 2010, Joseph Daly <skinny.moey@gmail.com>
3
3
 * All rights reserved.
4
4
 *
5
5
 * Redistribution and use in source and binary forms, with or without
28
28
 *
29
29
 */
30
30
 
31
 
#include <config.h>
32
 
#include <drizzled/plugin.h>
33
31
#include "global_stats.h"
34
32
 
35
33
GlobalStats::GlobalStats()
37
35
  user_commands= new UserCommands();
38
36
}
39
37
 
40
 
GlobalStats::GlobalStats(const GlobalStats &global_stats)
41
 
{
42
 
  user_commands= new UserCommands(*global_stats.user_commands);
43
 
}
44
 
 
45
38
GlobalStats::~GlobalStats()
46
39
{
47
40
  delete user_commands;
52
45
  return user_commands;
53
46
}
54
47
 
55
 
void GlobalStats::merge(GlobalStats *global_stats)
56
 
{
57
 
  user_commands->merge(global_stats->getUserCommands());
58
 
}
59
 
 
60
48
void GlobalStats::updateUserCommands(ScoreboardSlot *scoreboard_slot)
61
49
{
62
50
  user_commands->merge(scoreboard_slot->getUserCommands());