~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/srv/srv0que.c

Merge initial InnoDB+ import.

This was applied by generating a patch between MySQL 5.1.50 InnoDB plugin and
the just-merged innodb+ from mysql-trunk revision-id: vasil.dimov@oracle.com-20100422110752-1zowoqxel5xx3z2e

Then, some manual merge resolving and it worked. This should make it much
easier to merge the rest of InnoDB 1.1 and 1.2 from the mysql tree using
my bzr-reapply script.

This takes us to InnoDB 1.1.1(ish).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*****************************************************************************
2
 
 
3
 
Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved.
4
 
 
5
 
This program is free software; you can redistribute it and/or modify it under
6
 
the terms of the GNU General Public License as published by the Free Software
7
 
Foundation; version 2 of the License.
8
 
 
9
 
This program is distributed in the hope that it will be useful, but WITHOUT
10
 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
 
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12
 
 
13
 
You should have received a copy of the GNU General Public License along with
14
 
this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15
 
St, Fifth Floor, Boston, MA 02110-1301 USA
16
 
 
17
 
*****************************************************************************/
18
 
 
19
 
/**************************************************//**
20
 
@file srv/srv0que.c
21
 
Server query execution
22
 
 
23
 
Created 6/5/1996 Heikki Tuuri
24
 
*******************************************************/
25
 
 
26
 
#include "srv0que.h"
27
 
 
28
 
#include "srv0srv.h"
29
 
#include "sync0sync.h"
30
 
#include "os0thread.h"
31
 
#include "usr0sess.h"
32
 
#include "que0que.h"
33
 
 
34
 
/**********************************************************************//**
35
 
Enqueues a task to server task queue and releases a worker thread, if there
36
 
is a suspended one. */
37
 
UNIV_INTERN
38
 
void
39
 
srv_que_task_enqueue_low(
40
 
/*=====================*/
41
 
        que_thr_t*      thr)    /*!< in: query thread */
42
 
{
43
 
        ut_ad(thr);
44
 
        ut_ad(mutex_own(&kernel_mutex));
45
 
 
46
 
        UT_LIST_ADD_LAST(queue, srv_sys->tasks, thr);
47
 
 
48
 
        srv_release_threads(SRV_WORKER, 1);
49
 
}