summaryrefslogtreecommitdiff
path: root/test/src
AgeCommit message (Collapse)Author
2024-08-11Implementation of SQLSetDescRec & SQLGetDescRec functions (#23)Hunaid Sohail
* Implemented SQLSetDescRec function - Fixed SQL_DESC_PRECISION field in IPDSetField & IPDGetField functions - Added support for other fields for bookmark column in ARDSetField - SQL_DESC_TYPE - SQL_DESC_DATETIME_INTERVAL_CODE - SQL_DESC_OCTET_LENGTH - SQL_DESC_PRECISION - SQL_DESC_SCALE * Implemented SQLGetDescRec function - Handled SQL_NO_DATA case in GetField functions - Handled 01004 SQLSTATE in GetField functions - Added support for SQL_DESC_NAME & SQL_DESC_NULLABLE IPDGetField functions * Implemented SQLGetDescRecW & SQLSetDescRecW functions - Updated PGAPI_GetFunctions function to get new functions - Updated psqlodbc.def file for new functions on Windows - Fixed HY007 error handling * Added regression test for DescRec functions
2024-05-24Fixed bugs, reported in issue #8. (#25)Alexandr Kuznetsov
* Fixed bugs, reported in issue #8. Bunch of memory leaks, occuring in tests. One heap-buffer-overrun in read operation at convert.c:3162. Two memory leaks, detected by my unit tests: password, conn_settings, pqopt fields overwrite if their values provided by both, system config and connstring. Restored reference counting lifetime managment of COL_INFO objects. Some minor cosmetic changes. Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one> * Minor cosmetic changes. Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one> * Forgot set col_info to NULL in TABLE_INFO object while clearing it. Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one> * Fixing comments. Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one> --------- Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
2023-06-23Define TRUE and FALSE for regression tests in case they aren't defined.Hiroshi Inoue
2023-06-23Bug fix: SQLColAttribute returns wrong column name - In some circumstances ↵Adrian Grucza
it was returning a name from the previous result
2023-06-23Prevent cursors being closed prematurelyAdrian Grucza
2022-12-23Enable SQLColumnPrivileges functionality.Hiroshi Inoue
Add a regression test for SQLColumnPrivileges().
2022-11-30Fix FetchRefcursors issues 1. Fix crash if error occurs when fetching ↵Adrian Grucza
noninitial refcursor 2. Fix error when fetching NULL refcursor 3. Return empty result if all refcursors are NULL
2021-06-07Suppress compiler warnings.Hiroshi Inoue
2021-05-26Named parameter binding supportAdrian Grucza
2021-05-26The commit 2e67af added a new ansi test dsn psqlodbc_test_dsn_ansi_debug. So ↵Hiroshi Inoue
change the way how to determine ansi test driver.
2021-05-26Suppress compiler warnings.Hiroshi Inoue
2021-05-25Support fetching results from multiple refcursors * Multiple result sets are ↵Adrian Grucza
returned if multiple refcursors are found * Works with both ODBC CALL and PostgreSQL CALL syntaxes * Query must be executed in a transaction to avoid cursors being closed * Now works when output parameters are present * Added fetch-refcursors regression test
2021-04-21Add a *update returning* test case to insertreturning regression test.Hiroshi Inoue
The diff of the result was reported by Patrick Cheung and will be fixed in the later commit.
2021-04-21Add a call for SQLDescribeCol() before SQLExecute() to prepare-test.Hiroshi Inoue
The diff of the result was reported by Mangold Fabian and will be fixed in the later commit.
2020-11-19fixed C99 mode.Hiroshi Saito
2020-06-18Fix a compilation error in cygwin.Hiroshi Inoue
2020-05-23Suppress a warning.Hiroshi Inoue
2020-05-20Add regression test for batch execution.Hiroshi Inoue
2019-12-16Flush stdout before exiting.Hiroshi Inoue
2019-11-08Fix result-conversions regression test.Hiroshi Inoue
1. Remove tests for abstime type because the type was removed in PG12. 2. Update results for PG12's new floating point output format. Results for old floating point output format were moved to result-conversions_2.out and result-conversions_3.out.
2019-10-04Silence some compiler warnings.Hiroshi Inoue
2019-05-19Bug fix: don't forget to set parameter numbers while handling escaped ODBCHiroshi Inoue
functions. Report and patch by Grant Shirreiffs.
2018-05-23Fix compiler warnings in i386-linux-gnu.Hiroshi Inoue
2018-05-23Call AC_CHECK_SIZEOF(long int) in configure.ac and always place config.h ↵Hiroshi Inoue
before sql....h. Due to this change, sqltypes.h of unixODBC can recognize SIZEOF_LONG_INT used in psqlodbc driver.
2018-05-23Fix compiler warnings.Hiroshi Inoue
2018-05-17Reduce DB access to pg_class or pg_index by caching relhasoids, ↵Hiroshi Inoue
relhassubclass etc. It would improve the performance of SQLSetPos() or SQLBulkOperations() very much in some cases. Per report from Takayuki Tsunakawa.
2018-03-26Modify positioned-update-test.Hiroshi Inoue
1. Add a SQLSetPos(.., SQL_REFRESH, ..) call so that the test passes SC_pos_reload(). 2. Add a primary key to pos-update-test table(KEYSET-DRIVEN cursor needs non null int4/oid unique key). 3. Add expected/positioned-update-test_1.out for KEYSET-DRIVEN cursors.
2017-09-13Remove the "unknown" column from colattribute-test regression test.Hiroshi Inoue
Because there's no "unknown" output column in PG10 servers, it seems meaningless to test "unknown" case.
2017-09-12Handle PG 10 identity columns.Hiroshi Inoue
2017-08-19Add a test case to parse-test.Hiroshi Inoue
2017-08-19Fix catalogfunctions-test. The output of catalogfunctions-test was changed ↵Hiroshi Inoue
along with the change of parse-test.
2017-08-19Add 2 test cases to parse-test which handles '$'s in identifiers.Hiroshi Inoue
2017-08-18Add more test cases to parse-test.Hiroshi Inoue
2017-08-18Add a test case for parse-test.Hiroshi Inoue
2017-07-23Specify the size of query[].Hiroshi Inoue
It is neccesary because the strings are appended later.
2017-07-22Modify wchar-char test so that it handles parameters which are not properly ↵Hiroshi Inoue
null-terminated.
2017-06-05Modify cursor-block-delete-test so that the test runs without the ↵Hiroshi Inoue
specification of UseDeclareFetch option. Also change the cursor type from SQL_CURSOR_STATIC to SQL_CURSOR_KEYSET_DRIVEN though the type is changed to SQL_CURSOR_STATIC with UseDeclareFetch option.
2017-05-11Reorganize the language conversion between the current locale and unicode.Hiroshi Inoue
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.
2017-04-27Handle the case locale is 'C' in wchar-char-test.Hiroshi Inoue
2017-04-27exit(0) instead of exit(1).Hiroshi Inoue
2017-04-26Add fflush(stdout).Hiroshi Inoue
2017-04-24Review the handling of OUTPUT parameters in SQLProcedureColumns().Hiroshi Inoue
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.
2017-04-21Error out when SQLSetPos() skips updates.Hiroshi Inoue
2017-04-21Psqlodbc driver seems to skip repeated updates using SQLSetPos(.., ↵Hiroshi Inoue
SQL_UPDATE, ..). For the bug fix, modify positioned-update-test so that it includes repeated updates.
2017-04-20Fix a crash bug introduced by the previous commit.Hiroshi Inoue
2017-04-20Add an environment variable which defines a common connection string for ↵Hiroshi Inoue
regression test. Switch declare/fetch mode in Windows regression test using this functionality.
2017-04-02Rename the dsn for ANSI regression test from psqlodbc_test_dsna to ↵Hiroshi Inoue
psqlodbc_test_dsn_ansi.
2017-04-02Handle locales in non-Windows platforms and overhaule the language system.Hiroshi Inoue
2017-03-31Modify wchar-char test a little.Hiroshi Inoue
2017-03-30Add a new test case wchar-char-test.Hiroshi Inoue