diff options
author | Marcus Alves Grando <mnag@FreeBSD.org> | 2005-10-02 14:30:41 +0000 |
---|---|---|
committer | Marcus Alves Grando <mnag@FreeBSD.org> | 2005-10-02 14:30:41 +0000 |
commit | 12add669af24920a5136e3326afa314e98f5b1f3 (patch) | |
tree | 6aa300c91b59d7b428f4f7a91e6aa75e0cdd5db3 /databases/libdbi-drivers/files | |
parent | Update to 0.32 (diff) |
Update to 0.8.1
Add support to FreeTDS
Approved by: delphij (maintainer via email), pav (mentor)
Notes
Notes:
svn path=/head/; revision=143982
Diffstat (limited to 'databases/libdbi-drivers/files')
-rw-r--r-- | databases/libdbi-drivers/files/patch-drivers__freetds__Makefile.in | 11 | ||||
-rw-r--r-- | databases/libdbi-drivers/files/patch-drivers__freetds__dbd_freetds.c | 66 |
2 files changed, 77 insertions, 0 deletions
diff --git a/databases/libdbi-drivers/files/patch-drivers__freetds__Makefile.in b/databases/libdbi-drivers/files/patch-drivers__freetds__Makefile.in new file mode 100644 index 000000000000..2511c1057496 --- /dev/null +++ b/databases/libdbi-drivers/files/patch-drivers__freetds__Makefile.in @@ -0,0 +1,11 @@ +--- drivers/freetds/Makefile.in.orig Sat Oct 1 23:09:48 2005 ++++ drivers/freetds/Makefile.in Sat Oct 1 23:09:56 2005 +@@ -227,7 +227,7 @@ + # for each driver + @HAVE_FREETDS_TRUE@docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION) + @HAVE_FREETDS_FALSE@htmldir = +-@HAVE_FREETDS_TRUE@htmldir = $(docdir)dbd_freetds ++@HAVE_FREETDS_TRUE@htmldir = $(docdir)/dbd_freetds + @HAVE_FREETDS_FALSE@freetds_ltlibs = + #doc_DATA = dbd_freetds.pdf + #html_DATA = dbd_freetds/* diff --git a/databases/libdbi-drivers/files/patch-drivers__freetds__dbd_freetds.c b/databases/libdbi-drivers/files/patch-drivers__freetds__dbd_freetds.c new file mode 100644 index 000000000000..3c2e0f098d03 --- /dev/null +++ b/databases/libdbi-drivers/files/patch-drivers__freetds__dbd_freetds.c @@ -0,0 +1,66 @@ +--- drivers/freetds/dbd_freetds.c.orig Thu Sep 8 16:41:25 2005 ++++ drivers/freetds/dbd_freetds.c Sat Oct 1 23:34:11 2005 +@@ -453,6 +453,7 @@ + { + dbi_result_t *res; + char *sql_cmd; ++ char *current_db = NULL; + + if (db == NULL || db[0] == '\0') { + /* Use current database */ +@@ -460,7 +461,6 @@ + return res; + } + +- char *current_db = NULL; + if (conn->current_db) + /* Reserved current DB name */ + current_db = strdup(conn->current_db); +@@ -508,9 +508,9 @@ + { + /* foo's -> 'foo''s' */ + size_t len; ++ const char *escaped = "\'"; + + strcpy(dest, "\'"); +- const char *escaped = "\'"; + + len = _dbd_freetds_escape_chars(dest + 1, orig, strlen(orig), escaped); + +@@ -559,6 +559,8 @@ + * everything else will be filled in by DBI */ + + unsigned int idx = 0; ++ unsigned short type = 0; ++ unsigned int attribs = 0; + dbi_result_t *result = NULL; + dbi_row_t *row = NULL; + FREETDSCON *tdscon = (FREETDSCON *) conn->connection; +@@ -628,9 +630,6 @@ + return NULL; + } + +- unsigned short type = 0; +- unsigned int attribs = 0; +- + _translate_freetds_type(datafmt[idx], &type, &attribs); + /* Fill fields value in result */ + _dbd_result_add_field(result, idx, datafmt[idx]->name, type, attribs); +@@ -884,6 +883,7 @@ + dbi_row_t *row = NULL; + unsigned int idx = 0; + void *addr = NULL; ++ char **orig; + + FREETDSCON *tdscon = (FREETDSCON *) conn->connection; + +@@ -911,8 +911,7 @@ + dstfmt.format = CS_FMT_UNUSED; + + addr = malloc(sizeof(CS_NUMERIC_TYPE)); +- char **orig = +- &(result->rows[result->numrows_matched]->field_values[idx].d_string); ++ orig = &(result->rows[result->numrows_matched]->field_values[idx].d_string); + + if (cs_convert(tdscon->ctx, datafmt[idx], *orig, &dstfmt, addr, NULL) != + CS_SUCCEED) { |