~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/get_system_var.cc

  • Committer: Brian Aker
  • Date: 2011-02-22 06:12:02 UTC
  • mfrom: (2190.1.6 drizzle-build)
  • Revision ID: brian@tangent.org-20110222061202-k03czxykqy4x9hjs
List update, header fixes, multiple symbols, and David deletes some code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "config.h"
 
20
#include <config.h>
21
21
 
22
22
#include <drizzled/error.h>
23
23
#include <drizzled/function/get_system_var.h>
24
24
#include <drizzled/session.h>
 
25
#include <drizzled/sys_var.h>
25
26
 
26
27
namespace drizzled
27
28
{
49
50
  */
50
51
  if (!(item= var->item(session, var_type, &component)))
51
52
    return(1);                             // Impossible
 
53
 
52
54
  item->set_name(name, 0, system_charset_info); // don't allocate a new name
53
55
  session->change_item_tree(ref, item);
54
56
 
72
74
    component_name= &component;                 // Empty string
73
75
  }
74
76
 
75
 
  if (!(var= find_sys_var(base_name->str, base_name->length)))
 
77
  if (!(var= find_sys_var(base_name->str)))
76
78
    return 0;
77
79
  if (component.str)
78
80
  {
79
81
    my_error(ER_VARIABLE_IS_NOT_STRUCT, MYF(0), base_name->str);
80
82
    return 0;
81
83
  }
82
 
  session->lex->setCacheable(false);
 
84
  session->getLex()->setCacheable(false);
83
85
 
84
86
  set_if_smaller(component_name->length, (size_t)MAX_SYS_VAR_LENGTH);
85
87