# reportfmt

title: All Tickets
cols:
  #ffffff Key:
  #f2dcdc Active
  #e8e8e8 Review
  #cfe8bd Fixed
  #bde5d6 Tested
  #cacae5 Deferred
  #c8c8c8 Closed

sqlcode:
  SELECT
    CASE WHEN status IN ('Open','Verified') THEN '#f2dcdc'
         WHEN status='Review' THEN '#e8e8e8'
         WHEN status='Fixed' THEN '#cfe8bd'
         WHEN status='Tested' THEN '#bde5d6'
         WHEN status='Deferred' THEN '#cacae5'
         ELSE '#c8c8c8' END AS 'bgcolor',
    substr(tkt_uuid,1,10) AS '#',
    datetime(tkt_mtime) AS 'mtime',
    type,
    status,
    subsystem,
    title
  FROM ticket


# event

type: ci
user: kennykb
comment:
  * tdbc/configure.in: Changed configuration to use TEA_PATH_CONFIG to
  * tdbc/aclocal.m4:   locate tcloo and tdbc.  Removed the local code that 
                       did it from aclocal.m4.
  * tdbc/configure:    Autoconf 2.61

  * tdbcodbc/configure.in: Changed configuration to use TEA_PATH_CONFIG to
  * tdbcodbc/aclocal.m4:   locate tcloo and tdbc.  Removed the local code that 
  	                 did it from aclocal.m4.
  * tdbcodbc/configure:    Autoconf 2.61


type: ci
user: 200002852
comment:
  tdbc:
  * library/tdbc.tcl: Split [$resultset nextrow] into two primitive
  methods: [$resultset nextlist] and [$resultset nextdict]. Added
  a [$resultset nextrow] method that delegates to one or the other
  of these.

  tdbcodbc:
  * generic/tdbcodbc.c: Split [$resultset nextrow] into two primitive
  methods: [$resultset nextlist] and [$resultset nextdict]. Refactored
  a little bit of the code that handles result sets.

  tdbcsqlite3:
  * library/tdbcsqlite3.tcl: Split [$resultset nextrow] into two 
  primitive methods: [$resultset nextlist] and [$resultset nextdict]. 


type: ci
user: 200002852
comment:
  * generic/tdbcodbc.c: Removed the default check for Tk. Instead,
  added a '-parent window' option to the constructor of
  tdbc::odbc::connection that gives a parent window for the
  driver manager dialog.


type: ci
user: 200002852
comment:
  Added a 'configure' method to the connection object, and
  rudimentary tests. (No configuration options yet implemented)


type: ci
user: kennykb
comment:
  tdbc:

  	* Makefile.in: Removed nagging reminder about documentation.
  	* configure.in: Advanced revision to 0.2
  	* configure: Autoconf 2.61
  	* doc/tdbc.n:			First cut at a set of man
  	* doc/tdbc_connection.n:	pages for TDBC. Redactors
  	* doc/tdbc_resultSet.n:		and proofreaders are
  	* doc/tdbc_statement.n:		welcome to submit
  	* doc/tdbc_tokenize.n:		improvements.
  	* generic/tdbc.c: Lowercased the package name 'tdbc'
  	* generic/tdbc.h: Advanced patchlevel to 0.2a1
  	* generic/tdbcDecls.h: Lowercased the package name 'tdbc'
  	* generic/tdbcStubLib.c: Lowercased the package name 'tdbc'
  	* tests/tokenize.test: Lowercased the package name 'tdbc'

  tdbc::odbc:

  	* configure.in: Changed PACKAGE_NAME to lowercase 'tdbcodbc'
  			Changed PACKAGE_VERSION to 0.2a1
  	* tclconfig/tcl.m4: 
  			Look in a few additional places for dependent packages.
  	* library/tdbcodbc.tcl: Lowercased the 'tdbc' package and advanced the
  	                        version number on which tdbcodbc depends.
  			        Added code to detect whether the connection
  	                        supports Unicode.
  	* generic/tdbcodbc.c: Added '-isolation' and '-readonly' configuration
  		              options. Added code to use Unicode if possible
  			      for columns of unknown type and wide-character
  			      columns. Changed the script-level package name
  			      to tdbc::odbc.
  	* tests/tdbcodbc.test: Changed the script-level package name to
  			       tdbc::odbc. Renamed all tests accordingly.
  	* Makefile.in: Changed the script-level package name to tdbc::odbc
  	               for building pkgIndex.tcl


type: ci
user: steffen
comment:
      * Makefile.in: use INSTALL_LIBRARY instead of INSTALL_PROGRAM to
      install libraries, avoids breakage from tcl's install-strip when
      built as a bundled package.

      * tclconfig/ChangeLog:  update to latest TEA from tcl CVS, which has
      * tclconfig/tcl.m4:	Jan's 2008-12-19 changes (tcl.m4 r1.127)

      * configure.in:	update TEA_INIT for TEA 3.7
      * configure:	autoconf-2.59


type: t
user: kennykb
brief: Closed ticket [28616c6f8c].
comment:
  Closed ticket [28616c6f8c]: <i>tdbc bundled with tcl doesn't build on netbsd amd64</i> plus 4 other changes


type: t
user: kennykb
brief: Ticket [28616c6f8c]: 1 change
comment:
  Ticket [28616c6f8c] <i>tdbc bundled with tcl doesn't build on netbsd amd64</i> status still Closed with 1 other change


type: ci
user: kennykb
comment:
  1.0b7: Pervasive changes to ::errorCode to be more [try]-friendly. Error codes generated within the tdbc system are now all {TDBC errorClass sqlstate driver detail}


type: t
user: dgp
brief: Ticket [c30670d169]: 3 changes
comment:
  Ticket [c30670d169] <i>pkgIndex.tcl files no good for Tcl pre-8.5</i> status still Open with 3 other changes


type: t
user: kbk
brief: Ticket [29fe60bd53]: 3 changes
comment:
  Ticket [29fe60bd53] <i>2501258 tdbc is built without -fPIC option</i> status still Open with 3 other changes


type: t
user: kbk
brief: Ticket [c30670d169]: 1 change
comment:
  Ticket [c30670d169] <i>pkgIndex.tcl files no good for Tcl pre-8.5</i> status still Verified with 1 other change


type: t
user: kbk
brief: Ticket [98c4a10354]: 3 changes
comment:
  Ticket [98c4a10354] <i>Rework $::errorCode to be more try-friendly</i> status still Open with 3 other changes


type: g
user: root
comment:
  Tag changes on [/timeline?dp=91ede866a8aff6e3&n=4 | 91ede866a8aff6e3]: Add propagating symbolic tag "trunk".


type: g
user: root
comment:
  Tag changes on [/timeline?dp=91ede866a8aff6e3&n=4 | 91ede866a8aff6e3]: Add propagating branch=trunk.


type: t
user: kbk
brief: Verified ticket [67b5df557a].
comment:
  Verified ticket [67b5df557a]: <i>Document Tdbc_MapSqlState and tdbc::mapSqlState</i> plus 3 other changes


type: t
user: kbk
brief: Ticket [c30670d169]: 1 change
comment:
  Ticket [c30670d169] <i>pkgIndex.tcl files no good for Tcl pre-8.5</i> status still Fixed with 1 other change


type: ci
user: 200002852
comment:
  Cleanup of internal APIs: Replace 'my variable' with variable declarations at class level; 'init' methods with constructors implemented in C, and 'statementClass' and 'resultSetClass' variables with forwarded 'statementCreate' and 'resultSetCreate' methods.


type: t
user: anonymous
brief: New ticket [39a78606aa].
comment:
  New ticket [39a78606aa] <i>allrows method of statement object causes segmentation fault on second/third invocation</i>.


type: t
user: anonymous
brief: New ticket [d10e7a735c].
comment:
  New ticket [d10e7a735c] <i>tdbc::mysql doesn't throw error correctly if data definition commands fail</i>.


type: t
user: kbk
brief: Ticket [39a78606aa]: 3 changes
comment:
  Ticket [39a78606aa] <i>allrows method of statement object causes segmentation fault on second/third invocation</i> status still Open with 3 other changes


type: t
user: kbk
brief: Ticket [6d579ee22e]: 4 changes
comment:
  Ticket [6d579ee22e] <i>foreach arguments documentation/implementation mismatch</i> status still Open with 4 other changes


type: t
user: kbk
brief: Ticket [6d579ee22e]: 2 changes
comment:
  Ticket [6d579ee22e] <i>foreach arguments documentation/implementation mismatch</i> status still Open with 2 other changes


type: t
user: kbk
brief: Verified ticket [d10e7a735c].
comment:
  Verified ticket [d10e7a735c]: <i>tdbc::mysql doesn't throw error correctly if data definition commands fail</i> plus 5 other changes


type: t
user: kbk
brief: Ticket [ff2b13e75f]: 4 changes
comment:
  Ticket [ff2b13e75f] <i>tdbc::<driver>::connection new isn't documented</i> status still Open with 4 other changes


type: t
user: kbk
brief: Verified ticket [39a78606aa].
comment:
  Verified ticket [39a78606aa]: <i>allrows method of statement object causes segmentation fault on second/third invocation</i>


type: t
user: kbk
brief: Closed ticket [39a78606aa].
comment:
  Closed ticket [39a78606aa]: <i>allrows method of statement object causes segmentation fault on second/third invocation</i> plus 2 other changes


type: t
user: kbk
brief: Open ticket [d10e7a735c].
comment:
  Open ticket [d10e7a735c]: <i>tdbc::mysql doesn't throw error correctly if data definition commands fail</i> plus 2 other changes


type: t
user: kbk
brief: Closed ticket [d10e7a735c].
comment:
  Closed ticket [d10e7a735c]: <i>tdbc::mysql doesn't throw error correctly if data definition commands fail</i> plus 2 other changes


type: t
user: kbk
brief: Fixed ticket [67b5df557a].
comment:
  Fixed ticket [67b5df557a]: <i>Document Tdbc_MapSqlState and tdbc::mapSqlState</i> plus 1 other change


type: t
user: kbk
brief: Closed ticket [6d579ee22e].
comment:
  Closed ticket [6d579ee22e]: <i>foreach arguments documentation/implementation mismatch</i> plus 1 other change


type: t
user: kbk
brief: Closed ticket [ff2b13e75f].
comment:
  Closed ticket [ff2b13e75f]: <i>tdbc::<driver>::connection new isn't documented</i> plus 1 other change


type: ci
user: kennykb
comment:
  Change to have variable access failures produce NULLs rather than errors (Also correct one extraneous failing test in tdbcsqlite3)


type: ci
user: 200002852
comment:
  Advanced version to 1.0b11. Fixed a bug in tdbcodbc where results longer than the preallocated buffer length got spurious NULL characters inserted.


type: g
user: kennykb
comment:
  Tag changes on [/timeline?dp=26162d33072cfcf5&n=4 | 26162d33072cfcf5]: Cancel symbolic tag "1.0b10".


type: g
user: kennykb
comment:
  Tag changes on [/timeline?dp=b93c44fe9ebce4e6&n=4 | b93c44fe9ebce4e6]: Cancel symbolic tag "1.0b10".


type: g
user: kennykb
comment:
  Tag changes on [/timeline?dp=738383ee2aad0b15&n=4 | 738383ee2aad0b15]: Cancel symbolic tag "1.0b10".


type: t
user: kbk
brief: Ticket [04d164f7d0]: 4 changes
comment:
  Ticket [04d164f7d0] <i>tdbc::odbc queries inserting a NUL after char 255?</i> status still Open with 4 other changes


type: ci
user: 200002852
comment:
  Advanced all version numbers to 1.0b12.
  tdbc::odbc: Made the entire test suite runnable on SQL Server Express,
              and fixed all bugs exposed by the change, including
  	    [3e523335bb]. Added testing for data types present in
  	    SQL Server but absent in Jet.
  tdbc::sqlite3: Deleted an old test harness that is no longer useful.


type: t
user: kbk
brief: Closed ticket [04d164f7d0].
comment:
  Closed ticket [04d164f7d0]: <i>tdbc::odbc queries inserting a NUL after char 255?</i> plus 2 other changes


type: t
user: anonymous
brief: New ticket [3e523335bb].
comment:
  New ticket [3e523335bb] <i>tdbcodbc is_nullable problem when retrieving column info from MS SQL</i>.


type: t
user: kbk
brief: Closed ticket [a85edac3e1].
comment:
  Closed ticket [a85edac3e1]: <i>tdbc does not rebuld after a make clean & ./configure change</i> plus 5 other changes


type: t
user: kbk
brief: Closed ticket [e70d9fdce1].
comment:
  Closed ticket [e70d9fdce1]: <i>tdbc.tcl sqlCode vs sqlcode typo in statementCreate method</i> plus 4 other changes


type: t
user: kbk
brief: Closed ticket [75681e201d].
comment:
  Closed ticket [75681e201d]: <i>tdbcodbc binary no longer included in sourceforge download?</i> plus 4 other changes


type: t
user: kbk
brief: Closed ticket [3e523335bb].
comment:
  Closed ticket [3e523335bb]: <i>tdbcodbc is_nullable problem when retrieving column info from MS SQL</i> plus 4 other changes


type: ci
user: 200002852
comment:
  INTERMEDIATE CHECKPOINT FOR B13 DO NOT RELEASE. Did extensive cleanup in tdbc::postgres. Added much output to stderr to hunt for memory mismanagement issues.


type: ci
user: kennykb
comment:
  TEMP CHECKPOINT NOT FOR RELEASE: Moved current.test to tdbcpostgres.test. Cleaned up some compiler warnings and fixed more memory leaks in tdbcpostgres.c


type: t
user: slawek
brief: Closed ticket [10f4a9c15a].
comment:
  Closed ticket [10f4a9c15a]: <i>tdbcpostgres configurator fails on mingw+msys+default Postgres install</i>


type: t
user: slawek
brief: Closed ticket [9f3fce8c00].
comment:
  Closed ticket [9f3fce8c00]: <i>tdbcpostgres 'make shell' doesn't set environment correctly</i> plus 1 other change


type: t
user: anonymous
brief: New ticket [10f4a9c15a].
comment:
  New ticket [10f4a9c15a] <i>tdbcpostgres configurator fails on mingw+msys+default Postgres install</i>.


type: t
user: slawek
brief: Fixed ticket [10f4a9c15a].
comment:
  Fixed ticket [10f4a9c15a]: <i>tdbcpostgres configurator fails on mingw+msys+default Postgres install</i> plus 3 other changes


type: t
user: slawek
brief: Closed ticket [ac38621feb].
comment:
  Closed ticket [ac38621feb]: <i>many postgres operations are identified as mysql</i> plus 3 other changes


type: t
user: slawek
brief: Ticket [10f4a9c15a]: 1 change
comment:
  Ticket [10f4a9c15a] <i>tdbcpostgres configurator fails on mingw+msys+default Postgres install</i> status still Fixed with 1 other change


type: t
user: slawek
brief: Fixed ticket [9f3fce8c00].
comment:
  Fixed ticket [9f3fce8c00]: <i>tdbcpostgres 'make shell' doesn't set environment correctly</i> plus 3 other changes


type: ci
user: 200002852
comment:
  * generic/tdbcpostgres.c: Removed an ugly workaround for a
                            bug in Tcl_SubstObj.


type: ci
user: 200002852
comment:
  Finished advancing release number to 1.0b13.  Upgraded tdbcodbc for better portability to legacy drivers.  Revised tests so that separate drivers test suites have separate environment variables, and rationalized DRIVER= selection on the ODBC tests.


type: ci
user: 200002852
comment:
  <verbatim>
  * README:			Advanced version number to 1.0b14.
  * configure.in:
  * library/tdbcsqlite3.tcl:
  * configure:			autoconf 2.59
  * tests/tdbcsqlite3.test:	Added test cases (known bugs) for
  				duplicate column names in results.
  * doc/tdbcsqlite3.n:		Added a BUGS section documenting the
  				known problem with duplicate column
  				names.
  </verbatim>


type: t
user: kbk
brief: Deferred ticket [8d015d929f].
comment:
  Deferred ticket [8d015d929f]: <i>tdbc::sqlite3 driver doesn't resolve duplicate names</i> plus 4 other changes


type: t
user: kbk
brief: Ticket [8d015d929f]: 1 change
comment:
  Ticket [8d015d929f] <i>tdbc::sqlite3 driver doesn't resolve duplicate names</i> status still Deferred with 1 other change


type: ci
user: kennykb
comment:
  <verbatim>
  	* tools/genStubs.tcl: Revised 'genStubs' to write files in Unix
  			      format (-translation lf) so that 'make genstubs'
  	                      generates the same output on Unix and Windows.
  	* tdbcDecls.h:
  	* tdbcStubInit.h:     make genstubs
  	* README:
  	* configure.in:
  	* generic/tdbc.h:     Advance patchlevel to 1.0b14.1
  	* configure:          autoconf-2.59
  </verbatim>


type: t
user: kennykb
brief: Fixed ticket [99e97fb098].
comment:
  Fixed ticket [99e97fb098]: <i>Tdbc_Init manual page may be installed in the wrong place</i> plus 4 other changes


type: t
user: kennykb
brief: Fixed ticket [cf7bc364cc].
comment:
  Fixed ticket [cf7bc364cc]: <i>make stub table, StateLookup and command Table "const"</i> plus 4 other changes


type: ci
user: kennykb
comment:
  fixed cross references in man pages. added comments to tdbcStubLib.c about storage class of tdbcStubsPtr


type: ci
user: kennykb
comment:
  Changes to bring tdbc and tdbcodbc into better TEA compliance... see tdbc/ChangeLog and tdbcodbc/ChangeLog for details.


type: ci
user: kennykb
comment:
  Changes to enable 'make test' when tdbcodbc is in the 'pkgs/' subdirectory of a Tcl build. See ChangeLog files for details


type: ci
user: 200002852
comment:
  Added change log for commit of tdbc/tools/tdbc-man2html.tcl, which adds SourceForge logo to the HTML documentation


type: ci
user: 200002852
comment:
  tdbcodbc: TIP 357 features eliminate compile-time dependencies.
  <br>
  tdbc:
  <verbatim>
  	* tools/genExtStubs.tcl (new file): Added a tool so that
  	drivers can resolve imports into Stubs tables at run time, allowing
  	them to avoid compile-dependencies on the respective databases'
  	build systems.
  </verbatim>
  <br>
  tdbcodbc:
  <verbatim>
  	* configure.in: Removed all dependency on the native ODBC headers
  	and import libraries. All ODBC references are now resolved at
  	run time and contained in a 'fakesql.h' file. Removed references to
  	Tk as well.
  	* configure: autoconf-2.59
  	* generic/fakesql.h (new file): Added file containing declarations
  	of all ODBC API's used in this package, to avoid dependence on native
  	headers.
  	* generic/odbcStubsDefs.txt (new file): Declarations of functions
  	imported from odbc32.dll using Tcl_LoadLibrary.
  	* generic/odbcStubInit.c (new file): Code to load odbc32.dll and
  	odbccp32.dll and initialize Stubs tables with the routines in them
  	that are used in tdbc::odbc.
  	* generic/odbcStubs.h (new file): Generated .h file with the Stubs
  	structure defined in generic/odbcStubsDefs.txt.
  	* tdbcodbc.c: Updated to use run-time-loaded ODBC libraries instead
  	of associating to system headers at compile time and import libraries
  	at link time. Revised handling of the '-parent' option so that the
  	dependence on Tk is only at run time.
  </verbatim>


type: t
user: anonymous
brief: Ticket [b0ea387b9f]: 4 changes
comment:
  Ticket [b0ea387b9f] <i>tdbcoracle/configure.in oci.h location issue on FreeBSD</i> status still Open with 4 other changes


type: t
user: anonymous
brief: Ticket [7db2ab741d]: 4 changes
comment:
  Ticket [7db2ab741d] <i>TDBC install.tcl requires tk, should be optional</i> status still Open with 4 other changes


type: t
user: anonymous
brief: New ticket [6460f1f738].
comment:
  New ticket [6460f1f738] <i>There should be a way to escape &quot;@&quot;, or to configure supported parameter prefixes in tokenizer</i>.


type: ci
user: kennykb
comment:
  Changes to support run-time loading of MySQL.

  (plus cleanup identified in making those changes)
  <verbatim>
  tdbc:
  	* Makefile.in: Updated 'make dist' to include the tools that
  	               generate Stubs for external libs to support
  	               run-time loading.
  	* configure.in: Removed a stray backslash that caused a shell
  	                error message while configuring (and otherwise
  	                appeared harmless).
  	* tools/genExtStubs.tcl: Adjusted to generate the Stubs files in
  	                         Unix format only to avoid DOS-formatted files
  	                         sneaking into the repository.

  tdbcmysql:
  	* Makefile.in: Added explicit reference to the TDBC library in the
  		       TCLSH_ENV. Updated the 'dist' rule to include new files.
  		       Added a 'genstubs' rule to make the stubs to load
  	               the MySQL libraries at run time.
  	* configure.in: Removed compile-time references to the MySQL headers
  	                and libraries. Added new files to SOURCES and HEADERS.
  	* generic/fakemysql.h (new file):
  		Minimal subset of mysql.h needed to make tdbc::mysql compile.
  	* generic/mysqlStubDefs.txt (new file):
  		Definitions of MySQL runtime library routines brought
  		in by dynamic loading.
  	* generic/mysqlStubInit.c (new file):
  		Code to load the MySQL runtime library and build a stub
  		table for it.
  	* generic/mysqlStubDefs.txt (new file):
  		Definitions of the routines to be resolved when loading
  		the MySQL library at run time.
  	* generic/tdbcmysql.c:
  		Changed tdbc::mysql to load the MySQL library at run time
  		and to have no compile-time dependencies on MySQL.
  	* tests/tdbcodbc.test (tdbc::mysql-14.8):
  		Corrected a misnamed test.

  tdbcodbc:
  	* Makefile.in: Added missing files to 'make dist.' Added a 'genstubs'
  	               rule to automate building of the Stubs table from the
  		       ODBC library added at run time.
  	* generic/fakesql.h:
  	* generic/odbcStubDefs.txt:
  	* generic/odbcStubInit.c:
  		Fixed DOS line endings.
  </verbatim>


