~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

Imported InnoDB plugin with changes.

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
}