~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_class.cc

Merged in fix-headers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2000-2006 MySQL AB
2
 
 
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.
6
 
 
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.
11
 
 
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:
 
3
 *
 
4
 *  Copyright (C) 2008 Sun Microsystems
 
5
 *
 
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.
 
9
 *
 
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.
 
14
 *
 
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
 
18
 */
15
19
 
16
20
 
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>
33
37
 
 
38
extern scheduler_functions thread_scheduler;
34
39
/*
35
40
  The following is used to initialise Table_ident with a internal
36
41
  table name
598
603
  m_internal_handler= NULL;
599
604
}
600
605
 
601
 
extern "C"
 
606
#if defined(__cplusplus)
 
607
extern "C" {
 
608
#endif
 
609
 
602
610
void *session_alloc(Session *session, unsigned int size)
603
611
{
604
612
  return session->alloc(size);
605
613
}
606
614
 
607
 
extern "C"
608
615
void *session_calloc(Session *session, unsigned int size)
609
616
{
610
617
  return session->calloc(size);
611
618
}
612
619
 
613
 
extern "C"
614
620
char *session_strdup(Session *session, const char *str)
615
621
{
616
622
  return session->strdup(str);
617
623
}
618
624
 
619
 
extern "C"
620
625
char *session_strmake(Session *session, const char *str, unsigned int size)
621
626
{
622
627
  return session->strmake(str, size);
623
628
}
624
629
 
625
 
extern "C"
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)
629
 
{
630
 
  return session->make_lex_string(lex_str, str, size,
631
 
                              (bool) allocate_lex_string);
632
 
}
633
 
 
634
 
extern "C"
635
630
void *session_memdup(Session *session, const void* str, unsigned int size)
636
631
{
637
632
  return session->memdup(str, size);
638
633
}
639
634
 
640
 
extern "C"
641
635
void session_get_xid(const Session *session, DRIZZLE_XID *xid)
642
636
{
643
637
  *xid = *(DRIZZLE_XID *) &session->transaction.xid_state.xid;
644
638
}
645
639
 
 
640
#if defined(__cplusplus)
 
641
}
 
642
#endif
 
643
 
646
644
/*
647
645
  Init common variables that has to be reset on start and on change_user
648
646
*/
2245
2243
}
2246
2244
 
2247
2245
 
2248
 
#ifdef INNODB_COMPATIBILITY_HOOKS
 
2246
extern "C"
 
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)
 
2250
{
 
2251
  return session->make_lex_string(lex_str, str, size,
 
2252
                              (bool) allocate_lex_string);
 
2253
}
 
2254
 
2249
2255
extern "C" const struct charset_info_st *session_charset(Session *session)
2250
2256
{
2251
2257
  return(session->charset());
2275
2281
{
2276
2282
  mark_transaction_to_rollback(session, all);
2277
2283
}
2278
 
#endif // INNODB_COMPATIBILITY_HOOKS */
2279
2284
 
2280
2285
 
2281
2286
/**