~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/get_system_var.cc

  • Committer: Olaf van der Spek
  • Date: 2011-11-22 14:53:10 UTC
  • mto: This revision was merged to the branch mainline in revision 2464.
  • Revision ID: olafvdspek@gmail.com-20111122145310-ebg2sdiz77kuyy4i
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
{
59
59
  str_ref *base_name, *component_name;
60
60
 
61
 
  if (component.data())
 
61
  if (component.empty())
 
62
  {
 
63
    base_name= &name;
 
64
    component_name= &component;                 // Empty string
 
65
  }
 
66
  else
62
67
  {
63
68
    base_name= &component;
64
69
    component_name= &name;
65
70
  }
66
 
  else
67
 
  {
68
 
    base_name= &name;
69
 
    component_name= &component;                 // Empty string
70
 
  }
71
71
 
72
 
  sys_var *var= find_sys_var(base_name->data());
 
72
  sys_var *var= find_sys_var(*base_name);
73
73
  if (not var)
74
74
    return NULL;
75
 
  if (component.data())
 
75
  if (not component.empty())
76
76
  {
77
77
    my_error(ER_VARIABLE_IS_NOT_STRUCT, MYF(0), base_name->data());
78
78
    return NULL;