1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2008 Sun Microsystems
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.
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.
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
23
* Mostly constants and enums used by mysys
26
#ifndef MYSYS_DEFINITIONS_H
27
#define MYSYS_DEFINITIONS_H
29
enum thr_lock_type { TL_IGNORE=-1,
34
TL_READ_WITH_SHARED_LOCKS,
35
/* READ, Don't allow concurrent insert */
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.
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.
50
WRITE lock used by concurrent insert. Will allow
51
READ, if one could use concurrent insert on table.
53
TL_WRITE_CONCURRENT_INSERT,
55
parser only! Late bound low_priority flag.
56
At open_tables() becomes thd->update_lock_default.
59
/* Normal WRITE lock */
61
/* Abort new lock request with an error */
64
enum enum_thr_lock_result { THR_LOCK_SUCCESS= 0, THR_LOCK_ABORTED= 1,
65
THR_LOCK_WAIT_TIMEOUT= 2, THR_LOCK_DEADLOCK= 3 };
68
#endif /* MYSYS_DEFINITIONS_H */