]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/cats/cats.h
Bring 1.36.0 up to current 1.37 level
[bacula/bacula] / bacula / src / cats / cats.h
1 /*
2  * SQL header file
3  *
4  *   by Kern E. Sibbald
5  *
6  *   Anyone who accesses the database will need to include
7  *   this file.
8  *
9  * This file contains definitions common to sql.c and
10  * the external world, and definitions destined only
11  * for the external world. This is control with
12  * the define __SQL_C, which is defined only in sql.c
13  *
14  *    Version $Id$
15  */
16
17 /*
18    Copyright (C) 2000-2004 Kern Sibbald and John Walker
19
20    This program is free software; you can redistribute it and/or
21    modify it under the terms of the GNU General Public License as
22    published by the Free Software Foundation; either version 2 of
23    the License, or (at your option) any later version.
24
25    This program is distributed in the hope that it will be useful,
26    but WITHOUT ANY WARRANTY; without even the implied warranty of
27    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28    General Public License for more details.
29
30    You should have received a copy of the GNU General Public
31    License along with this program; if not, write to the Free
32    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
33    MA 02111-1307, USA.
34
35  */
36
37 #ifndef __SQL_H_
38 #define __SQL_H_ 1
39
40
41 typedef void (DB_LIST_HANDLER)(void *, const char *);
42 typedef int (DB_RESULT_HANDLER)(void *, int, char **);
43
44 #define db_lock(mdb)   _db_lock(__FILE__, __LINE__, mdb)
45 #define db_unlock(mdb) _db_unlock(__FILE__, __LINE__, mdb)
46
47 #ifdef __SQL_C
48
49 #ifdef HAVE_SQLITE
50
51 #define BDB_VERSION 8
52
53 #include <sqlite.h>
54
55 /* Define opaque structure for sqlite */
56 struct sqlite {
57    char dummy;
58 };
59
60 #define IS_NUM(x)             ((x) == 1)
61 #define IS_NOT_NULL(x)        ((x) == 1)
62
63 typedef struct s_sql_field {
64    char *name;                        /* name of column */
65    int length;                        /* length */
66    int max_length;                    /* max length */
67    uint32_t type;                     /* type */
68    uint32_t flags;                    /* flags */
69 } SQL_FIELD;
70
71 /*
72  * This is the "real" definition that should only be
73  * used inside sql.c and associated database interface
74  * subroutines.
75  *                    S Q L I T E
76  */
77 typedef struct s_db {
78    BQUEUE bq;                         /* queue control */
79    brwlock_t lock;                    /* transaction lock */
80    struct sqlite *db;
81    char **result;
82    int status;
83    int nrow;                          /* nrow returned from sqlite */
84    int ncolumn;                       /* ncolum returned from sqlite */
85    int num_rows;                      /* used by code */
86    int row;                           /* seek row */
87    int field;                         /* seek field */
88    SQL_FIELD **fields;                /* defined fields */
89    int ref_count;
90    char *db_name;
91    char *db_user;
92    char *db_address;                  /* host name address */
93    char *db_socket;                   /* socket for local access */
94    char *db_password;
95    int  db_port;                      /* port for host name address */
96    bool connected;                    /* connection made to db */
97    bool have_insert_id;               /* do not have insert id */
98    bool fields_defined;               /* set when fields defined */
99    char *sqlite_errmsg;               /* error message returned by sqlite */
100    POOLMEM *errmsg;                   /* nicely edited error message */
101    POOLMEM *cmd;                      /* SQL command string */
102    POOLMEM *cached_path;              /* cached path name */
103    int cached_path_len;               /* length of cached path */
104    uint32_t cached_path_id;           /* cached path id */
105    bool allow_transactions;           /* transactions allowed */
106    bool transaction;                  /* transaction started */
107    int changes;                       /* changes during transaction */
108    POOLMEM *fname;                    /* Filename only */
109    POOLMEM *path;                     /* Path only */
110    POOLMEM *esc_name;                 /* Escaped file/path name */
111    int fnl;                           /* file name length */
112    int pnl;                           /* path name length */
113 } B_DB;
114
115
116 /* 
117  * "Generic" names for easier conversion   
118  *
119  *                    S Q L I T E
120  */
121 #define sql_store_result(x)   (x)->result
122 #define sql_free_result(x)    my_sqlite_free_table(x)
123 #define sql_fetch_row(x)      my_sqlite_fetch_row(x)
124 #define sql_query(x, y)       my_sqlite_query((x), (y))
125 #define sql_close(x)          sqlite_close((x)->db)  
126 #define sql_strerror(x)       (x)->sqlite_errmsg?(x)->sqlite_errmsg:"unknown"
127 #define sql_num_rows(x)       (x)->nrow
128 #define sql_data_seek(x, i)   (x)->row = (i)
129 #define sql_affected_rows(x)  1
130 #define sql_insert_id(x,y)    sqlite_last_insert_rowid((x)->db)
131 #define sql_field_seek(x, y)  my_sqlite_field_seek((x), (y))
132 #define sql_fetch_field(x)    my_sqlite_fetch_field(x)
133 #define sql_num_fields(x)     ((x)->ncolumn)
134 #define SQL_ROW               char**   
135
136
137
138 /* In cats/sqlite.c */
139 void       my_sqlite_free_table(B_DB *mdb);
140 SQL_ROW    my_sqlite_fetch_row(B_DB *mdb);
141 int        my_sqlite_query(B_DB *mdb, char *cmd);
142 void       my_sqlite_field_seek(B_DB *mdb, int field);
143 SQL_FIELD *my_sqlite_fetch_field(B_DB *mdb);
144
145
146 #else
147
148 #ifdef HAVE_MYSQL
149
150 #define BDB_VERSION 8
151
152 #include <mysql.h>
153
154 /*
155  * This is the "real" definition that should only be
156  * used inside sql.c and associated database interface
157  * subroutines.
158  *
159  *                     M Y S Q L
160  */
161 typedef struct s_db {
162    BQUEUE bq;                         /* queue control */
163    brwlock_t lock;                    /* transaction lock */
164    MYSQL mysql;
165    MYSQL *db;
166    MYSQL_RES *result;
167    int status;
168    my_ulonglong num_rows;
169    int ref_count;
170    char *db_name;
171    char *db_user;
172    char *db_password;
173    char *db_address;                  /* host address */
174    char *db_socket;                   /* socket for local access */
175    int db_port;                       /* port of host address */
176    int have_insert_id;                /* do have insert_id() */
177    bool connected;
178    POOLMEM *errmsg;                   /* nicely edited error message */
179    POOLMEM *cmd;                      /* SQL command string */
180    POOLMEM *cached_path;
181    int cached_path_len;               /* length of cached path */
182    uint32_t cached_path_id;
183    int changes;                       /* changes made to db */
184    POOLMEM *fname;                    /* Filename only */
185    POOLMEM *path;                     /* Path only */
186    POOLMEM *esc_name;                 /* Escaped file/path name */
187    int fnl;                           /* file name length */
188    int pnl;                           /* path name length */
189 } B_DB;
190
191 #define DB_STATUS int
192
193 /* "Generic" names for easier conversion */
194 #define sql_store_result(x)   mysql_store_result((x)->db)
195 #define sql_free_result(x)    mysql_free_result((x)->result)
196 #define sql_fetch_row(x)      mysql_fetch_row((x)->result)
197 #define sql_query(x, y)       mysql_query((x)->db, (y))
198 #define sql_close(x)          mysql_close((x)->db)  
199 #define sql_strerror(x)       mysql_error((x)->db)
200 #define sql_num_rows(x)       mysql_num_rows((x)->result)
201 #define sql_data_seek(x, i)   mysql_data_seek((x)->result, (i))
202 #define sql_affected_rows(x)  mysql_affected_rows((x)->db)
203 #define sql_insert_id(x,y)    mysql_insert_id((x)->db)
204 #define sql_field_seek(x, y)  mysql_field_seek((x)->result, (y))
205 #define sql_fetch_field(x)    mysql_fetch_field((x)->result)
206 #define sql_num_fields(x)     (int)mysql_num_fields((x)->result)
207 #define SQL_ROW               MYSQL_ROW
208 #define SQL_FIELD             MYSQL_FIELD
209
210 #else
211
212 #ifdef HAVE_POSTGRESQL
213
214 #define BDB_VERSION 8
215
216 #include <libpq-fe.h>
217
218 /* TEMP: the following is taken from select OID, typname from pg_type; */
219 #define IS_NUM(x)             ((x) == 20 || (x) == 21 || (x) == 23 || (x) == 700 || (x) == 701)
220 #define IS_NOT_NULL(x)        ((x) == 1)
221
222 typedef char **POSTGRESQL_ROW;
223 typedef struct pg_field {
224         char         *name;
225         int           max_length;
226         unsigned int  type;
227         unsigned int  flags;       // 1 == not null
228 } POSTGRESQL_FIELD;
229
230
231 /*
232  * This is the "real" definition that should only be
233  * used inside sql.c and associated database interface
234  * subroutines.
235  *
236  *                     P O S T G R E S Q L
237  */
238 typedef struct s_db {
239    BQUEUE bq;                         /* queue control */
240    brwlock_t lock;                    /* transaction lock */
241    PGconn *db;
242    PGresult *result;
243    int status;
244    POSTGRESQL_ROW row;
245    POSTGRESQL_FIELD *fields;
246    int num_rows;
247    int num_fields;
248    int row_number;            /* what row number did we get via my_postgresql_data_seek? */
249    int field_number;          /* what field number did we get via my_postgresql_field_seek? */
250    int ref_count;
251    char *db_name;
252    char *db_user;
253    char *db_password;
254    char *db_address;              /* host address */
255    char *db_socket;               /* socket for local access */
256    int db_port;                   /* port of host address */
257    int have_insert_id;            /* do have insert_id() */
258    bool connected;
259    POOLMEM *errmsg;               /* nicely edited error message */
260    POOLMEM *cmd;                  /* SQL command string */
261    POOLMEM *cached_path;
262    int cached_path_len;           /* length of cached path */
263    uint32_t cached_path_id;
264    bool allow_transactions;       /* transactions allowed */
265    bool transaction;              /* transaction started */
266    int changes;                   /* changes made to db */
267    POOLMEM *fname;                /* Filename only */
268    POOLMEM *path;                 /* Path only */
269    POOLMEM *esc_name;             /* Escaped file/path name */
270    int fnl;                       /* file name length */
271    int pnl;                       /* path name length */
272 } B_DB;
273
274 void               my_postgresql_free_result(B_DB *mdb);
275 POSTGRESQL_ROW     my_postgresql_fetch_row  (B_DB *mdb);
276 int                my_postgresql_query      (B_DB *mdb, const char *query);
277 void               my_postgresql_data_seek  (B_DB *mdb, int row);
278 int                my_postgresql_currval    (B_DB *mdb, char *table_name);
279 void               my_postgresql_field_seek (B_DB *mdb, int row);
280 POSTGRESQL_FIELD * my_postgresql_fetch_field(B_DB *mdb);
281
282
283 /* "Generic" names for easier conversion */
284 #define sql_store_result(x)   ((x)->result)
285 #define sql_free_result(x)    my_postgresql_free_result(x)
286 #define sql_fetch_row(x)      my_postgresql_fetch_row(x)
287 #define sql_query(x, y)       my_postgresql_query((x), (y))
288 #define sql_close(x)          PQfinish((x)->db)  
289 #define sql_strerror(x)       PQresultErrorMessage((x)->result)
290 #define sql_num_rows(x)       ((unsigned) PQntuples((x)->result))
291 #define sql_data_seek(x, i)   my_postgresql_data_seek((x), (i))
292 #define sql_affected_rows(x)  ((unsigned) atoi(PQcmdTuples((x)->result)))
293 #define sql_insert_id(x,y)    my_postgresql_currval((x), (y))
294 #define sql_field_seek(x, y)  my_postgresql_field_seek((x), (y))
295 #define sql_fetch_field(x)    my_postgresql_fetch_field(x)
296 #define sql_num_fields(x)     ((x)->num_fields)
297 #define SQL_ROW               POSTGRESQL_ROW
298 #define SQL_FIELD             POSTGRESQL_FIELD
299
300 #else  /* USE BACULA DB routines */
301
302 #define HAVE_BACULA_DB 1
303
304 /* Change this each time there is some incompatible
305  * file format change!!!!
306  */
307 #define BDB_VERSION 13                /* file version number */
308
309 struct s_control {
310    int bdb_version;                   /* Version number */
311    uint32_t JobId;                    /* next Job Id */
312    uint32_t PoolId;                   /* next Pool Id */
313    uint32_t MediaId;                  /* next Media Id */
314    uint32_t JobMediaId;               /* next JobMedia Id */
315    uint32_t ClientId;                 /* next Client Id */
316    uint32_t FileSetId;                /* nest FileSet Id */
317    time_t time;                       /* time file written */
318 };
319
320
321 /* This is the REAL definition for using the
322  *  Bacula internal DB
323  */
324 typedef struct s_db {
325    BQUEUE bq;                         /* queue control */
326 /* pthread_mutex_t mutex;  */         /* single thread lock */
327    brwlock_t lock;                    /* transaction lock */
328    int ref_count;                     /* number of times opened */
329    struct s_control control;          /* control file structure */
330    int cfd;                           /* control file device */
331    FILE *jobfd;                       /* Jobs records file descriptor */
332    FILE *poolfd;                      /* Pool records fd */
333    FILE *mediafd;                     /* Media records fd */
334    FILE *jobmediafd;                  /* JobMedia records fd */
335    FILE *clientfd;                    /* Client records fd */
336    FILE *filesetfd;                   /* FileSet records fd */
337    char *db_name;                     /* name of database */
338    POOLMEM *errmsg;                   /* nicely edited error message */
339    POOLMEM *cmd;                      /* Command string */
340    POOLMEM *cached_path;
341    int cached_path_len;               /* length of cached path */
342    uint32_t cached_path_id;
343 } B_DB;
344
345 #endif /* HAVE_MYSQL */
346 #endif /* HAVE_SQLITE */
347 #endif /* HAVE_POSTGRESQL */
348
349 /* Use for better error location printing */
350 #define UPDATE_DB(jcr, db, cmd) UpdateDB(__FILE__, __LINE__, jcr, db, cmd)
351 #define INSERT_DB(jcr, db, cmd) InsertDB(__FILE__, __LINE__, jcr, db, cmd)
352 #define QUERY_DB(jcr, db, cmd) QueryDB(__FILE__, __LINE__, jcr, db, cmd)
353 #define DELETE_DB(jcr, db, cmd) DeleteDB(__FILE__, __LINE__, jcr, db, cmd)
354
355
356 #else    /* not __SQL_C */
357
358 /* This is a "dummy" definition for use outside of sql.c
359  */
360 typedef struct s_db {     
361    int dummy;                         /* for SunOS compiler */
362 } B_DB;  
363
364 #endif /*  __SQL_C */
365
366 extern uint32_t bacula_db_version;
367
368 /* ***FIXME*** FileId_t should *really* be uint64_t
369  *  but at the current time, this breaks MySQL.
370  */
371 typedef uint32_t FileId_t;
372 typedef uint32_t DBId_t;              /* general DB id type */
373 typedef uint32_t JobId_t;
374       
375 #define faddr_t long
376
377
378 /* Job information passed to create job record and update
379  * job record at end of job. Note, although this record
380  * contains all the fields found in the Job database record,
381  * it also contains fields found in the JobMedia record.
382  */
383 /* Job record */
384 struct JOB_DBR {
385    JobId_t JobId;
386    char Job[MAX_NAME_LENGTH];         /* Job unique name */
387    char Name[MAX_NAME_LENGTH];        /* Job base name */
388    int JobType;                       /* actually char(1) */
389    int JobLevel;                      /* actually char(1) */
390    int JobStatus;                     /* actually char(1) */
391    DBId_t ClientId;                   /* Id of client */
392    DBId_t PoolId;                     /* Id of pool */
393    DBId_t FileSetId;                  /* Id of FileSet */
394    time_t SchedTime;                  /* Time job scheduled */
395    time_t StartTime;                  /* Job start time */
396    time_t EndTime;                    /* Job termination time */
397    utime_t JobTDate;                  /* Backup time/date in seconds */
398    uint32_t VolSessionId;
399    uint32_t VolSessionTime;
400    uint32_t JobFiles;
401    uint32_t JobErrors;
402    uint32_t JobMissingFiles;
403    uint64_t JobBytes;
404
405    /* Note, FirstIndex, LastIndex, Start/End File and Block
406     * are only used in the JobMedia record.
407     */
408    uint32_t FirstIndex;               /* First index this Volume */
409    uint32_t LastIndex;                /* Last index this Volume */
410    uint32_t StartFile;
411    uint32_t EndFile;
412    uint32_t StartBlock;
413    uint32_t EndBlock;
414
415    char cSchedTime[MAX_TIME_LENGTH];
416    char cStartTime[MAX_TIME_LENGTH];
417    char cEndTime[MAX_TIME_LENGTH];
418    /* Extra stuff not in DB */
419    faddr_t rec_addr;
420 };
421
422 /* Job Media information used to create the media records
423  * for each Volume used for the job.
424  */
425 /* JobMedia record */
426 struct JOBMEDIA_DBR {
427    DBId_t JobMediaId;                 /* record id */
428    JobId_t  JobId;                    /* JobId */
429    DBId_t MediaId;                    /* MediaId */
430    uint32_t FirstIndex;               /* First index this Volume */
431    uint32_t LastIndex;                /* Last index this Volume */
432    uint32_t StartFile;                /* File for start of data */
433    uint32_t EndFile;                  /* End file on Volume */
434    uint32_t StartBlock;               /* start block on tape */
435    uint32_t EndBlock;                 /* last block */
436 };
437
438
439 /* Volume Parameter structure */
440 struct VOL_PARAMS {
441    char VolumeName[MAX_NAME_LENGTH];  /* Volume name */
442    uint32_t VolIndex;                 /* Volume seqence no. */ 
443    uint32_t FirstIndex;               /* First index this Volume */
444    uint32_t LastIndex;                /* Last index this Volume */
445    uint32_t StartFile;                /* File for start of data */
446    uint32_t EndFile;                  /* End file on Volume */
447    uint32_t StartBlock;               /* start block on tape */
448    uint32_t EndBlock;                 /* last block */
449 };
450
451
452 /* Attributes record -- NOT same as in database because
453  *  in general, this "record" creates multiple database
454  *  records (e.g. pathname, filename, fileattributes).
455  */
456 struct ATTR_DBR {
457    char *fname;                       /* full path & filename */
458    char *link;                        /* link if any */
459    char *attr;                        /* attributes statp */
460    uint32_t FileIndex;
461    uint32_t Stream;
462    JobId_t  JobId;
463    DBId_t ClientId;
464    DBId_t PathId;
465    DBId_t FilenameId;
466    FileId_t FileId;
467 };
468
469
470 /* File record -- same format as database */
471 struct FILE_DBR {
472    FileId_t FileId;
473    uint32_t FileIndex;
474    JobId_t  JobId;
475    DBId_t FilenameId;
476    DBId_t PathId;
477    JobId_t  MarkId;
478    char LStat[256];
479 /*   int Status; */
480    char SIG[50];
481    int SigType;                       /* NO_SIG/MD5_SIG/SHA1_SIG */
482 };
483
484 /* Pool record -- same format as database */
485 struct POOL_DBR {
486    DBId_t PoolId;
487    char Name[MAX_NAME_LENGTH];        /* Pool name */
488    uint32_t NumVols;                  /* total number of volumes */
489    uint32_t MaxVols;                  /* max allowed volumes */
490    int32_t UseOnce;                   /* set to use once only */
491    int32_t UseCatalog;                /* set to use catalog */
492    int32_t AcceptAnyVolume;           /* set to accept any volume sequence */
493    int32_t AutoPrune;                 /* set to prune automatically */
494    int32_t Recycle;                   /* default Vol recycle flag */
495    utime_t  VolRetention;             /* retention period in seconds */
496    utime_t  VolUseDuration;           /* time in secs volume can be used */
497    uint32_t MaxVolJobs;               /* Max Jobs on Volume */
498    uint32_t MaxVolFiles;              /* Max files on Volume */
499    uint64_t MaxVolBytes;              /* Max bytes on Volume */
500    char PoolType[MAX_NAME_LENGTH];             
501    char LabelFormat[MAX_NAME_LENGTH];
502    /* Extra stuff not in DB */
503    faddr_t rec_addr;
504 };
505
506 /* Media record -- same as the database */
507 struct MEDIA_DBR {
508    DBId_t MediaId;                    /* Unique volume id */
509    char VolumeName[MAX_NAME_LENGTH];  /* Volume name */
510    char MediaType[MAX_NAME_LENGTH];   /* Media type */
511    DBId_t PoolId;                     /* Pool id */
512    time_t   FirstWritten;             /* Time Volume first written */
513    time_t   LastWritten;              /* Time Volume last written */
514    time_t   LabelDate;                /* Date/Time Volume labeled */
515    uint32_t VolJobs;                  /* number of jobs on this medium */
516    uint32_t VolFiles;                 /* Number of files */
517    uint32_t VolBlocks;                /* Number of blocks */
518    uint32_t VolMounts;                /* Number of times mounted */
519    uint32_t VolErrors;                /* Number of read/write errors */
520    uint32_t VolWrites;                /* Number of writes */
521    uint32_t VolReads;                 /* Number of reads */
522    uint64_t VolBytes;                 /* Number of bytes written */
523    uint64_t MaxVolBytes;              /* Max bytes to write to Volume */
524    uint64_t VolCapacityBytes;         /* capacity estimate */
525    uint64_t VolReadTime;              /* time spent reading volume */
526    uint64_t VolWriteTime;             /* time spent writing volume */
527    utime_t  VolRetention;             /* Volume retention in seconds */
528    utime_t  VolUseDuration;           /* time in secs volume can be used */
529    uint32_t MaxVolJobs;               /* Max Jobs on Volume */
530    uint32_t MaxVolFiles;              /* Max files on Volume */
531    int32_t  Recycle;                  /* recycle yes/no */
532    int32_t  Slot;                     /* slot in changer */
533    int32_t  InChanger;                /* Volume currently in changer */
534    uint32_t EndFile;                  /* Last file on volume */
535    uint32_t EndBlock;                 /* Last block on volume */
536    char VolStatus[20];                /* Volume status */
537    /* Extra stuff not in DB */
538    faddr_t rec_addr;                  /* found record address */
539    /* Since the database returns times as strings, this is how we pass
540     *   them back.
541     */
542    char    cFirstWritten[MAX_TIME_LENGTH]; /* FirstWritten returned from DB */
543    char    cLastWritten[MAX_TIME_LENGTH];  /* LastWritten returned from DB */
544    char    cLabelData[MAX_TIME_LENGTH];    /* LabelData returned from DB */
545 };
546
547 /* Client record -- same as the database */
548 struct CLIENT_DBR {
549    DBId_t ClientId;                   /* Unique Client id */
550    int AutoPrune;
551    utime_t FileRetention;
552    utime_t JobRetention;
553    char Name[MAX_NAME_LENGTH];        /* Client name */
554    char Uname[256];                   /* Uname for client */
555 };
556
557 /* Counter record as in database */
558 struct COUNTER_DBR {
559    char Counter[MAX_NAME_LENGTH];
560    int32_t MinValue;
561    int32_t MaxValue;
562    int32_t CurrentValue;
563    char WrapCounter[MAX_NAME_LENGTH];
564 };
565
566
567 /* FileSet record -- same as the database */
568 struct FILESET_DBR {
569    DBId_t FileSetId;                  /* Unique FileSet id */
570    char FileSet[MAX_NAME_LENGTH];     /* FileSet name */
571    char MD5[50];                      /* MD5 signature of include/exclude */
572    time_t CreateTime;                 /* date created */
573    /*
574     * This is where we return CreateTime
575     */
576    char cCreateTime[MAX_TIME_LENGTH]; /* CreateTime as returned from DB */
577    /* Not in DB but returned by db_create_fileset() */
578    bool created;                      /* set when record newly created */
579 };
580
581
582
583 #include "protos.h"
584 #include "jcr.h"
585
586 /*
587  * Some functions exported by sql.c for use withing the 
588  *   cats directory.
589  */
590 void list_result(B_DB *mdb, DB_LIST_HANDLER *send, void *ctx, e_list_type type);
591 void list_dashes(B_DB *mdb, DB_LIST_HANDLER *send, void *ctx);
592 int get_sql_record_max(JCR *jcr, B_DB *mdb);
593 int check_tables_version(JCR *jcr, B_DB *mdb);
594 void _db_unlock(const char *file, int line, B_DB *mdb);
595 void _db_lock(const char *file, int line, B_DB *mdb);
596  
597 #endif /* __SQL_H_ */