~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/handler/mysql_addons.cc

  • Committer: Monty Taylor
  • Date: 2009-03-22 08:04:21 UTC
  • mto: (960.5.2 mordred)
  • mto: This revision was merged to the branch mainline in revision 961.
  • Revision ID: mordred@inaugust.com-20090322080421-xkfmhsstf51vvazm
Moved innodb handler code back to handler/ dir.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/******************************************************
2
 
This file contains functions that need to be added to
3
 
MySQL code but have not been added yet.
4
 
 
5
 
Whenever you add a function here submit a MySQL bug
6
 
report (feature request) with the implementation. Then
7
 
write the bug number in the comment before the
8
 
function in this file.
9
 
 
10
 
When MySQL commits the function it can be deleted from
11
 
here. In a perfect world this file exists but is empty.
12
 
 
13
 
(c) 2007 Innobase Oy
14
 
 
15
 
Created November 07, 2007 Vasil Dimov
16
 
*******************************************************/
17
 
 
18
 
#ifndef MYSQL_SERVER
19
 
#define MYSQL_SERVER
20
 
#endif /* MYSQL_SERVER */
21
 
 
22
 
#include <mysql_priv.h>
23
 
 
24
 
#include "mysql_addons.h"
25
 
#include "univ.i"
26
 
 
27
 
/***********************************************************************
28
 
Retrieve THD::thread_id
29
 
http://bugs.mysql.com/30930 */
30
 
extern "C" UNIV_INTERN
31
 
unsigned long
32
 
ib_thd_get_thread_id(
33
 
/*=================*/
34
 
                                /* out: THD::thread_id */
35
 
        const void*     thd)    /* in: THD */
36
 
{
37
 
        return((unsigned long) ((THD*) thd)->thread_id);
38
 
}
39
 
 
40
 
/* http://bugs.mysql.com/40360 */
41
 
/* http://lists.mysql.com/commits/57450 */
42
 
/**
43
 
  See if the binary log is engaged for a thread, i.e., open and
44
 
  LOG_BIN is set.
45
 
 
46
 
  @return @c true if the binlog is active, @c false otherwise.
47
 
*/
48
 
my_bool ib_bin_log_is_engaged(const MYSQL_THD thd)
49
 
{
50
 
  return mysql_bin_log.is_open() && (thd->options & OPTION_BIN_LOG);
51
 
}