Differences From Artifact [023963b990]:
- File tdbcmysql/generic/tdbcmysql.c — part of check-in [20ac2ee4ea] at 2010-04-30 15:08:44 on branch trunk — 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> (user: kennykb size: 102325)
To Artifact [f551b9b7cf]:
- File tdbcmysql/generic/tdbcmysql.c — part of check-in [e5d0f8236e] at 2010-05-10 19:47:34 on branch trunk — Fixed build failures for various unix platforms (c89 violations, bogus creation of stub libraries in driver Makefile) (user: andreask size: 102348)
| ︙ | |||
1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 | 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 | + - + |
return TCL_ERROR;
}
}
/* Timeout */
if (timeout != 0) {
int result;
Tcl_Obj* query = Tcl_ObjPrintf("SET SESSION WAIT_TIMEOUT = %d\n",
timeout);
Tcl_IncrRefCount(query);
|
| ︙ | |||
1926 1927 1928 1929 1930 1931 1932 1933 1934 | 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 | + + - - - + |
Tcl_InitHashTable(&names, TCL_STRING_KEYS);
if (result != NULL) {
unsigned int fieldCount = mysql_num_fields(result);
MYSQL_FIELD* fields = mysql_fetch_fields(result);
unsigned int i;
char numbuf[16];
for (i = 0; i < fieldCount; ++i) {
int new;
int count = 1;
Tcl_Obj* nameObj = Tcl_NewStringObj(fields[i].name,
fields[i].name_length);
|
| ︙ |