Age | Commit message (Collapse) | Author |
|
SPRINTF_FIXED().
|
|
snprintf_add().
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
Check the lost connection
1. at the beginning of ODBC APIs.
2. at the beginning of FE-BE communications using extended protocol.
|
|
|
|
|
|
Also handle return values properly.
Now passes odbc-escapes-test.
|
|
error. Also make a check for disconnected connections.
|
|
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.
|
|
version >= 9.3. We are now able to handle > 2GB BLOBs.
|
|
Now default isolation level is server's default instead of fixed SQL_TXN_READ_COMMITTED.
Also reduced the number of round trips using multiple commands.
|
|
messages only when error messages are not set.
|
|
Patch by Tsunakawa,Takayuki.
|
|
For sake of tidiness.
|
|
|
|
|
|
|
|
Takayuki.
|
|
When sending the query to the server, need to use the number of parameters
calculated by build_libpq_bind_params(), which excludes the OUT parameter,
rather than the original number of parameters. The branch that executes
an already prepared statement got this right.
There was one test query for the CALL syntax already, but it was commented
out, because it doesn't work for unrelated issues. Add a simpler test case
that does work.
This was broken by commit e6d7ded, in version 09.03.0400. The code was
heavily refactored in commit e85fbb24, but that refactoring failed to fix
this issue.
Reported by Haribabu Kommi.
|
|
If the server returned an error longer than 4096 bytes, we would overrun
the buffer by two bytes. If you're unlucky, that could lead to a crash,
and it consistently did on Windows.
Per report from Andrus Moor.
|
|
Add test case for the same.
|
|
Use protocol v3 Parse instead, even in UseServerSidePrepare=0 mode.
Remove the DisallowPremature config option.
|
|
I'm hoping that this silences a Coverity warning, making it realize that
none of the strings in the array are longer than 5 bytes.
|
|
A few were real bugs, although highly unlikely ones. Others were false
positives like dead code, but let's be tidy.
|
|
While we're at it, fix spelling of the error messages.
Clang static analyzer complained.
|
|
* Simplify the way the ignore-round-trip-time config option works. (No need
for the caller of CC_send_query_append to pass it as argument,
CC_send_query_append can look at the options in the connection object
itself)
* remove unnecessary local variable used for "fetch" constant.
* remove unused FLGP_BUILDING_PREPARE_STATEMENT flag.
* remove unused parameter, and check for stmt==NULL, from QB_Initialize.
* inline process_statements function into its only caller.
|
|
* Mark functions used only in same file as static.
* Remove unused 'encoding' argument from msgtowstr and wstrtoms (all
callers passed NULL).
* Silence remaining compiler warnings on 64-bit Windows about assigning
size_t to int without cast.
* Remove superfluous FORMAT_INT4/FORMAT_UINT4 defines.
* Remove useless dollar_quote argument from findTag (it was always '$'), and
add comment.
* Turn OID_NAME into a #define, to avoid a useless sprintf.
* Turn the mapFuncs array into structs, for clarity, and add comment.
|
|
libpq_bind_and_exec fetched a pointer to the statement's plan name to a
local variable, but then called prepareParameters which free'd it, and
allocated a new plan name. The already-free'd name was then passed to
PQexecParams().
Spotted by valgrind
|
|
In the big libpq patch, I accidentally removed the line where
current_exec_param was reset to 0. It's still required (which is a very
fiddly way to pass that value to ParseAndDescribeWithLibpq, but let's live
with it for now..)
|
|
Remove local variable that was never used for anything real (just passed as
NULL to mylog/qlog). Replace with real query in the logs, and add some extra
logging.
|
|
We haven't supported a segmented memory model for ages, probably never.
|
|
|
|
We used to always send 0 as the parameter type, which means that the server
should deduce the datatype from the context. That usually works well, but
we can do better. Sometimes there is ambiguity, like in "SELECT '555' > ?".
If the parameter is bound as a string, '6' would return true, but if it's
bound as an integer, it returns false.
When the application calls SQLBindParameter, it specifies the datatype, so
we should make use of that.
Add a test case for the "SELECT '555' > ?" case.
|
|
|
|
Instead of speaking the frontend/backend protocol directly, use libpq's
functions for executing queries. This makes it libpq a hard dependency, but
removes direct dependencies to SSL and SSPI, and a lot of related code.
|
|
Older versions have been obsolete for a very long time by now. Removing the
support lets us get rid of a lot of code that no-one has in practice been
even compiling for a long time.
Michael Paquier
|
|
PostgreSQL added support for protocol version 3 in server version 7.4.
There's no need to support servers older than that. This simplifies the
code a lot, removing a lot of corner cases that haven't been properly
regression tested for a long time anyway.
Original patch by me, with some tweaks by Michael Paquier.
|
|
descriptor.c(h) was broken by the commit
2da1668f4c7d7871a7212db10af606a7e646abd6
and it now causes a crash bug.
Instead of reverting the change revising the stuff completely.
|
|
reported by John Smith.
|
|
|
|
This is a similar bug that was fixed in commit 22b151eb. Some functions
reset conn->sock to NULL on a socket error, so we must not keep a copy of
it in a local variable. Also, SOCK_get_id should check for NULL argument
like all the rest of the SOCK_get/put_* functions.
|
|
|
|
1. NOTICE messages were not delivered to the application, if they arrived
as response to the DECLARE CURSOR statement.
2. Array-bound parameters on SELECT-queries caused a "cursor already open"
error.
These bugs were found by running the regression suite with
UseDeclareFetch=1. It's now clean.
|
|
Make whitespace and indentation more consistent in SQL_API function
declarations.
|
|
This also changed the file permissions stored in git for a couple of header
files, removing the executable bit. Didn't realize they were different from
all the others, but apparently my editor decided to change them. Now
they're the same as all the other files, which seems good.
Michael Paquier and me.
|
|
Commit 2f4f8eabf6ce685c38d69da3e98132b77d38d188 added ENTER/LEAVE_CRIT_CS
calls in SC_set_prepared, as a belt-and-suspenders fix for the race condition
already fixed by commit 7065a7af196bb09f80beddce82fa728c8a6dfcba. But it
didn't take a NULL connection into account.
|