My Project
sql_bootstrap.h
00001 /* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
00002 
00003    This program is free software; you can redistribute it and/or modify
00004    it under the terms of the GNU General Public License as published by
00005    the Free Software Foundation; version 2 of the License.
00006 
00007    This program is distributed in the hope that it will be useful,
00008    but WITHOUT ANY WARRANTY; without even the implied warranty of
00009    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010    GNU General Public License for more details.
00011 
00012    You should have received a copy of the GNU General Public License
00013    along with this program; if not, write to the Free Software Foundation,
00014    51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA */
00015 
00016 
00017 #ifndef SQL_BOOTSTRAP_H
00018 #define SQL_BOOTSTRAP_H
00019 
00026 #define MAX_BOOTSTRAP_QUERY_SIZE 20000
00027 
00031 #define MAX_BOOTSTRAP_LINE_SIZE 20000
00032 #define MAX_BOOTSTRAP_ERROR_LEN 256
00033 
00034 #define READ_BOOTSTRAP_SUCCESS     0
00035 #define READ_BOOTSTRAP_EOF         1
00036 #define READ_BOOTSTRAP_ERROR       2
00037 #define READ_BOOTSTRAP_QUERY_SIZE  3
00038 
00039 typedef void *fgets_input_t;
00040 typedef char * (*fgets_fn_t)(char *, size_t, fgets_input_t, int *error);
00041 
00042 int read_bootstrap_query(char *query, int *query_length,
00043                          fgets_input_t input, fgets_fn_t fgets_fn, int *error);
00044 
00045 #endif
00046 
00047 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines