2 Itzam/C (version 6.0) is an embedded database engine written in Standard C.
4 Copyright 2011 Scott Robert Ladd. All rights reserved.
6 Older versions of Itzam/C are:
7 Copyright 2002, 2004, 2006, 2008 Scott Robert Ladd. All rights reserved.
9 Ancestral code, from Java and C++ books by the author, is:
10 Copyright 1992, 1994, 1996, 2001 Scott Robert Ladd. All rights reserved.
12 Itzam/C is user-supported open source software. It's continued development is dependent on
13 financial support from the community. You can provide funding by visiting the Itzam/C
16 http://www.coyotegulch.com
18 You may license Itzam/C in one of two fashions:
20 1) Simplified BSD License (FreeBSD License)
22 Redistribution and use in source and binary forms, with or without modification, are
23 permitted provided that the following conditions are met:
25 1. Redistributions of source code must retain the above copyright notice, this list of
26 conditions and the following disclaimer.
28 2. Redistributions in binary form must reproduce the above copyright notice, this list
29 of conditions and the following disclaimer in the documentation and/or other materials
30 provided with the distribution.
32 THIS SOFTWARE IS PROVIDED BY SCOTT ROBERT LADD ``AS IS'' AND ANY EXPRESS OR IMPLIED
33 WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
34 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SCOTT ROBERT LADD OR
35 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
36 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
37 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
38 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
39 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
40 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 The views and conclusions contained in the software and documentation are those of the
43 authors and should not be interpreted as representing official policies, either expressed
44 or implied, of Scott Robert Ladd.
46 2) Closed-Source Proprietary License
48 If your project is a closed-source or proprietary project, the Simplified BSD License may
49 not be appropriate or desirable. In such cases, contact the Itzam copyright holder to
50 arrange your purchase of an appropriate license.
52 The author can be contacted at:
54 scott.ladd@coyotegulch.com
56 http:www.coyotegulch.com
59 /******************************************************************************
62 * Company XS Embedded GmbH
63 *****************************************************************************/
64 /******************************************************************************
65 Small changes to use in persistence
66 ******************************************************************************/
68 * @file persistence_client_itzam_errors.c
69 * @ingroup Persistence client library
70 * @author Ingo Huerner
71 * @brief Itzam database error definnitions
75 #include "persistence_client_library_itzam_errors.h"
78 const char * ERROR_STRINGS [] =
80 "invalid datafile signature",
82 "can not open 64-bit datafile on 32-bit operating system",
91 "rewrite record too small",
96 "unable to remove key record",
98 "unable to remove data record",
99 "list of deleted records could not be read",
100 "list of deleted records could not be written",
101 "iterator record count differs from database internal count",
102 "rewrite over deleted record",
103 "invalid column index",
105 "invalid hash value",
106 "memory allocation failed",
107 "attempt reading deleted record",
108 "invalid record signature found",
109 "invalid file locking mode",
110 "unable to lock datafile",
111 "unable to unlock datafile",
112 "size mismatch when reading record",
113 "attempt to start new transaction while one is already active",
114 "no transaction active",
115 "attempt to free a B-tree cursor when cursors were active",
116 "invalid datafile object",
117 "size_t is incompatible with Itzam",
118 "could not create datafile",
119 "global shared memory requires Administrator or user with SeCreateGlobalPrivilege",
120 "cannot create global shared memory",
121 "another process or thread has already created shared objects for this datafile",
122 "invalid operation for read only file"
125 const char * STATE_MESSAGES [] =
129 "version mismatch in files",
131 "iterator at beginning",
134 "exceeded maximum file size on 32-bit system",
135 "unable to write data record for index",
136 "sizeof(size_t) smaller than required for file references; possibly 64-bit DB on 32-bit platform",
137 "invalid operation for read only file"
141 void error_handler(const char * function_name, itzam_error error)
143 fprintf(stderr, "Itzam error in %s: %s\n", function_name, ERROR_STRINGS[error]);