1 #ifndef __MYDDAS_STRUCTS_H__ 2 #define __MYDDAS_STRUCTS_H__ 3 4 #include "myddas.h" 5 #ifdef MYDDAS_STATS 6 #include "myddas_statistics_structs.h" 7 #endif 8 9 struct myddas_global { 10 MYDDAS_UTIL_CONNECTION myddas_top_connections; 11 #ifdef MYDDAS_TOP_LEVEL 12 MYDDAS_UTIL_CONNECTION myddas_top_level_connection; 13 #endif 14 #ifdef MYDDAS_STATS 15 MYDDAS_GLOBAL_STATS myddas_statistics; 16 #endif 17 #ifdef DEBUG 18 /* Number times malloc was called */ 19 MyddasULInt malloc_called; 20 /* Memory allocated by MYDDAS */ 21 MyddasULInt memory_allocated; 22 23 /* Number times free was called */ 24 MyddasULInt free_called; 25 /* Memory freed by MYDDAS */ 26 MyddasULInt memory_freed; 27 #endif 28 }; 29 30 struct myddas_list_preds { 31 char *pred_module; 32 char *pred_name; 33 short pred_arity; 34 //void *pe; 35 MYDDAS_UTIL_PREDICATE next; 36 MYDDAS_UTIL_PREDICATE previous; 37 }; 38 39 struct myddas_list_connection { 40 void *connection; 41 42 /*If variable env is NULL, then it's a 43 MySQL connection, if not then it as the pointer 44 to the ODBC enviromment variable */ 45 void *odbc_enviromment; 46 47 #ifdef MYDDAS_STATS 48 MYDDAS_STATS_STRUCT stats; 49 #endif 50 MYDDAS_UTIL_PREDICATE predicates; 51 52 /* Multi Queries Section */ 53 unsigned long total_number_queries; 54 unsigned long actual_number_queries; 55 MYDDAS_UTIL_QUERY *queries; 56 57 /* List Integrety */ 58 MYDDAS_UTIL_CONNECTION next; 59 MYDDAS_UTIL_CONNECTION previous; 60 }; 61 62 struct myddas_util_query{ 63 char *query; 64 MYDDAS_UTIL_QUERY next; 65 }; 66 67 #endif 68