You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
|
Aug
(7) |
Sep
(1) |
Oct
(19) |
Nov
(3) |
Dec
(18) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
|
Feb
(6) |
Mar
(13) |
Apr
(10) |
May
|
Jun
(17) |
Jul
(2) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(9) |
2004 |
Jan
(11) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(11) |
Jun
|
Jul
(51) |
Aug
(33) |
Sep
(11) |
Oct
|
Nov
(1) |
Dec
(1) |
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(19) |
Dec
|
2009 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(1) |
Mar
(4) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
(21) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
From: <da...@br...> - 2002-09-27 06:43:24
|
Update of /home/cvs/libdbi In directory backbeat:/tmp/cvs-serv8296 Modified Files: README.win32 Log Message: win32 note Index: README.win32 =================================================================== RCS file: /home/cvs/libdbi/README.win32,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- README.win32 11 Feb 2002 06:15:04 -0000 1.3 +++ README.win32 27 Sep 2002 06:43:19 -0000 1.4 @@ -27,6 +27,15 @@ "binutils-20011002-1" or newer. +USAGE: +------ + +Once libdbi is compiled for Win32 and you have a DLL, you can use that DLL like +any other. The only requirement is that the cygwin runtime DLL is available on +the target machine also, since non-Windows API functions are implemented by +cygwin. + + MODIFICATIONS AND REDISTRIBUTION (LGPL): ---------------------------------------- |
From: <da...@br...> - 2002-08-07 06:50:23
|
Update of /home/cvs/libdbi/src In directory backbeat:/tmp/cvs-serv2410/src Modified Files: dbd_helper.c dbi_main.c dbi_result.c Log Message: many bugfixes, sizes without ints, debian updates finished (still need to change field_sizes to ulong from ulonglong) Index: dbd_helper.c =================================================================== RCS file: /home/cvs/libdbi/src/dbd_helper.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- dbd_helper.c 14 Jun 2002 23:29:25 -0000 1.17 +++ dbd_helper.c 7 Aug 2002 06:50:18 -0000 1.18 @@ -55,7 +55,7 @@ return 1; } -dbi_result_t *_dbd_result_create(dbi_conn_t *conn, void *handle, unsigned int numrows_matched, unsigned int numrows_affected) { +dbi_result_t *_dbd_result_create(dbi_conn_t *conn, void *handle, unsigned long long numrows_matched, unsigned long long numrows_affected) { dbi_result_t *result = (dbi_result_t *) malloc(sizeof(dbi_result_t)); if (!result) return NULL; result->conn = conn; @@ -96,11 +96,11 @@ dbi_row_t *row = malloc(sizeof(dbi_row_t)); if (!row) return NULL; row->field_values = calloc(numfields, sizeof(dbi_data_t)); - row->field_sizes = calloc(numfields, sizeof(int)); + row->field_sizes = calloc(numfields, sizeof(unsigned long long)); return row; } -void _dbd_row_finalize(dbi_result_t *result, dbi_row_t *row, unsigned int idx) { +void _dbd_row_finalize(dbi_result_t *result, dbi_row_t *row, unsigned long long idx) { /* rowidx is one-based in the DBI user level */ result->rows[idx+1] = row; } @@ -144,9 +144,9 @@ } } -dbi_result_t *_dbd_result_create_from_stringarray(dbi_conn_t *conn, unsigned int numrows_matched, const char **stringarray) { +dbi_result_t *_dbd_result_create_from_stringarray(dbi_conn_t *conn, unsigned long long numrows_matched, const char **stringarray) { dbi_result_t *result = (dbi_result_t *) malloc(sizeof(dbi_result_t)); - unsigned int currow = 0; + unsigned long long currow = 0; const int numfields = 1; if (!result) return NULL; Index: dbi_main.c =================================================================== RCS file: /home/cvs/libdbi/src/dbi_main.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- dbi_main.c 19 Jun 2002 16:14:11 -0000 1.35 +++ dbi_main.c 7 Aug 2002 06:50:18 -0000 1.36 @@ -295,6 +295,10 @@ if (!driver || !orig || !*orig) return -1; newstr = malloc((strlen(*orig)*2)+4+1); /* worst case, we have to escape every character and add 2*2 surrounding quotes */ + + if (!newstr) { + return -1; + } newlen = driver->functions->quote_string(driver, *orig, newstr); if (newlen < 0) { Index: dbi_result.c =================================================================== RCS file: /home/cvs/libdbi/src/dbi_result.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- dbi_result.c 14 Jun 2002 23:56:18 -0000 1.22 +++ dbi_result.c 7 Aug 2002 06:50:18 -0000 1.23 @@ -43,7 +43,7 @@ static _field_binding_t *_find_or_create_binding_node(dbi_result_t *result, const char *fieldname); static void _remove_binding_node(dbi_result_t *result, _field_binding_t *deadbinding); static int _find_field(dbi_result_t *result, const char *fieldname); -static int _is_row_fetched(dbi_result_t *result, unsigned int row); +static int _is_row_fetched(dbi_result_t *result, unsigned long long row); static int _setup_binding(dbi_result_t *result, const char *fieldname, void *bindto, void *helperfunc); static void _activate_bindings(dbi_result_t *result); static int _parse_field_formatstr(const char *format, char ***tokens_dest, char ***fieldnames_dest); @@ -71,7 +71,7 @@ /* XXX ROW SEEKING AND FETCHING XXX */ -int dbi_result_seek_row(dbi_result Result, unsigned int row) { +int dbi_result_seek_row(dbi_result Result, unsigned long long row) { dbi_result_t *result = Result; int retval; @@ -128,19 +128,19 @@ return dbi_result_seek_row(Result, result->currowidx+1); } -unsigned int dbi_result_get_numrows(dbi_result Result) { +unsigned long long dbi_result_get_numrows(dbi_result Result) { dbi_result_t *result = Result; if (!result) return 0; return result->numrows_matched; } -unsigned int dbi_result_get_numrows_affected(dbi_result Result) { +unsigned long long dbi_result_get_numrows_affected(dbi_result Result) { dbi_result_t *result = Result; if (!result) return 0; return result->numrows_affected; } -unsigned int dbi_result_get_field_size(dbi_result Result, const char *fieldname) { +unsigned long long dbi_result_get_field_size(dbi_result Result, const char *fieldname) { dbi_result_t *result = Result; int idx = 0; @@ -154,10 +154,9 @@ return dbi_result_get_field_size_idx(Result, idx+1); } -unsigned int dbi_result_get_field_size_idx(dbi_result Result, unsigned int idx) { +unsigned long long dbi_result_get_field_size_idx(dbi_result Result, unsigned int idx) { dbi_result_t *result = Result; - int currowidx; - int temp; + unsigned long long currowidx; idx--; if (!result || !result->rows) return 0; @@ -171,18 +170,16 @@ return 0; } - temp = result->rows[currowidx]->field_sizes[idx]; - if (temp == -1) return 0; - else return temp; + return result->rows[currowidx]->field_sizes[idx]; } -unsigned int dbi_result_get_field_length(dbi_result Result, const char *fieldname) { - unsigned int size = dbi_result_get_field_size(Result, fieldname); +unsigned long long dbi_result_get_field_length(dbi_result Result, const char *fieldname) { + unsigned long long size = dbi_result_get_field_size(Result, fieldname); return (size == 0) ? 0 : size-1; } -unsigned int dbi_result_get_field_length_idx(dbi_result Result, unsigned int idx) { - unsigned int size = dbi_result_get_field_size_idx(Result, idx); +unsigned long long dbi_result_get_field_length_idx(dbi_result Result, unsigned int idx) { + unsigned long long size = dbi_result_get_field_size_idx(Result, idx); return (size == 0) ? 0 : size-1; } @@ -433,7 +430,7 @@ } static void _free_result_rows(dbi_result_t *result) { - int rowidx = 0; + unsigned long long rowidx = 0; int fieldidx = 0; for (rowidx = 0; rowidx <= result->numrows_matched; rowidx++) { @@ -1063,7 +1060,7 @@ unsigned char *dbi_result_get_binary_copy_idx(dbi_result Result, unsigned int idx) { unsigned char *ERROR = "ERROR"; char *newblob = NULL; - unsigned int size; + unsigned long long size; dbi_result_t *result = Result; idx--; @@ -1350,7 +1347,7 @@ return -1; } -static int _is_row_fetched(dbi_result_t *result, unsigned int row) { +static int _is_row_fetched(dbi_result_t *result, unsigned long long row) { if (!result->rows || (row >= result->numrows_matched)) return -1; return !(result->rows[row] == NULL); } |
From: <da...@br...> - 2002-08-07 06:50:22
|
Update of /home/cvs/libdbi/include/dbi In directory backbeat:/tmp/cvs-serv2410/include/dbi Modified Files: dbd.h dbi-dev.h dbi.h Log Message: many bugfixes, sizes without ints, debian updates finished (still need to change field_sizes to ulong from ulonglong) Index: dbd.h =================================================================== RCS file: /home/cvs/libdbi/include/dbi/dbd.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- dbd.h 14 Jun 2002 22:08:22 -0000 1.15 +++ dbd.h 7 Aug 2002 06:50:18 -0000 1.16 @@ -35,9 +35,9 @@ int dbd_initialize(dbi_driver_t *driver); int dbd_connect(dbi_conn_t *conn); int dbd_disconnect(dbi_conn_t *conn); -int dbd_fetch_row(dbi_result_t *result, unsigned int rownum); +int dbd_fetch_row(dbi_result_t *result, unsigned long long rownum); int dbd_free_query(dbi_result_t *result); -int dbd_goto_row(dbi_result_t *result, unsigned int row); +int dbd_goto_row(dbi_result_t *result, unsigned long long row); dbi_result_t *dbd_list_dbs(dbi_conn_t *conn, const char *pattern); dbi_result_t *dbd_list_tables(dbi_conn_t *conn, const char *db, const char *pattern); dbi_result_t *dbd_query(dbi_conn_t *conn, const char *statement); @@ -49,13 +49,13 @@ unsigned long long dbd_get_seq_next(dbi_conn_t *conn, const char *sequence); /* _DBD_* DRIVER AUTHORS HELPER FUNCTIONS */ -dbi_result_t *_dbd_result_create(dbi_conn_t *conn, void *handle, unsigned int numrows_matched, unsigned int numrows_affected); +dbi_result_t *_dbd_result_create(dbi_conn_t *conn, void *handle, unsigned long long numrows_matched, unsigned long long numrows_affected); void _dbd_result_set_numfields(dbi_result_t *result, unsigned int numfields); void _dbd_result_add_field(dbi_result_t *result, unsigned int idx, char *name, unsigned short type, unsigned int attribs); dbi_row_t *_dbd_row_allocate(unsigned int numfields); -void _dbd_row_finalize(dbi_result_t *result, dbi_row_t *row, unsigned int idx); +void _dbd_row_finalize(dbi_result_t *result, dbi_row_t *row, unsigned long long idx); void _dbd_internal_error_handler(dbi_conn_t *conn, const char *errmsg, const int errno); -dbi_result_t *_dbd_result_create_from_stringarray(dbi_conn_t *conn, unsigned int numrows_matched, const char **stringarray); +dbi_result_t *_dbd_result_create_from_stringarray(dbi_conn_t *conn, unsigned long long numrows_matched, const char **stringarray); void _dbd_register_driver_cap(dbi_driver_t *driver, const char *capname, int value); void _dbd_register_conn_cap(dbi_conn_t *conn, const char *capname, int value); int _dbd_result_add_to_conn(dbi_result_t *result); Index: dbi-dev.h =================================================================== RCS file: /home/cvs/libdbi/include/dbi/dbi-dev.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- dbi-dev.h 14 Jun 2002 23:56:18 -0000 1.20 +++ dbi-dev.h 7 Aug 2002 06:50:18 -0000 1.21 @@ -51,14 +51,15 @@ typedef struct dbi_row_s { dbi_data_t *field_values; - int *field_sizes; /* NULL field = 0, string field = len, anything else = -1 */ + unsigned long long *field_sizes; /* NULL field = 0, string field = len, anything else = -1 */ + /* XXX TODO: above is false as of 8/6/02. no -1 */ } dbi_row_t; typedef struct dbi_result_s { dbi_conn_t_pointer conn; void *result_handle; /* will be typecast into conn-specific type */ - unsigned long numrows_matched; /* set immediately after query */ - unsigned long numrows_affected; + unsigned long long numrows_matched; /* set immediately after query */ + unsigned long long numrows_affected; _field_binding_t_pointer field_bindings; unsigned int numfields; /* can be zero or NULL until first fetchrow */ @@ -68,7 +69,7 @@ enum { NOTHING_RETURNED, ROWS_RETURNED, GETTING_ROWS } result_state; /* nothing_returned: wasn't a SELECT query. returns_rows: select, but no rows fetched yet. getting_rows: select, at least one row has been fetched */ dbi_row_t **rows; /* array of filled rows, elements set to NULL if not fetched yet */ - unsigned long currowidx; + unsigned long long currowidx; } dbi_result_t; typedef struct _field_binding_s { @@ -110,9 +111,9 @@ int (*initialize)(dbi_driver_t_pointer); int (*connect)(dbi_conn_t_pointer); int (*disconnect)(dbi_conn_t_pointer); - int (*fetch_row)(dbi_result_t *, unsigned int); + int (*fetch_row)(dbi_result_t *, unsigned long long); int (*free_query)(dbi_result_t *); - int (*goto_row)(dbi_result_t *, unsigned int); + int (*goto_row)(dbi_result_t *, unsigned long long); int (*get_socket)(dbi_conn_t_pointer); dbi_result_t *(*list_dbs)(dbi_conn_t_pointer, const char *); dbi_result_t *(*list_tables)(dbi_conn_t_pointer, const char *, const char *); Index: dbi.h =================================================================== RCS file: /home/cvs/libdbi/include/dbi/dbi.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- dbi.h 14 Jun 2002 22:08:22 -0000 1.33 +++ dbi.h 7 Aug 2002 06:50:18 -0000 1.34 @@ -116,17 +116,17 @@ dbi_conn dbi_result_get_conn(dbi_result Result); int dbi_result_free(dbi_result Result); -int dbi_result_seek_row(dbi_result Result, unsigned int row); +int dbi_result_seek_row(dbi_result Result, unsigned long long row); int dbi_result_first_row(dbi_result Result); int dbi_result_last_row(dbi_result Result); int dbi_result_prev_row(dbi_result Result); int dbi_result_next_row(dbi_result Result); -unsigned int dbi_result_get_numrows(dbi_result Result); -unsigned int dbi_result_get_numrows_affected(dbi_result Result); -unsigned int dbi_result_get_field_size(dbi_result Result, const char *fieldname); -unsigned int dbi_result_get_field_size_idx(dbi_result Result, unsigned int idx); -unsigned int dbi_result_get_field_length(dbi_result Result, const char *fieldname); /* size-1 */ -unsigned int dbi_result_get_field_length_idx(dbi_result Result, unsigned int idx); +unsigned long long dbi_result_get_numrows(dbi_result Result); +unsigned long long dbi_result_get_numrows_affected(dbi_result Result); +unsigned long long dbi_result_get_field_size(dbi_result Result, const char *fieldname); +unsigned long long dbi_result_get_field_size_idx(dbi_result Result, unsigned long long idx); +unsigned long long dbi_result_get_field_length(dbi_result Result, const char *fieldname); /* size-1 */ +unsigned long long dbi_result_get_field_length_idx(dbi_result Result, unsigned long long idx); int dbi_result_get_field_idx(dbi_result Result, const char *fieldname); const char *dbi_result_get_field_name(dbi_result Result, unsigned int idx); unsigned int dbi_result_get_numfields(dbi_result Result); @@ -189,28 +189,28 @@ /* and now for the same exact thing in index form: */ -signed char dbi_result_get_char_idx(dbi_result Result, unsigned int idx); -unsigned char dbi_result_get_uchar_idx(dbi_result Result, unsigned int idx); -short dbi_result_get_short_idx(dbi_result Result, unsigned int idx); -unsigned short dbi_result_get_ushort_idx(dbi_result Result, unsigned int idx); -long dbi_result_get_long_idx(dbi_result Result, unsigned int idx); -unsigned long dbi_result_get_ulong_idx(dbi_result Result, unsigned int idx); -long long dbi_result_get_longlong_idx(dbi_result Result, unsigned int idx); -unsigned long long dbi_result_get_ulonglong_idx(dbi_result Result, unsigned int idx); +signed char dbi_result_get_char_idx(dbi_result Result, unsigned long long idx); +unsigned char dbi_result_get_uchar_idx(dbi_result Result, unsigned long long idx); +short dbi_result_get_short_idx(dbi_result Result, unsigned long long idx); +unsigned short dbi_result_get_ushort_idx(dbi_result Result, unsigned long long idx); +long dbi_result_get_long_idx(dbi_result Result, unsigned long long idx); +unsigned long dbi_result_get_ulong_idx(dbi_result Result, unsigned long long idx); +long long dbi_result_get_longlong_idx(dbi_result Result, unsigned long long idx); +unsigned long long dbi_result_get_ulonglong_idx(dbi_result Result, unsigned long long idx); -float dbi_result_get_float_idx(dbi_result Result, unsigned int idx); -double dbi_result_get_double_idx(dbi_result Result, unsigned int idx); +float dbi_result_get_float_idx(dbi_result Result, unsigned long long idx); +double dbi_result_get_double_idx(dbi_result Result, unsigned long long idx); -const char *dbi_result_get_string_idx(dbi_result Result, unsigned int idx); -const unsigned char *dbi_result_get_binary_idx(dbi_result Result, unsigned int idx); +const char *dbi_result_get_string_idx(dbi_result Result, unsigned long long idx); +const unsigned char *dbi_result_get_binary_idx(dbi_result Result, unsigned long long idx); -char *dbi_result_get_string_copy_idx(dbi_result Result, unsigned int idx); -unsigned char *dbi_result_get_binary_copy_idx(dbi_result Result, unsigned int idx); +char *dbi_result_get_string_copy_idx(dbi_result Result, unsigned long long idx); +unsigned char *dbi_result_get_binary_copy_idx(dbi_result Result, unsigned long long idx); -const char *dbi_result_get_enum_idx(dbi_result Result, unsigned int idx); -const char *dbi_result_get_set_idx(dbi_result Result, unsigned int idx); +const char *dbi_result_get_enum_idx(dbi_result Result, unsigned long long idx); +const char *dbi_result_get_set_idx(dbi_result Result, unsigned long long idx); -time_t dbi_result_get_datetime_idx(dbi_result Result, unsigned int idx); +time_t dbi_result_get_datetime_idx(dbi_result Result, unsigned long long idx); /* int dbi_result_bind_char_idx(dbi_result Result, unsigned int idx, char *bindto); |
From: <da...@br...> - 2002-08-07 06:50:22
|
Update of /home/cvs/libdbi/drivers/mysql In directory backbeat:/tmp/cvs-serv2410/drivers/mysql Modified Files: dbd_mysql.c Log Message: many bugfixes, sizes without ints, debian updates finished (still need to change field_sizes to ulong from ulonglong) Index: dbd_mysql.c =================================================================== RCS file: /home/cvs/libdbi/drivers/mysql/dbd_mysql.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- dbd_mysql.c 14 Jun 2002 22:08:22 -0000 1.54 +++ dbd_mysql.c 7 Aug 2002 06:50:17 -0000 1.55 @@ -56,7 +56,7 @@ void _translate_mysql_type(enum enum_field_types fieldtype, unsigned short *type, unsigned int *attribs); void _get_field_info(dbi_result_t *result); -void _get_row_data(dbi_result_t *result, dbi_row_t *row, unsigned int rowidx); +void _get_row_data(dbi_result_t *result, dbi_row_t *row, unsigned long long rowidx); time_t _parse_datetime(const char *raw, unsigned long attribs); void dbd_register_driver(const dbi_info_t **_driver_info, const char ***_custom_functions, const char ***_reserved_words) { @@ -107,7 +107,7 @@ return 0; } -int dbd_fetch_row(dbi_result_t *result, unsigned int rownum) { +int dbd_fetch_row(dbi_result_t *result, unsigned long long rownum) { dbi_row_t *row = NULL; if (result->result_state == NOTHING_RETURNED) return -1; @@ -132,7 +132,7 @@ return 0; } -int dbd_goto_row(dbi_result_t *result, unsigned int row) { +int dbd_goto_row(dbi_result_t *result, unsigned long long row) { // XXX TODO: kosherize this, handle efficient queries. mysql_data_seek((MYSQL_RES *)result->result_handle, row); return 1; @@ -141,7 +141,7 @@ int dbd_get_socket(dbi_conn_t *conn){ MYSQL *mycon = (MYSQL*)conn->connection; - if(!mycon) return -1; + if (!mycon) return -1; return (int)mycon->net.fd; } @@ -357,7 +357,7 @@ } } -void _get_row_data(dbi_result_t *result, dbi_row_t *row, unsigned int rowidx) { +void _get_row_data(dbi_result_t *result, dbi_row_t *row, unsigned long long rowidx) { MYSQL_RES *_res = result->result_handle; MYSQL_ROW _row; @@ -373,16 +373,14 @@ while (curfield < result->numfields) { raw = _row[curfield]; data = &row->field_values[curfield]; + + row->field_sizes[curfield] = 0; + /* this will be set to the string size later on if the field is indeed a string */ if (strsizes[curfield] == 0) { - row->field_sizes[curfield] = 0; curfield++; continue; } - else { - row->field_sizes[curfield] = -1; - /* this will be set to the string size later on if the field is indeed a string */ - } switch (result->field_types[curfield]) { case DBI_TYPE_INTEGER: @@ -414,10 +412,11 @@ break; case DBI_TYPE_STRING: data->d_string = strdup(raw); - row->field_sizes[curfield] = strsizes[curfield]; + row->field_sizes[curfield] = (unsigned long long) strsizes[curfield]; break; case DBI_TYPE_BINARY: - row->field_sizes[curfield] = strsizes[curfield]; + row->field_sizes[curfield] = (unsigned long long) strsizes[curfield]; + data->d_string = malloc(strsizes[curfield]); memcpy(data->d_string, raw, strsizes[curfield]); break; case DBI_TYPE_DATETIME: @@ -429,7 +428,7 @@ case DBI_TYPE_SET: default: data->d_string = strdup(raw); - row->field_sizes[curfield] = strsizes[curfield]; + row->field_sizes[curfield] = (unsigned long long) strsizes[curfield]; break; } |
From: <da...@br...> - 2002-08-07 06:50:22
|
Update of /home/cvs/libdbi In directory backbeat:/tmp/cvs-serv2410 Modified Files: TODO Log Message: many bugfixes, sizes without ints, debian updates finished (still need to change field_sizes to ulong from ulonglong) Index: TODO =================================================================== RCS file: /home/cvs/libdbi/TODO,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- TODO 15 Jun 2002 00:04:11 -0000 1.9 +++ TODO 7 Aug 2002 06:50:16 -0000 1.10 @@ -14,3 +14,12 @@ * others? - finish plugin author's guide - determine datatype information (how many bits an 'int' is, etc. mainly for portability to non-lintel systems) + + +-- + + +int -> long, ulonglong portable? +create result without row count, -1 for rowcount accessors +_get_field_info -> query, not firstrow + |
From: <da...@br...> - 2002-08-07 06:50:22
|
Update of /home/cvs/libdbi/drivers/template In directory backbeat:/tmp/cvs-serv2410/drivers/template Modified Files: dbd_template.c Log Message: many bugfixes, sizes without ints, debian updates finished (still need to change field_sizes to ulong from ulonglong) Index: dbd_template.c =================================================================== RCS file: /home/cvs/libdbi/drivers/template/dbd_template.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- dbd_template.c 15 Aug 2001 19:20:47 -0000 1.11 +++ dbd_template.c 7 Aug 2002 06:50:18 -0000 1.12 @@ -1,6 +1,6 @@ /* * libdbi - database independent abstraction layer for C. - * Copyright (C) 2001, David Parker and Mark Tobenkin. + * Copyright (C) 2001-2002, David Parker and Mark Tobenkin. * http://libdbi.sourceforge.net * * This library is free software; you can redistribute it and/or @@ -35,7 +35,7 @@ #include "dbd_template.h" -dbi_info_t plugin_info = { +dbi_info_t driver_info = { /* short name, used for loading drivers by name */ "template", /* short desc, no more than two sentences, no newlines */ @@ -62,14 +62,14 @@ time_t _parse_datetime(const char *raw, unsigned long attribs); -void dbd_register_plugin(const dbi_info_t **_plugin_info, const char ***_custom_functions, const char ***_reserved_words) { +void dbd_register_driver(const dbi_info_t **_driver_info, const char ***_custom_functions, const char ***_reserved_words) { /* this is the first function called after the plugin module is loaded into memory */ *_plugin_info = &plugin_info; *_custom_functions = custom_functions; *_reserved_words = reserved_words; } -int dbd_initialize(dbi_plugin_t *plugin) { +int dbd_initialize(dbi_driver_t *driver) { /* perform any database-specific server initialization. * this is called right after dbd_register_plugin(). * return -1 on error, 0 on success. if -1 is returned, the plugin will not @@ -78,7 +78,7 @@ return 0; } -int dbd_connect(dbi_driver_t *driver) { +int dbd_connect(dbi_conn_t *conn) { /* void *conn; */ const char *host = dbi_driver_get_option(driver, "host"); @@ -109,7 +109,7 @@ return 0; } -int dbd_disconnect(dbi_driver_t *driver) { +int dbd_disconnect(dbi_conn_t *conn) { /* if (driver->connection) XXX_close_connection(driver->connection); */ @@ -155,21 +155,26 @@ return 1; /* return 0 if failed, or not supported */ } -dbi_result_t *dbd_list_dbs(dbi_driver_t *driver) { +int dbd_get_socket(dbi_conn_t *conn){ + + return -1; +} + +dbi_result_t *dbd_list_dbs(dbi_conn_t *conn, const char *pattern) { /* return dbd_query(driver, "SELECT dbname FROM dbs"); */ return NULL; } -dbi_result_t *dbd_list_tables(dbi_driver_t *driver, const char *db) { +dbi_result_t *dbd_list_tables(dbi_conn_t *conn, const char *db, const char *pattern) { /* return dbi_driver_query((dbi_driver)driver, "SELECT tablename FROM tables WHERE db = '%s'", db); */ return NULL; } -int dbd_quote_string(dbi_plugin_t *plugin, const char *orig, char *dest) { +int dbd_quote_string(dbi_driver_t *driver, const char *orig, char *dest) { /* foo's -> 'foo\'s' */ /* dest is already allocated as (strlen(orig)*2)+4+1 @@ -193,7 +198,7 @@ return len+2; } -dbi_result_t *dbd_query(dbi_driver_t *driver, const char *statement) { +dbi_result_t *dbd_query(dbi_conn_t *conn, const char *statement) { /* allocate a new dbi_result_t and fill its applicable members: * * result_handle, numrows_matched, and numrows_changed. @@ -225,7 +230,11 @@ return result; } -char *dbd_select_db(dbi_driver_t *driver, const char *db) { +dbi_result_t *dbd_query_null(dbi_conn_t *conn, const unsigned char *statement, unsigned long st_length) { + return NULL; +} + +char *dbd_select_db(dbi_conn_t *conn, const char *db) { /* if not supported, return NULL. * if supported but there's an error, return "". */ @@ -239,7 +248,7 @@ return (char *)db; } -int dbd_geterror(dbi_driver_t *driver, int *errno, char **errstr) { +int dbd_geterror(dbi_conn_t *conn, int *errno, char **errstr) { /* put error number into errno, error string into errstr * return 0 if error, 1 if errno filled, 2 if errstr filled, 3 if both errno and errstr filled */ @@ -258,6 +267,16 @@ return 3; } + +unsigned long long dbd_get_seq_last(dbi_conn_t *conn, const char *sequence) { + return 0; +} + + +unsigned long long dbd_get_seq_next(dbi_conn_t *conn, const char *sequence) { + return 0; +} + /* CORE TEMPLATE-SPECIFIC FUNCTIONS */ |
From: <da...@br...> - 2002-08-07 06:50:22
|
Update of /home/cvs/libdbi/drivers/postgresql In directory backbeat:/tmp/cvs-serv2410/drivers/postgresql Modified Files: dbd_pgsql.c Log Message: many bugfixes, sizes without ints, debian updates finished (still need to change field_sizes to ulong from ulonglong) Index: dbd_pgsql.c =================================================================== RCS file: /home/cvs/libdbi/drivers/postgresql/dbd_pgsql.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- dbd_pgsql.c 19 Jun 2002 01:23:33 -0000 1.20 +++ dbd_pgsql.c 7 Aug 2002 06:50:17 -0000 1.21 @@ -55,7 +55,7 @@ void _translate_postgresql_type(unsigned int oid, unsigned short *type, unsigned int *attribs); void _get_field_info(dbi_result_t *result); -void _get_row_data(dbi_result_t *result, dbi_row_t *row, unsigned int rowidx); +void _get_row_data(dbi_result_t *result, dbi_row_t *row, unsigned long long rowidx); void dbd_register_driver(const dbi_info_t **_driver_info, const char ***_custom_functions, const char ***_reserved_words) { /* this is the first function called after the driver module is loaded into memory */ @@ -126,7 +126,7 @@ return 0; } -int dbd_fetch_row(dbi_result_t *result, unsigned int rownum) { +int dbd_fetch_row(dbi_result_t *result, unsigned long long rownum) { dbi_row_t *row = NULL; if (result->result_state == NOTHING_RETURNED) return -1; @@ -151,7 +151,7 @@ return 0; } -int dbd_goto_row(dbi_result_t *result, unsigned int row) { +int dbd_goto_row(dbi_result_t *result, unsigned long long row) { /* libpq doesn't have to do anything, the row index is specified when * fetching fields */ return 1; @@ -386,27 +386,25 @@ } } -void _get_row_data(dbi_result_t *result, dbi_row_t *row, unsigned int rowidx) { +void _get_row_data(dbi_result_t *result, dbi_row_t *row, unsigned long long rowidx) { int curfield = 0; char *raw = NULL; - int strsize = 0; + unsigned long long strsize = 0; unsigned long sizeattrib; dbi_data_t *data; while (curfield < result->numfields) { raw = PQgetvalue((PGresult *)result->result_handle, rowidx, curfield); - strsize = PQfmod((PGresult *)result->result_handle, curfield); + strsize = (unsigned long long) PQfmod((PGresult *)result->result_handle, curfield); data = &row->field_values[curfield]; + row->field_sizes[curfield] = 0; + /* will be set to strlen later on for strings */ + if (PQgetisnull((PGresult *)result->result_handle, rowidx, curfield) == 1) { - row->field_sizes[curfield] = 0; curfield++; continue; } - else { - row->field_sizes[curfield] = -1; - /* will be set to strlen later on for strings */ - } switch (result->field_types[curfield]) { case DBI_TYPE_INTEGER: @@ -442,6 +440,7 @@ break; case DBI_TYPE_BINARY: row->field_sizes[curfield] = strsize; + data->d_string = malloc(strsize); memcpy(data->d_string, raw, strsize); break; |
From: <da...@br...> - 2002-08-07 06:50:21
|
Update of /home/cvs/libdbi/debian In directory backbeat:/tmp/cvs-serv2410/debian Modified Files: changelog control libdbi0-dev.doc-base.driver libdbi0-dev.doc-base.programmer Log Message: many bugfixes, sizes without ints, debian updates finished (still need to change field_sizes to ulong from ulonglong) Index: changelog =================================================================== RCS file: /home/cvs/libdbi/debian/changelog,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- changelog 15 Jun 2002 00:04:12 -0000 1.10 +++ changelog 7 Aug 2002 06:50:17 -0000 1.11 @@ -1,3 +1,19 @@ +libdbi (0.6.5-3) unstable; urgency=low + + * Changed Standards-Version. + * More libdbi-dev to libdbi0-dev references. + * Fixed Build-Depends. + + -- David Parker <da...@ne...> Tue, 30 Jul 2002 11:31:11 -0700 + +libdbi (0.6.5-2) unstable; urgency=low + + * Changed libdbi-dev to libdbi0-dev + * Removed libdbi0's postrm and postinst since ldconfig is auto-added. + * Updated Standards-Version. + + -- David Parker <da...@ne...> Mon, 29 Jul 2002 23:21:43 -0700 + libdbi (0.6.5-1) unstable; urgency=low * New upstream release. Index: control =================================================================== RCS file: /home/cvs/libdbi/debian/control,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- control 12 May 2002 03:11:09 -0000 1.8 +++ control 7 Aug 2002 06:50:17 -0000 1.9 @@ -1,15 +1,17 @@ Source: libdbi Priority: optional Maintainer: David Parker <da...@ne...> -Build-Depends: debhelper (>> 3.0.0), libmysqlclient10, zlib1g (>= 1:1.1.4), libpgsql2 (>= 7.2) -Standards-Version: 3.5.2 +Build-Depends: debhelper (>> 3.0.0), libmysqlclient10-dev, zlib1g (>= 1:1.1.4), libpgsql2 (>= 7.2), postgresql-dev +Standards-Version: 3.5.6 -Package: libdbi-dev +Package: libdbi0-dev Section: devel Architecture: any Depends: libdbi0 (= ${Source-Version}) +Provides: libdbi-dev +Conflicts: libdbi-dev Description: Database Independent Abstraction Layer for C (dev files) - The libdbi-dev package contains the header files, static libraries, + The libdbi0-dev package contains the header files, static libraries, and documentation needed to develop applications with libdbi. Package: libdbi0 Index: libdbi0-dev.doc-base.driver =================================================================== RCS file: /home/cvs/libdbi/debian/libdbi0-dev.doc-base.driver,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- libdbi0-dev.doc-base.driver 12 May 2002 02:10:47 -0000 1.3 +++ libdbi0-dev.doc-base.driver 7 Aug 2002 06:50:17 -0000 1.4 @@ -6,8 +6,8 @@ Section: Apps/Programming Format: HTML -Index: /usr/share/doc/libdbi-dev/driver-guide/index.html -Files: /usr/share/doc/libdbi-dev/driver-guide/*.html +Index: /usr/share/doc/libdbi0-dev/driver-guide/index.html +Files: /usr/share/doc/libdbi0-dev/driver-guide/*.html Format: PDF -Files: /usr/share/doc/libdbi-dev/driver-guide.pdf +Files: /usr/share/doc/libdbi0-dev/driver-guide.pdf Index: libdbi0-dev.doc-base.programmer =================================================================== RCS file: /home/cvs/libdbi/debian/libdbi0-dev.doc-base.programmer,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- libdbi0-dev.doc-base.programmer 12 May 2002 02:10:47 -0000 1.1 +++ libdbi0-dev.doc-base.programmer 7 Aug 2002 06:50:17 -0000 1.2 @@ -6,8 +6,8 @@ Section: Apps/Programming Format: HTML -Index: /usr/share/doc/libdbi-dev/programmers-guide/index.html -Files: /usr/share/doc/libdbi-dev/programmers-guide/*.html +Index: /usr/share/doc/libdbi0-dev/programmers-guide/index.html +Files: /usr/share/doc/libdbi0-dev/programmers-guide/*.html Format: PDF -Files: /usr/share/doc/libdbi-dev/programmers-guide.pdf +Files: /usr/share/doc/libdbi0-dev/programmers-guide.pdf |
From: <da...@br...> - 2002-06-19 16:14:17
|
Update of /home/cvs/libdbi/src In directory backbeat:/tmp/cvs-serv6939/src Modified Files: dbi_main.c Log Message: cms has a brown paper bag waiting for me as soon as this is committed ;) Index: dbi_main.c =================================================================== RCS file: /home/cvs/libdbi/src/dbi_main.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- dbi_main.c 2002/06/19 01:23:33 1.34 +++ dbi_main.c 2002/06/19 16:14:11 1.35 @@ -178,6 +178,7 @@ if (strcasecmp(word, driver->reserved_words[idx]) == 0) { return 1; } + idx++; } return 0; } |
From: <da...@br...> - 2002-06-19 01:23:42
|
Update of /home/cvs/libdbi/src In directory backbeat:/tmp/cvs-serv5089/src Modified Files: dbi_main.c Log Message: cms's fixes and note about driver compilation Index: dbi_main.c =================================================================== RCS file: /home/cvs/libdbi/src/dbi_main.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** dbi_main.c 2002/06/14 23:56:18 1.33 --- dbi_main.c 2002/06/19 01:23:33 1.34 *************** *** 410,414 **** } ! asprintf(&errmsg, "%s%s", number_portion, conn->error_message); *errmsg_dest = errmsg; --- 410,414 ---- } ! asprintf(&errmsg, "%s%s", number_portion, conn->error_message ? conn->error_message : ""); *errmsg_dest = errmsg; |
From: <da...@br...> - 2002-06-19 01:23:40
|
Update of /home/cvs/libdbi In directory backbeat:/tmp/cvs-serv5089 Modified Files: README Log Message: cms's fixes and note about driver compilation Index: README =================================================================== RCS file: /home/cvs/libdbi/README,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** README 2002/06/14 22:29:06 1.6 --- README 2002/06/19 01:23:32 1.7 *************** *** 17,20 **** --- 17,33 ---- + INSTALLATION: + ------------- + + Perform the regular ./configure, make, make install. See INSTALL for the + generic details of each step. Some of the libdbi-specific options to configure + that may interest you are: --with-mysql, --with-pgsql. These will enable + compilation of specific database drivers, of which you will need at least one + to make libdbi do anything useful. See ./configure --help for more libdbi + configuration options. + + If you are building the Win32 port, see README.win32. + + FEATURES: --------- |
From: <da...@br...> - 2002-06-19 01:23:40
|
Update of /home/cvs/libdbi/drivers/postgresql In directory backbeat:/tmp/cvs-serv5089/drivers/postgresql Modified Files: dbd_pgsql.c Log Message: cms's fixes and note about driver compilation Index: dbd_pgsql.c =================================================================== RCS file: /home/cvs/libdbi/drivers/postgresql/dbd_pgsql.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** dbd_pgsql.c 2002/06/14 04:20:21 1.19 --- dbd_pgsql.c 2002/06/19 01:23:33 1.20 *************** *** 276,285 **** result = dbd_query(conn, sql_cmd); free(sql_cmd); ! ! rawdata = PQgetvalue((PGresult *)result->result_handle, 0, 0); ! if (rawdata) { ! seq_last = atoll(rawdata); } - dbi_result_free((dbi_result)result); return seq_last; --- 276,287 ---- result = dbd_query(conn, sql_cmd); free(sql_cmd); ! ! if (result) { ! rawdata = PQgetvalue((PGresult *)result->result_handle, 0, 0); ! if (rawdata) { ! seq_last = atoll(rawdata); ! } ! dbi_result_free((dbi_result)result); } return seq_last; *************** *** 296,305 **** result = dbd_query(conn, sql_cmd); free(sql_cmd); ! ! rawdata = PQgetvalue((PGresult *)result->result_handle, 0, 0); ! if (rawdata) { ! seq_next = atoll(rawdata); } - dbi_result_free((dbi_result)result); return seq_next; --- 298,309 ---- result = dbd_query(conn, sql_cmd); free(sql_cmd); ! ! if (result) { ! rawdata = PQgetvalue((PGresult *)result->result_handle, 0, 0); ! if (rawdata) { ! seq_next = atoll(rawdata); ! } ! dbi_result_free((dbi_result)result); } return seq_next; |
From: <da...@br...> - 2002-06-15 00:13:10
|
Update of /home/cvs/libdbi/debian In directory backbeat:/tmp/cvs-serv21739/debian Modified Files: shlibs.local Log Message: hello world! (0.6.5) Index: shlibs.local =================================================================== RCS file: /home/cvs/libdbi/debian/shlibs.local,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** shlibs.local 2002/06/15 00:04:12 1.2 --- shlibs.local 2002/06/15 00:13:05 1.3 *************** *** 1 **** ! libdbi 0 libdbi0 (>= 0.6.6-1) --- 1 ---- ! libdbi 0 libdbi0 (>= 0.6.5-1) |