drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
internal/definitions.h
Go to the documentation of this file.
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 */
19
25
26#ifndef MYSYS_DEFINITIONS_H
27#define MYSYS_DEFINITIONS_H
28
29enum thr_lock_type { TL_IGNORE=-1,
30 /* UNLOCK ANY LOCK */
31 TL_UNLOCK,
32 /* Read lock */
33 TL_READ,
34 TL_READ_WITH_SHARED_LOCKS,
35 /* READ, Don't allow concurrent insert */
36 TL_READ_NO_INSERT,
37 /*
38 Write lock, but allow other threads to read / write.
39 Used by BDB tables in MySQL to mark that someone is
40 reading/writing to the table.
41 */
42 TL_WRITE_ALLOW_WRITE,
43 /*
44 Write lock, but allow other threads to read.
45 Used by ALTER TABLE in MySQL to allow readers
46 to use the table until ALTER TABLE is finished.
47 */
48 TL_WRITE_ALLOW_READ,
49 /*
50 WRITE lock used by concurrent insert. Will allow
51 READ, if one could use concurrent insert on table.
52 */
53 TL_WRITE_CONCURRENT_INSERT,
54 /*
55 parser only! Late bound low_priority flag.
56 At open_tables() becomes thd->update_lock_default.
57 */
58 TL_WRITE_DEFAULT,
59 /* Normal WRITE lock */
60 TL_WRITE,
61 /* Abort new lock request with an error */
62 TL_WRITE_ONLY};
63
64enum enum_thr_lock_result { THR_LOCK_SUCCESS= 0, THR_LOCK_ABORTED= 1,
65 THR_LOCK_WAIT_TIMEOUT= 2, THR_LOCK_DEADLOCK= 3 };
66
67
68#endif /* MYSYS_DEFINITIONS_H */