~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table_function_container.cc

Add Solaris atomics fixes and test files. Add replication.h header to makefile.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2010 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2010 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
22
22
#include "drizzled/plugin/table_function.h"
23
23
#include "drizzled/table_function_container.h"
24
24
 
25
 
#include <iostream>
26
 
 
27
25
using namespace std;
28
26
 
29
27
namespace drizzled
49
47
  {
50
48
    plugin::TableFunction *tool= (*it).second;
51
49
 
52
 
    if (tool->visable())
 
50
    if (predicate.length())
53
51
    {
54
 
      if (predicate.length())
55
 
      {
56
 
        if (boost::iequals(predicate, tool->getSchemaHome()))
57
 
        {
58
 
          set_of_names.insert(tool->getTableLabel());
59
 
        }
60
 
      }
61
 
      else
 
52
      if (not predicate.compare(tool->getSchemaHome()))
62
53
      {
63
54
        set_of_names.insert(tool->getTableLabel());
64
55
      }
65
56
    }
 
57
    else
 
58
    {
 
59
      set_of_names.insert(tool->getTableLabel());
 
60
    }
66
61
  }
67
62
}
68
63
 
69
64
void TableFunctionContainer::addFunction(plugin::TableFunction *tool)
70
65
{
71
 
  std::pair<ToolMap::iterator, bool> ret=
72
 
    table_map.insert(std::make_pair(tool->getPath(), tool));
 
66
  std::pair<ToolMap::iterator, bool> ret;
 
67
 
 
68
  ret= table_map.insert(std::make_pair(tool->getPath(), tool));
73
69
  assert(ret.second == true);
74
70
}
75
71