This list is closed, nobody may subscribe to it.
2000 |
Jan
|
Feb
(1) |
Mar
(53) |
Apr
(28) |
May
(5) |
Jun
(7) |
Jul
(16) |
Aug
(15) |
Sep
(10) |
Oct
(1) |
Nov
|
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(9) |
Feb
(7) |
Mar
(1) |
Apr
(7) |
May
(6) |
Jun
|
Jul
(15) |
Aug
(10) |
Sep
(2) |
Oct
(12) |
Nov
(3) |
Dec
(2) |
2002 |
Jan
(2) |
Feb
(12) |
Mar
(33) |
Apr
(30) |
May
(5) |
Jun
(18) |
Jul
(18) |
Aug
(47) |
Sep
(8) |
Oct
(7) |
Nov
(8) |
Dec
(13) |
2003 |
Jan
(48) |
Feb
(8) |
Mar
(10) |
Apr
(30) |
May
(6) |
Jun
(8) |
Jul
(19) |
Aug
(36) |
Sep
(19) |
Oct
(16) |
Nov
(11) |
Dec
(17) |
2004 |
Jan
(11) |
Feb
(22) |
Mar
(52) |
Apr
(45) |
May
(18) |
Jun
(72) |
Jul
(14) |
Aug
(31) |
Sep
(19) |
Oct
(27) |
Nov
(19) |
Dec
(25) |
2005 |
Jan
(16) |
Feb
(46) |
Mar
(50) |
Apr
(3) |
May
(21) |
Jun
(3) |
Jul
(24) |
Aug
(33) |
Sep
(25) |
Oct
(23) |
Nov
(30) |
Dec
(20) |
2006 |
Jan
(12) |
Feb
(11) |
Mar
(8) |
Apr
(15) |
May
(27) |
Jun
(15) |
Jul
(19) |
Aug
(5) |
Sep
(9) |
Oct
(1) |
Nov
(2) |
Dec
(3) |
2007 |
Jan
|
Feb
(3) |
Mar
(18) |
Apr
(5) |
May
(9) |
Jun
|
Jul
(10) |
Aug
(3) |
Sep
(8) |
Oct
(1) |
Nov
(7) |
Dec
(9) |
2008 |
Jan
(2) |
Feb
|
Mar
(10) |
Apr
(4) |
May
|
Jun
(5) |
Jul
(9) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(8) |
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(11) |
Nov
(1) |
Dec
(20) |
2010 |
Jan
|
Feb
(2) |
Mar
|
Apr
(7) |
May
|
Jun
(23) |
Jul
(3) |
Aug
(6) |
Sep
(1) |
Oct
(4) |
Nov
(1) |
Dec
|
2011 |
Jan
(1) |
Feb
(26) |
Mar
(25) |
Apr
(11) |
May
(5) |
Jun
(5) |
Jul
(2) |
Aug
(39) |
Sep
(12) |
Oct
(6) |
Nov
|
Dec
|
2012 |
Jan
(19) |
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
(7) |
Jul
|
Aug
(8) |
Sep
|
Oct
(3) |
Nov
(2) |
Dec
(3) |
2013 |
Jan
(6) |
Feb
|
Mar
(1) |
Apr
|
May
(7) |
Jun
(5) |
Jul
(2) |
Aug
|
Sep
(1) |
Oct
(2) |
Nov
|
Dec
|
2014 |
Jan
(4) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2016 |
Jan
(5) |
Feb
|
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: David F. <mdb...@me...> - 2010-10-29 17:26:02
|
* Moved sanitize_name() into its own header/source files, since the same function code had been implemented in two different source files (mdb-export.c and mdb-schema.c). * The enumerated type for specifying the column-data-type is now called MdbColDataType rather than the previous anonymous enum. * The open-file-failed error-messages in mdb-schema now contains the filename. Several error messages from mdb-export and mdb-schema now include the program-name. * mdb-export: boolean columns export as "true"/"false", rather than "0"/"1". * sanitize_names(): fixed bug: potential buffer-overflow-error. * sanitize_names(): looks for some SQL reserved words and if found attempts to mangle them to generate legal SQL. Signed-off-by: David Favro <mdb...@me...> --- AUTHORS | 3 ++ include/mdbtools.h | 4 +- src/util/Makefile.am | 3 ++ src/util/mdb-export.c | 35 ++++++--------------- src/util/mdb-schema.c | 36 +++++---------------- src/util/sanitize_name.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++ src/util/sanitize_name.h | 29 +++++++++++++++++ 7 files changed, 134 insertions(+), 54 deletions(-) create mode 100644 src/util/sanitize_name.c create mode 100644 src/util/sanitize_name.h diff --git a/AUTHORS b/AUTHORS index f639990..e08069c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -24,3 +24,6 @@ David Mansfield <mdb...@dm...> Jeff Smith <why...@ya...> Patches too numerous to enumerate. + +David Favro <mdb...@me...> + Enhancements/fixes: sanitization of names for SQL. diff --git a/include/mdbtools.h b/include/mdbtools.h index 8e33df3..25fe793 100644 --- a/include/mdbtools.h +++ b/include/mdbtools.h @@ -74,7 +74,7 @@ enum { MDB_DATABASE_PROPERTY, MDB_ANY = -1 }; -enum { +typedef enum MdbColDataType { MDB_BOOL = 0x01, MDB_BYTE = 0x02, MDB_INT = 0x03, @@ -88,7 +88,7 @@ enum { MDB_MEMO = 0x0c, MDB_REPID = 0x0f, MDB_NUMERIC = 0x10 -}; +} MdbColDataType; /* SARG operators */ enum { diff --git a/src/util/Makefile.am b/src/util/Makefile.am index c872aec..8ecb716 100644 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -7,3 +7,6 @@ LDADD = ../libmdb/libmdb.la if SQL mdb_sql_LDADD = ../libmdb/libmdb.la ../sql/libmdbsql.la $(LIBREADLINE) endif + +mdb_export_SOURCES = mdb-export.c sanitize_name.c sanitize_name.h +mdb_schema_SOURCES = mdb-schema.c sanitize_name.c sanitize_name.h diff --git a/src/util/mdb-export.c b/src/util/mdb-export.c index 8aa5290..e60e59a 100644 --- a/src/util/mdb-export.c +++ b/src/util/mdb-export.c @@ -23,16 +23,17 @@ #include "dmalloc.h" #endif +#include "sanitize_name.h" + #undef MDB_BIND_SIZE #define MDB_BIND_SIZE 200000 #define is_text_type(x) (x==MDB_TEXT || x==MDB_MEMO || x==MDB_SDATETIME) -static char *sanitize_name(char *str, int sanitize); static char *escapes(char *s); void -print_col(gchar *col_val, int quote_text, int col_type, char *quote_char, char *escape_char) +print_col(gchar *col_val, int quote_text, MdbColDataType col_type, char *quote_char, char *escape_char) { gchar *s; @@ -50,6 +51,8 @@ print_col(gchar *col_val, int quote_text, int col_type, char *quote_char, char * else fprintf(stdout,"%c",*s); } fprintf(stdout,quote_char); + } else if ( col_type == MDB_BOOL ) { + fputs( ((*col_val == '0') ? "false" : "true"), stdout ); } else { fprintf(stdout,"%s",col_val); } @@ -148,6 +151,7 @@ main(int argc, char **argv) g_free (quote_char); if (escape_char) g_free (escape_char); mdb_exit(); + fprintf( stderr, "%s: error opening \"%s\"\n", argv[0], argv[optind] ); exit(1); } @@ -174,11 +178,11 @@ main(int argc, char **argv) } if (header_row) { col=g_ptr_array_index(table->columns,0); - fprintf(stdout,"%s",sanitize_name(col->name,sanitize)); + fprintf(stdout,"%s",sanitize_name(col->name,sanitize,argv[0])); for (j=1;j<table->num_cols;j++) { col=g_ptr_array_index(table->columns,j); fprintf(stdout,delimiter); - fprintf(stdout,"%s",sanitize_name(col->name,sanitize)); + fprintf(stdout,"%s",sanitize_name(col->name,sanitize,argv[0])); } fprintf(stdout,"\n"); } @@ -187,11 +191,11 @@ main(int argc, char **argv) if (insert_statements) { fprintf(stdout, "INSERT INTO %s (", - sanitize_name(argv[optind + 1],sanitize)); + sanitize_name(argv[optind + 1],sanitize,argv[0])); for (j=0;j<table->num_cols;j++) { if (j>0) fprintf(stdout, ", "); col=g_ptr_array_index(table->columns,j); - fprintf(stdout,"%s", sanitize_name(col->name,sanitize)); + fprintf(stdout,"%s", sanitize_name(col->name,sanitize,argv[0])); } fprintf(stdout, ") VALUES ("); } @@ -231,25 +235,6 @@ main(int argc, char **argv) exit(0); } -static char *sanitize_name(char *str, int sanitize) -{ - static char namebuf[256]; - char *p = namebuf; - - if (!sanitize) - return str; - - while (*str) { - *p = isalnum(*str) ? *str : '_'; - p++; - str++; - } - - *p = 0; - - return namebuf; -} - static char *escapes(char *s) { char *d = (char *) g_strdup(s); diff --git a/src/util/mdb-schema.c b/src/util/mdb-schema.c index b142711..9216b20 100644 --- a/src/util/mdb-schema.c +++ b/src/util/mdb-schema.c @@ -24,8 +24,9 @@ #include "dmalloc.h" #endif -static char *sanitize_name(char *str, int sanitize); -static void generate_table_schema(MdbCatalogEntry *entry, char *namespace, int sanitize); +#include "sanitize_name.h" + +static void generate_table_schema(MdbCatalogEntry *entry, char *namespace, int sanitize, const char * prog_name); int main (int argc, char **argv) @@ -67,7 +68,7 @@ main (int argc, char **argv) /* open the database */ mdb = mdb_open (argv[optind], MDB_NOFLAGS); if (!mdb) { - fprintf(stderr, "Could not open file\n"); + fprintf(stderr, "%s: could not open file: \"%s\"\n", argv[0], argv[optind] ); mdb_exit(); exit(1); } @@ -101,7 +102,7 @@ main (int argc, char **argv) if (entry->object_type == MDB_TABLE) { if ((tabname && !strcmp(entry->object_name, tabname)) || (!tabname && mdb_is_user_table(entry))) { - generate_table_schema(entry, namespace, s); + generate_table_schema(entry, namespace, s, argv[0]); } } } @@ -122,7 +123,7 @@ main (int argc, char **argv) exit(0); } static void -generate_table_schema(MdbCatalogEntry *entry, char *namespace, int sanitize) +generate_table_schema(MdbCatalogEntry *entry, char *namespace, int sanitize, const char * prog_name) { MdbTableDef *table; MdbHandle *mdb = entry->mdb; @@ -131,11 +132,11 @@ generate_table_schema(MdbCatalogEntry *entry, char *namespace, int sanitize) /* drop the table if it exists */ fprintf (stdout, "DROP TABLE %s%s;\n", (namespace) ? namespace : "", - sanitize_name(entry->object_name, sanitize)); + sanitize_name(entry->object_name, sanitize, prog_name)); /* create the table */ fprintf (stdout, "CREATE TABLE %s%s\n", (namespace) ? namespace : "", - sanitize_name(entry->object_name, sanitize)); + sanitize_name(entry->object_name, sanitize, prog_name)); fprintf (stdout, " (\n"); table = mdb_read_table (entry); @@ -148,7 +149,7 @@ generate_table_schema(MdbCatalogEntry *entry, char *namespace, int sanitize) for (i = 0; i < table->num_cols; i++) { col = g_ptr_array_index (table->columns, i); - fprintf (stdout, "\t%s\t\t\t%s", sanitize_name(col->name,sanitize), + fprintf (stdout, "\t%s\t\t\t%s", sanitize_name(col->name, sanitize, prog_name), mdb_get_coltype_string (mdb->default_backend, col->col_type)); if (mdb_coltype_takes_length(mdb->default_backend, @@ -173,22 +174,3 @@ generate_table_schema(MdbCatalogEntry *entry, char *namespace, int sanitize) mdb_free_tabledef (table); } - -static char *sanitize_name(char *str, int sanitize) -{ - static char namebuf[256]; - char *p = namebuf; - - if (!sanitize) - return str; - - while (*str) { - *p = isalnum(*str) ? *str : '_'; - p++; - str++; - } - - *p = 0; - - return namebuf; -} diff --git a/src/util/sanitize_name.c b/src/util/sanitize_name.c new file mode 100644 index 0000000..66d9640 --- /dev/null +++ b/src/util/sanitize_name.c @@ -0,0 +1,78 @@ +/* MDB Tools - A library for reading MS Access database file + * Copyright (C) 2000 Brian Bruns + * Portions copyright (C) 2008 David Favro + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +#include "sanitize_name.h" + +#include <stdio.h> /* fprintf(), stderr */ +#include <ctype.h> /* isalnum(), isdigit() */ +#include <stdlib.h> /* exit() */ + + +static const char * const RESERVED [] = + { + "CHECK" , + }; +#define N_RESERVED (sizeof(RESERVED)/sizeof(*RESERVED)) + + +char * sanitize_name(char *str, int sanitize, const char * prog_name) + { + static char namebuf[256]; + char *p = namebuf; + + if (!sanitize) + return str; + + const char * sPtr = str; + + if ( isdigit(*sPtr) ) + *p++ = '_'; + else + { + // Check for SQL keywords thay may be used as identifiers in Access. + // For the moment, just do a linear search through the keywords, with a + // string comparison for each. This probably should be replaced with a + // more sophisticated data structure such as a hash table. + + const char * const * rPtr; + for ( rPtr = RESERVED + N_RESERVED ; rPtr-- != RESERVED ; ) + if ( strcasecmp( str, *rPtr ) == 0 ) + { + *p++ = '_'; + break; // **** BREAK HERE **** + } + } + + char * const limit = namebuf + sizeof(namebuf); + + while (*sPtr) { + *p = isalnum(*sPtr) ? *sPtr : '_'; + if ( p++ >= limit ) { + fprintf( stderr, "%s: failed assertion: table-name buffer-overflow (%s)\n", + prog_name, str ); + exit( 1 ); + } + sPtr++; + } + + *p = '\0'; + + return namebuf; + } diff --git a/src/util/sanitize_name.h b/src/util/sanitize_name.h new file mode 100644 index 0000000..1fc9bcc --- /dev/null +++ b/src/util/sanitize_name.h @@ -0,0 +1,29 @@ +/* MDB Tools - A library for reading MS Access database file + * Copyright (C) 2000 Brian Bruns + * Portions copyright (C) 2008 David Favro + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + + +#ifndef __sanitize_name_h +#define __sanitize_name_h + + +extern char * sanitize_name( char *str, int sanitize, const char * prog_name ); + + +#endif /* __sanitize_name_h */ -- 1.7.0.4 |
From: David F. <mdb...@me...> - 2010-10-29 17:25:59
|
Hello all, I made these fixes back in early 2008 because I needed to migrate a client's data from an Access database into PostGreSQL, and mdbtools generated SQL errors due to, amongst other problems, generating boolean literals that are apparently non-compliant with SQL-92 and SQL-99, and the client's database's use of SQL keywords. The patch is divided into two pieces, the first of which only normalizes whitespace so the the significant changes can be clearly seen in the second diff. I'm sorry to have waited so long to get them out the door, but I have already rebased them to apply on the latest HEAD from SourceForge's CVS repo. Cheers, David |
From: Nirgal V. <con...@ni...> - 2010-10-12 17:12:13
|
I found a problem with mdb-export SEGFAULTing on a big table. This is JET3 engine. CREATE TABLE "DDLogDr" ( "BatchId" INTEGER, "Date" TIMESTAMP WITHOUT TIME ZONE, "iTransactionID" INTEGER, "iConstituentID" INTEGER, "cAmount" NUMERIC(15,2), "dDate" TIMESTAMP WITHOUT TIME ZONE, "sAuthorisation" VARCHAR (50), "iAuthorisationStatusID" INTEGER, "sBankAccountName" VARCHAR (50), "sBankAccountNumber" VARCHAR (30), "iAppealID" INTEGER ); Here's the end of output: Row 0 bytes 8 to 2047 [delflag] Row 1 bytes 2376 to 7 [lookup] [delflag] Row 2 bytes 5662 to 2375 Program received signal SIGSEGV, Segmentation fault. 0xb7fdae99 in mdb_crack_row3 (table=0x805f300, row_start=5662, row_end=2375, fields=0xbfffd9f8) at write.c:121 121 var_col_offsets[i] = mdb->pg_buf[col_ptr-i]+(jumps_used*256); (gdb) info program Using the running image of child process 17636. Program stopped at 0xb7fdae99. It stopped with signal SIGSEGV, Segmentation fault. (gdb) bt #0 0xb7fdae99 in mdb_crack_row3 (table=0x805f300, row_start=5662, row_end=2375, fields=0xbfffd9f8) at write.c:121 #1 mdb_crack_row (table=0x805f300, row_start=5662, row_end=2375, fields=0xbfffd9f8) at write.c:185 #2 0xb7fd6595 in mdb_read_row (table=0x805f300, row=2) at data.c:277 #3 0xb7fd689a in mdb_fetch_row (table=0x805f300) at data.c:411 #4 0x080492d2 in main (argc=3, argv=0xbffff3a4) at mdb-export.c:193 (gdb) info locals i = 134533134 col_ptr = <value optimized out> num_jumps = 16777202 jumps_used = 295 (gdb) up #1 mdb_crack_row (table=0x805f300, row_start=5662, row_end=2375, fields=0xbfffd9f8) at write.c:185 185 mdb_crack_row3(mdb, row_start, row_end, bitmask_sz, (gdb) info locals col = <value optimized out> mdb = 0x804c800 row_var_cols = 0 row_cols = 255 nullmask = 0x804d138 "" bitmask_sz = 32 fixed_cols_found = 134531072 row_fixed_cols = 2342 col_count_size = 1 i = <value optimized out> Defining SLOW_READ in src/libmdb/data.c fixes the problem. So I traced back the problem to a incorrect page being returned by mdb_map_find_next. I noticed that the slow version is testing if the page is correct with byte #0 if the page being 1 (MDB_PAGE_DATA) and bytes #4..7 matching entry->table_pg. So I simply added that test in the not-slow version. This works ok. I get the good record count (4,170,473) in my problematic case. I was a bit confused by the fact that function mdb_map_find_next returns -1 on failure, but that the return type was guint32. This results in the test in mdb_read_next_dpg that produce "Warning: defaulting to brute force read" never being called. I order to fix that, I had to change the type returned by mdb_map_find_next from guint32 to gint32. This implies another change in mdb_map_find_next_freepage() and in src/util/prfreemap.c. Attached is a patch, based on "my" debian-based version. http://nirgal.com/mdbtools Hopefully, it should also applies on various trunk/master out there... |
From: Jeff S. <why...@ya...> - 2010-09-24 04:20:35
|
--- As I read it, the CVS repo is entirely historical at this point. This is yet one more step in the direction of git development. .cvsignore | 18 ----------- .gitignore | 60 +++++++++++++++++++++++++++++++++++++++ doc/.cvsignore | 7 ---- doc/reference/libmdb/.cvsignore | 2 - include/.cvsignore | 6 ---- src/.cvsignore | 2 - src/extras/.cvsignore | 5 --- src/gmdb/.cvsignore | 5 --- src/gmdb2/.cvsignore | 5 --- src/gmdb2/gladefiles/.cvsignore | 3 -- src/gmdb2/help/.cvsignore | 2 - src/gmdb2/help/C/.cvsignore | 3 -- src/gmdb2/pixmaps/.cvsignore | 2 - src/libmdb/.cvsignore | 6 ---- src/odbc/.cvsignore | 7 ---- src/sql/.cvsignore | 9 ------ src/util/.cvsignore | 23 --------------- 17 files changed, 60 insertions(+), 105 deletions(-) delete mode 100644 .cvsignore create mode 100644 .gitignore delete mode 100644 doc/.cvsignore delete mode 100644 doc/reference/libmdb/.cvsignore delete mode 100644 include/.cvsignore delete mode 100644 src/.cvsignore delete mode 100644 src/extras/.cvsignore delete mode 100644 src/gmdb/.cvsignore delete mode 100644 src/gmdb2/.cvsignore delete mode 100644 src/gmdb2/gladefiles/.cvsignore delete mode 100644 src/gmdb2/help/.cvsignore delete mode 100644 src/gmdb2/help/C/.cvsignore delete mode 100644 src/gmdb2/pixmaps/.cvsignore delete mode 100644 src/libmdb/.cvsignore delete mode 100644 src/odbc/.cvsignore delete mode 100644 src/sql/.cvsignore delete mode 100644 src/util/.cvsignore diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index bea2c5c..0000000 --- a/.cvsignore +++ /dev/null @@ -1,18 +0,0 @@ -Makefile -Makefile.in -aclocal.m4 -configure -config.log -config.status -autom4te-*.cache -config.guess -config.sub -libtool -ltmain.sh -mdbtools.spec -autom4te.cache -libmdb.pc -libmdbsql.pc -missing -install-sh -depcomp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0eef432 --- /dev/null +++ b/.gitignore @@ -0,0 +1,60 @@ +Makefile +Makefile.in +*.o +*.lo +*.la +*.1 +.deps/ +.libs/ + +aclocal.m4 +config.guess +config.log +config.status +config.sub +configure +depcomp +install-sh +libmdb.pc +libmdbsql.pc +libtool +ltmain.sh +mdbtools.spec +missing +ylwrap + +autom4te.cache/ + +include/config.h +include/config.h.in +include/mdbver.h +include/stamp-h1 + +src/extras/mdb-hexdump +src/gmdb/gmdb +src/gmdb2/gmdb2 +src/gmdb2/gladefiles/*.gladep +src/gmdb2/help/C/omf_timestamp +src/odbc/unittest +src/sql/lexer.c +src/sql/parser.c +src/sql/parser.h +src/util/mdb-array +src/util/mdb-check +src/util/mdb-export +src/util/mdb-header +src/util/mdb-import +src/util/mdb-parsecsv +src/util/mdb-prop +src/util/mdb-schema +src/util/mdb-sql +src/util/mdb-tables +src/util/mdb-ver +src/util/prcat +src/util/prdata +src/util/prdump +src/util/prindex +src/util/prkkd +src/util/prole +src/util/prtable +src/util/updrow diff --git a/doc/.cvsignore b/doc/.cvsignore deleted file mode 100644 index 296fff9..0000000 --- a/doc/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -Makefile -Makefile.in -mdb-sql.1 -mdb-ver.1 -mdb-schema.1 -mdb-export.1 -mdb-tables.1 diff --git a/doc/reference/libmdb/.cvsignore b/doc/reference/libmdb/.cvsignore deleted file mode 100644 index 282522d..0000000 --- a/doc/reference/libmdb/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/include/.cvsignore b/include/.cvsignore deleted file mode 100644 index 5b0e80e..0000000 --- a/include/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -Makefile -Makefile.in -config.h -config.h.in -stamp-h1 -mdbver.h diff --git a/src/.cvsignore b/src/.cvsignore deleted file mode 100644 index 282522d..0000000 --- a/src/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/src/extras/.cvsignore b/src/extras/.cvsignore deleted file mode 100644 index 8f4d934..0000000 --- a/src/extras/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -Makefile -Makefile.in -.deps -.libs -mdb-hexdump diff --git a/src/gmdb/.cvsignore b/src/gmdb/.cvsignore deleted file mode 100644 index a030779..0000000 --- a/src/gmdb/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -Makefile -Makefile.in -.deps -.libs -gmdb diff --git a/src/gmdb2/.cvsignore b/src/gmdb2/.cvsignore deleted file mode 100644 index 2da21c1..0000000 --- a/src/gmdb2/.cvsignore +++ /dev/null @@ -1,5 +0,0 @@ -Makefile -Makefile.in -.deps -.libs -gmdb2 diff --git a/src/gmdb2/gladefiles/.cvsignore b/src/gmdb2/gladefiles/.cvsignore deleted file mode 100644 index 5a89b9b..0000000 --- a/src/gmdb2/gladefiles/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -*.gladep -Makefile.in -Makefile diff --git a/src/gmdb2/help/.cvsignore b/src/gmdb2/help/.cvsignore deleted file mode 100644 index 3dda729..0000000 --- a/src/gmdb2/help/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/src/gmdb2/help/C/.cvsignore b/src/gmdb2/help/C/.cvsignore deleted file mode 100644 index 035f4a5..0000000 --- a/src/gmdb2/help/C/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile.in -Makefile -omf_timestamp diff --git a/src/gmdb2/pixmaps/.cvsignore b/src/gmdb2/pixmaps/.cvsignore deleted file mode 100644 index 3dda729..0000000 --- a/src/gmdb2/pixmaps/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile.in -Makefile diff --git a/src/libmdb/.cvsignore b/src/libmdb/.cvsignore deleted file mode 100644 index 6e5ca7e..0000000 --- a/src/libmdb/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -Makefile -Makefile.in -.deps -.libs -*.lo -*.la diff --git a/src/odbc/.cvsignore b/src/odbc/.cvsignore deleted file mode 100644 index 70e81af..0000000 --- a/src/odbc/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -Makefile -Makefile.in -.deps -.libs -*.lo -*.la -unittest diff --git a/src/sql/.cvsignore b/src/sql/.cvsignore deleted file mode 100644 index 243aa08..0000000 --- a/src/sql/.cvsignore +++ /dev/null @@ -1,9 +0,0 @@ -Makefile -Makefile.in -.deps -.libs -parser.c -lexer.c -parser.h -*.lo -*.la diff --git a/src/util/.cvsignore b/src/util/.cvsignore deleted file mode 100644 index 0322d46..0000000 --- a/src/util/.cvsignore +++ /dev/null @@ -1,23 +0,0 @@ -Makefile -Makefile.in -.deps -.libs -mdb-array -mdb-export -mdb-header -mdb-parsecsv -mdb-schema -mdb-sql -mdb-tables -mdb-ver -mdb-check -mdb-import -mdb-prop -prcat -prdata -prdump -prkkd -prtable -prole -prindex -updrow -- 1.7.2.3 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: Gregor at H. <gr...@ho...> - 2010-08-17 22:10:20
|
Hey there. I am having a rough time getting started with trying to use MDB with unixODBC. The OS is Slackware 64-bit, aka Slamd64. If I use isql, it crashes when I do anything. Any help on diagnosing this would be highly appreciated. $ isql -v CalvegEcoRegions +---------------------------------------+ | Connected! | | | | sql-statement | | help [tablename] | | quit | | | +---------------------------------------+ SQL> help Error at Line : syntax error near exec + | + Segmentation fault I have built mdbtools-0.6pre1 and specified --with-unixodbc=/usr/local This created the following files under /usr/local/lib. Note that the filenames are a bit unusual in that they don't contain .so Is that expected? libmdb -> libmdb.0.0.0 libmdb.0 -> libmdb.0.0.0 libmdb.0.0.0 libmdb.a libmdb.la libmdbodbc -> libmdbodbc.0.0.0 libmdbodbc.0 -> libmdbodbc.0.0.0 libmdbodbc.0.0.0 libmdbodbc.a libmdbodbc.la libmdbsql -> libmdbsql.0.0.0 libmdbsql.0 -> libmdbsql.0.0.0 libmdbsql.0.0.0 libmdbsql.a libmdbsql.la My odbcinst.ini and odbc.ini are as follows: [Microsoft Access Driver (*.mdb)] Description = MDB Tools ODBC drivers Driver = /usr/local/lib/libmdbodbc.0.0.0 Setup = FileUsage = 1 CPTimeout = CPReuse = [Regions] Description = My first MDB Driver = Microsoft Access Driver (*.mdb) Database = /tmp/RegionData2010.mdb Host = Port = User = Password = -- HostGIS, Open Source solutions for the global GIS community Greg Allensworth - SysAdmin, Programmer, GIS Person, Security Network+ Server+ A+ Security+ Linux+ PHP PostgreSQL MySQL DHTML/JavaScript/AJAX "No one cares if you can back up — only if you can recover." |
From: Gregor at H. <gr...@ho...> - 2010-08-17 17:44:14
|
Hey guys. I checked out MDB Tools from CVS, and it won't compile if I try to include unixODBC support. gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/local/include -g -O2 -DSQL -DUNIXODBC -MT odbc.lo -MD -MP -MF .deps/odbc.Tpo -c odbc.c -fPIC -DPIC -o .libs/odbc.o odbc.c:215: error: conflicting types for 'SQLDescribeParam' /usr/local/include/sqlext.h:1920: error: previous declaration of 'SQLDescribeParam' was here odbc.c:215: error: conflicting types for 'SQLDescribeParam' /usr/local/include/sqlext.h:1920: error: previous declaration of 'SQLDescribeParam' was here (and many more: SQLExtendedFetch, SQLParamOptions, SQLSetPos, ... ) If I leave this out, MDB Tools will compile properly, but I do need the unixODBC driver. Any ideas? -- HostGIS, Open Source solutions for the global GIS community Greg Allensworth - SysAdmin, Programmer, GIS Person, Security Network+ Server+ A+ Security+ Linux+ PHP PostgreSQL MySQL DHTML/JavaScript/AJAX "No one cares if you can back up — only if you can recover." |
From: Brian B. <br...@br...> - 2010-08-04 00:10:38
|
Commited and pushed to github 2010/7/14 Terry Brown <ter...@ya...>: > mdb-export needs to support -N <namespace> to make it work with mdb-schema when the latter is using -N <namespace>. > > It's a trivial thing to do, I've attached what I hope is a correctly formatted patch from `git diff -w` against a git clone from today, Jul 14 2010. If this isn't the right place for the patch let me know. > > Thanks for the great tool. > > Cheers -Terry > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > mdbtools-dev mailing list > mdb...@li... > https://lists.sourceforge.net/lists/listinfo/mdbtools-dev > > |
From: Brian B. <br...@br...> - 2010-08-04 00:03:28
|
Commited and pushed to github, please check as it didn't apply cleanly and I had to manually resolve. Brian 2010/8/2 Nirgal Vourgère <con...@ni...>: > Hello > > Attached is a modified version for patch 130-export-smallfloat > > Basically, it's ok to use "%e" instead of "%f" but we must NOT call trim_trailing_zeros after that. > Or 0.00000000000000e+00 becomes 0.00000000000000e+ that is invalid. > > > http://nirgal.com/mdbtools > (squeeze version not updated yet) > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://p.sf.net/sfu/dev2dev-palm > _______________________________________________ > mdbtools-dev mailing list > mdb...@li... > https://lists.sourceforge.net/lists/listinfo/mdbtools-dev > > |
From: Nirgal V. <con...@ni...> - 2010-08-02 13:28:54
|
Hello Attached is a modified version for patch 130-export-smallfloat Basically, it's ok to use "%e" instead of "%f" but we must NOT call trim_trailing_zeros after that. Or 0.00000000000000e+00 becomes 0.00000000000000e+ that is invalid. http://nirgal.com/mdbtools (squeeze version not updated yet) |
From: inittab <in...@gm...> - 2010-08-02 07:16:37
|
Hello, I'm attempting to access an access database via php with a unixodbc connection. if I copy the mdb database over to the local filesystem I have no issues and can query the database fine. But if I try to access it over my samba mounted directory I get the following error: Can't alloc filename Unable to locate database /mnt/netops/20101.mdb /mnt/netops was mounted with the following command: mount -t cifs -o username=XXXXXXXXX,password=XXXXXXXX //10.2.1.XX/NetOps /mnt/netops I can read files off of the share fine, and can copy the database off but it seems unixodbc cannot access the file. root@laptop:~# file /mnt/netops/20101.mdb /mnt/netops/20101.mdb: Microsoft Access Database /etc/odbc.ini: [NetOps] Description = Netops Database Driver = MDBToolsODBC Database = /mnt/netops/20101.mdb Servername = localhost UserName = Password = port = 5432 I am using the mdbtools driver: [MDBToolsODBC] Description = MDB Tools ODBC drivers Driver = /usr/lib/libmdbodbc.so.0 Driver64 = Setup = Setup64 = UsageCount = 1 CPTimeout = CPReuse = Any help is appreciated. |
From: Terry B. <ter...@ya...> - 2010-07-14 17:33:22
|
Sorry, mistake in the previous version of this patch, corrected in the attached. On Wed, 14 Jul 2010 12:10:52 -0500 Terry Brown <ter...@ya...> wrote: > mdb-export does not sanitize the namespace supplied by the user, which is good, and namespace like 'gc.' acts as a schema in postgres. > > This patch makes mdb-schema behave like mdb-export, and not sanitize the namespace. Previously mdb-schema would turn 'gc.' into 'gc_', which is unhelpful. As the user supplies the namespace, I don't think the user can complain if it's unsanitary :-) > > Also, this patch changes the behavior of sanitize_name; when the name starts with a digit the digit is *preceded* by an '_', rather than *replaced* by the '_'. > > So "2003 2004 Inventory" becomes "_2003_2004_Inventory", and not "_003_2004_Inventory". > > Cheers -Terry |
From: Terry B. <ter...@ya...> - 2010-07-14 17:15:22
|
mdb-export does not sanitize the namespace supplied by the user, which is good, and namespace like 'gc.' acts as a schema in postgres. This patch makes mdb-schema behave like mdb-export, and not sanitize the namespace. Previously mdb-schema would turn 'gc.' into 'gc_', which is unhelpful. As the user supplies the namespace, I don't think the user can complain if it's unsanitary :-) Also, this patch changes the behavior of sanitize_name; when the name starts with a digit the digit is *preceded* by an '_', rather than *replaced* by the '_'. So "2003 2004 Inventory" becomes "_2003_2004_Inventory", and not "_003_2004_Inventory". Cheers -Terry |
From: Terry B. <ter...@ya...> - 2010-07-14 15:48:24
|
mdb-export needs to support -N <namespace> to make it work with mdb-schema when the latter is using -N <namespace>. It's a trivial thing to do, I've attached what I hope is a correctly formatted patch from `git diff -w` against a git clone from today, Jul 14 2010. If this isn't the right place for the patch let me know. Thanks for the great tool. Cheers -Terry |
From: Brian B. <br...@br...> - 2010-06-20 22:30:42
|
Hi all, All patches committed (unless I screwed up and missed something). Brian 2010/6/16 Nirgal Vourgère <con...@ni...>: > Hi > > I've been trying to improve mdbtools and found it quite frustrating seeing no response at all on that mailing list... Last commit was 3 years ago. > > This is my last message before setting up a new public repository. > > I now have quite a lot of patches over svn trunk, mostly from Debian: > patches/015-allsyms > Add the necessary sql and odbc library dependencies. > patches/038-removals > Factorisation of code for macro/module/query/report > patches/041-eggiconlist > Icons, gtk > patches/045-aboutdialog > Use of gtk_show_about_dialog rather than custom widget > patches/055-iconv-config > Do not #include <config.h> in public headers. > patches/056-libmdb-data > Prevent infinite recursion when database contains infinite floats. > patches/070-unixodbc-api > Fix 64-bit issues with the ODBC support. > patches/090-mdb-hexdump-argc > Get mdb-hexdump usage statement to print. > patches/092-odbc-close-connections > Make odbc_close actually disconnect from the database. > patches/094-add-man-pages > Add man pages for several binaries. > patches/096-use-system-txt2man > Use system txt2man. > patches/100-postgres-types > Fix postgres backend types (UUID, TEXT, BYTEA) > patches/110-export-csv-null > Don't output "" when exporting null values. > patches/120-decrypt > Support for encrypted files. > patches/130-export-smallfloat > Fix for small flats > patches/140-mdb-tables > Fixes in mdb-table command line tool > patches/150-backend-quote > Use backend/dialect specific quotation when generating SQL, for support of spaces in tables names and other problematic characters. > patches/155-blob > Support of Blobs > patches/160-foreign-keys > Support for postgres foreign keys and ON UPDATE / ON DELETE. > patches/170-sequences > Support for autonum as postgres sequences. > > > Is there an commiter left around? Or are they all gone? > What is their opinion of the above patches? > Any chance to get an read/write access? > > I'm putting all this on http://www.nirgal.com/mdbtools/ > |
From: Steve L. <vo...@de...> - 2010-06-18 23:24:45
|
On Thu, Jun 17, 2010 at 06:30:55PM -0400, Brian Bruns wrote: > Oops, applied the patch but missed the commit. Doh! I know Steve > from way back on the FreeTDS list. Hi, Brian :) Glad to know these patches have made their way upstream to you! -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ sla...@ub... vo...@de... |
From: Brian B. <br...@br...> - 2010-06-17 23:19:34
|
I added parser.[ch] to the Makefile.am's BUILT_SOURCES. I think this should resolve the problem. Brian 2010/6/17 Brian Bruns <br...@br...>: > Oops, applied the patch but missed the commit. Doh! I know Steve > from way back on the FreeTDS list. > > I had to remove the parser.[hc] files from my setup as well. I'm > looking into that. I agree about removing them from the repo, but > that only solves the problem the first time you make. > > Brian > > 2010/6/17 Nirgal Vourgère <con...@ni...>: >> On Thursday 17 June 2010 15:52:09 Brian Bruns wrote: >>> > patches/015-allsyms >>> > Add the necessary sql and odbc library dependencies. >>> >>> Applied. >> >> Looked like you missed a diff in that one (and maybe the author name, Steve Langasek?) >> >> >> Also, I had to remove manually from src/sql/ files parser.c parser.h lexer.c for the project to compile. I don't know automake well enough to fix that one. >> However, I do think these intermediate files shouldn't be in the repositories. They are in .cvsignore files anyways. >> >> By the way, attached is a proposal for migration of these ignore files. I am quite new to git, just discovered there was a gui ^^ So someone should doublecheck! >> > |
From: Brian B. <br...@br...> - 2010-06-17 22:31:01
|
Oops, applied the patch but missed the commit. Doh! I know Steve from way back on the FreeTDS list. I had to remove the parser.[hc] files from my setup as well. I'm looking into that. I agree about removing them from the repo, but that only solves the problem the first time you make. Brian 2010/6/17 Nirgal Vourgère <con...@ni...>: > On Thursday 17 June 2010 15:52:09 Brian Bruns wrote: >> > patches/015-allsyms >> > Add the necessary sql and odbc library dependencies. >> >> Applied. > > Looked like you missed a diff in that one (and maybe the author name, Steve Langasek?) > > > Also, I had to remove manually from src/sql/ files parser.c parser.h lexer.c for the project to compile. I don't know automake well enough to fix that one. > However, I do think these intermediate files shouldn't be in the repositories. They are in .cvsignore files anyways. > > By the way, attached is a proposal for migration of these ignore files. I am quite new to git, just discovered there was a gui ^^ So someone should doublecheck! > |
From: Nirgal V. <con...@ni...> - 2010-06-17 21:54:19
|
On Thursday 17 June 2010 15:52:09 Brian Bruns wrote: > > patches/015-allsyms > > Add the necessary sql and odbc library dependencies. > > Applied. Looked like you missed a diff in that one (and maybe the author name, Steve Langasek?) Also, I had to remove manually from src/sql/ files parser.c parser.h lexer.c for the project to compile. I don't know automake well enough to fix that one. However, I do think these intermediate files shouldn't be in the repositories. They are in .cvsignore files anyways. By the way, attached is a proposal for migration of these ignore files. I am quite new to git, just discovered there was a gui ^^ So someone should doublecheck! |
From: Rene E. <re...@de...> - 2010-06-17 21:38:31
|
[ resend, I accidentially only replied to debian-openoffice ] [ out of curiosity, why is debian-openoffice Cced?) Hi, On Thu, Jun 17, 2010 at 09:07:55PM +0200, Nirgal Vourgère wrote: > I not familiar with openoffice code but, FYI, I think they had problems with that, too. Their source contains several mdbtools patches, including: > ooo-build-3-2-0-10/patches/dev300/cws-mdbdriver02.diff > I didn't fully reviewed them, but I had the general feeling their patches are now part of developing branch. Actually, no. That patch above is the extraction of a CVS(!) branch (Ooo does not use CVS anymore since looong) which tried to support mdb in OOo. Not applied anymore since ages because incomplete and broken (and that afair has some parts in mdbtools) See also http://www.openoffice.org/issues/show_bug.cgi?id=33654 Grüße/Regards, René -- .''`. René Engelhard -- Debian GNU/Linux Developer : :' : http://www.debian.org | http://people.debian.org/~rene/ `. `' re...@de... | GnuPG-Key ID: D03E3E70 `- Fingerprint: E12D EA46 7506 70CF A960 801D 0AA0 4571 D03E 3E70 |
From: Alex H. <ba...@gm...> - 2010-06-17 21:23:41
|
On Thu, Jun 17, 2010 at 13:07, Nirgal Vourgère <con...@ni...> wrote: > Reading the last posts, I'm a bit surprised some people have being using some pacthes for 5 years without them being integrated upstream! *shrug* Things get lost/missed/skimmed/skipped. Really, I should have pestered more than once. > Please make sure you give write access to a few people when you'll think you can't spare any more time on that project. Heh, well the great think about github is you dont need to. I, you, anyone can create forks that can easily be integrated into mainline later. |
From: Tim R. <ti...@re...> - 2010-06-17 20:48:58
|
On 17 June 2010 14:52, Brian Bruns <br...@br...> wrote: > 2010/6/16 Nirgal Vourgère <con...@ni...>: >> patches/015-allsyms >> Add the necessary sql and odbc library dependencies. > > Applied. I think the way that libmdbodbc is statically including libmdb should be changed - that patch just fixed the immediate problem. That will automatically mean an API break, iirc. >> patches/038-removals >> Factorisation of code for macro/module/query/report >> patches/041-eggiconlist >> Icons, gtk >> patches/045-aboutdialog >> Use of gtk_show_about_dialog rather than custom widget > > Didn't have time to properly evaluate these yet, but maybe you can > give me the run down? It appears to commonize the handling of the > icon lists? Also, appears to remove gnome calls in favor of gtk > equivalents. I can't actually find who wrote these, so it's tempting to rewrite them. Unless they came from CVS, but that seems unlikely? The last one seems separate - at some point a standard gtk "about" dialog was introduced, so this is just trying to make things consistent. The first two replace GnomeIconList with EggIconList. At some point the former became deprecated - but it's a bit pointless without also removing the other libgnomeui dependencies. This might become more pressing in the next year or two, because libgnomeui will be going away altogether. >> patches/055-iconv-config >> Do not #include <config.h> in public headers. > > Didn't apply yet, but will. Eh, there seems to be a typo in the comment in the makefile. (Rene's the openoffice.org maintainer in Debian.) >> patches/070-unixodbc-api >> Fix 64-bit issues with the ODBC support. > > Need to look at. http://bugs.debian.org/360436 was the Debian bug. Apparently unixodbc breaks API occasionally. >> patches/094-add-man-pages >> Add man pages for several binaries. >> patches/096-use-system-txt2man >> Use system txt2man. > > What if txt2man is not there? Might go ahead and apply, but need to > test what happens if there is no txt2man is available (used to be much > more common occurrence than it is now), I'm fine with not installing > man pages if not found, but I want to make sure the behavior is > correct. Hmm, I'd ship the generated man pages in the release tarball, and just make developers install txt2man. -- Tim Retout <ti...@re...> |
From: Tim R. <ti...@re...> - 2010-06-17 20:05:01
|
On 17 June 2010 20:07, Nirgal Vourgère <con...@ni...> wrote: > Patches starting with 0 - I mean having a number < 100 - are from the Debian repository. I guess Tim will know about these better than me. For the record, you'll always be able to get Debian's patches from: http://patch-tracker.debian.org/package/mdbtools or straight out of git: http://git.debian.org/?p=collab-maint/mdbtools.git;a=tree;f=debian/patches;hb=HEAD Some of them are in a bit of a mess, and the original motivation for them might have been lost. But I'm not going to carry patches unnecessarily, so I'll find a way of figuring out what they all do, or drop them. I'm going to take a look now at making a new Debian release based on a git snapshot. The thing I want to watch out for is breaking the API - this stopped me basing a release on CVS HEAD before, I think, because our automated tools flagged something up. Or if we do break API, we'll need a soname bump, and that's fine as well. -- Tim Retout <ti...@re...> |
From: Nirgal V. <con...@ni...> - 2010-06-17 19:08:12
|
On Thursday 17 June 2010 15:52:09 Brian Bruns wrote: > I merged a few of the more obvious ones. Hoping to get back to it > tonight or this weekend. Again, all commited to the repo at github. Hey, this is really good news. Kind of funny I had to use the Ugly word "fork" for this to work. ^^ Reading the last posts, I'm a bit surprised some people have being using some pacthes for 5 years without them being integrated upstream! Please make sure you give write access to a few people when you'll think you can't spare any more time on that project. Also, it would be nice to have a big notice on SF telling people to go to github if that's where you plan to keep the repository stored. I was annoyed a couple of time with other projects changing their repo without a proper notice. Patches starting with 0 - I mean having a number < 100 - are from the Debian repository. I guess Tim will know about these better than me. > (...) > > patches/055-iconv-config > > Do not #include <config.h> in public headers. > Didn't apply yet, but will. I not familiar with openoffice code but, FYI, I think they had problems with that, too. Their source contains several mdbtools patches, including: ooo-build-3-2-0-10/patches/dev300/cws-mdbdriver02.diff I didn't fully reviewed them, but I had the general feeling their patches are now part of developing branch. > > patches/120-decrypt > > Support for encrypted files. > Didn't apply yet, but will. There is no support for writing. It might be easy to implement. Meanwhile, I disabled write operations if file is encrypted, just to be sure not to loose data. I found several keys around the internet as a xor value for the RC4 seed: 0xe15e01b9 and 0x4ebc8afb. I'm using the second as it works for me (access 97). It would be nice to have other people test. > > patches/150-backend-quote > > Use backend/dialect specific quotation when generating SQL, for support of spaces in tables names and other problematic characters. I need it to export tables containing spaces in their names. I focused on postgres. Other backends are poorly tested. > > patches/155-blob > > Support of Blobs Poorly tested. > > patches/160-foreign-keys > > Support for postgres foreign keys and ON UPDATE / ON DELETE. That one will give you good clues as how mdb files handle cascade of foreign key, and opens new area of work. :) Handling foreign keys leads to small problems however when exporting data with a mdb-schema / mdb-export couple. 1/ The foreign keys constraints are set first. Then the data is loaded. Foreign key violation will occur when tables are loaded in the wrong order. I sloved that with a script that do "mdb-schema ... | grep -v REFERENCES" then "mdb-export ..." then "mdb-schema ... | grep REFERENCES" 2/ The little "drop table" statements generated before the "create table" ones will fail when there are constraints. I think that patch is still really usefull, and should be applied. But I guess what most people want is a complete mdb-export-magic tool that will do everything for them, both basic schema + data + constraints. This goes far beyond a simple "patch". I'm willing to help on that, but I won't do it unless we agree about how it should be done, so that the work is integrated upstream. One more thing about foreign keys, the GUI will not print them yet. It's not implemented. There will be a lot of code duplicated in mdb-schema and gmdb, this is not good. But a fix with factorisation into backend.c is not "just a patch". > > patches/170-sequences > > Support for autonum as postgres sequences. The bad part of that one is that sequences are not initialized. For one, I didn't find where last value is stored in access. So for postgres, I have a script that will do: mdb-schema ... | grep -r "SET DEFAULT pg_catalog.next" | sed -r -e "s/ALTER TABLE (.*) ALTER COLUMN (.*) SET DEFAULT pg_catalog.nextval\('(.*)'\);/SELECT pg_catalog.setval('\3', (SELECT MAX(\2) FROM \1), true);/" Ugly, isn't it? Here again, I have a general infrastructure problem. Should sequences initialisation should be part of mdb-export and not mdb-schema? Sequences next values sure should be set after data is imported.... Don't get me wrong, however. I like my patches and would love to have them upstream, even the "poorly tested" ones. On Wednesday 16 June 2010 13:03:11 Nirgal Vourgère wrote: (...) > I'm putting all this on http://www.nirgal.com/mdbtools/ |
From: James M. <jjm...@ea...> - 2010-06-17 14:32:06
|
>Brian Bruns wrote: >> I've noticed that sourceforge has munged the project home page too. I >> opened a ticket with them, so hopefully they'll fix it in the next day >> or two. > >Btw. SourceForge has started blocking users from "evil countries" (as if there was such >a thing) in anticipatory obedience to comply with US export control. > If SF is located in the United States, they really have no choice :( >Not such a good thing for open source. It has been discussed in many projects to look >at alternatives to SF, in less restrictive countries, to not block out >contributors/users. I doubt that we have many contributors from Syria, Iraq, Iran and North Korea these days. They should not be blocking the PRC, as it has its own blocking mechanism (and it is an interesting topic of itself.) Also, any signatur of the Wassenar agreement has automatically signed on for the 'Evil Countris of Axis' as it prohibits exportation of cryptographic information to countries known to support the construction of Weapons of Mass Destruction. This might include Afganistan and Pakistan, but I don't have specifics on this. Again, I don't see many folks contributing to FOSS projects from these countries. Most other countries should be just fine to download from SF. If not, it is time to talk to them. James McKenzie |
From: Brian B. <br...@br...> - 2010-06-17 13:52:17
|
I merged a few of the more obvious ones. Hoping to get back to it tonight or this weekend. Again, all commited to the repo at github. 2010/6/16 Nirgal Vourgère <con...@ni...>: > Hi > > I've been trying to improve mdbtools and found it quite frustrating seeing no response at all on that mailing list... Last commit was 3 years ago. > > This is my last message before setting up a new public repository. > > I now have quite a lot of patches over svn trunk, mostly from Debian: > patches/015-allsyms > Add the necessary sql and odbc library dependencies. Applied. > patches/038-removals > Factorisation of code for macro/module/query/report > patches/041-eggiconlist > Icons, gtk > patches/045-aboutdialog > Use of gtk_show_about_dialog rather than custom widget Didn't have time to properly evaluate these yet, but maybe you can give me the run down? It appears to commonize the handling of the icon lists? Also, appears to remove gnome calls in favor of gtk equivalents. > patches/055-iconv-config > Do not #include <config.h> in public headers. Didn't apply yet, but will. > patches/056-libmdb-data > Prevent infinite recursion when database contains infinite floats. Applied. > patches/070-unixodbc-api > Fix 64-bit issues with the ODBC support. Need to look at. > patches/090-mdb-hexdump-argc > Get mdb-hexdump usage statement to print. > patches/092-odbc-close-connections > Make odbc_close actually disconnect from the database. Applied. > patches/094-add-man-pages > Add man pages for several binaries. > patches/096-use-system-txt2man > Use system txt2man. What if txt2man is not there? Might go ahead and apply, but need to test what happens if there is no txt2man is available (used to be much more common occurrence than it is now), I'm fine with not installing man pages if not found, but I want to make sure the behavior is correct. > patches/100-postgres-types > Fix postgres backend types (UUID, TEXT, BYTEA) Applied. > patches/110-export-csv-null > Don't output "" when exporting null values. Applied. > patches/120-decrypt > Support for encrypted files. Didn't apply yet, but will. > patches/130-export-smallfloat > Fix for small flats Didn't apply yet, but will. > patches/140-mdb-tables > Fixes in mdb-table command line tool Applied. > patches/150-backend-quote > Use backend/dialect specific quotation when generating SQL, for support of spaces in tables names and other problematic characters. > patches/155-blob > Support of Blobs > patches/160-foreign-keys > Support for postgres foreign keys and ON UPDATE / ON DELETE. > patches/170-sequences > Support for autonum as postgres sequences. > Need to look at these a bit more, at first blush they seem ok. > > Is there an commiter left around? Or are they all gone? > What is their opinion of the above patches? > Any chance to get an read/write access? > > I'm putting all this on http://www.nirgal.com/mdbtools/ > |