~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/status_dictionary/status.cc

  • Committer: lbieber
  • Date: 2010-10-01 13:06:31 UTC
  • mfrom: (1802.2.2 drizzle-bug-651948)
  • mto: This revision was merged to the branch mainline in revision 1805.
  • Revision ID: lbieber@orisndriz08-20101001130631-xubscnhmj7r5dn6g
Merge Andrew - Fix bug 651948 - Index lengths not retrieved using drizzledump

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
71
71
      drizzle_show_var tmp;
72
72
 
73
73
      for (var= variables; var->type == SHOW_FUNC; var= &tmp)
74
 
        ((drizzle_show_var_func)((st_show_var_func_container *)var->value)->func)(&tmp, buff);
 
74
        ((mysql_show_var_func)((st_show_var_func_container *)var->value)->func)(&tmp, buff);
75
75
    }
76
76
 
77
77
    if (isWild(variables->name))
95
95
  std::ostringstream oss;
96
96
  std::string return_value;
97
97
 
 
98
  LOCK_global_system_variables.lock();
 
99
 
 
100
  if (show_type == SHOW_SYS)
98
101
  {
99
 
    boost::mutex::scoped_lock scopedLock(getSession().catalog().systemVariableLock());
100
 
 
101
 
    if (show_type == SHOW_SYS)
102
 
    {
103
 
      show_type= ((sys_var*) value)->show_type();
104
 
      value= (char*) ((sys_var*) value)->value_ptr(&(getSession()), option_type,
105
 
                                                   &null_lex_str);
106
 
    }
107
 
 
108
 
    return_value= StatusHelper::fillHelper(NULL, value, show_type); 
 
102
    show_type= ((sys_var*) value)->show_type();
 
103
    value= (char*) ((sys_var*) value)->value_ptr(&(getSession()), option_type,
 
104
                                                 &null_lex_str);
109
105
  }
 
106
 
 
107
  return_value= StatusHelper::fillHelper(NULL, value, show_type); 
 
108
 
 
109
  LOCK_global_system_variables.unlock();
110
110
  push(name);
111
 
 
112
111
  if (return_value.length())
113
112
    push(return_value);
114
113
  else