~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/show.cc

  • Committer: Monty Taylor
  • Date: 2010-02-04 08:14:46 UTC
  • mfrom: (1277.2.1 build) (1280.2.1 build)
  • mto: This revision was merged to the branch mainline in revision 1283.
  • Revision ID: mordred@inaugust.com-20100204081446-ldh9m486va30uap6
Put everything in drizzled into drizzled namespace.
Put internal stuff into drizzled::internal namespace.
Removed some cruft.
Now every symbol that is shipped in a header is in the drizzled namespace
and everything in the server that's not shipped is labeled internal. woot. 
Removed a lot of the extra extern "C" stuff that was in there. Less ugliness for
internal callbacks now for Sun Studio.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
#include <algorithm>
61
61
 
62
62
using namespace std;
63
 
using namespace drizzled;
 
63
 
 
64
namespace drizzled
 
65
{
64
66
 
65
67
inline const char *
66
68
str_or_nil(const char *str)
70
72
 
71
73
static void store_key_options(String *packet, Table *table, KEY *key_info);
72
74
 
73
 
 
74
 
 
75
75
int wild_case_compare(const CHARSET_INFO * const cs, const char *str,const char *wildstr)
76
76
{
77
77
  register int flag;
78
78
  while (*wildstr)
79
79
  {
80
 
    while (*wildstr && *wildstr != wild_many && *wildstr != wild_one)
 
80
    while (*wildstr && *wildstr != internal::wild_many && *wildstr != internal::wild_one)
81
81
    {
82
 
      if (*wildstr == wild_prefix && wildstr[1])
 
82
      if (*wildstr == internal::wild_prefix && wildstr[1])
83
83
        wildstr++;
84
84
      if (my_toupper(cs, *wildstr++) != my_toupper(cs, *str++))
85
85
        return (1);
86
86
    }
87
87
    if (! *wildstr )
88
88
      return (*str != 0);
89
 
    if (*wildstr++ == wild_one)
 
89
    if (*wildstr++ == internal::wild_one)
90
90
    {
91
91
      if (! *str++)
92
92
        return (1);     /* One char; skip */
95
95
    {                                           /* Found '*' */
96
96
      if (! *wildstr)
97
97
        return (0);             /* '*' as last char: OK */
98
 
      flag=(*wildstr != wild_many && *wildstr != wild_one);
 
98
      flag=(*wildstr != internal::wild_many && *wildstr != internal::wild_one);
99
99
      do
100
100
      {
101
101
        if (flag)
102
102
        {
103
103
          char cmp;
104
 
          if ((cmp= *wildstr) == wild_prefix && wildstr[1])
 
104
          if ((cmp= *wildstr) == internal::wild_prefix && wildstr[1])
105
105
            cmp= wildstr[1];
106
106
          cmp= my_toupper(cs, cmp);
107
107
          while (*str && my_toupper(cs, *str) != cmp)
178
178
 
179
179
    file_name_len= filename_to_tablename(entry->filename.c_str(), uname,
180
180
                                         sizeof(uname));
181
 
    if (wild && wild_compare(uname, wild, 0))
 
181
    if (wild && internal::wild_compare(uname, wild, 0))
182
182
    {
183
183
      ++entry_iter;
184
184
      continue;
681
681
      table->s->getKeyBlockSize() != key_info->block_size)
682
682
  {
683
683
    packet->append(STRING_WITH_LEN(" KEY_BLOCK_SIZE="));
684
 
    end= int64_t10_to_str(key_info->block_size, buff, 10);
 
684
    end= internal::int64_t10_to_str(key_info->block_size, buff, 10);
685
685
    packet->append(buff, (uint32_t) (end - buff));
686
686
  }
687
687
 
752
752
    {
753
753
      tmp= *it;
754
754
      Security_context *tmp_sctx= &tmp->security_ctx;
755
 
      struct st_my_thread_var *mysys_var;
 
755
      internal::st_my_thread_var *mysys_var;
756
756
      if (tmp->client->isConnected() && (!user || (tmp_sctx->user.c_str() && !strcmp(tmp_sctx->user.c_str(), user))))
757
757
      {
758
758
 
1475
1475
    file_name= session->make_lex_string(file_name, (*it).c_str(),
1476
1476
                                        (*it).length(), true);
1477
1477
    const char* wild= lookup_field_vals->table_value.str;
1478
 
    if (wild && wild_compare((*it).c_str(), wild, 0))
 
1478
    if (wild && internal::wild_compare((*it).c_str(), wild, 0))
1479
1479
      continue;
1480
1480
 
1481
1481
    table_names.push_back(file_name);
2111
2111
  return false;
2112
2112
}
2113
2113
 
 
2114
} /* namespace drizzled */