~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/time/month.cc

  • Committer: Lee Bieber
  • Date: 2011-03-18 04:10:25 UTC
  • mfrom: (2241.1.2 build)
  • Revision ID: kalebral@gmail.com-20110318041025-1xoj1azy6zobhnbm
Merge Stewart - refactoring of default values
Merge Olaf - more refactoring

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
 
#include "drizzled/temporal.h"
23
 
#include "drizzled/error.h"
24
 
#include "drizzled/session.h"
25
 
#include "drizzled/function/time/month.h"
 
22
#include <drizzled/temporal.h>
 
23
#include <drizzled/error.h>
 
24
#include <drizzled/session.h>
 
25
#include <drizzled/function/time/month.h>
 
26
#include <drizzled/typelib.h>
26
27
 
27
28
namespace drizzled
28
29
{
116
117
  }
117
118
  const char *month_name;
118
119
  uint32_t   month= (uint) val_int();
119
 
  Session *session= current_session;
120
120
 
121
121
  if (null_value || !month)
122
122
  {
124
124
    return (String*) 0;
125
125
  }
126
126
  null_value=0;
127
 
  month_name= session->variables.lc_time_names->month_names->type_names[month-1];
 
127
  month_name= getSession().variables.lc_time_names->month_names->type_names[month-1];
128
128
  str->set(month_name, strlen(month_name), system_charset_info);
129
129
  return str;
130
130
}