Hiroshi Inoue [Wed, 24 May 2017 02:13:40 +0000 (11:13 +0900)]
Remove ConnInfo.drivers.onlyread and ConnInfo.drivers.conn_settings.
They are rather confusing and we can use ConnInfo.onlyread and ConnInfo.conn_settings.
Hiroshi Inoue [Sat, 20 May 2017 05:04:48 +0000 (14:04 +0900)]
Removed an external variable "globals".
Also removed driver_optionsProc().
Use getDriverNameFromDSN() for unixODBC as well as Windows.
Hiroshi Inoue [Mon, 22 May 2017 10:47:08 +0000 (19:47 +0900)]
Remove unused variables.
Hiroshi Inoue [Tue, 16 May 2017 09:57:39 +0000 (18:57 +0900)]
Remove the stuff about Debug and Commlog from getCommonDefaults().
Now per connection Debug/Commlog info are handled in getDSNinfo().
Global Debug/Commlog info are get/set using functions get(set)GlobalDebug(Commlog)().
Hiroshi Inoue [Mon, 15 May 2017 11:32:56 +0000 (20:32 +0900)]
For the sake of clarity #define DBMS_NAME in psqlodbc.h instead of specifying MSBuild parameters.
Hiroshi Inoue [Tue, 9 May 2017 04:10:26 +0000 (13:10 +0900)]
Implement SC_get_localtime() and reduce time()/localtime() calls.
Hiroshi Inoue [Tue, 2 May 2017 11:30:15 +0000 (20:30 +0900)]
Make a function setup_getdataclass() separating from long confusing if-block in convert_text_field_to_sql_c() and clarify the parameters. Also move the stuff which hanldles GetDataClass into convert_text_field_to_sql_c().
Provide functions get_terminator_len() and get_adjust_len() which
hide #ifdef UNICODE_SUPPORT ~ #endif.
Hiroshi Inoue [Wed, 26 Apr 2017 02:10:14 +0000 (11:10 +0900)]
Reorganize the language conversion between the current locale and unicode.
Support the platforms e.g. FreeBSD which satisfies __STDC_UTF_16__ (but not satify __STDC_ISO_10646__) using mbrtoc16() and c16rtomb().
Use the functions bindpara_msg_to_utf8(), bindpara_wchar_to_msg(),
bindcol_hybrid_estimate(), bindcol_hybrid_exec(), bindcol_localize_estimate()
and bindcol_localize_exec() which hide the difference of platforms instead of
platform specific functions. They are implemented using already implemented
wstrtomsg(), msgtowstr(), wcs_to_utf8(), utf8_to_wcs_lf() and newly implemented
mbstoc16_lf(), c16tomsb(), ucs4_to_ucs2_lf(), ucs2_to_ucs4().
Add eucJP encoding case to wchar-char test.
[Minor changes]
Add conversion error check between unicode and the current locale.
Rename buf to send_buf in ResolveOneParam() so that grep or find can them find easily.
Separate "unicode_support.h" from "psqlodbc.h"
Change convert_linefeeds() from static to external.
Add AC_CHECK_FUNCS(mbrtoc16 c16rtomb) to Makefile.am.
Remove win_unicode.c from psqlsetup.vcxproj.
Hiroshi Saito [Thu, 11 May 2017 14:25:23 +0000 (23:25 +0900)]
Prep release 09.06.0310.
Hiroshi Inoue [Wed, 10 May 2017 08:06:16 +0000 (17:06 +0900)]
Fix a crash bug when connecting from MSACCESS(Microsoft Jet) reported by Robert Ball. This occurs when MSACCESS(Jet) calls SQLConnectAttr(.., 30002, ..) => ucs2_to_utf8() and about to call mylog() with a NULL derefernced pointer parameter.
Hiroshi Saito [Sun, 7 May 2017 14:05:59 +0000 (23:05 +0900)]
Prep release 09.06.0300.
Hiroshi Saito [Sat, 29 Apr 2017 12:39:42 +0000 (21:39 +0900)]
add bat files for windows.
Hiroshi Inoue [Thu, 27 Apr 2017 12:26:54 +0000 (21:26 +0900)]
Handle the case locale is 'C' in wchar-char-test.
Hiroshi Inoue [Thu, 27 Apr 2017 11:56:18 +0000 (20:56 +0900)]
Fix a crash bug when the locale isn't set.
Hiroshi Inoue [Thu, 27 Apr 2017 08:22:02 +0000 (17:22 +0900)]
exit(0) instead of exit(1).
Hiroshi Inoue [Thu, 27 Apr 2017 02:16:14 +0000 (11:16 +0900)]
Set lc_messages='C' for regression test.
Hiroshi Inoue [Wed, 26 Apr 2017 22:54:10 +0000 (07:54 +0900)]
Add fflush(stdout).
Hiroshi Inoue [Wed, 26 Apr 2017 08:37:21 +0000 (17:37 +0900)]
Fix a compiler warning.
Hiroshi Inoue [Wed, 26 Apr 2017 08:15:23 +0000 (17:15 +0900)]
Use the same CPPFLAGS as well as CFLAGS/LDFLAGS to build regression tests as used to build driver.
Also uchar.h header checking for later use.
Hiroshi Inoue [Wed, 19 Apr 2017 11:06:42 +0000 (20:06 +0900)]
Review the handling of OUTPUT parameters in SQLProcedureColumns().
1. If there are OUT, INOUT or TABLE arguments, ignore RETURN values.
2. OUT parameters of functions with returning SETOF should be treated as SQL_RESULT_COL rather than SQL_PARAM_OUTPUT.
3. Also treat table output arguments as SQL_RESULT_COL because functions returning table are equivalent to using one or more OUT parameters plus marking the function as returning SETOF record (or SETOF a single output parameter's type).
Also add 5 test cases about SQLProcedureColumns to catalogfunctions-test.
Hiroshi Inoue [Sun, 23 Apr 2017 09:32:26 +0000 (18:32 +0900)]
Modify a message a little.
Hiroshi Inoue [Sun, 23 Apr 2017 05:43:18 +0000 (14:43 +0900)]
Correct the inappropriate use of set_nullfield_int2().
Hiroshi Inoue [Wed, 19 Apr 2017 02:45:16 +0000 (11:45 +0900)]
Don't reset the status of Keyset in case of updates.
This fixes the bug about repeated updates using SQLSetPos().
positioned-update-test now passes.
Hiroshi Inoue [Fri, 21 Apr 2017 08:03:50 +0000 (17:03 +0900)]
Error out when SQLSetPos() skips updates.
Hiroshi Inoue [Thu, 20 Apr 2017 09:38:45 +0000 (18:38 +0900)]
Psqlodbc driver seems to skip repeated updates using SQLSetPos(.., SQL_UPDATE, ..). For the bug fix, modify positioned-update-test so that it includes repeated updates.
Hiroshi Inoue [Thu, 20 Apr 2017 04:19:12 +0000 (13:19 +0900)]
Fix a crash bug introduced by the previous commit.
Hiroshi Inoue [Sun, 22 Jan 2017 12:05:14 +0000 (21:05 +0900)]
Add an environment variable which defines a common connection string for regression test. Switch declare/fetch mode in Windows regression test using this functionality.
Hiroshi Inoue [Wed, 12 Apr 2017 00:09:51 +0000 (09:09 +0900)]
Add __STDC_ISO_10646__ check to confirm that wchar_t means unicode.
Hiroshi Inoue [Mon, 3 Apr 2017 12:48:57 +0000 (21:48 +0900)]
It's bad to use lf_conv here.
Hiroshi Inoue [Sun, 2 Apr 2017 04:43:43 +0000 (13:43 +0900)]
Rename the dsn for ANSI regression test from psqlodbc_test_dsna to psqlodbc_test_dsn_ansi.
Hiroshi Inoue [Wed, 29 Mar 2017 09:27:20 +0000 (18:27 +0900)]
Handle locales in non-Windows platforms and overhaule the language system.
Hiroshi Inoue [Fri, 31 Mar 2017 07:42:11 +0000 (16:42 +0900)]
Modify wchar-char test a little.
Hiroshi Inoue [Sun, 26 Mar 2017 11:59:24 +0000 (20:59 +0900)]
Add a new test case wchar-char-test.
Hiroshi Inoue [Mon, 27 Mar 2017 09:48:28 +0000 (18:48 +0900)]
Remove #ifdef WIN_UNICODE_SUPPORT.
Hiroshi Inoue [Fri, 24 Mar 2017 23:00:20 +0000 (08:00 +0900)]
Make a function convert_text_field_to_sql_c() simply extracting from long confusing code and clarify the parameters for subsequent modifications.
Hiroshi Inoue [Sat, 25 Mar 2017 08:12:26 +0000 (17:12 +0900)]
Introduce locale_encoding which corresponds to the locale. For non-Windows platforms determine the locale encodings from the current locale.
Hiroshi Inoue [Fri, 24 Mar 2017 02:30:58 +0000 (11:30 +0900)]
Add #ifdef UNICODE_SUPPORT where there should be.
Hiroshi Inoue [Fri, 24 Mar 2017 06:53:32 +0000 (15:53 +0900)]
Stop using percent-encoding to store the conn_settings option in odbc.ini.
Hiroshi Inoue [Fri, 24 Mar 2017 03:43:34 +0000 (12:43 +0900)]
For Unicode drivers, when SQLConnect() or SQLDriverConnect() instead of SQLConnectW or SQLDriverConnectW is called, use the same client encoding as ANSI version of drivers use.
Hiroshi Inoue [Thu, 23 Mar 2017 08:36:12 +0000 (17:36 +0900)]
Change the max byte per char of UTF8 from 6 to 4. This affects the result of ANSI colattribute-test.
Hiroshi Inoue [Thu, 23 Mar 2017 08:59:42 +0000 (17:59 +0900)]
Modify odbcini-gen.sh so that it generates ANSI driver and dsn as well.
Hiroshi Inoue [Wed, 22 Mar 2017 10:12:21 +0000 (19:12 +0900)]
Generate psqlodbca.so(ANSI version of driver) as well as psqlodbca.so at once.
Hiroshi Inoue [Wed, 22 Mar 2017 04:37:09 +0000 (13:37 +0900)]
Revise the handling of client encoding so as not to forget the update of related items(ccsc or mb_maxbyte_per_char).
Hiroshi Inoue [Tue, 21 Mar 2017 11:52:07 +0000 (20:52 +0900)]
Simple implementation of get_environment_setting() on non-Windows platforms.
If the codeset part of the current locale is UTF8, set the client_encoding to 'UTF8'.
Take * set client_coding='...' * into account in check_client_coding().
Hiroshi Inoue [Mon, 20 Mar 2017 12:06:04 +0000 (21:06 +0900)]
Fix ansi version result-conversions-test on Windows.
Hiroshi Inoue [Mon, 20 Mar 2017 22:57:54 +0000 (07:57 +0900)]
Reflect the ANSI test dsn to reset-db.
Hiroshi Inoue [Mon, 20 Mar 2017 12:40:02 +0000 (21:40 +0900)]
Fix a compilation error and remove an ununed varaible.
Hiroshi Inoue [Mon, 20 Mar 2017 10:05:42 +0000 (19:05 +0900)]
Fix a dangling reference in CC_lookup_characterset() introduced by the commit
e85fbb2.
Hiroshi Inoue [Sun, 19 Mar 2017 13:00:41 +0000 (22:00 +0900)]
The 1st cut to add regression test for Windows Ansi drivers.
Hiroshi Inoue [Mon, 20 Mar 2017 01:06:14 +0000 (10:06 +0900)]
Remove unnecessary code from Unicode drivers.
Hiroshi Inoue [Mon, 20 Mar 2017 00:26:00 +0000 (09:26 +0900)]
Fix a bug about Unicode driver for ansi apps.
Hiroshi Inoue [Sun, 19 Mar 2017 06:04:47 +0000 (15:04 +0900)]
Fixes about SQLDescribeCol() or SQLColAttribute().
1. Report the size of constant strings using Unknown Sizes as Longest.
2. Correct the inconsistency between the sqltype of PG_TYPE_TEXT or PG_TYPE_UNKNOWN and the size in case of Unknown Sizes as Longeset.
Hiroshi Inoue [Sat, 18 Mar 2017 23:12:40 +0000 (08:12 +0900)]
Remove obsolete code in statement.c.
Hiroshi Inoue [Sat, 18 Mar 2017 07:04:55 +0000 (16:04 +0900)]
Use symbols defined in catfunc.h instead of literal column numbers in SQLGetTypeInfo(), SQLSpecialColumns() and SQLTablePrivileges().
Hiroshi Inoue [Sat, 18 Mar 2017 05:11:03 +0000 (14:11 +0900)]
Remove UNKNOWNS_AS_CATALOG of Unknown Sizes option.
Also remove test case in colattribute-test corresponding to UNKNOWNS_AS_CATALOG.
Hiroshi Inoue [Sat, 18 Mar 2017 01:41:06 +0000 (10:41 +0900)]
Revise the use of pgtype_xxxx() in catalog functions.
Replace pgtype_xxxx() whose 1st parameter is StatementClass with pgtype_attr_xxxx(). Also use macros for pgtype_xxxx() calls which have PG_ATP_UNSET, PG_ADT_UNSET or PG_UNKNOWNS_UNSET parameters.
Remove the use of PG_STATIC and UNKNOWNS_AS_DEFAULT.
Remove the test case in colattribute-test corresponding to UNKNOWNS_AS_DEFAULT. The test case was meaningless in the first place.
Hiroshi Inoue [Fri, 17 Mar 2017 11:21:16 +0000 (20:21 +0900)]
Revise the handling of show oid column and row versioning option.
Hiroshi Inoue [Wed, 15 Mar 2017 07:17:03 +0000 (16:17 +0900)]
Modify the code about UNKNOWNS_AS_LONGEST of the Unknown Sizes option so that it works properly.
Hiroshi Inoue [Thu, 16 Mar 2017 09:44:08 +0000 (18:44 +0900)]
Remove obsolete code in pgtypes.c.
Hiroshi Inoue [Thu, 16 Mar 2017 02:13:17 +0000 (11:13 +0900)]
Remove obsolete code in info.c.
Hiroshi Inoue [Mon, 13 Mar 2017 11:47:27 +0000 (20:47 +0900)]
For debug, implement SQLSet/GetConnectAttr() for some driver specific options.
Hiroshi Saito [Fri, 10 Mar 2017 15:14:15 +0000 (00:14 +0900)]
Prep release 09.06.0200
Hiroshi Inoue [Sat, 4 Mar 2017 12:45:47 +0000 (21:45 +0900)]
Stop specifying parameter datatype oids in parse message. Unfortunately it is inflexible and rather harmful. Though I don't know if it has much meaning, use cast instead just in order to keep regression test results.
It's not necessary to cast any more the 2nd parameter of {call a_b_c_d_e(?, ?, ?, ?, ?)} in odbc-escapes-test.
Hiroshi Inoue [Wed, 8 Mar 2017 03:54:16 +0000 (12:54 +0900)]
Fix regression test failures in diagnostic-test.
Hiroshi Inoue [Wed, 8 Mar 2017 03:56:00 +0000 (12:56 +0900)]
Use 1/0 instead of TRUE/FALSE in test/src/odbc-escape-test.c.
TRUE/FALSE is not usable in some platforms.
Hiroshi Inoue [Sun, 5 Mar 2017 13:26:53 +0000 (22:26 +0900)]
Revise recent lost connection check.
Check the lost connection
1. at the beginning of ODBC APIs.
2. at the beginning of FE-BE communications using extended protocol.
Hiroshi Inoue [Sun, 5 Mar 2017 12:11:16 +0000 (21:11 +0900)]
Remove upgrade(_x64).bat.
It's useless anymore.
Hiroshi Inoue [Mon, 6 Mar 2017 03:22:02 +0000 (12:22 +0900)]
Oops the implementation of SC_set_error_if_not_set() is terribly wrong.
Hiroshi Inoue [Sun, 5 Mar 2017 04:22:50 +0000 (13:22 +0900)]
Make check of connection lost.
Hiroshi Inoue [Sat, 4 Mar 2017 12:33:57 +0000 (21:33 +0900)]
Handle output parameters properly in build_libpq_bind_params.
Also handle return values properly.
Now passes odbc-escapes-test.
Hiroshi Inoue [Sat, 4 Mar 2017 11:17:09 +0000 (20:17 +0900)]
The failure of libpq_bind_exec() which returns NULL doesn't mean a FATAL error. Also make a check for disconnected connections.
Hiroshi Inoue [Wed, 22 Feb 2017 05:13:56 +0000 (14:13 +0900)]
Modify odbc-escapes-test case. SQLExecDirect cases were added as well as SQLExecute after SQLPrepare ones. Currently odbc-escapes-test fails due to the following reason.
1. newly added {call a_b_c_d_e( .. fails in SQLExecDirect test case.
2. { = call concat( .. fails in both test cases.
It would be fixed by the next commit.
Hiroshi Inoue [Wed, 8 Feb 2017 08:35:35 +0000 (17:35 +0900)]
Start transactons first before calling SQLEndTran().
Hiroshi Inoue [Fri, 3 Feb 2017 02:12:07 +0000 (11:12 +0900)]
Run the diff against all expected output files and print the smallest diff.
Also clean up a couple of comments.
Hiroshi Inoue [Mon, 6 Feb 2017 13:48:06 +0000 (22:48 +0900)]
Oops I should have removed test/expected/deprecated_2.out but removed test/expected/deprecated_1.out by mistake.
Hiroshi Inoue [Tue, 24 Jan 2017 12:38:45 +0000 (21:38 +0900)]
Suppress a diff output of deprecated-test.
Hiroshi Inoue [Wed, 1 Feb 2017 03:16:46 +0000 (12:16 +0900)]
Use the same version number in buildBootstrapper.ps1 as buildInstaller.ps1 uses.
Hiroshi Saito [Thu, 2 Feb 2017 14:21:29 +0000 (23:21 +0900)]
missing include position..
Hiroshi Saito [Thu, 2 Feb 2017 13:50:20 +0000 (22:50 +0900)]
add def files.
Hiroshi Saito [Thu, 2 Feb 2017 13:46:55 +0000 (22:46 +0900)]
Ooops, lost psqlsetup.c
Hiroshi Saito [Thu, 2 Feb 2017 13:02:38 +0000 (22:02 +0900)]
change winbuild list of EXTRA_DIST.
Hiroshi Inoue [Thu, 2 Feb 2017 02:48:59 +0000 (11:48 +0900)]
Fix the expected output of catalogfunctions test on Windows.
Hiroshi Saito [Wed, 1 Feb 2017 13:43:12 +0000 (22:43 +0900)]
Oops, typo version.
Hiroshi Inoue [Wed, 1 Feb 2017 07:25:09 +0000 (16:25 +0900)]
Removed version number from the configuration template xml file.
Hiroshi Inoue [Wed, 1 Feb 2017 03:24:56 +0000 (12:24 +0900)]
getVersion already got $VERSION correctly.
Hiroshi Saito [Tue, 31 Jan 2017 15:33:30 +0000 (00:33 +0900)]
Prep relese 09.06.0100.
Hiroshi Inoue [Mon, 30 Jan 2017 05:50:17 +0000 (14:50 +0900)]
Change expected result of catalogfunctions-test according to the change of ByteaAsLongVarBinary's default.
Now bulkoperations-test under Use Declare/Fetch mode is available.
Hiroshi Inoue [Mon, 30 Jan 2017 03:47:17 +0000 (12:47 +0900)]
Just an improvement for testing.
Hiroshi Inoue [Mon, 30 Jan 2017 02:54:58 +0000 (11:54 +0900)]
Change the default of ByteaAsLongVarBinary from 0 to 1.
Hiroshi Inoue [Sun, 29 Jan 2017 11:51:32 +0000 (20:51 +0900)]
As tuple_updated item in AddUpdated(), the parameter should be used. Deriving from other items caused bad results.
Hiroshi Inoue [Sun, 29 Jan 2017 05:04:41 +0000 (14:04 +0900)]
Fix a compiltaion error and some warnings.
Hiroshi Inoue [Sun, 29 Jan 2017 06:37:45 +0000 (15:37 +0900)]
Fix a corner case when parsing connection strings enclosed with braces.
Hiroshi Inoue [Thu, 26 Jan 2017 10:00:14 +0000 (19:00 +0900)]
Parse connection strings enncloed with braces more correctly.
Hiroshi Inoue [Sat, 21 Jan 2017 01:34:20 +0000 (10:34 +0900)]
Add a new option 'pqopt' which specifies libpq connection parameters as a conninfo style string. The string must be enclosed with braces {} e.g. pqopt={sslcert=... sslkey=... sslrootcert=...} in the case of connection strings. Though host, port, dbname, user, password, sslmode, keepalives_idle or keepalive_interval parameters can be set using this option, they are ordinarily set by other options. When some settings for those parameters conflict with other ordinary options, connections are rejected.
Hiroshi Inoue [Tue, 8 Nov 2016 22:54:56 +0000 (07:54 +0900)]
a hack to handle boolean items in VBA with MS Access.
VBA seems to transform the where condition
a_boolean_item=True
into
("a_boolean_item" = 1)
which causes an ERROR:Operator does not exist boolean = integer .
Here transforms it into
("a_boolean_item"='1')
which seems safe in anyway.
Hiroshi Inoue [Mon, 23 May 2016 05:52:50 +0000 (14:52 +0900)]
Enable SQLBulkOperations in declare/fetch mode using long (>=12bytes) bookmarks.
Formerly the driver offered very simple bookmark support -- it is just
the current row number. Now the driver offers more verbose bookmarks which
contain KeySet informations (CTID (+ OID)). Though they consume 12bytes
(row number + CTID) or 16bytes (row number + CTID + OID), they are useful
in declare/fetch mode.
Hiroshi Inoue [Wed, 18 Jan 2017 05:35:10 +0000 (14:35 +0900)]
Oops I placed parameters of memset() in the wrong order.
Hiroshi Inoue [Sun, 15 Jan 2017 01:14:07 +0000 (10:14 +0900)]
Implement SQL_FECTH_BY_BOOKMARK operation of SQLBulkOperations properly.
Hiroshi Inoue [Sun, 15 Jan 2017 01:50:01 +0000 (10:50 +0900)]
Make some macros more safe.
Hiroshi Inoue [Thu, 12 Jan 2017 10:08:19 +0000 (19:08 +0900)]
Removed a duplicate definition.