1
/* Copyright (C) 2000-2006 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 2 of the License.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
21
/*****************************************************************************
28
32
#include <mysys/thr_alarm.h>
29
33
#include <mysys/mysys_err.h>
30
34
#include <drizzled/error.h>
31
#include <drizzled/innodb_plugin_extras.h>
32
35
#include <drizzled/query_id.h>
36
#include <drizzled/data_home.h>
38
extern scheduler_functions thread_scheduler;
35
40
The following is used to initialise Table_ident with a internal
598
603
m_internal_handler= NULL;
606
#if defined(__cplusplus)
602
610
void *session_alloc(Session *session, unsigned int size)
604
612
return session->alloc(size);
608
615
void *session_calloc(Session *session, unsigned int size)
610
617
return session->calloc(size);
614
620
char *session_strdup(Session *session, const char *str)
616
622
return session->strdup(str);
620
625
char *session_strmake(Session *session, const char *str, unsigned int size)
622
627
return session->strmake(str, size);
626
LEX_STRING *session_make_lex_string(Session *session, LEX_STRING *lex_str,
627
const char *str, unsigned int size,
628
int allocate_lex_string)
630
return session->make_lex_string(lex_str, str, size,
631
(bool) allocate_lex_string);
635
630
void *session_memdup(Session *session, const void* str, unsigned int size)
637
632
return session->memdup(str, size);
641
635
void session_get_xid(const Session *session, DRIZZLE_XID *xid)
643
637
*xid = *(DRIZZLE_XID *) &session->transaction.xid_state.xid;
640
#if defined(__cplusplus)
647
645
Init common variables that has to be reset on start and on change_user
2248
#ifdef INNODB_COMPATIBILITY_HOOKS
2247
LEX_STRING *session_make_lex_string(Session *session, LEX_STRING *lex_str,
2248
const char *str, unsigned int size,
2249
int allocate_lex_string)
2251
return session->make_lex_string(lex_str, str, size,
2252
(bool) allocate_lex_string);
2249
2255
extern "C" const struct charset_info_st *session_charset(Session *session)
2251
2257
return(session->charset());