~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

edit

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>
26
 
#include <drizzled/typelib.h>
 
22
#include "drizzled/temporal.h"
 
23
#include "drizzled/error.h"
 
24
#include "drizzled/session.h"
 
25
#include "drizzled/function/time/month.h"
27
26
 
28
27
namespace drizzled
29
28
{
117
116
  }
118
117
  const char *month_name;
119
118
  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= getSession().variables.lc_time_names->month_names->type_names[month-1];
 
127
  month_name= session->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
}