type: ci
user: kennykb
comment:
  Changes to restore builability of all drivers under Visual C++
  (plus cleanup identified in making those changes)
  <verbatim>
  tdbc:
  	* aclocal.m4:	Add a TEAX_PATH_LINE rule to simplify emitting the
  			stub library paths in tdbcConfig.sh.
  	* tools/genExtStubs.tcl (ParseImports, writeStubDeclarations):
  			Add a new '* CONVENTION:' declaration to the
  			stub declarations that specifies the linkage
  			convention (e.g., __stdcall, WINAPI) that is
  			used in an imported library.
  	* configure.in: Add code to put the stub library path (build and
  			(install) in the tdbcConfig.sh file so that extensions
  			that import TDBC stubs can find it.
  	* generic/tdbc.h:
  	* README:	Advance release to 1.0b15
  	* configure:	autoconf-2.59

  tdbcmysql:
  	* aclocal.m4:	Synchronize with tdbc.
  	* configure.in:	Advance TEA version to 3.7. Advance release to 1.0b15.
  			Corrected the TDBC stub library specification so that 
  			it works under MSVC.
  	* generic/mysqlStubDefs.txt:
  			Split out the linkage convention so that 
  			genExtStubs.tcl can generate syntactically correct
  			VC++ pointer-to-function declarations.
  	* generic/mysqlStubInit.c:
  	* generic/mysqlStubs.h:
  			Regenerate
  	* generic/tdbcmysql.c:
  			Added code to silence VC++ warnings.
  	* README:	Advance release to 1.0b15
  	* tclconfig/:	Advance to TEA 3.7
  	* configure:	autoconf-2.59

  tdbcodbc:
  	* aclocal.m4:	Synchronized with the 'tdbc' package.
  	* configure.in: Advanced release to 1.0b15 and TEA version to 3.7.
  			Added code to detect VC++ and include the stub
  			library by path rather than with -L and -l.
  	* generic/fakesql.h:
  			Corrected syntax of INSTAPI specifiers.
  	* generic/odbcStubDefs.txt:
  			Added a CONVENTION: SQL_API line so that 
  			genExtStubs.tcl can get the syntax right on the
  			pointer-to-function declarations.
  	* generic/odbcStubInit.txt:
  			Corrected syntax of INSTAPI specifiers. Regenerated.
  	* generic/odbcStubs.h:
  			Regenerated.
  	* generic/tdbcodbc.c:
  			Silenced several VC++ warnings.
  	* README:	Advanced release to 1.0b15.
  	* tclconfig/:	Advanced to TEA 3.7
  	* configure:	autoconf-2.59

  tdbcpostgres:
  	* aclocal.m4:	Synchronized with tdbc.
  	* configure.in:	Advanced version number to 1.0b15. Advanced TEA
  			version to 3.7. Corrected the way that stub libraries
  			are located on VC++.
  	* generic/tdbcpostgres.c: 
  			Corrected a number of errors and warnings in the
  			VC++ build.
  	* README:	Advanced to 1.0b15
  	* tclconfig/:	Advanced to TEA 3.7
  	* configure:	autoconf-2.59

  tdbcsqlite3:
  	* aclocal.m4:	Synchronized with 'tdbc'.
  	* configure.in: Advanced version to 1.0b15. Advanced TEA to 3.7.
  	* library/tdbcsqlite3.tcl:
  			Advanced version to 1.0b15.
  	* README:	Advanced version to 1.0b15.
  	* tclconfig/:	Advanced TEA to 3.7.
  	* configure:	autoconf-2.59

  </verbatim>


type: ci
user: kennykb
comment:
  tdbcmysql: Restored MySQL 5.0 compatibility.
  <verbatim>
  	* generic/fakesql.h:
  			Added dual definitions of data structures that change
  			between MySQL 5.0 and 5.1.
  	* generic/mysqlStubDefs.h:
  			Added code to link to mysqlclient_r and mysqlclient
  			as well as mysql so that client libs can be found
  			on Unix. Added query of the client lib version.
  	* generic/mysqlStubInit.c: 
  			Regenerate
  	* generic/mysqlStubs.h:	
  			Regenerate
  	* generic/tdbcmysql.c:
  			Modified to make MYSQL_BIND and MYSQL_FIELD accesses
  			go through accessor functions that hit the correct
  			versions of the structures according to the client
  			library version. (Tcl can provide ABI stability,
  			even if MySQL can't!)
  	* configure.in: Advance release to 1.0b15.1
  	* README:	Advance release to 1.0b15.1
  	* configure:	autoconf-2.59
  </verbatim>


type: t
user: anonymous
brief: New ticket [dadf1ab854].
comment:
  New ticket [dadf1ab854] <i>tdbc::sqlite3 cannot [package require] (therefore test) from build dir</i>.


type: t
user: anonymous
brief: Ticket [dadf1ab854]: 4 changes
comment:
  Ticket [dadf1ab854] <i>tdbc::sqlite3 cannot [package require] (therefore test) from build dir</i> status still Open with 4 other changes


type: ci
user: andreask
comment:
  Fixed build failures for various unix platforms (c89 violations, bogus creation of stub libraries in driver Makefile)


type: ci
user: kennykb
comment:
  fix Win64 build of tdbc::odbc:
  <verbatim>
  	* generic/fakesql.h: 
  			Eliminated uses of INT64 and UINT64 in 
  			favour of Tcl_WideInt and Tcl_WideUInt
  			respectively.  (Avoids a conflict with
  			INT64 and UINT64 definitions in basetsd.h
  			on Win64.)
  </verbatim>


type: g
user: kennykb
comment:
  Tag changes on [/timeline?dp=122999cbb6a9cb66&n=4 | 122999cbb6a9cb66]: Cancel symbolic tag "1.0b15.1".


type: g
user: kennykb
comment:
  Tag changes on [/timeline?dp=d3f93ad4b3230077&n=4 | d3f93ad4b3230077]: Cancel symbolic tag "1.0b15.1".


type: ci
user: andreask
comment:
  Moved the int32_t/int16_t types into the _WIN32 conditional. Conflicted with HPUX own definitions of these types and required only for windows.


type: ci
user: kennykb
comment:
  tdbc:
  	* library/tdbc.tcl: Add methods 'primarykeys' and 'foreignkeys'
  			    on the 'tdbc::connection' object
  	                    to inspect database structure, and methods
  			    'BuildPrimaryKeysStatement' and 
  	                    'BuildForeignKeysStatement' to initialize the
  	                    'statement' objects that the methods use.

  tdbcmysql:
  	* library/tdbcmysql.tcl: Added a 'BuildForeignKeysStatement' method
  	                         to tdbcmysql::connection that overrides the
  				 one in the base class and accommodates the
  				 nonstandard INFORMATION_SCHEMA provided in
  				 MySQL.
  	* tests/tdbcmysql.test: Added test cases for '$db primarykeys'
  	                        and '$db foreignkeys'

  tdbcpostgres:
  	* tests/tdbcpostgres.test: Added test cases for '$db primarykeys'
  				   and '$db foreignkeys'


type: g
user: kennykb
comment:
  Tag changes on [/timeline?dp=d3f93ad4b3230077&n=4 | d3f93ad4b3230077]: Cancel symbolic tag "10.b15.1".


type: g
user: kennykb
comment:
  Tag changes on [/timeline?dp=f9bae25da3683394&n=4 | f9bae25da3683394]: Cancel symbolic tag "1.0b14".


type: ci
user: kennykb
comment:
  Added "primarykeys" and "foreignkeys" methods to the "connection" object. Added test cases for these methods.


type: t
user: kennykb
brief: Closed ticket [dadf1ab854].
comment:
  Closed ticket [dadf1ab854]: <i>tdbc::sqlite3 cannot [package require] (therefore test) from build dir</i> plus 2 other changes


type: t
user: kennykb
brief: Deferred ticket [b0ea387b9f].
comment:
  Deferred ticket [b0ea387b9f]: <i>tdbcoracle/configure.in oci.h location issue on FreeBSD</i> plus 1 other change


type: t
user: kennykb
brief: Deferred ticket [3e7f26479a].
comment:
  Deferred ticket [3e7f26479a]: <i>tdbcoracle/configure.in can't detect libocciei on FreeBSD</i> plus 4 other changes


type: g
user: kennykb
comment:
  Tag changes on [/timeline?dp=fd0d0e363d8c8d5d&n=4 | fd0d0e363d8c8d5d]: Cancel symbolic tag "1.0b16".


type: g
user: kennykb
comment:
  Tag changes on [/timeline?dp=5a29dbe5006ec884&n=4 | 5a29dbe5006ec884]: Cancel symbolic tag "1.0b16".


type: t
user: anonymous
brief: Ticket [8766b8dc40]: 4 changes
comment:
  Ticket [8766b8dc40] <i>tdbc::odbc crashes tclsh when retrieving DECIMAL data from Oracle</i> status still Open with 4 other changes


type: ci
user: kennykb
comment:
  * generic/fakemysql.h: Added the MYSQL data structure and the
  		       nest of other definitions that it depends on.
  * generic/mysqlStubDefs.txt: Added mysql_affected_rows and
  			     mysql_field_count.
  * generic/mysqlStubInit.c, generic/mysqlStubs.h: Regenerated.
  * generic/tdbcmysql.c: Added 'evaldirect' method that allows
  		       executing statements that are unimplemented
  		       in the MySQL prepared statement API.
  * generic/tdbcmysql.tcl: Did a rough (not really functional) hack
                           at formatting prepared statements.
  * tests/tdbcmysql.test (tdbc::mysql-25.*): Added two tests for
  creating a (parameterless) stored procedure and executing it.


type: ci
user: kennykb
comment:
  development checkpoint: add tests for multiple results, fix a memory leak when 'foreignkeys' returns an error.


type: ci
user: kennykb
comment:
  Added 'nextresults' method and tests for it to tdbc::sqlite3. Revised tests to use the correct package name in test numbers.


type: ci
user: kennykb
comment:
  Added stubbed 'nextresults' method in tdbcpostgres; added test cases for it; corrected pointer smash in preparing an empty statement.


type: ci
user: kennykb
comment:
  Fixed a bug in handling small integer data on 64-bit systems. Who would have imagined that MYSQL_TYPE_LONG doesn't mean 'long', but rather 'int'?


type: ci
user: kennykb
comment:
  Quieted test cases on 64-bit machines and on MySQL server versions earlier than 5.1.16. Thanks to Damon Courtney for testing and reporting the bugs.


type: ci
user: kennykb
comment:
  Added empty comment to the start of each man page because the 'man' command interprets the first comment in the file as containing directives.


type: ci
user: kennykb
comment:
    * library/tdbc.tcl:
  Changed 'foreach' method on the connection, statement
  and result set objects so that 'foreach' and 'allrows'
  will iterate over multiple result sets.  Added
  default 'nextresults' method (does nothing, reports
  that no further results are available) and
  'outputparams' method (does nothing, reports no
  output parameters) to the base 'resultset' class so
  that drivers that lack multiple-results functionality
  need not implement these.


type: ci
user: kennykb
comment:
  * tests/tdbcsqlite3.test (tdbc::sqlite3-30.[45]):
  Added tests for [foreach] and [allrows] against
  multiple result sets.


type: ci
user: kennykb
comment:
  * tests/tdbcodbc.test (tdbc::odbc-30.[45]):
  Added tests for [allrows] and [foreach] on multiple result sets.


type: t
user: kennykb
brief: Verified ticket [6460f1f738].
comment:
  Verified ticket [6460f1f738]: <i>There should be a way to escape "@", or to configure supported parameter prefixes in tokenizer</i> plus 4 other changes


type: ci
user: kennykb
comment:
  <verbatim>
     * doc/tdbc_resultset.n:
  	Added description of the 'nextresults' method,
  	and its effect on 'allrows' and 'foreach'
  </verbatim>


type: ci
user: kennykb
comment:
  <verbatim>
  * tests/tdbcmysql.test:
  	Added rudimentary test for 'nextresults' - the method
  	is a dummy because the calls supported by tdbc::mysql
  	do not allow for multiple result sets.
  </verbatim>


type: ci
user: kennykb
ecomment:
  <verbatim>
  * generic/tdbcodbc.c (ResultSetNextresultsMethod):
  * tests/tdbcodbc.test (tdbc::odbc-{30.6,31.1}:
  	Made 'rowcount' work for multiple result sets. Added a
  	test for 'rowcount' in multiple result sets, and added
  	a rudimentary test that stored procedures can be called.
  * library/tdbcodbc.tcl (tdbc::odbc::resultset preparecall)
  	Added a non-executed sketch of how a preparse of
  	a prepared statement call might go in order to allow
  	the use of SQLProcedureColumns to determine parameter
  	directions. (This code may or may not be used; a first
  	experiment would simply be to make all SP parameters
  	'inout' and see if that works.)
  </verbatim>

comment:
  <verbatim>
  * generic/tdbcodbc.c (ResultSetNextresultsMethod):
  * tests/tdbcodbc.test (tdbc::odbc-{30.6,31.1}:
  	Made 'rowcount' work for multiple result sets. Added a
  	test for 'rowcount' in multiple result sets, and added
  	a rudimentary test that stored procedures can be called.
  * library/tdbcodbc.tcl (tdbc::odbc::resultset preparecall)
  	Added a non-executed sketch of how a preparse of
  	a prepared statement call might go in order to allow
  	the use of SQLProcedureColumns to determine parameter
  	directions. (This code may or may not be used; a first
  	experiment would simply be to make all SP parameters
  	'inout' and see if that works.)
  </verbatim>


type: t
user: kennykb
brief: Tested ticket [6460f1f738].
comment:
  Tested ticket [6460f1f738]: <i>There should be a way to escape "@", or to configure supported parameter prefixes in tokenizer</i> plus 2 other changes


type: ci
user: kennykb
comment:
     * generic/pqStubInit.c:
  		Revised code to look for libpq.so by SONAME as well
  		as directly, so that ABI version number is taken into
  		account and so that libpq-dev is not required.
     * generic/pqStubs.h: 
  		make genstubs


type: t
user: kbk
brief: Ticket [dfff082917]: 4 changes
comment:
  Ticket [dfff082917] <i>typo in $resultset allrows man page</i> status still Open with 4 other changes


type: t
user: kbk
brief: Ticket [dd75b2b7a5]: 4 changes
comment:
  Ticket [dd75b2b7a5] <i>tdbc::connection transaction doesn't close TRANSACTION on timeout</i> status still Open with 4 other changes


type: ci
user: kennykb
comment:
  <verbatim>
  * generic/tdbcodbc.c (GetCell):
  	(It is hoped) Fix a crash where an error is returned
  	from SQLGetData. (Bug [8766b8dc40], partial fix.)
  * tests/tdbcodbc.test:
  	Code formatting changes to avoid long lines and spurious
  	semicolons.
  </verbatim>


type: t
user: kennykb
brief: Ticket [8766b8dc40]: 1 change
comment:
  Ticket [8766b8dc40] <i>tdbc::odbc crashes tclsh when retrieving DECIMAL data from Oracle</i> status still Open with 1 other change


type: t
user: kennykb
brief: Verified ticket [8766b8dc40].
comment:
  Verified ticket [8766b8dc40]: <i>tdbc::odbc crashes tclsh when retrieving DECIMAL data from Oracle</i>


type: ci
user: kennykb
comment:
  <verbatim>
  * generic/tdbcodbc.c (GetCell, HasBigintMethod, ResultSetConstructor):
  	Fix a crash where an error is returned from SQLGetData.
          Add a check for whether a connection supports 64-bit integers
  	before trying to use them to replace NUMERIC or DECIMAL
  	values. Add a method to determine 64-bit integer support.
  	(Bug [8766b8dc40].)
  * library/tdbcodbc.tcl (tdbc::odbc::connection typemap):
  	Add to initialization a check for 64-bit integer support
  	so that the above change works. (Bug [8766b8dc40].)
  </verbatim>


type: t
user: kennykb
brief: Fixed ticket [8766b8dc40].
comment:
  Fixed ticket [8766b8dc40]: <i>tdbc::odbc crashes tclsh when retrieving DECIMAL data from Oracle</i> plus 2 other changes


type: ci
user: kennykb
ecomment:
  * library/tdbc.tcl (tdbc::connection transaction):<br>
  &nbsp;&nbsp;&nbsp;&nbsp;Modified the 'transaction' method to attempt to rollback<br>
  &nbsp;&nbsp;&nbsp;&nbsp;if a commit fails, in order to clear out a failed<br>
  &nbsp;&nbsp;&nbsp;&nbsp;transaction.<br>
  * doc/tdbc_connection.n:<br>
  &nbsp;&nbsp;&nbsp;&nbsp;Modified the 'tdbc_connection' manual page to reflect the<br>
  &nbsp;&nbsp;&nbsp;&nbsp;above behaviour. (Bug [dd75b2b7a5])<br>
  </verbatim>

comment:
  <verbatim>
  * library/tdbc.tcl (tdbc::connection transaction):
  	Modified the 'transaction' method to attempt to rollback
  	if a commit fails, in order to clear out a failed
  	transaction.
  * doc/tdbc_connection.n:
  	Modified the 'tdbc_connection' manual page to reflect the
  	above behaviour. (Bug </verbatim>[d7dd97c402]<verbatim>)
  </verbatim>


type: t
user: kbk
brief: Fixed ticket [dd75b2b7a5].
comment:
  Fixed ticket [dd75b2b7a5]: <i>tdbc::connection transaction doesn't close TRANSACTION on timeout</i> plus 2 other changes


type: g
user: kbk
comment:
  Tag changes on [/timeline?dp=8a226b022001218d&n=4 | 8a226b022001218d]: Cancel symbolic tag "closed".


type: g
user: kennykb
comment:
  Tag changes on [/timeline?dp=f09e4f0ad3d5d7c4&n=4 | f09e4f0ad3d5d7c4]: Cancel symbolic tag "1.0b17".


type: g
user: dgp
comment:
  Tag changes on [/timeline?dp=7799d26ac99c88c0&n=4 | 7799d26ac99c88c0]: Cancel symbolic tag "1.0b17".


type: g
user: dgp
comment:
  Tag changes on [/timeline?dp=90fd7599e769efeb&n=4 | 90fd7599e769efeb]: Cancel symbolic tag "1.0b17".


type: ci
user: kostix
comment:
  Sketch support for the "early bindings" configuration

  The ./configure options do work but the driver code needs
  a fair amount of work due to its heavy dependency on runtime
  self-adjustments to different versions of libmysqlclient.


type: ci
user: kostix
comment:
  Provide two sets of functions to work with certain MySQL data types.

  One is used in "native" mode, when early binding is enabled,
  and another one is used with late binding, when accessing these
  data types depends on the version of the client library loaded.


type: ci
user: kostix
comment:
  Mark all functions in generic/mysqlNative.c as inline

  In early-binding build mode all the functions in this module
  perform nothing more than simple accessing so they are good
  candidates for inlining.


type: g
user: kennykb
comment:
  Tag changes on [/timeline?dp=129d7f153167c2d8&n=4 | 129d7f153167c2d8]: Cancel symbolic tag "kbk-test".


type: ci
user: kennykb
comment: Add a 'valgrind' rule to the Makefile and change 'all.tcl' to facilitate 'valgrind'
ecomment:
  tdbcmysql: Add a 'valgrind' rule to the Makefile and change 'all.tcl' to facilitate 'valgrind'
  tdbcsqlite3: Fix a bug where a multi-SQL-statement 'statement' whose last result was empty would fail in 'allrows' or 'foreach'.


type: t
user: jan.nijtmans
brief: Ticket [b4029dc351]: 4 changes
comment:
  Ticket [b4029dc351] <i>make all TDBC API functions MODULE_SCOPE</i> status still Open with 4 other changes


type: t
user: jan.nijtmans
brief: Ticket [b4029dc351]: 2 changes
comment:
  Ticket [b4029dc351] <i>make all TDBC API functions MODULE_SCOPE</i> status still Open with 2 other changes


type: ci
bgcolor: #f0f0c0
user: dgp
comment:
  Use hyphen in file/dir names so we know version 1.0b17 of tdbcsqlite3 is different
  from version 31.0b17 of tdbcsqlite.


type: t
user: anonymous
brief: Ticket [b4029dc351]: 1 change
comment:
  Ticket [b4029dc351] <i>make all TDBC API functions MODULE_SCOPE</i> status still Open with 1 other change


type: t
user: anonymous
brief: Ticket [0a8fd3f25e]: 4 changes
comment:
  Ticket [0a8fd3f25e] <i>Tdbc_Init() not exported - libtdbc.so not [load]able</i> status still Open with 4 other changes


type: t
user: jan.nijtmans
brief: Fixed ticket [0a8fd3f25e].
comment:
  Fixed ticket [0a8fd3f25e]: <i>Tdbc_Init() not exported - libtdbc.so not [load]able</i> plus 2 other changes


type: ci
user: kennykb
comment:
  Updated ChangeLogs from Nijtmans's last few changes. Restored Unix buildability of tdbc by giving Tdbc_Init a correct external declaration. Fixed two failing tests in tdbcpostgres (the tests, not the code, were bad).


type: ci
user: kennykb
comment:
  Correct a problem where SELECT operations returning bytearrays yield corrupted data from PostgreSQL servers at version 9.0 and beyond.


type: ci
user: kennykb
comment:
  A user asserts that certain 'output' parameters
                        to SQLGetData must be initialized. While I have
                        never seen the failure he reports, initializing
        them appears to be Mostly Harmless, so do so. (Bug [0dda7dbb73])


type: t
user: kbk
brief: Closed ticket [b846c1f20e].
comment:
  Closed ticket [b846c1f20e]: <i>crash when idle-exit, after 'package require tdbc::odbc'</i> plus 5 other changes


type: t
user: kbk
brief: Ticket [bf0603a6a2]: 6 changes
comment:
  Ticket [bf0603a6a2] <i>postgres does not support semicolons</i> status still Open with 6 other changes


type: t
user: kbk
brief: Ticket [0dda7dbb73]: 1 change
comment:
  Ticket [0dda7dbb73] <i>Uninitialized data causes problem in GetCell</i> status still Fixed with 1 other change


type: ci
user: kennykb
comment:
  Make tdbc::mysql functional tests refuse to run unless the user explicitly sets a TDBCMYSQL_TEST_DB environment variable designating a test database.


type: t
user: jan.nijtmans
brief: Ticket [d528df190c]: 4 changes
comment:
  Ticket [d528df190c] <i>Changes to build using makefile.vc</i> status still Open with 4 other changes


type: ci
user: jan.nijtmans
ecomment:
  Fix [14a8b7c3bd]: package tdbc::mysql fails to load under Fedora 17. 
  Make some internal tables "const"

comment:
  Fix [dd068d5942]: package tdbc::mysql fails to load under Fedora 17. 
  Make some internal tables "const"


type: t
user: jan.nijtmans
brief: Fixed ticket [14a8b7c3bd].
comment:
  Fixed ticket [14a8b7c3bd]: <i>package tdbc::mysql fails to load under Fedora 17</i> plus 4 other changes


type: ci
user: jan.nijtmans
comment:
  fix TEA bug 3554282: Checkin [30736d63f0] broke CFLAGS
  fix [d528df190c]: Changes to build using makefile.vc


type: g
user: jan.nijtmans
comment:
  Tag changes on [/timeline?dp=bdd8b4286262413c&n=4 | bdd8b4286262413c]: Cancel symbolic tag "1.0-branch".


type: g
user: jan.nijtmans
comment:
  Tag changes on [/timeline?dp=738383ee2aad0b15&n=4 | 738383ee2aad0b15]: Cancel symbolic tag "1.0-branch".


type: g
user: jan.nijtmans
comment:
  Tag changes on [/timeline?dp=3fb3d3cb0e2b85bb&n=4 | 3fb3d3cb0e2b85bb]: Cancel symbolic tag "1.0-branch".


type: g
user: jan.nijtmans
comment:
  Tag changes on [/timeline?dp=3c947581664fa2c5&n=4 | 3c947581664fa2c5]: Cancel symbolic tag "1.0-branch".


type: g
user: jan.nijtmans
comment:
  Tag changes on [/timeline?dp=b172b416142cab92&n=4 | b172b416142cab92]: Add closed. Cancel symbolic tag "1.0-branch".


type: g
user: jan.nijtmans
comment:
  Tag changes on [/timeline?dp=1e22326ceb5a7789&n=4 | 1e22326ceb5a7789]: Cancel symbolic tag "1.0-branch".


type: g
user: jan.nijtmans
comment:
  Tag changes on [/timeline?dp=24a54bce57d9205c&n=4 | 24a54bce57d9205c]: Cancel symbolic tag "1.0-branch".


type: g
user: jan.nijtmans
comment:
  Tag changes on [/timeline?dp=cdee385d7b03128c&n=4 | cdee385d7b03128c]: Cancel symbolic tag "release".


type: ci
user: jan.nijtmans
comment:
  update to latest TEA (Fix [Bug 3555058], add "-DNDEBUG" to CFLAGS_DEFAULT)
  update to latest version of nmakehlp.c


type: g
user: dgp
comment:
  Tag changes on [/timeline?dp=ea0a013fc523dbaa&n=4 | ea0a013fc523dbaa]: Add symbolic tag "tdbc-1-0-b17".


type: g
user: dgp
comment:
  Tag changes on [/timeline?dp=ea0a013fc523dbaa&n=4 | ea0a013fc523dbaa]: Cancel symbolic tag "tdbc-1-0-b17".


type: g
user: dgp
comment:
  Tag changes on [/timeline?dp=dc470dee3956a286&n=4 | dc470dee3956a286]: Add symbolic tag "tdbc-1-0-b17".


type: g
user: jan.nijtmans
comment:
  Tag changes on [/timeline?dp=9972d7cf7d10b551&n=4 | 9972d7cf7d10b551]: Cancel symbolic tag "1.0b17".


type: g
user: jan.nijtmans
comment:
  Tag changes on [/timeline?dp=dc470dee3956a286&n=4 | dc470dee3956a286]: Add symbolic tag "1.0b17". Cancel symbolic tag "tdbc-1-0-b17".


type: t
user: anonymous
brief: Ticket [751477d142]: 4 changes
comment:
  Ticket [751477d142] <i>Problem with MS SQL SERVER (via tdbcodbc) stored procedures</i> status still Open with 4 other changes


type: t
user: kbk
brief: Ticket [14dee3be9a]: 5 changes
comment:
  Ticket [14dee3be9a] <i>postgresql [column] doesn't like bool or boolean</i> status still Open with 5 other changes


type: t
user: kbk
brief: Closed ticket [dd068d5942].
comment:
  Closed ticket [dd068d5942]: <i>tdbc::sqlite3 does not show the data for attached files</i> plus 4 other changes


type: g
user: kbk
comment:
  Tag changes on [/timeline?dp=34859471d3d03fc1&n=4 | 34859471d3d03fc1]: Cancel branch. Cancel symbolic tag "repository-refactor".


type: t
user: kbk
brief: Closed ticket [751477d142].
comment:
  Closed ticket [751477d142]: <i>Problem with MS SQL SERVER (via tdbcodbc) stored procedures</i> plus 2 other changes


type: t
user: oehhar
brief: Ticket [e226dbc23c]: 3 changes
comment:
  Ticket [e226dbc23c] <i>tdbc win/makefile.vc does not install development files</i> status still Open with 3 other changes


type: t
user: oehhar
brief: Ticket [dde9dbcb64]: 1 change
comment:
  Ticket [dde9dbcb64] <i>No Windows makefile.vc for tdbc-odbc</i> status still Closed with 1 other change


type: t
user: oehhar
brief: Ticket [05d96953e1]: 8 changes
comment:
  Ticket [05d96953e1] <i>tdbc::sqlite3 does not support schematas</i> status still Open with 8 other changes


type: t
user: oehhar
brief: Ticket [e226dbc23c]: 4 changes
comment:
  Ticket [e226dbc23c] <i>tdbc win/makefile.vc does not install development files</i> status still Open with 4 other changes


type: t
user: oehhar
brief: Ticket [10f9e9c162]: 6 changes
comment:
  Ticket [10f9e9c162] <i>tdbc::odbc makefile.vc requires TCL_VERSION_REQ</i> status still Open with 6 other changes


type: ci
user: oehhar
comment:
  tdbc/win/Makefile.vc now installs prototypes, stub lib and tdbcConfig.sh.
  tdbcodbc/win/Makefile.vc builds when bundled, test invocation fixed.


type: t
user: oehhar
brief: Closed ticket [10f9e9c162].
comment:
  Closed ticket [10f9e9c162]: <i>tdbc::odbc makefile.vc requires TCL_VERSION_REQ</i> plus 3 other changes


type: t
user: oehhar
brief: Closed ticket [e226dbc23c].
comment:
  Closed ticket [e226dbc23c]: <i>tdbc win/makefile.vc does not install development files</i> plus 3 other changes


type: g
user: dgp
comment:
  Tag changes on [/timeline?dp=caab6510cb7b9fb1&n=4 | caab6510cb7b9fb1]: Add propagating branch=trunk. Add propagating symbolic tag "trunk".


type: g
user: dgp
comment:
  Tag changes on [/timeline?dp=34859471d3d03fc1&n=4 | 34859471d3d03fc1]: Add propagating branch=trunk. Add propagating symbolic tag "trunk".


type: g
user: dgp
comment:
  Tag changes on [/timeline?dp=7934bed4e7231910&n=4 | 7934bed4e7231910]: Add propagating branch=trunk. Add propagating symbolic tag "trunk".


type: g
user: dgp
comment:
  Tag changes on [/timeline?dp=caab6510cb7b9fb1&n=4 | caab6510cb7b9fb1]: Add symbolic tag "tdbc-1-0-0".


type: t
user: kbk
brief: Ticket [491a0e30c4]: 6 changes
comment:
  Ticket [491a0e30c4] <i>tdbc::mysql needs trim function to retrieve integers</i> status still Open with 6 other changes


# ticket

tkt_uuid: bc5ff8352f460d51b895529c1e57f7da5bda0ad3
type: Code_Defect
status: Closed
subsystem: not_specified
priority: Medium
severity: Minor
foundin: 1.0b1
private_contact: 72c73ce34e23821d1efcc88bc872fc296aabde7e
resolution: Fixed
title: Get rid of tcl_findLibrary
comment:
  dgp informs me that tcl_findLibrary should be considered obsolete.
  The current thinking on how to structure a module is that both the
  C code for the module and any Tcl scripts required should be loaded
  from pkgIndex.tcl, and the 'tcl_findLibrary' hack should never be
  needed. (It appears that there are some order-of-initialization
  issues to resolve with the recommended approach, but these can be
  tackled if necessary by adding commands in the C code to be called
  at the appropriate point in the Tcl code, so that the sequence will
  be load DLL - source Tcl library - Tcl library calls initialisation
  in DLL in whatever order is needed.

  <hr><i>kennykb added on 2010-09-03 18:10:19:</i><br>
  It's got rid of. pkgIndex.tcl now sources the Tcl script and then loads the library. There are a few subtleties that are attended to.


tkt_uuid: 28616c6f8cd7ec340cfc2e5230c1fe61dc81ea15
type: Code_Defect
status: Closed
subsystem: tdbc
priority: Immediate
severity: Critical
foundin: 1.0b1
private_contact: 72c73ce34e23821d1efcc88bc872fc296aabde7e
resolution: Fixed
title: tdbc bundled with tcl doesn't build on netbsd amd64
comment:
  compilation fails with the following message:

  Building package 'tdbc'
  gcc -DPACKAGE_NAME=\"tdbc\" -DPACKAGE_TARNAME=\"tdbc\" -DPACKAGE_VERSION=\"1.0b1\" -DPACKAGE_STRING=\"tdbc\ 1.0b1\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DTCL_WIDE_INT_IS_LONG=1 -DUSE_TCL_STUBS=1   -I"/home/emiliano/src/tcl/generic"    -pipe -pthread -O2 -Wall -fPIC -c `echo /home/emiliano/src/tcl/pkgs/tdbc/generic/tdbc.c` -o tdbc.o
  gcc -DPACKAGE_NAME=\"tdbc\" -DPACKAGE_TARNAME=\"tdbc\" -DPACKAGE_VERSION=\"1.0b1\" -DPACKAGE_STRING=\"tdbc\ 1.0b1\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DTCL_WIDE_INT_IS_LONG=1 -DUSE_TCL_STUBS=1   -I"/home/emiliano/src/tcl/generic"    -pipe -pthread -O2 -Wall -fPIC -c `echo /home/emiliano/src/tcl/pkgs/tdbc/generic/tdbcStubInit.c` -o tdbcStubInit.o
  gcc -DPACKAGE_NAME=\"tdbc\" -DPACKAGE_TARNAME=\"tdbc\" -DPACKAGE_VERSION=\"1.0b1\" -DPACKAGE_STRING=\"tdbc\ 1.0b1\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DTCL_WIDE_INT_IS_LONG=1 -DUSE_TCL_STUBS=1   -I"/home/emiliano/src/tcl/generic"    -pipe -pthread -O2 -Wall -fPIC -c `echo /home/emiliano/src/tcl/pkgs/tdbc/generic/tdbcTokenize.c` -o tdbcTokenize.o
  /home/emiliano/src/tcl/pkgs/tdbc/generic/tdbcTokenize.c: In function 'Tdbc_TokenizeSql':
  /home/emiliano/src/tcl/pkgs/tdbc/generic/tdbcTokenize.c:138: warning: array subscript has type 'char'
  /home/emiliano/src/tcl/pkgs/tdbc/generic/tdbcTokenize.c:139: warning: array subscript has type 'char'
  /home/emiliano/src/tcl/pkgs/tdbc/generic/tdbcTokenize.c:146: warning: array subscript has type 'char'
  rm -f libtdbc1.0b1.so
  gcc -shared -fPIC -o libtdbc1.0b1.so tdbc.o tdbcStubInit.o tdbcTokenize.o  -L/home/emiliano/src/tcl/unix -ltclstub8.6
  ld: tdbc.o: relocation R_X86_64_PC32 against `tdbcStubs' can not be used when making a shared object; recompile with -fPIC
  ld: final link failed: Bad value

  this patch solves the problem
  --- ./pkgs/tdbc/generic/tdbcStubInit.c.orig     2008-12-23 02:04:46.000000000 -0200
  +++ ./pkgs/tdbc/generic/tdbcStubInit.c  2008-12-23 02:08:14.000000000 -0200
  @@ -17,7 +17,7 @@
   
   /* !BEGIN!: Do not edit below this line. */
   
  -TdbcStubs tdbcStubs = {
  +MODULE_SCOPE TdbcStubs tdbcStubs = {
       TCL_STUB_MAGIC,
       TDBC_STUBS_EPOCH,
       TDBC_STUBS_REVISION,

  <hr><i>kennykb added on 2008-12-30 17:38:05:</i><br>
  Fixed in [651d34d627]


tkt_uuid: 98c4a10354f55468a8abf577c9cb00550913ce09
type: Feature_Request
status: Closed
subsystem: --none--
priority: Immediate
severity: Minor
foundin: 1.0b4
private_contact: 72c73ce34e23821d1efcc88bc872fc296aabde7e
resolution: Fixed
title: Rework $::errorCode to be more try-friendly
comment:
  Currently, the error code returned from TDBC drivers looks like:
  <pre>
  TDBC <driver> <sqlstate> <detail>
  </pre>
  It should rather be:
  <pre>
  TDBC <category> <sqlstate> <driver> <detail>
  </pre>
  where <category> is a human-readable description of the error category obtained from the first two characters of sqlstate.
  <p>This change would make it possible for a 'try' call to catch a particular sort of SQL error, for instance 'data exception':
  <pre>
  TDBC DATAEXCEPTION ...
  </pre>
  or more specifically 'division by zero':
  <pre>
  TDBC DATAEXCEPTION 22012 ...
  </pre>


tkt_uuid: f916ff78a12099fc19ba33ad11773baa821137de
type: Build_Problem
status: Closed
priority: Immediate
severity: Important
foundin: current tcl CVS head
private_contact: 188c82e08dafda0b395d8b1182a0ab03060f986e
resolution: Fixed
title: makefile.vc patch
comment:
  When $(SCRIPT_INSTALL_DIR) has spaces in the name, the install-libraries target fails on the $(CPY) operation.


  Index: makefile.vc
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/win/makefile.vc,v
  retrieving revision 1.3
  diff -c -r1.3 makefile.vc
  *** makefile.vc	22 Dec 2008 00:42:03 -0000	1.3
  --- makefile.vc	7 Jan 2009 20:59:23 -0000
  ***************
  *** 466,472 ****
    	@echo Installing libraries to '$(SCRIPT_INSTALL_DIR)'
    	@if exist $(LIBDIR) $(CPY) $(LIBDIR)\*.tcl "$(SCRIPT_INSTALL_DIR)"
    	@echo Installing package index in '$(SCRIPT_INSTALL_DIR)'
  ! 	@$(CPY) $(OUT_DIR)\pkgIndex.tcl $(SCRIPT_INSTALL_DIR)
    
    install-docs:
    	@echo Installing documentation files to '$(DOC_INSTALL_DIR)'
  --- 466,472 ----
    	@echo Installing libraries to '$(SCRIPT_INSTALL_DIR)'
    	@if exist $(LIBDIR) $(CPY) $(LIBDIR)\*.tcl "$(SCRIPT_INSTALL_DIR)"
    	@echo Installing package index in '$(SCRIPT_INSTALL_DIR)'
  ! 	@$(CPY) $(OUT_DIR)\pkgIndex.tcl "$(SCRIPT_INSTALL_DIR)"
    
    install-docs:
    	@echo Installing documentation files to '$(DOC_INSTALL_DIR)'

  <hr><i>kbk added on 2009-01-08 03:35:43:</i><br>
  Thanks for the patch, Davy. I've merged it upstream.  Kevin


tkt_uuid: 29fe60bd53ff2fcda60fc01bb8157f36a7101dfb
type: Code_Defect
status: Closed
subsystem: tdbc
priority: Immediate
severity: Severe
foundin: 1.0b1
private_contact: 57cc71d7cce54a7bb74c3501fd513bcd65e3fdc2
resolution: Fixed
title: 2501258 tdbc is built without -fPIC option
comment:
  Hi!

  Currently tdbc shared library is built without -fPIC option, which may
  cause build problems on architectures other than x86. You can see build
  failures on x86_64
  (http://experimental.debian.net/fetch.php?&pkg=tcl8.6&ver=8.6.0%7Eb1-1&arch
  =amd64&stamp=1230511061&file=log&as=raw) and HP PA-RISC
  (http://experimental.debian.net/fetch.php?&pkg=tcl8.6&ver=8.6.0%7Eb1-1&arch
  =hppa&stamp=1230521525&file=log&as=raw) architectures.

  To fix this bug it should be sufficient to add $(SHLIB_CFLAGS) to COMPILE
  definition:
  <pre>
  --- tcl8.6-8.6.0~b1.orig/pkgs/tdbc1.0b1/Makefile.in
  +++ tcl8.6-8.6.0~b1/pkgs/tdbc1.0b1/Makefile.in
  @@ -167,7 +167,7 @@
  LIBS = @PKG_LIBS@ @LIBS@
  AR = @AR@
  CFLAGS = @CFLAGS@
  -COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
  $(AM_CFLAGS) $(CFLAGS)
  +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS)
  $(AM_CFLAGS) $(CFLAGS) $(SHLIB_CFLAGS)

  #========================================================================
  # Start of user-definable TARGETS section
  </pre>

  <hr><i>kbk added on 2009-02-06 17:44:08:</i><br>
  Teo verifies that 1.0b4 in the Tcl HEAD fixes the problem.


tkt_uuid: c30670d169c77b7c07e4150b614227484e4d0f39
type: Code_Defect
status: Closed
subsystem: tdbc
priority: Immediate
severity: Important
foundin: 1.0b1
private_contact: d65c8f42ef81f14ced10171bf205f9a35ce6dff4
resolution: Open
title: pkgIndex.tcl files no good for Tcl pre-8.5
comment:
  When installed, tdbc 1.0b1 installs a
  pkgIndex.tcl file with these contents:

  if {[catch {package require Tcl }]} return
  package ifneeded tdbc 1.0b1 \
      [list load [file join $dir libtdbc1.0b1.so] tdbc]

  And when a 8.4 or earlier interp [source]s
  that, it barfs on "1.0b1".

  Something didn't get substituted right in
  the screening line.

  <hr><i>dgp added on 2009-01-15 21:34:55:</i><br>

  The Makefile sticks in the value
  of $(TCL_VERSION_REQ) at the critical
  spot, but that appears to be undefined.

  <hr><i>kbk added on 2009-02-15 02:01:03:</i><br>
  pkgIndex.tcl changed per dgp's suggestions and released in 1.0b8.
  1.0b8 has been merged to the Tcl HEAD.


tkt_uuid: e33df9041f9c669977f0ed9d86bb46e98898345a
type: Documentation
status: Closed
subsystem: tdbc
priority: Immediate
severity: Cosmetic
foundin: 1.0b4
private_contact: eda214b8908e4945e7a6d1377e45d6a5246ab6a7
resolution: Fixed
title: Editorial nits fixed in tdbc/README
comment:
  --- README.orig Tue Feb 10 07:01:33 2009
  +++ README      Tue Feb 10 07:05:34 2009
  @@ -4,3 +4,3 @@
       (TDBC). TDBC is available from a Fossil version control repository
  -       at http://tdbc.tcl.tk/
  +       at http://tdbc.tcl.tk/ .
   
  @@ -15,3 +15,3 @@
   The drivers are available from http://tdbc.tcl.tk along with the
  -source code of this module A bug database and Wiki are available 
  +source code of this module. A bug database and Wiki are available 
   at the same location.
  @@ -28,3 +28,3 @@
   commands; files with an extension '.3' are for C library functions. The
  -file, 'doc/tdbc.n' gives an overview, listing the classes and functions 
  +file, 'doc/tdbc.n' gives an overview, listing the classes and functions.
   
  @@ -91,3 +91,3 @@
   The Tcl community is too large for us to provide much individual support
  -for users.  If you need help we suggest that you post questions to
  +for users.  If you need help, we suggest that you post questions to
   comp.lang.tcl.  We read the newsgroup and will attempt to answer esoteric

  <hr><i>kbk added on 2009-02-15 01:52:59:</i><br>
  Fixes applied to the head, will be included in 1.0b9 or 1.0.0, whichever comes first.

  <hr><i>kbk added on 2009-02-16 21:17:10:</i><br>
  Fixes merged to the Tcl HEAD from 1.0b9


tkt_uuid: 39a78606aa75626c0c2f727a5e4b46e4831bb39a
type: Incident
status: Closed
subsystem: tdbc::mysql
priority: Immediate
severity: Critical
foundin: 1.0b7
private_contact: 0e580cac0a1e8fcbb8dba8514857461d6968e2a7
resolution: Fixed
title: allrows method of statement object causes segmentation fault on second/third invocation
comment:
  This script fails as shown:

  package require tdbc::mysql
  set dbx [tdbc::mysql::connection new -user tester -password tester -db test]


  foreach sql {
      "DROP TABLE IF EXISTS competition_types"
      "CREATE TABLE competition_types (cty_id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, cty_name VARCHAR(16) NOT NULL, cty_nplayers TINYINT NOT NULL)"
      "INSERT INTO competition_types (cty_name, cty_nplayers) VALUES ('individual', 1), ('pairs', 2), ('teams', 4)"
      "DESCRIBE competition_types"
      "SELECT * FROM competition_types"
  } {
      puts stdout "Executing $sql"
      $dbx foreach row $sql {
  	puts stdout $row
      }
      puts stdout ""
  }

  set sql "SELECT * FROM competition_types WHERE cty_name=:name"

  puts stdout "Using database foreach method"
  foreach name {individual pairs teams} {
      $dbx foreach row $sql [dict create name $name] {
  	puts stdout $row
  	flush stdout
      }
  }
  puts stdout ""

  set stmt [$dbx prepare $sql]

  puts stdout "Using statement foreach method"
  foreach name {individual pairs teams} {
      $stmt foreach row [dict create name $name] {
  	puts stdout $row
  	flush stdout
      }
  }
  puts stdout ""

  puts stdout "Using statement allrows method"
  foreach name {individual pairs teams} {
      puts stdout [$stmt allrows [dict create name $name]]
      flush stdout
  }

  Output:

  Executing DROP TABLE IF EXISTS competition_types

  Executing CREATE TABLE competition_types (cty_id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, cty_name VARCHAR(16) NOT NULL, cty_nplayers TINYINT NOT NULL)

  Executing INSERT INTO competition_types (cty_name, cty_nplayers) VALUES ('individual', 1), ('pairs', 2), ('teams', 4)

  Executing DESCRIBE competition_types
  Field cty_id Type int(11) Null NO Key PRI Extra auto_increment
  Field cty_name Type varchar(16) Null NO Key {} Extra {}
  Field cty_nplayers Type tinyint(4) Null NO Key {} Extra {}

  Executing SELECT * FROM competition_types
  cty_id 1 cty_name individual cty_nplayers 1
  cty_id 2 cty_name pairs cty_nplayers 2
  cty_id 3 cty_name teams cty_nplayers 4

  Using database foreach method
  cty_id 1 cty_name individual cty_nplayers 1
  cty_id 2 cty_name pairs cty_nplayers 2
  cty_id 3 cty_name teams cty_nplayers 4

  Using statement foreach method
  cty_id 1 cty_name individual cty_nplayers 1
  cty_id 2 cty_name pairs cty_nplayers 2
  cty_id 3 cty_name teams cty_nplayers 4

  Using statement allrows method
  {cty_id 1 cty_name individual cty_nplayers 1}
  {cty_id 2 cty_name pairs cty_nplayers 2}
  Segmentation fault

  The fault happens consistently at this point, but small changes to the script can cause the fault to happen on the second statement allrows call. (I.e. the "cty_id 2" line is not output.)

  Setup:

  Tcl 8.6b1.1
  ActiveTcl 8.6.0.0.289006
  tdbc 1.0b7
  tdbc::mysql 1.0b7

  Ubuntu 8.04

  MySQL 5.0.51a-3ubuntu5.4

  <hr><i>kbk added on 2009-04-16 23:03:16:</i><br>
  Fixed in commit [f09e74d5c6]


tkt_uuid: 6d579ee22e9ec0b47a41073c41345b835dfd5150
type: Code_Defect
status: Closed
subsystem: tdbc
priority: High
severity: Severe
foundin: 1.0b8
private_contact: 4def4e9346c6b5093f34887253369c15bbf87bc6
resolution: Fixed
title: foreach arguments documentation/implementation mismatch
comment:
  The syntax of the foreach method of a statement object is documented to be

  (according to the manpage:)

      $stmt foreach ?-as lists|dicts?  ?-columnsvariable name? ?--? dict varName script

  (according to TIP#308)

      statement foreach ?-as lists|dicts? ?-columnsvariable varName? ?--? ?dictionary? varName script

  i.e., it's dictionary before varName. At least in the tdbc::sqlite3 driver however, it's implemented the other way around, as can be seen for example in the following test:

  <verbatim>
  test tdbcsqlite3-9.33 {stmt foreach / parameters in a dictionary} {*}{
      -setup {
          set stmt [::db prepare {
              SELECT idnum, name FROM people WHERE name LIKE :thePattern
          }]
          $stmt paramtype thePattern varchar 40
      }
      -body {
          set result {}
          $stmt foreach row {thePattern b%} {
              lappend result $row
          }
          set result
      }
      -cleanup {
          $stmt close
      }
      -result {{idnum 4 name barney} {idnum 5 name betty} {idnum 6 name bam-bam}}
  }
  </verbatim>

  (Typing this down, I also notice that the manpage is missing ?'s around the dict argument, but that's a separate issue.)


tkt_uuid: d10e7a735c8975d2e79352be9f135e00abd2f965
type: Code_Defect
status: Closed
subsystem: tdbc::mysql
priority: High
severity: Important
foundin: 1.0b8
private_contact: 0e580cac0a1e8fcbb8dba8514857461d6968e2a7
resolution: Overcome_By_Events
title: tdbc::mysql doesn't throw error correctly if data definition commands fail
comment:
  The script below demonstrates that if a DROP TABLE statement fails, then an error is thrown without any text.

  I suspect that the problem may apply to many if not all data definition statements, since executing the same CREATE TABLE command twice in succession has the same effect.

  I further suspect that this problem lies in the tdbc::mysql driver rather than the tdbc core, since if you execute the same CREATE TABLE command twice in succession on an sqlite3 connection the error "table FOO already exists" is thrown.

  package require tdbc::mysql;

  set db [tdbc::mysql::connection new -db test -user tester -password tester];

  $db allrows {
      CREATE TABLE parent (
  	parent_id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY
      ) ENGINE=InnoDb};
  $db allrows {
      CREATE TABLE child (
  	child_id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
  	child_parent INTEGER NOT NULL,
  	FOREIGN KEY (child_parent) REFERENCES parent (parent_id)
      ) ENGINE=InnoDb};
  if {[catch {
      $db allrows {DROP TABLE parent}
  }]} {
      puts stdout "errorCode: $errorCode"
  };
  $db close

  <hr><i>kbk added on 2009-04-17 00:12:50:</i><br>
  I'm not able to reproduce the behaviour that you describe.

  Modifying your script to cause 'catch' to capture the error message:

  <verbatim>
  package require tdbc::mysql

  set db [tdbc::mysql::connection new -socket $env(TEST_SOCKET) \
  	    -db tdbc_test -password $env(TEST_PASSWD)]

  $db allrows {DROP TABLE IF EXISTS child}
  $db allrows {DROP TABLE IF EXISTS parent}
  $db allrows {
      CREATE TABLE parent (
  	parent_id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY
      ) ENGINE=InnoDb}
  $db allrows {
      CREATE TABLE child (
  	child_id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
  	child_parent INTEGER NOT NULL,
  	FOREIGN KEY (child_parent) REFERENCES parent (parent_id)
      ) ENGINE=InnoDb}
  puts [list [catch {
      puts "Deleting parent"
      $db allrows {DROP TABLE parent}
  } result] $result $::errorCode]

  $db close
  </verbatim>

  I get the result:

  <verbatim>
  Deleting parent
  1 {Cannot delete or update a parent row: a foreign key constraint fails} {TDBC CONSTRAINT_VIOLATION 23000 MYSQL 1217}
  </verbatim>

  which appears to be an entirely reasonable explanation of what went wrong with deleting the table.

  I don't know whether I inadvertently fixed the problem while doing something else, or whether your original script had an issue.

  <hr><i>kbk added on 2009-04-18 02:42:22:</i><br>
  The user retested in 1.0b10 and is now unable to reproduce the problem.

  I didn't do anything intentionally to fix it, but I wasn't able to
  reproduce it, either.


tkt_uuid: ff2b13e75f213904f67d6cfd2e60b62e306f8084
type: Documentation
status: Closed
subsystem: not_specified
priority: Medium
severity: Minor
foundin: 1.0b8
private_contact: 0e580cac0a1e8fcbb8dba8514857461d6968e2a7
resolution: Fixed
title: tdbc::<driver>::connection new isn't documented
comment:
  The error from

      tdbc::<driver>::connection foo ...

  suggests, and experiment confirms that

      tdbc::<driver>::connection new ...

  is a valid command.

  It's not documented.

  <hr><i>kbk added on 2009-04-06 02:17:02:</i><br>
  all of the drivers, not just tdbc::mysql, need this change.


tkt_uuid: 9441073bc94803a4c2b99ea5d246e83d2ca2066a
type: Documentation
status: Closed
subsystem: tdbc
priority: Medium
severity: Important
foundin: 1.0b10
private_contact: 72c73ce34e23821d1efcc88bc872fc296aabde7e
resolution: Fixed
title: begintransaction / starttransaction
comment:
  A user reports in email that tdbc::mysql documentation has an inconsistency
  between 'starttransaction' and 'begintransaction' object commands. Need to
  correct documentation throughout and edit TIP 308 as necessary.


tkt_uuid: 1d89c6ea69ef59a4f31bf5ead2e65b3bef2a68b4
type: Incident
status: Closed
subsystem: not_specified
priority: Medium
severity: Important
foundin: 1.0b10
private_contact: 72c73ce34e23821d1efcc88bc872fc296aabde7e
resolution: Fixed
title: substitution of :x where x is an array
comment:
  TIP 308 has the 'execute' method on tdbc statements, and the related 
  methods, throw an error if the statement contains a reference to a 
  variable ':x', but the Tcl variable 'x' is an array. This turns out
  to be an awkward check to make (there's no way to do it cheaply from
  C, and it greatly complicates the code in a Tcl driver). Need to
  make an editorial change to 308 to use NULL in that case (the plain
  variable 'x' arguably does not exist) and change the mysql and
  odbc drivers accordingly. (The same applies if 'x' has a read trace
  that throws an error.)


tkt_uuid: 04d164f7d0b55bb44f122ecd92b31974f3378cda
type: Code_Defect
status: Closed
subsystem: tdbc::odbc
priority: Medium
severity: Important
foundin: 1.0b9
private_contact: 957fdfcd8744611e3fe1f4896c7538b1d9bf47b2
resolution: Fixed
title: tdbc::odbc queries inserting a NUL after char 255?
comment:
  Julian Noble reports, on http://wiki.tcl.tk/:

  I'm using the precompiled windows tdbc1.0b9 and tdbcodbc1.0b9 - and I'm getting a strange error with some MS Access MEMO fields. A nul character (\0) is appearing at exactly character position 255 within a field value in a '$resultset foreach row ..' loop. (resultset returned from a query ie:
  <verbatim>
  [db prepare "select * from $queryname"] execute]
  </verbatim>
   )

  I tried producing a simplified version of my program in order to submit a bug report - but couldn't reproduce it in the simple program :( It's got me beat as to where this nul is coming from.

  Just flagging it here for now in case someone has some debugging ideas etc..

  <hr><i>kbk added on 2009-05-04 04:59:41:</i><br>
  Suspect an off-by-one error in the buffer reallocation code near
  'convertString:' in tdbcodbc/generic/tdbcodbc.c(GetCell)

  <hr><i>kbk added on 2009-05-30 02:14:16:</i><br>
  Alan Grunwald reported the same problem, and it should finally be fixed.

  The ODBC documentation doesn't entirely tell the truth about null bytes at
  the end of a partial buffer.  A SQL_C_CHAR buffer has a null byte; a
  SQL_C_WCHAR buffer has a null WCHAR, and a SQL_C_BINARY buffer has no terminator.
  The code now adjusts byte counts with this in mind.


tkt_uuid: e70d9fdce1dd5beed9aac738353cf147329f6f4f
type: Code_Defect
status: Closed
subsystem: not_specified
priority: Immediate
severity: Important
foundin: 1.0b11
private_contact: 957fdfcd8744611e3fe1f4896c7538b1d9bf47b2
resolution: Fixed
title: tdbc.tcl sqlCode vs sqlcode typo in statementCreate method
comment:
      method statementCreate {name instance sqlCode} {
  	my variable statementClass
  	return [$statementClass create $name $instance $sqlcode]
      }

  results in error: can't read "sqlcode": no such variable, during a call such as: $cmd prepare $sql

  <hr><i>kbk added on 2009-07-03 05:56:18:</i><br>
  Fixed in 1.0b12


tkt_uuid: 75681e201d426ea3424f15eaafc3cf988387d27a
type: Feature_Request
status: Closed
subsystem: not_specified
priority: Immediate
severity: Minor
foundin: tdbc1.0b11-win32
private_contact: 957fdfcd8744611e3fe1f4896c7538b1d9bf47b2
resolution: Fixed
title: tdbcodbc binary no longer included in sourceforge download?
comment:
  A dll for tdbcodbc used to be included in the windows binaries available at:
  https://sourceforge.net/project/showfiles.php?group_id=10894&package_id=305160

  ..but the latest file tdbc1.0b11-win32.zip doesn't include tdbcodbc

  Is this intentional?

  <hr><i>kbk added on 2009-07-03 06:00:53:</i><br>
  If it was missing, it was unintentional.

  There certainly is one in the 1.0b12 zip.


tkt_uuid: 3e523335bb387cf1931e1b5d8e6356bd630718f5
type: Code_Defect
status: Closed
subsystem: not_specified
priority: Immediate
severity: Critical
foundin: 1.0b11
private_contact: 957fdfcd8744611e3fe1f4896c7538b1d9bf47b2
resolution: Fixed
title: tdbcodbc is_nullable problem when retrieving column info from MS SQL
comment:
  Testing against an MS SQLServer using the following script:

  package require tdbc::odbc
  set connstr  "Driver={SQL Native Client};Server=127.0.0.1; Database=somedb;Uid=someone;Pwd=somepass;"
  tdbc::odbc::connection create db $connstr
  set allcolinfo [db columns items]

  The script raises the error:
  can't use non-numeric string as operand of "!"

   
  The specific line within the 'columns' method is:
  dict set row nullable \
  			[expr {!![dict get $row is_nullable]}]

  By placing a puts statement above this line, I found that [dict get $row is_nullable] returns "NO "   ie - there is a trailing space which causes it to be invalid in the expr.

  <hr><i>kbk added on 2009-07-03 06:24:25:</i><br>
  Fixed in 1.0b12


tkt_uuid: a85edac3e1f8b8dd5341933980c1fafd63cbb280
type: Build_Problem
status: Closed
subsystem: tdbc
priority: Zero
severity: Important
foundin: 8.6b1.1 1.0b9
private_contact: 5bc23a662eb19b11a79f31fbdc9305e0ff4edf1e
resolution: External_Bug
title: tdbc does not rebuld after a make clean & ./configure change
comment:
  While developing a script to download and build tcl/tk, I noticed that after I compiled tcl, re-./configured with a new --prefix, that tdbc would not build again and that it would make install into the previous --prefix.

  I believe it happens to itcl as well, as its also a package and the logic in ./configure tests for the existence of a Makefile to decide whether to rebuild the two extensions.

  <hr><i>kbk added on 2009-06-26 01:57:12:</i><br>
  This is a Tcl build problem, not a TDBC one... referring it to the Tcl project


tkt_uuid: 8766b8dc403bb1a4b4ee09a9752ef79a2cd8d536
type: Code_Defect
status: Fixed
subsystem: not_specified
priority: Immediate
severity: Critical
private_contact: d7dd97c402985138d0d42f13120ecaa82f31bd03
resolution: Fixed
title: tdbc::odbc crashes tclsh when retrieving DECIMAL data from Oracle
comment:
  <verbatim>

  tdbc::odbc crashes tclsh when retrieving DECIMAL data from Oracle. 
  MS Sql Server works properly with DECIMALs. 


  Oracle databases: 10.02.0040 (both win and oracle are 64-bit), 10.02.0020 (SunOS 5.9) and 09.02.0010 (SunOS 5.9)

  Table myTable: 
  decimalNumber DECIMAL(10)       freeText VARCHAR2(10) 
  123456                          word1 
  654321                          word2 


  Retrieving VARCHAR2 works fine
  ~: set db [::tdbc::odbc::connection new "DSN=myDatabase; UID=user; PWD=pass;"]
  ~: $db allrows "SELECT COUNT(freeText) FROM myTable"
  ~: {COUNT(FREETEXT) 2.0}
  ~: $db allrows "SELECT freeText FROM myTable"
  ~: {FREETEXT word1} {FREETEXT word2}

  Retrieving DECIMAL crashes tclsh
  ~: $db allrows "SELECT COUNT(decimalNumber) FROM myTable"
  ~: {COUNT(DECIMALNUMBER) 2.0}
  ~: $db allrows "SELECT decimalNumber FROM myTable"
  alloc: invalid block: 0012F31C: 40 0
  abnormal program termination


  </verbatim>

  <hr /><i>anonymous added on 2010-12-13 15:13:45:</i><br />
  I guess the crash is provoked by SQLGetData() when using it with SQL_C_SBIGINT or SQL_C_UBIGINT. Both types are not supported by the Oracle ODBC driver. A workaround may be to treat theses "big" integers as strings.

  <hr /><i>kennykb added on 2011-02-21 06:36:25:</i><br />
  The crash is fixed (in commit [145e893bf82]). The underlying problem - suspected but not proven to be lack of bigint support in the Oracle ODBC driver - is still outstanding. Email sent to the original submitter:
  <verbatim>
  I'm sorry that I've been so long at getting back to this bug.
  It's surely catastrophic, and the only excuse I have is that
  I misread the headline totally, and misunderstood it to be
  against the (unfinished and unsupported) tdbc::oracle driver.
  Mea culpa.

  I think that your analysis about SQL_C_SBIGINT may indeed be
  correct, since I've found where it will crash if SQLGetData
  fails.  I'll surely fix the crash so that it returns the
  correct error code (which I strongly suspect is
  either 22003 Numeric value out of range or
  07006 Restricted data type attribute violation).  But that,
  of course, won't fix the underlying problem.

  I think I have an idea how to go about fixing it, though.
  Could I get you to open a tdbc::odbc connection to an Oracle
  instance and mail me back the result of:

      set typesStmt [::tdbc::odbc::typesStatement new $connection]
      $typesStmt foreach row {puts $row}
      $typesStmt close

  ? That should enumerate the data types that Oracle is prepared
  to cope with, and if I'm right, -5 (bigint) isn't among them.
  If that's the case, I can do a similar hack to what I do to
  avoid handing wvarchar to database that can't accept it. 
  </verbatim>

  <hr /><i>kennykb added on 2011-02-22 02:26:40:</i><br />
  Fix committed in [46f95ec3128], please test.


tkt_uuid: 42df65a764972b0c8c107168b803f8c00754de0e
type: Code_Defect
status: Fixed
priority: High
severity: Important
foundin: cba4d6c4a0
private_contact: 72c73ce34e23821d1efcc88bc872fc296aabde7e
resolution: Fixed
title: msys build is broken again
comment:
  The problem described in [10f4a9c15a4] appears to have regressed. I rolled forward to today's commit [cba4d6c4a0], and I don't see the patch applied
  in configure.in.

  <hr><i>anonymous added on 2009-07-22 02:32:43:</i><br>
  For what it's worth, here are the current diffs that make the code buildable on mingw+msys.  I added a couple more messages to the configurator, the better to track what's going on.

  <verbatim>
  Index: tdbcpostgres/Makefile.in
  ===================================================================
  "d:\Fossil\fossil.exe" diff d:/home/200002852/tdbc-slavek/tdbcpostgres/Makefile.in
  --- tdbcpostgres/Makefile.in
  +++ tdbcpostgres/Makefile.in
  @@ -132,11 +132,11 @@
   TCLLIBPATH	= $(top_builddir)
   TCLSH_ENV	= TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library`
   PKG_ENV		= @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
   		  PATH="$(EXTRA_PATH):$(PATH)" \
   		  TCLLIBPATH="$(TCLLIBPATH)" \
  -                  TDBCMYSQL_LIBRARY=`@CYGPATH@ $(srcdir)/library`
  +                  TDBCPOSTGRES_LIBRARY=`@CYGPATH@ $(srcdir)/library`
   
   TCLSH_PROG	= @TCLSH_PROG@
   TCLSH   	= $(PKG_ENV) $(TCLSH_ENV) $(TCLSH_PROG)
   
   #WISH_ENV	= TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library`

  Index: tdbcpostgres/configure.in
  ===================================================================
  "d:\Fossil\fossil.exe" diff d:/home/200002852/tdbc-slavek/tdbcpostgres/configure.in
  --- tdbcpostgres/configure.in
  +++ tdbcpostgres/configure.in
  @@ -196,30 +196,35 @@
   
   #----------------------------------------------------------------------
   # Get Postgre libpq include files, and set POSTGRESS_INCLUDE_SPEC accordingly
   #----------------------------------------------------------------------
   
  +AC_MSG_CHECKING([for PostgreSQL include directory])
  +POSTGRES_COMMAND="\"${PG_CONFIG}\" --includedir"
  +POSTGRES_INCLUDE_DIR=`eval ${POSTGRES_COMMAND}`
  +AC_MSG_RESULT(${POSTGRES_INCLUDE_DIR})
   TDBCPOSTGRES_SAVED_CPPFLAGS="${CPPFLAGS}"
  -POSTGRES_INCLUDE_SPEC="-I`${PG_CONFIG} --includedir`"
  -
  +POSTGRES_INCLUDE_SPEC="-I${POSTGRES_INCLUDE_DIR}"
   CPPFLAGS="${CPPFLAGS} ${POSTGRES_INCLUDE_SPEC}"
   AC_CHECK_HEADERS([libpq-fe.h], , AC_MSG_ERROR("cannot find a working libpq-fe.h"))
  -
   CPPFLAGS="${TDBCPOSTGRES_SAVED_CPPLFAGS}"
   TEA_ADD_INCLUDES([${POSTGRES_INCLUDE_SPEC}])
   
   #----------------------------------------------------------------------
   # Locate the libpq library
   #----------------------------------------------------------------------
   
   
  -POSTGRES_LIB_SPEC="-L`${PG_CONFIG} --libdir`"
  -
  +AC_MSG_CHECKING([for PostgreSQL library directory])
  +POSTGRES_COMMAND="\"${PG_CONFIG}\" --libdir"
  +POSTGRES_LIB_DIR=`eval ${POSTGRES_COMMAND}`
  +AC_MSG_RESULT(${POSTGRES_LIB_DIR})
  +POSTGRES_LIB_SPEC="-L${POSTGRES_LIB_DIR}"
   TDBCPOSTGRES_SAVED_LDFLAGS="${LDFLAGS}"
  -
  +LDFLAGS="${LDFLAGS} ${POSTGRES_LIB_SPEC}"
   AC_CHECK_LIB(pq, PQconnectdb, [
  -	POSTGRES_LIB_SPEC="${MYSQL_LIB_SPEC} -lpq"
  +	POSTGRES_LIB_SPEC="${POSTGRES_LIB_SPEC} -lpq"
       ],  [
               AC_MSG_ERROR("cannot find a working libpq library")
   	    ])
   
   LDFLAGS="${TDBCPOSTGRES_SAVED_LDFLAGS}"

  Index: tdbcpostgres/tests/current.test
  ===================================================================
  "d:\Fossil\fossil.exe" diff d:/home/200002852/tdbc-slavek/tdbcpostgres/tests/current.test
  --- tdbcpostgres/tests/current.test
  +++ tdbcpostgres/tests/current.test
  @@ -24,11 +24,11 @@
   }
   if {[info exists env(TEST_USER)]} {
       lappend connFlags -user $env(TEST_USER)
   }
   if {[info exists env(TEST_PASSWD)]} {
  -    lappend connFlags -passwd $env(TEST_PASSWD)
  +    lappend connFlags -password $env(TEST_PASSWD)
   }
   if {[info exists env(TEST_DB)]} {
       lappend connFlags -db $env(TEST_DB)
   } else {
       lappend connFlags -db tdbc_test

  </verbatim>


tkt_uuid: 10f4a9c15a4ee2ec7d2ffe47f3344f398e23b229
type: Code_Defect
status: Closed
priority: Immediate
severity: Important
foundin: 1b3a31f8d9
private_contact: 72c73ce34e23821d1efcc88bc872fc296aabde7e
resolution: Fixed
title: tdbcpostgres configurator fails on mingw+msys+default Postgres install
comment:
  I tried the tdbcpostgres configurator on a mingw+msys configuration,
  with a default Windows binary distribution of Postgres 8.4.  

  (1) I found that 'configure' didn't match 'configure.in', so I tried
      rerunning 'autoconf'.  That would have fixed it except that:

  (2) For some reason, 'autom4te.cache' is in the repository. It shouldn't
      be, and it contained incorrect cached information from 'autoconf'.

  (3) Once that was removed, and autoconf-2.59 ran, I ran into trouble
  when 'configure' got to the pg_config material, owing to the spaces in
  file names.  The following patch appeared to fix it:

  <verbatim>
  $ /d/Fossil/fossil diff tdbcpostgres/configure.in
  --- tdbcpostgres/configure.in
  +++ tdbcpostgres/configure.in
  @@ -1,6 +1,6 @@
  -n#!/bin/bash -norc
  +#!/bin/bash -norc
   dnl    This file is an input file used by the GNU "autoconf" program to
   dnl    generate the file "configure", which is run during Tcl installation
   dnl    to configure the system for the local environment.
   #
   # RCS: @(#) $Id: configure.in,v 1.47 2007/02/09 19:06:47 hobbs Exp $
  @@ -196,13 +196,14 @@
   
   #----------------------------------------------------------------------
   # Get Postgre libpq include files, and set POSTGRESS_INCLUDE_SPEC accordingly
   #----------------------------------------------------------------------
   
  +POSTGRES_COMMAND="\"${PG_CONFIG}\" --includedir"
  +POSTGRES_INCLUDE_DIR=`echo ${POSTGRES_COMMAND} | sh`
   TDBCPOSTGRES_SAVED_CPPFLAGS="${CPPFLAGS}"
  -POSTGRES_INCLUDE_SPEC="-I`${PG_CONFIG} --includedir`"
  -
  +POSTGRES_INCLUDE_SPEC="-I${POSTGRES_INCLUDE_DIR}"
   CPPFLAGS="${CPPFLAGS} ${POSTGRES_INCLUDE_SPEC}"
   AC_CHECK_HEADERS([libpq-fe.h], , AC_MSG_ERROR("cannot find a working libpq-fe.h"))
   
   CPPFLAGS="${TDBCPOSTGRES_SAVED_CPPLFAGS}"
   TEA_ADD_INCLUDES([${POSTGRES_INCLUDE_SPEC}])
  @@ -210,16 +211,17 @@
   #----------------------------------------------------------------------
   # Locate the libpq library
   #----------------------------------------------------------------------
   
   
  -POSTGRES_LIB_SPEC="-L`${PG_CONFIG} --libdir`"
  -
  +POSTGRES_COMMAND="\"${PG_CONFIG}\" --libdir"
  +POSTGRES_LIB_DIR=`echo ${POSTGRES_COMMAND} | sh`
  +POSTGRES_LIB_SPEC="-L${POSTGRES_LIB_DIR}"
   TDBCPOSTGRES_SAVED_LDFLAGS="${LDFLAGS}"
  -
  +LDFLAGS="${LDFLAGS} ${POSTGRES_LIB_SPEC}"
   AC_CHECK_LIB(pq, PQconnectdb, [
  -       POSTGRES_LIB_SPEC="${MYSQL_LIB_SPEC} -lpq"
  +       POSTGRES_LIB_SPEC="${POSTGRES_LIB_SPEC} -lpq"
       ],  [
               AC_MSG_ERROR("cannot find a working libpq library")
              ])
   
   LDFLAGS="${TDBCPOSTGRES_SAVED_LDFLAGS}"


  </verbatim>

  <hr><i>slawek added on 2009-07-15 17:25:22:</i><br>
  Done, thanks very much.


tkt_uuid: 9f3fce8c0080bb9f1fb490332c9a785a94721075
type: Code_Defect
status: Closed
priority: Immediate
severity: Important
foundin: 1b3a31f8d9
private_contact: 72c73ce34e23821d1efcc88bc872fc296aabde7e
resolution: Fixed
title: tdbcpostgres 'make shell' doesn't set environment correctly
comment:
  Trying to do 'make shell' after building tdbcpostgres runs a shell, but fails to set things up to load the tdbcpostgres10b11.dll from the build directory. The problem turns out to be that it's using an environment variable name with 'MYSQL'
  in it.  The following patch is suggested to fix it.

  <verbatim>
  --- tdbcpostgres/Makefile.in
  +++ tdbcpostgres/Makefile.in
  @@ -132,11 +132,11 @@
   TCLLIBPATH     = $(top_builddir)
   TCLSH_ENV      = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library`
   PKG_ENV                = @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
                    PATH="$(EXTRA_PATH):$(PATH)" \
                    TCLLIBPATH="$(TCLLIBPATH)" \
  -                  TDBCMYSQL_LIBRARY=`@CYGPATH@ $(srcdir)/library`
  +                  TDBCPOSTGRES_LIBRARY=`@CYGPATH@ $(srcdir)/library`
   
   TCLSH_PROG     = @TCLSH_PROG@
   TCLSH          = $(PKG_ENV) $(TCLSH_ENV) $(TCLSH_PROG)
   
   #WISH_ENV      = TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library`


  </verbatim>

  <hr><i>slawek added on 2009-07-15 17:36:34:</i><br>
  Thanks, I've missed this somehow - now fixed.


tkt_uuid: a922f6900b1ef5e35af8f67f86cc6ad48ebb893b
type: Code_Defect
status: Closed
priority: Immediate
severity: Critical
foundin: 1b3a31f8d9
private_contact: 72c73ce34e23821d1efcc88bc872fc296aabde7e
resolution: Fixed
title: tdbcpostgres fails in initialisation
comment:
  Trying to do some hand testing, I see that tdbc::postgres gets a segmentation
  fault in Tdbcpostgres_Init.  There were two distinct problems:

  (1) the table of data types was lacking a NULL termination, causing the
  loop that was initialising the hash table in per-interp data to run off the end.

  (2) the code to install methods was looking for the tdbc::mysql::statement object, which of course should have been tdbc::postgres::statement.

  The following patch gets around the issue, and at least allows the library to load.

  <verbatim>
  --- tdbcpostgres/generic/tdbcpostgres.c
  +++ tdbcpostgres/generic/tdbcpostgres.c
  @@ -151,16 +151,17 @@
          if (--(stmt->refCount) <= 0) {          \
              DeleteStatement(stmt);              \
          }                                       \
       } while(0)
   
  -typedef struct MysqlDataType {
  +typedef struct PostgresDataType {
       const char* name;          /* Type name */
       int num;                   /* Type number */
  -} MysqlDataType;
  -static const MysqlDataType dataTypes[] = {
  -    { "varchar",    0 }
  +} PostgresDataType;
  +static const PostgresDataType dataTypes[] = {
  +    { "varchar",    0 },
  +    { NULL,        0 }
   };
   
   
   /* Configuration options for Postgres connections */
   
  @@ -1546,11 +1547,11 @@
                                       Tcl_NewStringObj(tokenStr+1, tokenLen-1));
              break;
   
          case ';':
              Tcl_SetObjResult(interp,
  -                            Tcl_NewStringObj("tdbc::mysql"
  +                            Tcl_NewStringObj("tdbc::postgres"
                                                " does not support semicolons "
                                                "in statements", -1));
              goto freeNativeSql;
              break;
   
  @@ -2001,11 +2002,11 @@
          Tcl_DecrRefCount(nameObj);
       }
   
       /* Look up the 'statement' class */
   
  -    nameObj = Tcl_NewStringObj("::tdbc::mysql::statement", -1);
  +    nameObj = Tcl_NewStringObj("::tdbc::postgres::statement", -1);
       Tcl_IncrRefCount(nameObj);
       if ((curClassObject = Tcl_GetObjectFromObj(interp, nameObj)) == NULL) {
          Tcl_DecrRefCount(nameObj);
          return TCL_ERROR;
       }


  </verbatim>

  <hr><i>slawek added on 2009-07-15 17:34:16:</i><br>
  Fixed ealier, not pulled.


tkt_uuid: ac38621febfa2248eb67d0d2c3ab90c580e76552
type: Code_Defect
status: Closed
priority: Immediate
severity: Minor
foundin: 1b3a31f8d9
private_contact: 72c73ce34e23821d1efcc88bc872fc296aabde7e
resolution: Fixed
title: many postgres operations are identified as mysql
comment:
  A lot of the code in tdbcpostgres.c was obviously cut-and-pasted from tdbcmysql.c.  This is a Good Thing (good programmers borrow, great programmers steal). But at least you should go through and do a global search-and-replace of mysql with postgres, so that the two extensions don't interfere and so that the commentary matches the database.

  <hr><i>slawek added on 2009-07-15 17:32:05:</i><br>
  I'm regularly checking for it and exterminating such things with sed. This time I fogot to do it. 


tkt_uuid: dd75b2b7a5e12311d0eda7945a2e9fe069bf5d31
type: Code_Defect
status: Fixed
subsystem: not_specified
priority: Immediate
severity: Critical
foundin: 1.0b12
private_contact: d7dd97c402985138d0d42f13120ecaa82f31bd03
resolution: Fixed
title: tdbc::connection transaction doesn't close TRANSACTION on timeout
comment:
  An exception raised by 'my commit' (in method 'transaction') leaves TRANSACTION open. 

  This behavior was observed using sqlite3 driver with timeouts enabled. 

  I suppose that 'my rollback' could also raise an exception, in which case the TRANSACTION wouldn't be closed as well. 

  Does this mean that 'transaction' method shouldn't be used with timeouts enabled?

  <hr /><i>kbk added on 2011-02-21 05:28:20 UTC:</i><br />
  Emailed to original submitter:
  <verbatim>
  If 'commit' fails, I'm not sure what the correct action is!  I can
  certainly attempt to 'rollback' after an error on 'commit', but
  a failed rollback really has nowhere else to go, as I understand it.
  (And I thought that a failed 'commit' was supposed to initiate
  a rollback: did I err?)

  The code in question looks like the following.  I propose adding
  the stanza between tbe two comments, so that commit errors are
  reported and rollback attempted. (And removing the commits
  in the [switch] cases, since they're handled up above)
  Richard, does this look as if it might fix the issue in question?

  Kevin

      method transaction {script} {
      my begintransaction
      set status [catch {uplevel 1 $script} result options]

      # Propose adding the following code: vvvvvvvvvvvvvvvvvvvv

      if {$status in {0 2 3 4}} {
          set status2 [catch {my commit} result2 options2]
          if {$status2 == 1} {
          set status 1
          set result $result2
          set options $options2
          }
      }

      # End of added code ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

      switch -exact -- $status {
          0 {
          my commit ; #delete this when the commit is added above
          }
          2 - 3 - 4 {
          set options [dict merge {-level 1} \
                      $options[set options {}]]
          dict incr options -level
          my commit ; #delete this when the commit is added above
          }
          default {
          my rollback
          }
      }
      return -options $options $result
      } 
  </verbatim>

  <hr /><i>kbk added on 2011-02-22 02:56:32 UTC:</i><br />
  Fixed in [7413b791cb], please retest.


tkt_uuid: 8d015d929f6294e2f77e7c580cb86e182f5508b5
type: Code_Defect
status: Deferred
subsystem: tdbc::sqlite3
priority: Medium
severity: Important
foundin: 1.0b13
private_contact: 3c686d4616da9760dc7f0bf95d5539a3cad3a6bd
resolution: Open
title: tdbc::sqlite3 driver doesn't resolve duplicate names
comment:
  When doing a join on tables whaving columns with same name like this:

      select a.name, b.name from t1 a, t2 b where a.id = b.id;

  the tdbc::sqlite driver will only return one 'name' key in a result dict. A result list will contain both values, but the columnvariable will contain the same column name twice.

  <hr><i>kbk added on 2009-10-27 01:09:56:</i><br>
  This is being recorded as a 'known bug'. It's essentially unfixable
  until we convert the SQLite3 driver over to using C, because that's
  where it's tripping over the duplicate names.

  <hr><i>kbk added on 2009-10-27 01:10:40:</i><br>
  Oh, yeah. It can be fixed by using <B>AS</B> clauses to disambiguate the
  column names.


tkt_uuid: 7db2ab741dc570fdd98bb33967e342a396cca100
type: Feature_Request
status: Open
subsystem: not_specified
priority: Immediate
severity: Minor
foundin: 1.0b13
private_contact: 2b22fb0e382fd94c0ee85d4d3f6248e57ab250cf
resolution: Open
title: TDBC install.tcl requires tk, should be optional
comment:
  The INSTALL.tcl file requires Tk for two messages. 

  I'd suggest if Tk is not found the messages are displayed to stdout via puts. 

  Not all tdbc users will be using Tk.

  <hr><i>anonymous claiming to be dereckson added on 2010-06-30 03:21:57:</i><br>
  Currently, tk is only required to build tdbc::mysql


tkt_uuid: 18c90402fbe60139bcc0b395f41c0284c3646e8c
type: Documentation
status: Fixed
subsystem: not_specified
priority: Immediate
severity: Important
private_contact: f6b536f9c1ed4b589e96e38fb613afc3d8991783
resolution: Fixed
title: Patch from Tcl HEAD
comment:
  Here's the patch for bringing TDBC more strongly in line with Tcl documentation requirements. This allows its documentation to be built as part of Tcl's HTML doc build.

  <hr><i>anonymous added on 2010-01-10 01:40:24:</i><br>
  Index: Tdbc_Init.3
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/doc/Tdbc_Init.3,v
  retrieving revision 1.1.1.1
  retrieving revision 1.3
  diff -u -r1.1.1.1 -r1.3
  --- Tdbc_Init.3	21 Apr 2009 02:44:27 -0000	1.1.1.1
  +++ Tdbc_Init.3	10 Jan 2010 01:32:14 -0000	1.3
  @@ -42,10 +42,6 @@
   .\"	# BS - start boxed text
   .\"	# ^y = starting y location
   .\"	# ^b = 1
  -.br
  -.\"	# BS - start boxed text
  -.\"	# ^y = starting y location
  -.\"	# ^b = 1
   .de BS
   .br
   .mk ^y
  @@ -94,15 +90,16 @@
   .SH SYNOPSIS
   .nf
   \fB#include <tdbc.h>\fR
  -.sp
  +
   int
   \fBTdbc_Init\fR(\fIinterp\fR)
  -.sp
  +
   Tcl_Obj *
   \fBTdbc_TokenizeSql\fR(\fIinterp, sqlcode\fR)
  -.sp
  +
   const char *
   \fBTdbc_MapSqlState\fR(\fIstate\fR)
  +.fi
   .SH ARGUMENTS
   .AS "Tcl_Interp" statement in/out
   .AP Tcl_Interp *interp in/out
  Index: tdbc.n
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/doc/tdbc.n,v
  retrieving revision 1.1.1.3
  retrieving revision 1.2
  diff -u -r1.1.1.3 -r1.2
  --- tdbc.n	21 Apr 2009 02:44:27 -0000	1.1.1.3
  +++ tdbc.n	10 Jan 2010 00:57:13 -0000	1.2
  @@ -47,17 +47,18 @@
   .SH "NAME"
   tdbc \- Tcl Database Connectivity
   .SH "SYNOPSIS"
  +.nf
   package require \fBtdbc 1.0\fR
  -.sp
  -package require \fBtdbc::\fR\fIdriver version\fR
  -.sp
  -\fBtdbc::\fR\fIdriver\fR\fB::connection create \fR\fIdb\fR \fI?\-option value\fR...?
  +package require \fBtdbc::\fIdriver version\fR
  +
  +\fBtdbc::\fIdriver\fB::connection create \fIdb\fR ?\fI\-option value\fR...?
  +.fi
   .BE
   .SH "DESCRIPTION"
   .PP
   Tcl Database Connectivity (TDBC) is a common interface for Tcl
   programs to access SQL databases. It is implemented by a series of
  -database \fIdrivers:\fR separate modules, each of which adapts Tcl to
  +database \fIdrivers\fR: separate modules, each of which adapts Tcl to
   the interface of one particular database system.  All of the drivers
   implement a common series of commands for manipulating the database.
   These commands are all named dynamically, since they all represent
  Index: tdbc_connection.n
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/doc/tdbc_connection.n,v
  retrieving revision 1.1.1.3
  retrieving revision 1.2
  diff -u -r1.1.1.3 -r1.2
  --- tdbc_connection.n	21 Apr 2009 02:44:27 -0000	1.1.1.3
  +++ tdbc_connection.n	10 Jan 2010 00:57:13 -0000	1.2
  @@ -47,46 +47,40 @@
   .SH "NAME"
   tdbc::connection \- TDBC connection object
   .SH "SYNOPSIS"
  +.nf
   package require \fBtdbc 1.0\fR
  -.sp
  -package require \fBtdbc::\fR\fIdriver version\fR
  -.sp
  -\fBtdbc::\fR\fIdriver\fR\fB::connection create \fR\fIdb\fR \fI?\-option value\fR...?
  -.sp
  -\fIdb\fR \fBconfigure\fR ?\fI-option value\fR...?
  -.sp
  -\fIdb\fR \fBclose\fR
  -.sp
  -\fIdb\fR \fBprepare\fR \fIsql-code\fR
  -.sp
  -\fIdb\fR \fBpreparecall\fR \fIcall\fR
  -.sp
  -\fIdb\fR \fBstatements\fR
  -.sp
  -\fIdb\fR \fBresultsets\fR
  -.sp
  -\fIdb\fR \fBtables\fR ?\fIpattern\fR?
  -.sp
  -\fIdb\fR \fBcolumns\fR \fItable\fR ?\fIpattern\fR?
  -.sp
  -\fIdb\fR \fBbegintransaction\fR
  -.sp
  -\fIdb\fR \fBcommit\fR
  -.sp
  -\fIdb\fR \fBrollback\fR
  -.sp
  -\fIdb\fR \fBtransaction\fR \fIscript\fR
  -.sp
  -\fIdb\fR \fBallrows\fR ?\fB-as lists|dicts\fR? ?\fB-columnsvariable\fR \fIname\fR? ?\fB--\fR? \fIsql-code\fR ?\fIdictionary\fR?
  -.sp
  -\fIdb\fR \fBforeach\fR ?\fB-as lists|dicts\fR? ?\fB-columnsvariable\fR \fIname\fR? ?--? \fIvarName\fR \fIsqlcode\fR ?\fIdictionary\fR? \fIscript\fR
  +package require \fBtdbc::\fIdriver version\fR
  +
  +\fBtdbc::\fIdriver\fB::connection create \fIdb\fR ?\fI\-option value\fR...?
  +
  +\fIdb \fBconfigure\fR ?\fI\-option value\fR...?
  +\fIdb \fBclose\fR
  +\fIdb \fBprepare \fIsql-code\fR
  +\fIdb \fBpreparecall \fIcall\fR
  +\fIdb \fBstatements\fR
  +\fIdb \fBresultsets\fR
  +\fIdb \fBtables\fR ?\fIpattern\fR?
  +\fIdb \fBcolumns \fItable\fR ?\fIpattern\fR?
  +\fIdb \fBbegintransaction\fR
  +\fIdb \fBcommit\fR
  +\fIdb \fBrollback\fR
  +\fIdb \fBtransaction \fIscript\fR
  +.fi
  +.ad l
  +.in 14
  +.ti 7
  +\fIdb \fBallrows\fR ?\fB\-as lists\fR|\fBdicts\fR? ?\fB\-columnsvariable \fIname\fR? ?\fB\-\-\fR? \fIsql-code\fR ?\fIdictionary\fR?
  +.br
  +.ti 7
  +\fIdb \fBforeach\fR ?\fB\-as lists\fR|\fBdicts\fR? ?\fB\-columnsvariable \fIname\fR? ?\fB\-\-\fR? \fIvarName sql-code\fR ?\fIdictionary\fR? \fIscript\fR
  +.ad b
   .BE
   .SH "DESCRIPTION"
   .PP
   Every database driver for TDBC (Tcl DataBase Connectivity) implements
   a \fIconnection\fR object that represents a connection to a database.
   By convention, this object is created by the command,
  -\fBtdbc::\fR\fIdriver\fR\fB::connection\fR \fBcreate\fR.
  +\fBtdbc::\fIdriver\fB::connection create\fR.
   This command accepts the name of a Tcl command that will represent the
   connection and a possible set of options (see \fBCONFIGURATION
   OPTIONS\fR). It establishes a connection to the database and returns
  @@ -95,7 +89,7 @@
   The \fBconfigure\fR object command on a database connection, if
   presented with no arguments, returns a list of alternating keywords
   and values representing the connection's current configuration. If
  -presented with a single argument \fI-option\fR, it returns the
  +presented with a single argument \fI\-option\fR, it returns the
   configured value of the given option. Otherwise, it must be given an
   even number of arguments which are alternating options and values. The
   specified options receive the specified values, and nothing is
  @@ -112,18 +106,20 @@
   included. See \fBSQL STATEMENTS\fR for a further description of the
   SQL that is accepted by this command. The return value is a
   newly-created Tcl command that represents the statement. See
  -tdbc_statement(n) for the interface accepted by a statement.
  +\fBtdbc_statement\fR for the interface accepted by a statement.
   .PP
   On a database connection where the underlying database and driver
   support stored procedures, the \fBpreparecall\fR
   object command prepares a call to a stored procedure for execution.
   The syntax of the stored procedure call is:
  -.sp
  +.PP
  +.CS
   ?\fIresultvar\fR =? \fIprocname\fR(?\fIarg\fR ?, \fIarg\fR...?)
  -.sp
  +.CE
  +.PP
   The return value is a
   newly-created Tcl command that represents the statement. See
  -tdbc_statement(n) for the interface accepted by a statement.
  +\fBtdbc_statement\fR for the interface accepted by a statement.
   .PP
   The \fBstatements\fR object command returns a list of statements 
   that have been created by \fBprepare\fR and \fBpreparecall\fR
  @@ -199,19 +195,19 @@
   .PP
   The \fBallrows\fR object command prepares a SQL statement (given by
   the \fIsql-code\fR parameter) to execute against the database.
  -It then executes it (see \fBtdbc_statement(n)\fR for details) with the
  +It then executes it (see \fBtdbc_statement\fR for details) with the
   optional \fIdictionary\fR parameter giving bind variables. Finally,
   it uses the \fIallrows\fR object command on the result set (see
  -\fBtdbc_resultset(n)\fR) to construct a list of the results. Finally, both
  +\fBtdbc_resultset\fR) to construct a list of the results. Finally, both
   result set and statement are closed. The return value is the list of
   results. 
   .PP
   The \fBforeach\fR object command prepares a SQL statement (given by
   the \fIsql-code\fR parameter) to execute against the database.
  -It then executes it (see \fBtdbc_statement(n)\fR for details) with the
  +It then executes it (see \fBtdbc_statement\fR for details) with the
   optional \fIdictionary\fR parameter giving bind variables. Finally,
   it uses the \fIforeach\fR object command on the result set (see
  -\fBtdbc_resultset(n)\fR) to evaluate the given \fIscript\fR for each row of
  +\fBtdbc_resultset\fR) to evaluate the given \fIscript\fR for each row of
   the results. Finally, both result set and statement are closed, even
   if the given \fIscript\fR results in a \fBreturn\fR, an error, or
   an unusual return code. 
  @@ -219,29 +215,29 @@
   The configuration options accepted when the connection is created and
   on the connection's \fBconfigure\fR object command include the
   following, and may include others specific to a database driver.
  -.IP "\fB-encoding\fR \fIname\fR"
  +.IP "\fB\-encoding \fIname\fR"
   Specifies the encoding to be used in connecting to the database.
   The \fIname\fR should be one of the names accepted by the
  -\fBencoding(n)\fR command. This option is usually unnecessary; most
  +\fBencoding\fR command. This option is usually unnecessary; most
   database drivers can figure out the encoding in use by themselves.
  -.IP "\fB-isolation\fR \fIlevel\fR"
  +.IP "\fB\-isolation \fIlevel\fR"
   Specifies the transaction isolation level needed for transactions on
   the database. The acceptable values for \fIlevel\fR are shown under
   \fBTRANSACTION ISOLATION LEVELS\fR.
  -.IP "\fB-timeout\fR \fIms\fR"
  +.IP "\fB\-timeout \fIms\fR"
   Specifies the maximum time to wait for a an operation database engine before
   reporting an error to the caller. The \fIms\fR argument gives the
   maximum time in milliseconds. A value of zero (the default) specifies
   that the calling process is to wait indefinitely for database
   operations.
  -.IP "\fB-readonly\fR \fIflag\fR"
  +.IP "\fB\-readonly \fIflag\fR"
   Specifies that the connection will not modify the database (if the
   Boolean parameter \fIflag\fR is true), or that it may modify the
   database (if \fIflag\fR is false). If \fIflag\fR is true, this option
   may have the effect of raising the transaction isolation level to
   \fIreadonly\fR.
  -.SH "TRANSACTION ISOLATION LEVELS"
  -The acceptable values for the \fB-isolation\fR configuration option
  +.SS "TRANSACTION ISOLATION LEVELS"
  +The acceptable values for the \fB\-isolation\fR configuration option
   are as follows:
   .IP \fBreaduncommitted\fR
   Allows the transaction to read "dirty", that is, uncommitted
  Index: tdbc_mapSqlState.n
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/doc/tdbc_mapSqlState.n,v
  retrieving revision 1.1.1.1
  retrieving revision 1.2
  diff -u -r1.1.1.1 -r1.2
  --- tdbc_mapSqlState.n	21 Apr 2009 02:44:27 -0000	1.1.1.1
  +++ tdbc_mapSqlState.n	10 Jan 2010 01:32:14 -0000	1.2
  @@ -59,9 +59,11 @@
   .SH "NAME"
   tdbc::mapSqlState \- Map SQLSTATE to error class
   .SH "SYNOPSIS"
  +.nf
   package require \fBtdbc 1.0\fR
  -.sp
  +
   \fBtdbc::mapSqlState\fR \fIsqlstate\fR
  +.fi
   .BE
   .SH "DESCRIPTION"
   .PP
  Index: tdbc_resultset.n
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/doc/tdbc_resultset.n,v
  retrieving revision 1.1.1.3
  retrieving revision 1.2
  diff -u -r1.1.1.3 -r1.2
  --- tdbc_resultset.n	21 Apr 2009 02:44:27 -0000	1.1.1.3
  +++ tdbc_resultset.n	10 Jan 2010 00:57:13 -0000	1.2
  @@ -59,32 +59,32 @@
   .SH "NAME"
   tdbc::resultset \- TDBC result set object
   .SH "SYNOPSIS"
  +.nf
   package require \fBtdbc 1.0\fR
  -.sp
   package require \fBtdbc::\fR\fIdriver version\fR
  -.sp
  +
   \fBtdbc::\fR\fIdriver\fR\fB::connection create \fR\fIdb\fR \fI?\-option value\fR...?
  -.sp
  +
   \fBset\fR \fIstmt\fR \fB[\fR\fIdb\fR \fBprepare\fR \fIsql-code\fR\fB]\fR
  -.sp
  -\fBset\fR \fIresultset\fR \fB[\fR\fI$stmt\fR \fBexecute\fR ?\fIargs...\fR?
  -.sp
  +\fBset\fR \fIresultset\fR \fB[\fR\fI$stmt\fR \fBexecute\fR ?\fIargs...\fR?\fB]\fR
  +
   \fI$resultset\fR \fBcolumns\fR
  -.sp
  -\fI$resultset \fR \fBrowcount\fR
  -.sp
  +\fI$resultset\fR \fBrowcount\fR
   \fI$resultset\fR \fBnextrow\fR ?\fB-as\fR \fBlists\fR|\fBdicts\fR? ?\fB--\fR? \fIvarname\fR
  -.sp
   \fI$resultset\fR \fBnextlist\fR \fIvarname\fR
  -.sp
   \fI$resultset\fR \fBnextdict\fR \fIvarname\fR
  -.sp
  +.fi
  +.ad l
  +.in 14
  +.ti 7
   \fI$resultset\fR \fBallrows\fR ?\fB-as lists|dicts\fR? ?\fB-columnsvariable\fR \fIname\fR? ?\fB--\fR?
  -.sp
  -\fI$resultset\fR \fBforeach\fR ?\fB-as lists|dicts\fR?
  -?\fB-columnsvariable\fR \fIname\fR? ?\fB--\fR? \fIvarname\fR \fIscript\fR
  -.sp
  +.br
  +.ti 7
  +\fI$resultset\fR \fBforeach\fR ?\fB-as lists|dicts\fR? ?\fB-columnsvariable\fR \fIname\fR? ?\fB--\fR? \fIvarname\fR \fIscript\fR
  +.br
  +.ti 7
   \fI$resultset\fR \fBclose\fR
  +.ad b
   .BE
   .SH "DESCRIPTION"
   .PP
  Index: tdbc_statement.n
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/doc/tdbc_statement.n,v
  retrieving revision 1.1.1.3
  retrieving revision 1.2
  diff -u -r1.1.1.3 -r1.2
  --- tdbc_statement.n	21 Apr 2009 02:44:27 -0000	1.1.1.3
  +++ tdbc_statement.n	10 Jan 2010 00:57:13 -0000	1.2
  @@ -58,32 +58,31 @@
   .SH "NAME"
   tdbc::statement \- TDBC statement object
   .SH "SYNOPSIS"
  +.nf
   package require \fBtdbc 1.0\fR
  -.sp
   package require \fBtdbc::\fR\fIdriver version\fR
  -.sp
  +
   \fBtdbc::\fR\fIdriver\fR\fB::connection create \fR\fIdb\fR \fI?\-option value\fR...?
  -.sp
  +
   \fBset\fR \fIstmt\fR \fB[\fR\fIdb\fR \fBprepare\fR \fIsql-code\fR\fB]\fR
  -.sp
  -\fBset\fR \fIstmt\fR \fB[\fR\fIdb\fR \fBpreparecall\fR
  -\fIcall\fR\fB]\fR
  -.sp
  +\fBset\fR \fIstmt\fR \fB[\fR\fIdb\fR \fBpreparecall\fR \fIcall\fR\fB]\fR
  +
   \fI$stmt\fR \fBparams\fR
  -.sp
   \fI$stmt\fR \fBparamtype\fR ?\fIdirection\fR? \fItype\fR ?\fIprecision\fR? ?\fIscale\fR?
  -.sp
   \fI$stmt\fR \fBexecute\fR ?\fIdict\fR?
  -.sp
   \fI$stmt\fR \fBresultsets\fR
  -.sp
  +.fi
  +.ad l
  +.in 14
  +.ti 7
   \fI$stmt\fR \fBallrows\fR ?\fB-as lists|dicts\fR? ?\fB-columnsvariable\fR \fIname\fR? ?\fB--\fR? ?\fIdict\fR
  -.sp
  -\fI$stmt\fR \fBforeach\fR ?\fB-as lists|dicts\fR?
  -?\fB-columnsvariable\fR \fIname\fR? ?\fB--\fR? \fIvarName\fR ?\fIdict\fR?
  -\fIscript\fR
  -.sp
  +.br
  +.ti 7
  +\fI$stmt\fR \fBforeach\fR ?\fB-as lists|dicts\fR? ?\fB-columnsvariable\fR \fIname\fR? ?\fB--\fR? \fIvarName\fR ?\fIdict\fR? \fIscript\fR
  +.br
  +.ti 7
   \fI$stmt\fR \fBclose\fR
  +.ad b
   .BE
   .SH "DESCRIPTION"
   .PP
  @@ -108,13 +107,17 @@
   .PP
   The \fBpreparecall\fR object command against the connection accepts a
   stylized statement in the form:
  -.sp
  +.PP
  +.CS
   \fIprocname\fR \fB(\fR?\fB:\fR\fIvarname\fR? ?\fB,:\fR\fIvarname\fR...?\fB)\fR
  -.sp
  +.CE
  +.PP
   or
  -.sp
  +.PP
  +.CS
   \fIvarname\fR \fB=\fR \fIprocname\fR \fB(\fR?\fB:\fR\fIvarname\fR? ?\fB,:\fR\fIvarname\fR...?\fB)\fR
  -.sp
  +.CE
  +.PP
   This statement represents a call to a stored procedure \fIprocname\fR in the
   database. The variable name to the left of the equal sign (if
   present), and all variable names that are parameters inside
  @@ -171,7 +174,7 @@
   found, its value becomes the bound variable's value. If none is found,
   the bound variable is assigned a SQL NULL as its value.  Once
   substitution is finished, the resulting statement is executed. The
  -return value is a result set object (see \fBtdbc_resultset(n)\fR for
  +return value is a result set object (see \fBtdbc_resultset\fR for
   details).
   .PP
   The \fBresultsets\fR method returns a list of all the result sets that
  @@ -183,7 +186,7 @@
   optional \fIdict\fR parameter giving bind variables. After executing
   the statement,
   it uses the \fIallrows\fR object command on the result set (see
  -\fBtdbc_resultset(n)\fR) to construct a list of the results. Finally, 
  +\fBtdbc_resultset\fR) to construct a list of the results. Finally, 
   the result set is closed. The return value is the list of
   results. 
   .PP
  @@ -192,7 +195,7 @@
   optional \fIdict\fR parameter giving bind variables. After executing
   the statement,
   it uses the \fIforeach\fR object command on the result set (see
  -\fBtdbc_resultset(n)\fR) to evaluate the given \fIscript\fR for each row of
  +\fBtdbc_resultset\fR) to evaluate the given \fIscript\fR for each row of
   the results. Finally, the result set is closed, even
   if the given \fIscript\fR results in a \fBreturn\fR, an error, or
   an unusual return code. 
  @@ -203,6 +206,7 @@
   .SH "EXAMPLES"
   The following code would look up a telephone number in a directory,
   assuming an appropriate SQL schema:
  +.PP
   .CS
   package require tdbc::sqlite3
   tdbc::sqlite3::connection create db phonebook.sqlite3
  Index: tdbc_tokenize.n
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/doc/tdbc_tokenize.n,v
  retrieving revision 1.1.1.3
  retrieving revision 1.2
  diff -u -r1.1.1.3 -r1.2
  --- tdbc_tokenize.n	21 Apr 2009 02:44:27 -0000	1.1.1.3
  +++ tdbc_tokenize.n	10 Jan 2010 01:32:14 -0000	1.2
  @@ -59,9 +59,11 @@
   .SH "NAME"
   tdbc::tokenize \- TDBC SQL tokenizer
   .SH "SYNOPSIS"
  +.nf
   package require \fBtdbc 1.0\fR
  -.sp
  +
   \fBtdbc::tokenize\fR \fIstring\fR
  +.fi
   .BE
   .SH "DESCRIPTION"
   .PP


  <hr><i>anonymous claiming to be dkf added on 2010-01-10 11:56:13:</i><br>
  Trying again to add the patch, having looked up fossil's formatting rules first:
  <verbatim>Index: Tdbc_Init.3
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/doc/Tdbc_Init.3,v
  retrieving revision 1.1.1.1
  retrieving revision 1.3
  diff -u -r1.1.1.1 -r1.3
  --- Tdbc_Init.3	21 Apr 2009 02:44:27 -0000	1.1.1.1
  +++ Tdbc_Init.3	10 Jan 2010 01:32:14 -0000	1.3
  @@ -42,10 +42,6 @@
   .\"	# BS - start boxed text
   .\"	# ^y = starting y location
   .\"	# ^b = 1
  -.br
  -.\"	# BS - start boxed text
  -.\"	# ^y = starting y location
  -.\"	# ^b = 1
   .de BS
   .br
   .mk ^y
  @@ -94,15 +90,16 @@
   .SH SYNOPSIS
   .nf
   \fB#include <tdbc.h>\fR
  -.sp
  +
   int
   \fBTdbc_Init\fR(\fIinterp\fR)
  -.sp
  +
   Tcl_Obj *
   \fBTdbc_TokenizeSql\fR(\fIinterp, sqlcode\fR)
  -.sp
  +
   const char *
   \fBTdbc_MapSqlState\fR(\fIstate\fR)
  +.fi
   .SH ARGUMENTS
   .AS "Tcl_Interp" statement in/out
   .AP Tcl_Interp *interp in/out
  Index: tdbc.n
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/doc/tdbc.n,v
  retrieving revision 1.1.1.3
  retrieving revision 1.2
  diff -u -r1.1.1.3 -r1.2
  --- tdbc.n	21 Apr 2009 02:44:27 -0000	1.1.1.3
  +++ tdbc.n	10 Jan 2010 00:57:13 -0000	1.2
  @@ -47,17 +47,18 @@
   .SH "NAME"
   tdbc \- Tcl Database Connectivity
   .SH "SYNOPSIS"
  +.nf
   package require \fBtdbc 1.0\fR
  -.sp
  -package require \fBtdbc::\fR\fIdriver version\fR
  -.sp
  -\fBtdbc::\fR\fIdriver\fR\fB::connection create \fR\fIdb\fR \fI?\-option value\fR...?
  +package require \fBtdbc::\fIdriver version\fR
  +
  +\fBtdbc::\fIdriver\fB::connection create \fIdb\fR ?\fI\-option value\fR...?
  +.fi
   .BE
   .SH "DESCRIPTION"
   .PP
   Tcl Database Connectivity (TDBC) is a common interface for Tcl
   programs to access SQL databases. It is implemented by a series of
  -database \fIdrivers:\fR separate modules, each of which adapts Tcl to
  +database \fIdrivers\fR: separate modules, each of which adapts Tcl to
   the interface of one particular database system.  All of the drivers
   implement a common series of commands for manipulating the database.
   These commands are all named dynamically, since they all represent
  Index: tdbc_connection.n
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/doc/tdbc_connection.n,v
  retrieving revision 1.1.1.3
  retrieving revision 1.2
  diff -u -r1.1.1.3 -r1.2
  --- tdbc_connection.n	21 Apr 2009 02:44:27 -0000	1.1.1.3
  +++ tdbc_connection.n	10 Jan 2010 00:57:13 -0000	1.2
  @@ -47,46 +47,40 @@
   .SH "NAME"
   tdbc::connection \- TDBC connection object
   .SH "SYNOPSIS"
  +.nf
   package require \fBtdbc 1.0\fR
  -.sp
  -package require \fBtdbc::\fR\fIdriver version\fR
  -.sp
  -\fBtdbc::\fR\fIdriver\fR\fB::connection create \fR\fIdb\fR \fI?\-option value\fR...?
  -.sp
  -\fIdb\fR \fBconfigure\fR ?\fI-option value\fR...?
  -.sp
  -\fIdb\fR \fBclose\fR
  -.sp
  -\fIdb\fR \fBprepare\fR \fIsql-code\fR
  -.sp
  -\fIdb\fR \fBpreparecall\fR \fIcall\fR
  -.sp
  -\fIdb\fR \fBstatements\fR
  -.sp
  -\fIdb\fR \fBresultsets\fR
  -.sp
  -\fIdb\fR \fBtables\fR ?\fIpattern\fR?
  -.sp
  -\fIdb\fR \fBcolumns\fR \fItable\fR ?\fIpattern\fR?
  -.sp
  -\fIdb\fR \fBbegintransaction\fR
  -.sp
  -\fIdb\fR \fBcommit\fR
  -.sp
  -\fIdb\fR \fBrollback\fR
  -.sp
  -\fIdb\fR \fBtransaction\fR \fIscript\fR
  -.sp
  -\fIdb\fR \fBallrows\fR ?\fB-as lists|dicts\fR? ?\fB-columnsvariable\fR \fIname\fR? ?\fB--\fR? \fIsql-code\fR ?\fIdictionary\fR?
  -.sp
  -\fIdb\fR \fBforeach\fR ?\fB-as lists|dicts\fR? ?\fB-columnsvariable\fR \fIname\fR? ?--? \fIvarName\fR \fIsqlcode\fR ?\fIdictionary\fR? \fIscript\fR
  +package require \fBtdbc::\fIdriver version\fR
  +
  +\fBtdbc::\fIdriver\fB::connection create \fIdb\fR ?\fI\-option value\fR...?
  +
  +\fIdb \fBconfigure\fR ?\fI\-option value\fR...?
  +\fIdb \fBclose\fR
  +\fIdb \fBprepare \fIsql-code\fR
  +\fIdb \fBpreparecall \fIcall\fR
  +\fIdb \fBstatements\fR
  +\fIdb \fBresultsets\fR
  +\fIdb \fBtables\fR ?\fIpattern\fR?
  +\fIdb \fBcolumns \fItable\fR ?\fIpattern\fR?
  +\fIdb \fBbegintransaction\fR
  +\fIdb \fBcommit\fR
  +\fIdb \fBrollback\fR
  +\fIdb \fBtransaction \fIscript\fR
  +.fi
  +.ad l
  +.in 14
  +.ti 7
  +\fIdb \fBallrows\fR ?\fB\-as lists\fR|\fBdicts\fR? ?\fB\-columnsvariable \fIname\fR? ?\fB\-\-\fR? \fIsql-code\fR ?\fIdictionary\fR?
  +.br
  +.ti 7
  +\fIdb \fBforeach\fR ?\fB\-as lists\fR|\fBdicts\fR? ?\fB\-columnsvariable \fIname\fR? ?\fB\-\-\fR? \fIvarName sql-code\fR ?\fIdictionary\fR? \fIscript\fR
  +.ad b
   .BE
   .SH "DESCRIPTION"
   .PP
   Every database driver for TDBC (Tcl DataBase Connectivity) implements
   a \fIconnection\fR object that represents a connection to a database.
   By convention, this object is created by the command,
  -\fBtdbc::\fR\fIdriver\fR\fB::connection\fR \fBcreate\fR.
  +\fBtdbc::\fIdriver\fB::connection create\fR.
   This command accepts the name of a Tcl command that will represent the
   connection and a possible set of options (see \fBCONFIGURATION
   OPTIONS\fR). It establishes a connection to the database and returns
  @@ -95,7 +89,7 @@
   The \fBconfigure\fR object command on a database connection, if
   presented with no arguments, returns a list of alternating keywords
   and values representing the connection's current configuration. If
  -presented with a single argument \fI-option\fR, it returns the
  +presented with a single argument \fI\-option\fR, it returns the
   configured value of the given option. Otherwise, it must be given an
   even number of arguments which are alternating options and values. The
   specified options receive the specified values, and nothing is
  @@ -112,18 +106,20 @@
   included. See \fBSQL STATEMENTS\fR for a further description of the
   SQL that is accepted by this command. The return value is a
   newly-created Tcl command that represents the statement. See
  -tdbc_statement(n) for the interface accepted by a statement.
  +\fBtdbc_statement\fR for the interface accepted by a statement.
   .PP
   On a database connection where the underlying database and driver
   support stored procedures, the \fBpreparecall\fR
   object command prepares a call to a stored procedure for execution.
   The syntax of the stored procedure call is:
  -.sp
  +.PP
  +.CS
   ?\fIresultvar\fR =? \fIprocname\fR(?\fIarg\fR ?, \fIarg\fR...?)
  -.sp
  +.CE
  +.PP
   The return value is a
   newly-created Tcl command that represents the statement. See
  -tdbc_statement(n) for the interface accepted by a statement.
  +\fBtdbc_statement\fR for the interface accepted by a statement.
   .PP
   The \fBstatements\fR object command returns a list of statements 
   that have been created by \fBprepare\fR and \fBpreparecall\fR
  @@ -199,19 +195,19 @@
   .PP
   The \fBallrows\fR object command prepares a SQL statement (given by
   the \fIsql-code\fR parameter) to execute against the database.
  -It then executes it (see \fBtdbc_statement(n)\fR for details) with the
  +It then executes it (see \fBtdbc_statement\fR for details) with the
   optional \fIdictionary\fR parameter giving bind variables. Finally,
   it uses the \fIallrows\fR object command on the result set (see
  -\fBtdbc_resultset(n)\fR) to construct a list of the results. Finally, both
  +\fBtdbc_resultset\fR) to construct a list of the results. Finally, both
   result set and statement are closed. The return value is the list of
   results. 
   .PP
   The \fBforeach\fR object command prepares a SQL statement (given by
   the \fIsql-code\fR parameter) to execute against the database.
  -It then executes it (see \fBtdbc_statement(n)\fR for details) with the
  +It then executes it (see \fBtdbc_statement\fR for details) with the
   optional \fIdictionary\fR parameter giving bind variables. Finally,
   it uses the \fIforeach\fR object command on the result set (see
  -\fBtdbc_resultset(n)\fR) to evaluate the given \fIscript\fR for each row of
  +\fBtdbc_resultset\fR) to evaluate the given \fIscript\fR for each row of
   the results. Finally, both result set and statement are closed, even
   if the given \fIscript\fR results in a \fBreturn\fR, an error, or
   an unusual return code. 
  @@ -219,29 +215,29 @@
   The configuration options accepted when the connection is created and
   on the connection's \fBconfigure\fR object command include the
   following, and may include others specific to a database driver.
  -.IP "\fB-encoding\fR \fIname\fR"
  +.IP "\fB\-encoding \fIname\fR"
   Specifies the encoding to be used in connecting to the database.
   The \fIname\fR should be one of the names accepted by the
  -\fBencoding(n)\fR command. This option is usually unnecessary; most
  +\fBencoding\fR command. This option is usually unnecessary; most
   database drivers can figure out the encoding in use by themselves.
  -.IP "\fB-isolation\fR \fIlevel\fR"
  +.IP "\fB\-isolation \fIlevel\fR"
   Specifies the transaction isolation level needed for transactions on
   the database. The acceptable values for \fIlevel\fR are shown under
   \fBTRANSACTION ISOLATION LEVELS\fR.
  -.IP "\fB-timeout\fR \fIms\fR"
  +.IP "\fB\-timeout \fIms\fR"
   Specifies the maximum time to wait for a an operation database engine before
   reporting an error to the caller. The \fIms\fR argument gives the
   maximum time in milliseconds. A value of zero (the default) specifies
   that the calling process is to wait indefinitely for database
   operations.
  -.IP "\fB-readonly\fR \fIflag\fR"
  +.IP "\fB\-readonly \fIflag\fR"
   Specifies that the connection will not modify the database (if the
   Boolean parameter \fIflag\fR is true), or that it may modify the
   database (if \fIflag\fR is false). If \fIflag\fR is true, this option
   may have the effect of raising the transaction isolation level to
   \fIreadonly\fR.
  -.SH "TRANSACTION ISOLATION LEVELS"
  -The acceptable values for the \fB-isolation\fR configuration option
  +.SS "TRANSACTION ISOLATION LEVELS"
  +The acceptable values for the \fB\-isolation\fR configuration option
   are as follows:
   .IP \fBreaduncommitted\fR
   Allows the transaction to read "dirty", that is, uncommitted
  Index: tdbc_mapSqlState.n
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/doc/tdbc_mapSqlState.n,v
  retrieving revision 1.1.1.1
  retrieving revision 1.2
  diff -u -r1.1.1.1 -r1.2
  --- tdbc_mapSqlState.n	21 Apr 2009 02:44:27 -0000	1.1.1.1
  +++ tdbc_mapSqlState.n	10 Jan 2010 01:32:14 -0000	1.2
  @@ -59,9 +59,11 @@
   .SH "NAME"
   tdbc::mapSqlState \- Map SQLSTATE to error class
   .SH "SYNOPSIS"
  +.nf
   package require \fBtdbc 1.0\fR
  -.sp
  +
   \fBtdbc::mapSqlState\fR \fIsqlstate\fR
  +.fi
   .BE
   .SH "DESCRIPTION"
   .PP
  Index: tdbc_resultset.n
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/doc/tdbc_resultset.n,v
  retrieving revision 1.1.1.3
  retrieving revision 1.2
  diff -u -r1.1.1.3 -r1.2
  --- tdbc_resultset.n	21 Apr 2009 02:44:27 -0000	1.1.1.3
  +++ tdbc_resultset.n	10 Jan 2010 00:57:13 -0000	1.2
  @@ -59,32 +59,32 @@
   .SH "NAME"
   tdbc::resultset \- TDBC result set object
   .SH "SYNOPSIS"
  +.nf
   package require \fBtdbc 1.0\fR
  -.sp
   package require \fBtdbc::\fR\fIdriver version\fR
  -.sp
  +
   \fBtdbc::\fR\fIdriver\fR\fB::connection create \fR\fIdb\fR \fI?\-option value\fR...?
  -.sp
  +
   \fBset\fR \fIstmt\fR \fB[\fR\fIdb\fR \fBprepare\fR \fIsql-code\fR\fB]\fR
  -.sp
  -\fBset\fR \fIresultset\fR \fB[\fR\fI$stmt\fR \fBexecute\fR ?\fIargs...\fR?
  -.sp
  +\fBset\fR \fIresultset\fR \fB[\fR\fI$stmt\fR \fBexecute\fR ?\fIargs...\fR?\fB]\fR
  +
   \fI$resultset\fR \fBcolumns\fR
  -.sp
  -\fI$resultset \fR \fBrowcount\fR
  -.sp
  +\fI$resultset\fR \fBrowcount\fR
   \fI$resultset\fR \fBnextrow\fR ?\fB-as\fR \fBlists\fR|\fBdicts\fR? ?\fB--\fR? \fIvarname\fR
  -.sp
   \fI$resultset\fR \fBnextlist\fR \fIvarname\fR
  -.sp
   \fI$resultset\fR \fBnextdict\fR \fIvarname\fR
  -.sp
  +.fi
  +.ad l
  +.in 14
  +.ti 7
   \fI$resultset\fR \fBallrows\fR ?\fB-as lists|dicts\fR? ?\fB-columnsvariable\fR \fIname\fR? ?\fB--\fR?
  -.sp
  -\fI$resultset\fR \fBforeach\fR ?\fB-as lists|dicts\fR?
  -?\fB-columnsvariable\fR \fIname\fR? ?\fB--\fR? \fIvarname\fR \fIscript\fR
  -.sp
  +.br
  +.ti 7
  +\fI$resultset\fR \fBforeach\fR ?\fB-as lists|dicts\fR? ?\fB-columnsvariable\fR \fIname\fR? ?\fB--\fR? \fIvarname\fR \fIscript\fR
  +.br
  +.ti 7
   \fI$resultset\fR \fBclose\fR
  +.ad b
   .BE
   .SH "DESCRIPTION"
   .PP
  Index: tdbc_statement.n
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/doc/tdbc_statement.n,v
  retrieving revision 1.1.1.3
  retrieving revision 1.2
  diff -u -r1.1.1.3 -r1.2
  --- tdbc_statement.n	21 Apr 2009 02:44:27 -0000	1.1.1.3
  +++ tdbc_statement.n	10 Jan 2010 00:57:13 -0000	1.2
  @@ -58,32 +58,31 @@
   .SH "NAME"
   tdbc::statement \- TDBC statement object
   .SH "SYNOPSIS"
  +.nf
   package require \fBtdbc 1.0\fR
  -.sp
   package require \fBtdbc::\fR\fIdriver version\fR
  -.sp
  +
   \fBtdbc::\fR\fIdriver\fR\fB::connection create \fR\fIdb\fR \fI?\-option value\fR...?
  -.sp
  +
   \fBset\fR \fIstmt\fR \fB[\fR\fIdb\fR \fBprepare\fR \fIsql-code\fR\fB]\fR
  -.sp
  -\fBset\fR \fIstmt\fR \fB[\fR\fIdb\fR \fBpreparecall\fR
  -\fIcall\fR\fB]\fR
  -.sp
  +\fBset\fR \fIstmt\fR \fB[\fR\fIdb\fR \fBpreparecall\fR \fIcall\fR\fB]\fR
  +
   \fI$stmt\fR \fBparams\fR
  -.sp
   \fI$stmt\fR \fBparamtype\fR ?\fIdirection\fR? \fItype\fR ?\fIprecision\fR? ?\fIscale\fR?
  -.sp
   \fI$stmt\fR \fBexecute\fR ?\fIdict\fR?
  -.sp
   \fI$stmt\fR \fBresultsets\fR
  -.sp
  +.fi
  +.ad l
  +.in 14
  +.ti 7
   \fI$stmt\fR \fBallrows\fR ?\fB-as lists|dicts\fR? ?\fB-columnsvariable\fR \fIname\fR? ?\fB--\fR? ?\fIdict\fR
  -.sp
  -\fI$stmt\fR \fBforeach\fR ?\fB-as lists|dicts\fR?
  -?\fB-columnsvariable\fR \fIname\fR? ?\fB--\fR? \fIvarName\fR ?\fIdict\fR?
  -\fIscript\fR
  -.sp
  +.br
  +.ti 7
  +\fI$stmt\fR \fBforeach\fR ?\fB-as lists|dicts\fR? ?\fB-columnsvariable\fR \fIname\fR? ?\fB--\fR? \fIvarName\fR ?\fIdict\fR? \fIscript\fR
  +.br
  +.ti 7
   \fI$stmt\fR \fBclose\fR
  +.ad b
   .BE
   .SH "DESCRIPTION"
   .PP
  @@ -108,13 +107,17 @@
   .PP
   The \fBpreparecall\fR object command against the connection accepts a
   stylized statement in the form:
  -.sp
  +.PP
  +.CS
   \fIprocname\fR \fB(\fR?\fB:\fR\fIvarname\fR? ?\fB,:\fR\fIvarname\fR...?\fB)\fR
  -.sp
  +.CE
  +.PP
   or
  -.sp
  +.PP
  +.CS
   \fIvarname\fR \fB=\fR \fIprocname\fR \fB(\fR?\fB:\fR\fIvarname\fR? ?\fB,:\fR\fIvarname\fR...?\fB)\fR
  -.sp
  +.CE
  +.PP
   This statement represents a call to a stored procedure \fIprocname\fR in the
   database. The variable name to the left of the equal sign (if
   present), and all variable names that are parameters inside
  @@ -171,7 +174,7 @@
   found, its value becomes the bound variable's value. If none is found,
   the bound variable is assigned a SQL NULL as its value.  Once
   substitution is finished, the resulting statement is executed. The
  -return value is a result set object (see \fBtdbc_resultset(n)\fR for
  +return value is a result set object (see \fBtdbc_resultset\fR for
   details).
   .PP
   The \fBresultsets\fR method returns a list of all the result sets that
  @@ -183,7 +186,7 @@
   optional \fIdict\fR parameter giving bind variables. After executing
   the statement,
   it uses the \fIallrows\fR object command on the result set (see
  -\fBtdbc_resultset(n)\fR) to construct a list of the results. Finally, 
  +\fBtdbc_resultset\fR) to construct a list of the results. Finally, 
   the result set is closed. The return value is the list of
   results. 
   .PP
  @@ -192,7 +195,7 @@
   optional \fIdict\fR parameter giving bind variables. After executing
   the statement,
   it uses the \fIforeach\fR object command on the result set (see
  -\fBtdbc_resultset(n)\fR) to evaluate the given \fIscript\fR for each row of
  +\fBtdbc_resultset\fR) to evaluate the given \fIscript\fR for each row of
   the results. Finally, the result set is closed, even
   if the given \fIscript\fR results in a \fBreturn\fR, an error, or
   an unusual return code. 
  @@ -203,6 +206,7 @@
   .SH "EXAMPLES"
   The following code would look up a telephone number in a directory,
   assuming an appropriate SQL schema:
  +.PP
   .CS
   package require tdbc::sqlite3
   tdbc::sqlite3::connection create db phonebook.sqlite3
  Index: tdbc_tokenize.n
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/doc/tdbc_tokenize.n,v
  retrieving revision 1.1.1.3
  retrieving revision 1.2
  diff -u -r1.1.1.3 -r1.2
  --- tdbc_tokenize.n	21 Apr 2009 02:44:27 -0000	1.1.1.3
  +++ tdbc_tokenize.n	10 Jan 2010 01:32:14 -0000	1.2
  @@ -59,9 +59,11 @@
   .SH "NAME"
   tdbc::tokenize \- TDBC SQL tokenizer
   .SH "SYNOPSIS"
  +.nf
   package require \fBtdbc 1.0\fR
  -.sp
  +
   \fBtdbc::tokenize\fR \fIstring\fR
  +.fi
   .BE
   .SH "DESCRIPTION"
   .PP
  </verbatim>

  <hr><i>kennykb added on 2010-04-06 21:24:31:</i><br>
  Merged all documentation changes from the Tcl HEAD


tkt_uuid: fcc8231b9efa1165d01157134c2dbad98d0c4fbc
type: Documentation
status: Fixed
subsystem: not_specified
priority: Immediate
severity: Critical
foundin: HEAD of Tcl version
private_contact: f6b536f9c1ed4b589e96e38fb613afc3d8991783
resolution: Fixed
title: missing section in tdbc_connection.n
comment:
  There is a reference to a section "SQL STATEMENTS", but no such section exists. Fix by either adding the section or removing the reference.

  <hr><i>kennykb added on 2010-04-06 23:32:25:</i><br>
  Reference redirected to 'tdbc::statement', which is what was intended.


tkt_uuid: cf7bc364ccd56091c1c587d51c388a2d0dde20eb
type: Feature_Request
status: Fixed
subsystem: not_specified
priority: Immediate
severity: Minor
foundin: latest
private_contact: cd7093095d9cfcb1d94e1ac96bf5d520b20d5cd7
resolution: Fixed
title: make stub table, StateLookup and command Table "const"
comment:
  Here is a patch which makes the stub table
  as well as the StateLookup and commandTable
  "const", so those are placed in read-only
  memory, like Tcl does now with other stub
  (and other) tables.

  Regards,
            Jan Nijtmans

  =============================================
  Index: generic/tdbcStubInit.c
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/generic/tdbcStubInit.c,v
  retrieving revision 1.1.1.4
  diff -c -r1.1.1.4 tdbcStubInit.c
  *** generic/tdbcStubInit.c	1 Feb 2009 22:41:57 -0000	1.1.1.4
  --- generic/tdbcStubInit.c	1 Mar 2010 20:15:03 -0000
  ***************
  *** 15,25 ****
    
    #include "tdbcInt.h"
    
  ! MODULE_SCOPE TdbcStubs tdbcStubs;
    
    /* !BEGIN!: Do not edit below this line. */
    
  ! TdbcStubs tdbcStubs = {
        TCL_STUB_MAGIC,
        TDBC_STUBS_EPOCH,
        TDBC_STUBS_REVISION,
  --- 15,25 ----
    
    #include "tdbcInt.h"
    
  ! MODULE_SCOPE const TdbcStubs tdbcStubs;
    
    /* !BEGIN!: Do not edit below this line. */
    
  ! const TdbcStubs tdbcStubs = {
        TCL_STUB_MAGIC,
        TDBC_STUBS_EPOCH,
        TDBC_STUBS_REVISION,
  Index: generic/tdbcDecls.h
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/generic/tdbcDecls.h,v
  retrieving revision 1.1.1.3
  diff -c -r1.1.1.3 tdbcDecls.h
  *** generic/tdbcDecls.h	1 Feb 2009 22:41:57 -0000	1.1.1.3
  --- generic/tdbcDecls.h	1 Mar 2010 20:15:03 -0000
  ***************
  *** 50,56 ****
        int magic;
        int epoch;
        int revision;
  !     struct TdbcStubHooks *hooks;
    
        int (*tdbc_Init) (Tcl_Interp* interp); /* 0 */
        Tcl_Obj* (*tdbc_TokenizeSql) (Tcl_Interp* interp, const char* statement); /* 1 */
  --- 50,56 ----
        int magic;
        int epoch;
        int revision;
  !     const struct TdbcStubHooks *hooks;
    
        int (*tdbc_Init) (Tcl_Interp* interp); /* 0 */
        Tcl_Obj* (*tdbc_TokenizeSql) (Tcl_Interp* interp, const char* statement); /* 1 */
  Index: generic/tdbcStubLib.c
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/generic/tdbcStubLib.c,v
  retrieving revision 1.1.1.2
  diff -c -r1.1.1.2 tdbcStubLib.c
  *** generic/tdbcStubLib.c	30 Dec 2008 19:08:12 -0000	1.1.1.2
  --- generic/tdbcStubLib.c	1 Mar 2010 20:15:03 -0000
  ***************
  *** 19,25 ****
    #define USE_TDBC_STUBS 1
    #include "tdbc.h"
    
  ! const TdbcStubs* tdbcStubsPtr;
    
    /*
     *-----------------------------------------------------------------------------
  --- 19,26 ----
    #define USE_TDBC_STUBS 1
    #include "tdbc.h"
    
  ! MODULE_SCOPE const TdbcStubs* tdbcStubsPtr;
  ! const TdbcStubs *tdbcStubsPtr = NULL;
    
    /*
     *-----------------------------------------------------------------------------
  ***************
  *** 57,63 ****
        ClientData clientData = NULL;
    				/* Client data for the package */
        const char* actualVersion;  /* Actual version of the package */
  !     TdbcStubs* stubsPtr;	/* Stubs table for the public API */
    
        /* Load the package */
    
  --- 58,64 ----
        ClientData clientData = NULL;
    				/* Client data for the package */
        const char* actualVersion;  /* Actual version of the package */
  !     const TdbcStubs* stubsPtr;	/* Stubs table for the public API */
    
        /* Load the package */
    
  ***************
  *** 77,83 ****
        if (actualVersion == NULL) {
    	return NULL;
        } else {
  ! 	stubsPtr = (TdbcStubs*) clientData;
    	if (stubsPtr->epoch != epoch) {
    	    errorMsg = "mismatched epoch number";
    	} else if (stubsPtr->revision < revision) {
  --- 78,84 ----
        if (actualVersion == NULL) {
    	return NULL;
        } else {
  ! 	stubsPtr = (const TdbcStubs*) clientData;
    	if (stubsPtr->epoch != epoch) {
    	    errorMsg = "mismatched epoch number";
    	} else if (stubsPtr->revision < revision) {
  Index: generic/tdbc.c
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/generic/tdbc.c,v
  retrieving revision 1.1.1.3
  diff -c -r1.1.1.3 tdbc.c
  *** generic/tdbc.c	1 Feb 2009 22:41:57 -0000	1.1.1.3
  --- generic/tdbc.c	1 Mar 2010 20:15:03 -0000
  ***************
  *** 22,32 ****
    static int TdbcMapSqlStateObjCmd(ClientData unused, Tcl_Interp* interp,
    				 int objc, Tcl_Obj *const objv[]);
    
  ! MODULE_SCOPE TdbcStubs tdbcStubs;
    
    /* Table of commands to create for TDBC */
    
  ! static struct TdbcCommand {
        const char* name;		/* Name of the command */
        Tcl_ObjCmdProc* proc;	/* Command procedure */
    } commandTable[] = {
  --- 22,32 ----
    static int TdbcMapSqlStateObjCmd(ClientData unused, Tcl_Interp* interp,
    				 int objc, Tcl_Obj *const objv[]);
    
  ! MODULE_SCOPE const TdbcStubs tdbcStubs;
    
    /* Table of commands to create for TDBC */
    
  ! static const struct TdbcCommand {
        const char* name;		/* Name of the command */
        Tcl_ObjCmdProc* proc;	/* Command procedure */
    } commandTable[] = {
  ***************
  *** 37,43 ****
    
    /* Table mapping SQLSTATE to error code */
    
  ! static struct SqlStateLookup {
        const char* stateclass;
        const char* message;
    } StateLookup [] = {
  --- 37,43 ----
    
    /* Table mapping SQLSTATE to error code */
    
  ! static const struct SqlStateLookup {
        const char* stateclass;
        const char* message;
    } StateLookup [] = {
  Index: tools/genStubs.tcl
  ===================================================================
  RCS file: /cvsroot/tcl/tdbc/tools/genStubs.tcl,v
  retrieving revision 1.1.1.1
  diff -c -r1.1.1.1 genStubs.tcl
  *** tools/genStubs.tcl	17 Dec 2008 18:00:35 -0000	1.1.1.1
  --- tools/genStubs.tcl	1 Mar 2010 20:15:03 -0000
  ***************
  *** 694,700 ****
    	foreach hook $hooks($name) {
    	    set capHook [string toupper [string index $hook 0]]
    	    append capHook [string range $hook 1 end]
  ! 	    append text "    struct ${capHook}Stubs *${hook}Stubs;\n"
    	}
    	append text "} ${capName}StubHooks;\n"
        }
  --- 694,700 ----
    	foreach hook $hooks($name) {
    	    set capHook [string toupper [string index $hook 0]]
    	    append capHook [string range $hook 1 end]
  ! 	    append text "    const struct ${capHook}Stubs *${hook}Stubs;\n"
    	}
    	append text "} ${capName}StubHooks;\n"
        }
  ***************
  *** 702,708 ****
        append text "    int magic;\n"
        append text "    int epoch;\n"
        append text "    int revision;\n"
  !     append text "    struct ${capName}StubHooks *hooks;\n\n"
    
        emitSlots $name text
    
  --- 702,708 ----
        append text "    int magic;\n"
        append text "    int epoch;\n"
        append text "    int revision;\n"
  !     append text "    const struct ${capName}StubHooks *hooks;\n\n"
    
        emitSlots $name text
    
  ***************
  *** 741,747 ****
        set CAPName [string toupper $name]
    
        if {[info exists hooks($name)]} {
  !  	append text "\nstatic ${capName}StubHooks ${name}StubHooks = \{\n"
    	set sep "    "
    	foreach sub $hooks($name) {
    	    append text $sep "&${sub}Stubs"
  --- 741,747 ----
        set CAPName [string toupper $name]
    
        if {[info exists hooks($name)]} {
  !  	append text "\nstatic const ${capName}StubHooks ${name}StubHooks = \{\n"
    	set sep "    "
    	foreach sub $hooks($name) {
    	    append text $sep "&${sub}Stubs"
  ***************
  *** 749,755 ****
    	}
    	append text "\n\};\n"
        }
  !     append text "\n${capName}Stubs ${name}Stubs = \{\n"
        append text "    TCL_STUB_MAGIC,\n"
        append text "    ${CAPName}_STUBS_EPOCH,\n"
        append text "    ${CAPName}_STUBS_REVISION,\n"
  --- 749,755 ----
    	}
    	append text "\n\};\n"
        }
  !     append text "\nconst ${capName}Stubs ${name}Stubs = \{\n"
        append text "    TCL_STUB_MAGIC,\n"
        append text "    ${CAPName}_STUBS_EPOCH,\n"
        append text "    ${CAPName}_STUBS_REVISION,\n"

  <hr><i>kennykb added on 2010-04-06 22:59:59:</i><br>
  Patches accepted (with a few minor tweaks to correct some linkage problems
  on mingw).


tkt_uuid: 02c0131ba1ee91e420fb04ebe727539b401eea1c
type: Documentation
status: Fixed
subsystem: not_specified
priority: Immediate
severity: Critical
foundin: 1.0b13
private_contact: 05bd8bac7a1fd8b42cc9f6958ce2bbfd708e21a9
resolution: Fixed
title: docs diverge from Tcl HEAD
comment:
  The HEAD of the Tcl bundle of tdbc contains
  patches to the doc files that are not reflected
  back in the 1.0b13 release.  I'd like the
  Tcl HEAD and some actual release of tdbc to
  reach agreement so that Tcl can be in the
  bundling business instead of the patching 
  business.

  Appears that tdbc fossil has some commits
  since the 1.0b13 release as well.

  <hr><i>kennykb added on 2010-04-06 21:27:56:</i><br>
  HEAD changes to the documentation merged back upstream.


tkt_uuid: 99e97fb0982d7d6c2c1ebf4b937d531e84c7b9b1
type: Build_Problem
status: Fixed
subsystem: not_specified
priority: Immediate
severity: Minor
foundin: 1.0b13
private_contact: a14e86e42de97d772b29e661c837c018a34a711b
resolution: Fixed
title: Tdbc_Init manual page may be installed in the wrong place
comment:
  If the directory <prefix>/man/man3 doesn't exist, the Tdbc_Init.3 file gets installed as <prefix>/man/man3 instead of <prefix>/man/man3/Tdbc_Init.3. This can happen when omitting the docs while installing Tcl, eg:
      make install-binaries install-libraries install-packages

  The problem is that the makefile doesn't create the man3 directory. It does create the man/mann directory. Adding a similar line for man/man3 in the install-doc target seems to fix the problem.

  --- ../pkgs/tdbc/Makefile.in~   2010-03-29 20:57:43.000000000 +0200
  +++ ../pkgs/tdbc/Makefile.in    2010-04-05 23:50:19.000000000 +0200
  @@ -229,6 +229,7 @@

   install-doc: doc
          @mkdir -p $(DESTDIR)$(mandir)/mann
  +       @mkdir -p $(DESTDIR)$(mandir)/man3
          @echo "Installing documentation in $(DESTDIR)$(mandir)"
          @list='$(srcdir)/doc/*.3'; for i in $$list; do \
              echo "Installing $$i"; \

  <hr><i>kennykb added on 2010-04-06 21:28:46:</i><br>
  Fixed.


tkt_uuid: a4d7f2a64f404e5820d71d5ead649c2b7c7fe585
type: Documentation
status: Open
severity: Critical
foundin: 1.0b13
private_contact: d589dc7c7c01830a044ad802b0b879d59058bd84
title: documentation for statement getSql missing
comment:
  The statement object has a method "getSql" which is not document:
  <nowiki>
  <p>set statement [$db_name prepare {select PATH_ID from PATHS where PATH=:path and parent_id is null}]
  <p>::oo::Obj943372::Stmt::10
  <p>(bin) 71 % $statement getSql
  <p>select PATH_ID from PATHS where PATH=:path and parent_id is null
  <p>(bin) 72 % 
  </nowiki>


tkt_uuid: a2ad232bf6ea70a5da22128c7a358be08ea28a12
type: Feature_Request
status: Open
severity: Minor
private_contact: d589dc7c7c01830a044ad802b0b879d59058bd84
title: feature request: add a getSql method to the resultset object
comment:
  The statement object currently has an (undocumented) method yielding the underlying sql statement used for the construction of the specific statement object. (using bind variables notation).
  request: add a similar method for the resultset object, showing the substituted values. 

  Using the example from the man page:

  <nowiki>
  <p>package require tdbc::sqlite3
  <p>tdbc::sqlite3::connection create db phonebook.sqlite3
  <p>set statement [db prepare {
  <p>    select phone_num from directory where first_name = :firstname and last_name = :lastname
  <p> }]
  <p>set firstname Fred
  <p>set lastname Flintstone
  <p>
  <p>$statement getSql gives: 
  <p><i>    select phone_num from directory where first_name = :firstname and last_name = :lastname </i>
  <p>
  <p>set rs [$statement execute]

  <p><b>Request:</b>
  <p>$rs getSql would give:
  <p> <i>select phone_num from directory where first_name = 'Fred' and last_name = 'Flintstone' </i>
  <p>
  <p>

  <p><b>Motivation:</b> this feature would be very helpfull in debugging..
  </nowiki>


tkt_uuid: c76ee42eb7c650cd0b864380eaeb7ab650cfe98b
type: Build_Problem
status: Deferred
subsystem: not_specified
priority: Immediate
severity: Cosmetic
foundin: 1.0b12
private_contact: 441df5aa37cec2a7c355ef4c66200392ce7f354e
resolution: Open
title: tdbcoracle/configure.in typo
comment:
  In sh scripting, the if comparison operator is = and not ==.

  Symptom:

  checking for ORACLE_HOME variable... test: x/usr/local/oracle8-client: unexpected operator
  /usr/local/oracle8-client

  Patch:

  --- configure.in.old    2010-06-30 02:54:09.000000000 +0000
  +++ configure.in        2010-06-30 02:44:58.000000000 +0000
  @@ -191,7 +191,7 @@
   #--------------------------------------------------------------------
   AC_MSG_CHECKING([for ORACLE_HOME variable])

  -if  test x"${ORACLE_HOME}" == "x"; then
  +if  test x"${ORACLE_HOME}" = "x"; then
       AC_MSG_ERROR("ORACLE_HOME environment variable is not set. Set it to oracle product directory containing rdbms dir.");
   fi
   AC_MSG_RESULT(${ORACLE_HOME})

  <hr><i>anonymous added on 2010-06-30 03:00:25:</i><br>
  patch: http://pastebin.com/sYzwBMXU

  <hr><i>kennykb added on 2010-09-03 18:06:22:</i><br>
  tdbc::oracle is in the repos in case anyone wants to pick up where Slavek left off. It's not part of the release, because it's not quite done.


tkt_uuid: b0ea387b9f618c1ff4a609eecc4c0be2e267ef22
type: Build_Problem
status: Deferred
subsystem: not_specified
priority: Immediate
severity: Important
foundin: 1.0b12
private_contact: 441df5aa37cec2a7c355ef4c66200392ce7f354e
resolution: Open
title: tdbcoracle/configure.in oci.h location issue on FreeBSD
comment:
  On FreeBSD 8.0 with Oracle 8 client (oracle8-client-0.2.0_1 package), oci.h is in rdbms/demo and not in rdbms/public.

  The configure script needs *BOTH* directories as -D.

  Something like ORACLE_INCLUDE_SPEC="-I${ORACLE_INCLUDE_DIR} -I${ORACLE_HOME}/rdbms/demo" works.

  <hr><i>anonymous claiming to be dereckson added on 2010-06-30 03:19:24:</i><br>
  Patch: http://paste2.org/p/897729

  <hr><i>kennykb added on 2010-09-03 18:08:26:</i><br>
  tdbc::oracle is not part of any release; it's left in the repository in case anyone wants to take over the unfinished project.


tkt_uuid: 3e7f26479ae248f9374a6c3c2482bb627063ae09
type: Build_Problem
status: Deferred
subsystem: not_specified
priority: Immediate
severity: Severe
foundin: 1.0b12
private_contact: 441df5aa37cec2a7c355ef4c66200392ce7f354e
resolution: Open
title: tdbcoracle/configure.in can't detect libocciei on FreeBSD
comment:
  ld -lclntsh fails.

  config.log with genuine configure.in: http://pastebin.com/NEFXXni9

  According those errors and under advice of a FreeBSD port maintainer, I tried -lm -lcompat (required on FreeBSD for cuserid function)

  config.log with -lm -lcompat: http://pastebin.com/nmAASZgH

  <hr><i>kennykb added on 2010-09-03 18:11:31:</i><br>
  tdbcoracle is not part of any release; it's in the repository in case someone else wants to pick up the unfinished project where Slavek left off.


tkt_uuid: 6460f1f7386bde0bc96986dd96dec27ca2e6978e
type: Feature_Request
status: Tested
subsystem: not_specified
priority: Immediate
severity: Severe
private_contact: 6081932e3295a733bccd74f0aa982e27afb04a1f
resolution: Fixed
title: There should be a way to escape "@", or to configure supported parameter prefixes in tokenizer
comment:
  A problem in tdbc preventing a lot of its uses with e.g. tdbcodbc + Microsoft SQL Server: @[alphanumerics] is always interpreted by tdbc as a host parameter, with no way to escape it. Transact-SQL has its own uses for @: it is the only way to pass parameters by name to stored procedures, to specify a freshly defined stored procedure's argument list,  to name and access @@error etc. 

  I'd readily accept the fact that TDBC drivers fail to give access to *all* features for *every* underlying database interface. But being unable to pass *certain kinds of SQL statements* to an underlying engine is _not_ acceptable. 

  E.g. if I have a DBI layer lacking output parameters (like, duh, current tdbcodbc), Transact-SQL would enable me to work around it by declaring a temporary @local, EXEC'ing sp @param=@local OUTPUT and then selecting @local AS result. But with TDBC, I have no such option: declaring @local is impossible, as the tokenizer will see a host parameter there. What bothers me here is not only that certain statements are impossible, but that they are impossible because TDBC is `too smart' and doing `too much' (as opposed to TDBC lacking some code).

  Some options to allow @'s while staying backward compatible: (1) allow @@ or maybe \@ to mean literal @, (2) allow tokenizer to be *reconfigured* to ignore @localname and handle only :paramname syntax as a host parameter, (3) make TDBC C-language part call overridden version of tokenize method, when this method is redefined, (4) introduce some weird TDBC-specific syntax like @@{ /* we just asked not to look for host parameters inside braces */ } and provide an option to enable the syntax, disabling it by default for compatibility.

  Both (1) and (2) are easy to implement, and any of (1) (2) (4) would make a great benefit for most users of MSSQL (Transact-SQL).

  <hr /><i>kennykb added on 2011-02-20 22:31:26:</i><br />
  The bug is indeed there and an appropriate modification is in progress as part of ongoing work that will also resolve issues with multiple result sets and with output parameters from stored procedures. ☺

  <hr /><i>kennykb added on 2011-02-21 04:59:51:</i><br />
  I actually went one better: @ is now a special character for substitution only in tdbc::sqlite3.  In all the other platforms, there's no need for it as a substitution character, and there *is* need for it as a user variable sigil.

  Also added multiple result sets, because it appears that SQL Server doesn't
  keep the values of @variables between calls.


tkt_uuid: dadf1ab8548e9ce6dc686c54e6e12c0d460de042
type: Build_Problem
status: Closed
subsystem: not_specified
priority: Immediate
severity: Critical
foundin: 1.0b15
private_contact: 2e2722795e96b4d35f6edca554003fc262162cde
resolution: Fixed
title: tdbc::sqlite3 cannot [package require] (therefore test) from build dir
comment:
  Trying out tdbc::sqlite3 under the tcl/pkgs system,
  I find that [package require tdbc::sqlite3] only works
  after install, or when the build directory happens to
  be a subdirectory of the source directory.

  In other situations, the path ../library/tdbcsqlite3.tcl
  relative to pkgIndex.tcl doesn't point to anything, so
  the provide script fails.

  <hr><i>anonymous added on 2010-09-02 16:01:45:</i><br>

  ok, I see that tdbc::sqlite3 wants to install using
  the TM configuration, so the more useful approach may
  be to look into how to make that work.

  <hr><i>kennykb added on 2010-09-03 18:04:24:</i><br>
  It should be able to, now. Thanks for the fix in the chat.


tkt_uuid: dfff0829170bc51b79a9acd88cf37463f037d811
type: Documentation
status: Closed
subsystem: not_specified
priority: Immediate
severity: Severe
private_contact: 13671576852635e674ec7156abc5c1794320bcc0
resolution: Not_A_Bug
title: typo in $resultset allrows man page
comment:
  in SYNOPSIS section of
  tdbc::resultset - TDBC result set object

  $resultset allrows ?-as lists|dicts? ?-columnsvariable name? ?--?

  should be

  $resultset allrows ?-as lists|dicts? ?-columnsvariable name? ?--? script

  <hr /><i>kbk added on 2011-02-21 05:08:51 UTC:</i><br />
  Not so - the 'allrows' method doesn't take a script.


tkt_uuid: 4cf30e29a1fa6fe1dc57da14ce7328b3c8ea3fe5
type: Code_Defect
status: Open
subsystem: not_specified
priority: Immediate
severity: Minor
foundin: tdbc 1.0b16
private_contact: 84f9bf21f3ee394f9c80e01d021f21d8ae95f525
resolution: Open
title: install.tcl error
comment:
  Start the install.tcl the following error occurs, but the installation seems to be corret
  ---------------------------

  Error in startup script
  ---------------------------
  expected boolean value but got "8.6b1.2"
      while executing
  "if {[package present Tk]} {
    tk_messageBox -type ok  -detail "Files installed in $instdir"  -message
  "TDBC drivers installed."  -icon info
       } else ..."
       (file "C:\xxxxxxxx.\Downloads\tdbc1.0b16-win32\INSTALL.tcl" line 38)
  ---------------------------


tkt_uuid: 4357c31d894b61fd42bde278e4bb88f99db56fb0
type: Code_Defect
status: Fixed
subsystem: not_specified
priority: Immediate
severity: Severe
foundin: 1.0b16 (fossil head on 2011-05-05)
private_contact: 54152f94cb1628c0c148b4b5708ace53216227b0
resolution: Fixed
title: tdbc::postgres bytea hex escape problem
comment:
  Postgres 9.0 changed the default formatting of bytea fields returned in a select to 'hex'.  The default behaviour before was 'escape'.  This confuses the code in ResultSetNextrowMethod:

  <code>
  colObj = Tcl_SubstObj(interp, toSubst, TCL_SUBST_BACKSLASHES);
  </code>

  Since the hex formatted data is in the form \x68656c6c6f2c20776f726c64 (for "hello, world"), Tcl_SubstObj converts this to "d"

  Workarounds are to change the default in postgres.conf
  <verbatim>
  bytea_output = 'escape'
  </verbatim>

  or set it on the connection:

  <code>
  db allrows {set bytea_output = 'escape'}
  </code>

  Ideal would be teach ResultSetNextrowMethod about the hex format though, as this is the preferred format going forward.

  Code to reproduce:

  <verbatim>
  package require tdbc::postgres
  tdbc::postgres::connection create db -db wf_test
  db allrows {create temporary table foo (bar bytea)}
  db allrows {insert into foo (bar) values ('hello, world')}
  #db allrows {set bytea_output = 'escape'}
  puts [lindex [db allrows -as lists {select bar from foo}] 0 0]
  db close
  </verbatim>

  Expected output: "hello, world"

  Got: "d"

  <hr /><i>kbk added on 2012-07-13 01:41:26 UTC:</i><br />
  Fixed in [10d916626e5bf1bb0ccd77c0fcf7e034fa641567]


tkt_uuid: b4029dc351e0a3afe03a06e5668adf81af9573f3
type: Feature_Request
status: Tested
subsystem: tdbc
priority: Medium
severity: Minor
foundin: 1.0b17
private_contact: cd7093095d9cfcb1d94e1ac96bf5d520b20d5cd7
resolution: Fixed
title: make all TDBC API functions MODULE_SCOPE
comment:
  As a follow-up to [Tcl FRQ 3010352],

  Objective: simplify Stubs by

  - exporting only the minimally needed symbols, i.e.
  only Tdbc_Init, nothing more.

  - Eliminate the need for -DUSE_TDBC_STUBS

  For TclOO, this is already done, I have a
  corresponding patch for Tdbc available.

  <hr /><i>anonymous added on 2011-11-07 10:05:24 UTC:</i><br />
  Implementation available now in branch rfe-b4029dc351

  Kevin, is this suitable for the next beta?

              Jan Nijtmans

  <hr /><i>jan.nijtmans added on 2012-06-10 20:11:21 UTC:</i><br />
  Now tested on Windows and UNIX, should work fine on all platforms


tkt_uuid: b846c1f20e56a6c1a93882dc5e89677aedb9d5f2
type: Incident
status: Closed
subsystem: tdbc::odbc
priority: Immediate
severity: Critical
foundin: tdbc_odbc1.0b15
private_contact: fe1bbf6c51232a9c4f0a2ce2f4afba6ab6a0afae
resolution: Unable_To_Reproduce
title: crash when idle-exit, after 'package require tdbc::odbc'
comment:
  <verbatim>
  # start with tclsh.exe; tcl_patchLevel 8.6b1.2 and wait for the crash.
  rename exit orig_exit

  proc exit {{a 0}} {
      puts "exit"
      after idle [list ::orig_exit $a]
  }

  proc anything {} {
      package require tdbc::odbc
      puts "anything"
  }
  anything
  </verbatim>

  <hr /><i>kbk added on 2012-07-13 01:52:49 UTC:</i><br />
  Works On My Machine - please resubmit if this continues to fail post-8.6b3


tkt_uuid: bf0603a6a2ec9509d0743d8ca04667f37fec60eb
type: Feature_Request
status: Closed
subsystem: not_specified
priority: Low
severity: Important
foundin: 1.0b16
private_contact: c8fadf1e180b2eee42ae633c3e0045ff1bdd6523
resolution: Overcome_By_Events
title: postgres does not support semicolons
comment:
  Hi,

  It appears that the tdbc::postgres adapter does not support semicolons in statements making it a bit difficult to create functions

  Looks like it was introduced here:

  http://mirror1.tcl.tk/tdbc/info/a922f6900b

  <hr /><i>kbk added on 2012-07-13 01:57:15 UTC:</i><br />
  tdbc is supposed to handle plain, "bread and butter" data manipulation requests (INSERT, SELECT, UPDATE, DELETE, and SP calls) from Tcl.  Sophisticated data
  definition tasks may remain beyond it. I'm leaving this incident open as a
  feature request, but SP creation will need a fair amount of work to get right, and will ordinarily be done through other tools in any event.

  <hr /><i>kbk added on 2012-11-16 20:49:02 UTC:</i><br />
  This is a postgresql-specific problem and is being closed out in the main repository with the repository split.


tkt_uuid: 0dda7dbb73269bdd816a6c92812ac3b6850f50de
type: Code_Defect
status: Fixed
subsystem: tdbc::odbc
priority: Immediate
severity: Critical
foundin: trunk
private_contact: 438e59f1f1c891b29d2528ed82d1e629cecc6336
resolution: Fixed
title: Uninitialized data causes problem in GetCell
comment:
  The GetCell function in generic/tdbcodbc.c uses the following variables, which are not initialized:


      SQLLEN colLen;		/* Actual size of the return value, in bytes */

      SQLINTEGER colLong;		/* Integer value of the column */

      SQLBIGINT colWide;		/* Wide-integer value of the column */

      SQLDOUBLE colDouble;	/* Double value of the column */



  This causes problems, e.g., at 



  4143:	rc = SQLGetData(rdata->hStmt, i+1, SQL_C_SBIGINT,
  			(SQLPOINTER) &colWide, sizeof(colWide), &colLen);




  if colLen != sizeof(colLong), in which case colLong is not completely set.

  See for example this Tcl code:




  set stmt [$db_conn prepare {SELECT 1}]

  set res [$stmt execute]

  $res nextlist row

  puts "row: $row"

  $stmt close



  By adding a couple of printfs to generic/tdbcodbc.c



  4172        printf("sizeof(colLong) => %zu\n", sizeof(colLong));

  4172        printf("         colLen => %ld\n", colLen);

  4173        printf("        colLong => %ld\n", colLong);


  I get

  sizeof(colLong) => 8

           colLen => 4

          colLong => 34359738369

  row: 34359738369


  To fix this, initialize the four variables at the top of this issue.

  <hr /><i>kbk added on 2012-07-13 02:11:57 UTC:</i><br />
  I strongly suspect that this problem was actually the problem where tdbc was failing to check for bigint support from ODBC prior to transferring bigints through SqlGetData.  Nevertheless, in a superabundance of caution I am adding the requested initialisation of output parameters.

  <hr /><i>kbk added on 2012-07-13 02:12:35 UTC:</i><br />
  Fixed in [b65e45ce102be0cfbd9e8fae787b0f5dfe150c32]


tkt_uuid: 14dee3be9abb6761a3cba88c14315a87f031b239
type: Incident
status: Closed
subsystem: not_specified
priority: Immediate
severity: Important
private_contact: 5fc5e972c33194840d812dceaa267241ac9348a2
resolution: Overcome_By_Events
title: postgresql [column] doesn't like bool or boolean
comment:
  the postgresql driver, given a table with a column declared as 'fieldname boolean', '$db columns $t $f' returns {fieldname {name fieldname nullable 1}} where I would expect at least a type boolean element in the dict.

  <hr /><i>kbk added on 2012-11-16 20:45:28 UTC:</i><br />
  Closing this incident in the main TDBC repository since it is postgresql-specific. It will remain open in tdbc::postgresql until I can verify that it is fixed.


tkt_uuid: dd068d594258184ecce39b15e6525bcf5486e4ad
type: Code_Defect
status: Closed
subsystem: not_specified
priority: Immediate
severity: Minor
foundin: 1.0b17::1.0b15
private_contact: c595d9f53a3a638fdeacdb67623299c4cfe02e83
resolution: Overcome_By_Events
title: tdbc::sqlite3 does not show the data for attached files
comment:
  After [tdbc::sqlite3::connection create db mainfilename] , the db command can execute the SQL command to ATTACH an additional database file, and the tables in the attached file can be used, but the [db tables] and other introspection object commands do not show the additional tables.

  The workaround is to get the data from the attachName.sqlite_master table.

  <hr /><i>kbk added on 2012-11-16 20:48:06 UTC:</i><br />
  This is a sqlite3-specific problem and is being closed in the main tdbc repository with the repository split


tkt_uuid: 14a8b7c3bd7af93df844bf539c8656c850b098ab
type: Code_Defect
status: Fixed
subsystem: tdbc::mysql
priority: Immediate
severity: Critical
foundin: 1.0b17
private_contact: 3cb4dabca0e1e7b9d560b2ca060abb67f2a97f23
resolution: Fixed
title: package tdbc::mysql fails to load under Fedora 17
comment:
  Under Fedora 17, the mysql libraries are named as:

  /usr/lib64/mysql/libmysqlclient.so.18
  /usr/lib64/mysql/libmysqlclient.so.18.0.0
  /usr/lib64/mysql/libmysqld.so.0
  /usr/lib64/mysql/libmysqld.so.0.0.1

  I had to manually edit mysqlStubInit.c in order to make it work:

  static const char* mysqlSuffixes[] = {
      "", ".18", ".17", ".16", ".15", NULL
  };

  The code searches up to version 16.

  <hr /><i>jan.nijtmans added on 2012-07-26 14:04:00 UTC:</i><br />
  committed to trunk


tkt_uuid: 0a8fd3f25e5ff152bf796f4b3749fe2981d26787
type: Build_Problem
status: Fixed
subsystem: not_specified
priority: Immediate
severity: Important
foundin: 1.0b17
private_contact: edc1f1e4efd28fb6c0366c275e034f7c21387ada
resolution: Fixed
title: Tdbc_Init() not exported - libtdbc.so not [load]able
comment:
  TDBC fails to build properly on Unices where __attribute__((__visibility__("hidden"))) is supported.

  Cause of problem: Tdbc_Init() is defined in tdbc.c with storage class TDBCAPI, which is #defined as MODULE_SCOPE, which is in turn #defined as __attribute__((__visibility__("hidden"))), which means "do not make this symbol visible to dlsym() or ld.so".

  That's exactly backwards: extension *_Init routines *must* be visible to dlsym(), so should be declared and defined with storage class DLLEXPORT (not MODULE_SCOPE, not EXTERN, and especially not TCL_STORAGE_CLASS).

  <hr /><i>anonymous claiming to be jenglish added on 2012-07-11 21:54:12 UTC:</i><br />
  (hope this patch survives fossilization)

  --- tdbc.h.broken	2012-07-11 14:13:28.669980232 -0700
  +++ tdbc.h	2012-07-11 14:21:15.664986200 -0700
  @@ -28,17 +28,7 @@
   #   endif
   #endif
   
  -#undef TCL_STORAGE_CLASS
  -#ifdef BUILD_tdbc
  -#   define TCL_STORAGE_CLASS DLLEXPORT
  -#else
  -#   define TCL_STORAGE_CLASS
  -#endif
  -
  -EXTERN int		Tdbc_Init(Tcl_Interp *interp);
  -
  -#undef TCL_STORAGE_CLASS
  -#define TCL_STORAGE_CLASS DLLIMPORT
  +DLLEXPORT int Tdbc_Init(Tcl_Interp *interp);
   
   /*
    * TDBC_VERSION and TDBC_PATCHLEVEL here must match the ones that
  --- tdbc.c.broken	2012-07-11 14:27:13.718553784 -0700
  +++ tdbc.c	2012-07-11 14:27:23.367086984 -0700
  @@ -191,7 +191,7 @@
    *-----------------------------------------------------------------------------
    */
   
  -TDBCAPI int
  +DLLEXPORT int
   Tdbc_Init(
       Tcl_Interp* interp		/* Tcl interpreter */
   ) {


  <hr /><i>jan.nijtmans added on 2012-07-11 22:51:33 UTC:</i><br />
  Should be fixed now


tkt_uuid: d528df190c7c036a4304e1e3567c4a6ecb841ec9
type: Build_Problem
status: Fixed
subsystem: not_specified
priority: Immediate
severity: Important
foundin: trunk
private_contact: 3c686d4616da9760dc7f0bf95d5539a3cad3a6bd
resolution: Fixed
title: Changes to build using makefile.vc
comment:
  Building tdbc and tdbcsqlite3 on windows using makefile.vc had some problems:

  - 64 bit compiler not recognised (change needed in tdbc/win/makefile.vc)

  - platform not recognised (change needed in tdbc/win/rules.vc)

  - MODULE_SCOPE compile error (change needed in tdbcInt.h)

  - missing win directory for tdbcsqlite3

  I can send the patches and missing tdbcsqlite3/win files, but could not attach them to this ticket.

  Jos.

  <hr /><i>jan.nijtmans added on 2012-07-17 14:39:45 UTC:</i><br />
  I was already working on that ;-)

  Everything done for tdbc, not yet for the other sub-packages.

  <hr /><i>anonymous added on 2012-07-17 19:55:44 UTC:</i><br />
  Thanks Jan, you want the win directory for tdbcsqlite3?

  <hr /><i>jan.nijtmans added on 2012-08-07 07:50:04 UTC:</i><br />
  Thanks, Jos, for your files.

  Please verify that everything is correct now.


tkt_uuid: 751477d14272e9cf114225ff316f5cbe414bc13c
type: Code_Defect
status: Closed
subsystem: tdbc::odbc
priority: Immediate
severity: Severe
foundin: trunk 2012/08/01
private_contact: 668a819fc68ae3df87285ba92d1fd8ef824e2d2b
resolution: Overcome_By_Events
title: Problem with MS SQL SERVER (via tdbcodbc) stored procedures
comment:
  (Submitted on behalf of a colleague - also mailed to the 'tcl-tdbc' list but that mail doesn't seem to have come through?)

  I am using tdbc's odbc driver to work with an MS SQL Server (2008) database.  I have run into a problem when writing code to create a stored procedure, specifically w.r.t. the syntax for a procedure's parameters.  SQL Server's "CREATE PROCEDURE" syntax (http://msdn.microsoft.com/en-us/library/ms187926%28v=sql.100%29.aspx) requires that a procedure's parameters be declared using the @ symbol preceding the name, e.g. @myvar
  Just doing this results in the connection's prepare method returning a statement whose params method returns a dict that has all of the stored procedure's parameters as bound variables.  If I precede the parameter specifications with an underscore then the params dict does not contain the parameters, they are not seen as bound variables (b.t.w. this is undocumented) but when executing the statement fails due to the sql command still having the underscore.  See examples below.

  Thanks
  Douglas

  <verbatim>
  (tools) 5 %   set con_str {Driver=SQL Server Native Client 10.0;Server=127.0.0.1\SQLEXPRESS;DATABASE=TDBC;UID=builder;PWD=bob;}
  Driver=SQL Server Native Client 10.0;Server=127.0.0.1\SQLEXPRESS;DATABASE=TDBC;UID=builder;PWD=bob;
  (tools) 6 % tdbc::odbc::connection create my_mssql_con $con_str
  ::my_mssql_con
  (tools) 7 % set sql_stmt {
  >   CREATE PROCEDURE [ESS].[sp_commitsinsert]
  >     @commitRef nchar(64),
  >     @streamId int,
  >     @lastCommitId int,
  >     @events nchar(64),
  >     @metadata nchar(64) = NULL,
  >     @snapshot nchar(64) = NULL
  >   AS
  >     IF EXISTS (SELECT 1 FROM [ESS].[t_streams_myStore] s WHERE s.streamId = @streamId AND s.lastCommitId != @lastCommitId)
  >       RAISERROR('Concurrency exception', 0, 0)
  >     ELSE
  >       INSERT INTO [ESS].[t_commits_myStore] (commitRef, streamId, lastCommitId, events, metadata, snapshot)
  >       VALUES (@commitRef, @streamId, @lastCommitId, @events, @metadata, @snapshot)
  > }

    CREATE PROCEDURE [ESS].[sp_commitsinsert]
      @commitRef nchar(64),
      @streamId int,
      @lastCommitId int,
      @events nchar(64),
      @metadata nchar(64) = NULL,
      @snapshot nchar(64) = NULL
    AS
      IF EXISTS (SELECT 1 FROM [ESS].[t_streams_myStore] s WHERE s.streamId = @streamId AND s.lastCommitId != @lastCommitId)
        RAISERROR('Concurrency exception', 0, 0)
      ELSE
        INSERT INTO [ESS].[t_commits_myStore] (commitRef, streamId, lastCommitId, events, metadata, snapshot)
        VALUES (@commitRef, @streamId, @lastCommitId, @events, @metadata, @snapshot)

  (tools) 8 % set stmt [my_mssql_con prepare $sql_stmt]
  ::oo::Obj22::Stmt::1
  (tools) 9 % set param_dict {}
  (tools) 10 % set param_dict [$stmt params]
  commitRef {name commitRef direction in type wvarchar precision 255 scale 0}
    streamId {name streamId direction in type wvarchar precision 255 scale 0} 
    lastCommitId {name lastCommitId direction in type wvarchar precision 255 scale 0} 
    events {name events direction in type wvarchar precision 255 scale 0} 
    metadata {name metadata direction in type wvarchar precision 255 scale 0} 
    snapshot {name snapshot direction in type wvarchar precision 255 scale 0}
  (tools) 11 % set args {}
  (tools) 12 % foreach v_name [dict keys $param_dict] arg $args {
  >   if { ($v_name ne {}) && ([dict get $param_dict $v_name direction] ne "out") } {
  >     dict set param_dict $v_name $arg
  >   }
  > }
  (tools) 13 % puts $param_dict
  commitRef {} streamId {} lastCommitId {} events {} metadata {} snapshot {}
  (tools) 14 % set resultset [$stmt execute $param_dict]
  [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near the keyword 'PROCEDURE'.
  [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could not be prepared.
  (executing the statement)
  (tools) 15 %
  (tools) 15 %
  (tools) 15 % set sql_stmt {
  >   CREATE PROCEDURE [ESS].[sp_commitsinsert]
  >     _@commitRef nchar(64),
  >     _@streamId int,
  >     _@lastCommitId int,
  >     _@events nchar(64),
  >     _@metadata nchar(64) = NULL,
  >     _@snapshot nchar(64) = NULL
  >   AS
  >     IF EXISTS (SELECT 1 FROM [ESS].[t_streams_myStore] s WHERE s.streamId = _@streamId AND s.lastCommitId != _@lastCommitId)
  >       RAISERROR('Concurrency exception', 0, 0)
  >     ELSE
  >       INSERT INTO [ESS].[t_commits_myStore] (commitRef, streamId, lastCommitId, events, metadata, snapshot)
  >       VALUES (_@commitRef, _@streamId, _@lastCommitId, _@events, _@metadata, _@snapshot)
  > }

    CREATE PROCEDURE [ESS].[sp_commitsinsert]
      _@commitRef nchar(64),
      _@streamId int,
      _@lastCommitId int,
      _@events nchar(64),
      _@metadata nchar(64) = NULL,
      _@snapshot nchar(64) = NULL
    AS
      IF EXISTS (SELECT 1 FROM [ESS].[t_streams_myStore] s WHERE s.streamId = _@streamId AND s.lastCommitId != _@lastCommitId)
        RAISERROR('Concurrency exception', 0, 0)
      ELSE
        INSERT INTO [ESS].[t_commits_myStore] (commitRef, streamId, lastCommitId, events, metadata, snapshot)
        VALUES (_@commitRef, _@streamId, _@lastCommitId, _@events, _@metadata, _@snapshot)

  (tools) 16 % set stmt [my_mssql_con prepare $sql_stmt]
  ::oo::Obj22::Stmt::2
  (tools) 17 % set param_dict {}
  (tools) 18 % set param_dict [$stmt params]
  (tools) 19 % set args {}
  (tools) 20 % foreach v_name [dict keys $param_dict] arg $args {
  >   if { ($v_name ne {}) && ([dict get $param_dict $v_name direction] ne "out") } {
  >     dict set param_dict $v_name $arg
  >   }
  > }
  (tools) 21 % puts $param_dict

  (tools) 22 % set resultset [$stmt execute $param_dict]
  [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near '_@commitRef'.
  [Microsoft][SQL Server Native Client 10.0][SQL Server]Statement(s) could not be prepared.
  (executing the statement)
  (tools) 23 %
  </verbatim>

  <hr /><i>anonymous claiming to be twylite added on 2012-11-16 11:41:01 UTC:</i><br />
  While pushing TEA build scripts for tdbcodbc I seem to have accidentally pushed the branch 'td-prism-tokenise-mod' as well, which contains our fix for this problem (which is to remove the special behaviour of '@' in tdbcTokenize.c).

  <hr /><i>kbk added on 2012-11-16 20:51:22 UTC:</i><br />
  This problem is reported against ODBC specifically and is being closed out from the main repository in the repository split.


tkt_uuid: dde9dbcb64ecb86e577f09d8603dc493f179f7e2
type: Build_Problem
status: Closed
subsystem: not_specified
priority: Immediate
severity: Important
foundin: trunk 2012/11/16
private_contact: 668a819fc68ae3df87285ba92d1fd8ef824e2d2b
resolution: Overcome_By_Events
title: No Windows makefile.vc for tdbc-odbc
comment:
  There is no makefile.vc for TDBC-ODBC, so Windows builds are not possible without Mingw32/Cygwin.  

  Proposed makefile.vc and supporting files committed to branch td-win-tea.

  <hr /><i>kbk added on 2012-11-16 20:52:24 UTC:</i><br />
  This problem is ODBC-specific and is being closed out from the main repository.

  <hr /><i>oehhar added on 2012-11-27 16:22:06 UTC:</i><br />
  But where is the place to commit odbc-related issues ?
  I have also prepared a makefile.vc and are quite happy with it.
  Thank you,
  Harald


tkt_uuid: e226dbc23c0bb81a724c20fa7f60a1b50c387ddb
type: Build_Problem
status: Closed
subsystem: tdbc
priority: Immediate
severity: Important
foundin: 1.0.0
private_contact: 0f366eb3e9e2fcab52b8ebacd197db9047186a5f
resolution: Overcome_By_Events
title: tdbc win/makefile.vc does not install development files
comment:
  When trying to compile tdbc::odbc with msvc, I found the following issues in
  win\makefile.vc:

    *  stub library is not installed
    *  there are two rules for <b>pkgIndex.tcl</b>: No issue, but leads to a make warning
    *  header files are not installed
    *  <b>tdbcConfig.sh</b> is incorrect and not installed

  The following patch cures all of them:
    *  stub library is copied to the same location as the <b>tdbc100.dll</b>.
    *  header files are copied to the tcl include folder.
    The destination folder is build as: <b>$(_INSTALLDIR)\..\include</b>
    *  <b>tdbcConfig.sh</b> is installed to the same location as <b>tdbc100.dll</b>.
    Within the generated <b>tdbcconfig.sh</b> file, the build locations are not usable, because they use relative paths.
    There is one slash which should be a backslash, hardcoded in <b>tclconfig.sh.in</b>.
    
  I would appreciate, if someone could verify, if this is correct and if I used the
  desired path names.

  Thank you,
  Harald

  <verbatim>
  ---makefile.vc.patch---
  --- C:/test/tcl8.6.0/pkgs/tdbc1.0.0/win/makefile_ori.vc	Fri Nov 23 22:46:02 2012
  +++ C:/test/tcl8.6.0/pkgs/tdbc1.0.0/win/makefile.vc	Tue Nov 27 13:38:26 2012
  @@ -227,7 +227,7 @@
   BIN_INSTALL_DIR		= $(PRJ_INSTALL_DIR)
   DOC_INSTALL_DIR		= $(PRJ_INSTALL_DIR)
   SCRIPT_INSTALL_DIR	= $(PRJ_INSTALL_DIR)
  -INCLUDE_INSTALL_DIR	= $(_TCLDIR)\include
  +INCLUDE_INSTALL_DIR	= $(_INSTALLDIR)\..\include
   
   ### The following paths CANNOT have spaces in them.
   GENERICDIR	= $(ROOT)\generic
  @@ -462,22 +462,22 @@
   @TCL_VERSION@         $(TCL_DOTVERSION)
   <<
   
  -$(OUT_DIR)\pkgIndex.tcl: $(ROOT)\pkgIndex.tcl.in
  -	@nmakehlp -s << $** > $@
  -
  -	type << > $@
  -if {[catch {package require Tcl 8.5}]} return
  -package ifneeded $(PROJECT) $(DOTVERSION) \
  - [list load [file join $$dir $(PRJLIBNAME)] $(PROJECT)]
  -<<
  +.PHONY: $(OUT_DIR)\tdbcConfig.sh
   
   $(OUT_DIR)\tdbcConfig.sh: $(ROOT)\tdbcConfig.sh.in
   	nmakehlp -s << $** > $@
  -@TDBC_LIB_SPEC@              $(PRJLIBNAME)
  -@TDBC_STUB_LIB_SPEC@         $(PRJLIBNAME)
  -@TDBC_INCLUDE_SPEC@          -I$(LIB_INSTALL_DIR)
  -@TDBC_PRIVATE_INCLUDE_SPEC@  -I$(LIB_INSTALL_DIR)
   @PACKAGE_VERSION@            $(DOTVERSION)
  +@PKG_LIB_FILE@               $(PRJLIBNAME)
  +@tdbc_LIB_SPEC@              $(LIB_INSTALL_DIR)\$(PRJLIBNAME)
  +@PKG_STUB_LIB_FILE@          $(PRJSTUBLIBNAME)
  +@tdbc_BUILD_STUB_LIB_SPEC@   $(PRJSTUBLIB)
  +@tdbc_STUB_LIB_SPEC@         $(LIB_INSTALL_DIR)\$(PRJSTUBLIBNAME)
  +@tdbc_BUILD_STUB_LIB_PATH@   $(PRJSTUBLIB)
  +@tdbc_STUB_LIB_PATH@         $(LIB_INSTALL_DIR)\$(PRJSTUBLIBNAME)
  +@tdbc_SRC_DIR@               $(ROOT)
  +@tdbc_INCLUDE_SPEC@          -I$(INCLUDE_INSTALL_DIR)
  +@tdbc_BUILD_INCLUDE_SPEC@    -I$(GENERICDIR)
  +@tdbc_LIB_DIR@               $(LIB_INSTALL_DIR)
   <<
   
   $(TMP_DIR)\tdbcStubLib.obj : $(GENERICDIR)\tdbcStubLib.c
  @@ -495,12 +495,17 @@
   	@echo Installing binaries to '$(SCRIPT_INSTALL_DIR)'
   	@if not exist "$(SCRIPT_INSTALL_DIR)" mkdir "$(SCRIPT_INSTALL_DIR)"
   	@$(CPY) $(PRJLIB) "$(SCRIPT_INSTALL_DIR)" >NUL
  +	@$(CPY) $(PRJSTUBLIB) "$(LIB_INSTALL_DIR)" >NUL
   
  -install-libraries: $(OUT_DIR)\pkgIndex.tcl
  +install-libraries: $(OUT_DIR)\pkgIndex.tcl $(OUT_DIR)\tdbcConfig.sh
   	@echo Installing libraries to '$(SCRIPT_INSTALL_DIR)'
   	@if exist $(LIBDIR) $(CPY) $(LIBDIR)\*.tcl "$(SCRIPT_INSTALL_DIR)"
   	@echo Installing package index in '$(SCRIPT_INSTALL_DIR)'
   	@$(CPY) $(OUT_DIR)\pkgIndex.tcl "$(SCRIPT_INSTALL_DIR)"
  +	@$(CPY) $(OUT_DIR)\tdbcConfig.sh "$(SCRIPT_INSTALL_DIR)"
  +	@echo Installing header files in '$(INCLUDE_INSTALL_DIR)'
  +	@$(CPY) "$(GENERICDIR)\tdbc.h"      "$(INCLUDE_INSTALL_DIR)\"
  +	@$(CPY) "$(GENERICDIR)\tdbcDecls.h" "$(INCLUDE_INSTALL_DIR)\"
   
   install-docs:
   	@echo Installing documentation files to '$(DOC_INSTALL_DIR)'
  </verbatim>


tkt_uuid: 10f9e9c16250b35359a9d6bc184e8b8781dd6cd9
type: Code_Defect
status: Closed
subsystem: not_specified
priority: Immediate
severity: Important
foundin: 1dcee1f65f
private_contact: 0f366eb3e9e2fcab52b8ebacd197db9047186a5f
resolution: Overcome_By_Events
title: tdbc::odbc makefile.vc requires TCL_VERSION_REQ
comment:
  Thank you, Twilite, for the tdbc::odbc makefile

  IMHO the macro <b>TCL_VERSION_REQ</b> is required to build the <b>pkgConfig.sh</b> file.

  Here is a possible patch:
  <verbatim>
  --- C:/test/TDBC1.0/tdbcodbc/win/makefile_twilite.vc	Tue Nov 27 17:24:46 2012
  +++ C:/test/TDBC1.0/tdbcodbc/win/makefile_twilite_n.vc	Tue Nov 27 17:29:49 2012
  @@ -177,6 +177,9 @@
   !if [echo DOTVERSION = \>> versions.vc] \
      && [nmakehlp -V ..\configure.in AC_INIT >> versions.vc]
   !endif
  +!if [echo TCL_VERSION_REQ = \>> versions.vc] \
  +   && [nmakehlp -V ..\configure.in TCL_VERSION_REQ >> versions.vc]
  +!endif
   !include "versions.vc"
   
   VERSION         = $(DOTVERSION:.=)
  </verbatim>

  Eventually, you could also adjust path management to the patch of this ticket: e226dbc23c
  It may eventually be used to locate the header files and stub lib of tdbc.

  Thank you,
  Harald


