pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedpsqlodbc - prepared statement crash
3+ messages / 2 participants
[nested] [flat]
* psqlodbc - prepared statement crash
@ 2019-07-26 13:56 Xuesong Gao <xgao@senturus.com>
0 siblings, 1 reply; 3+ messages in thread
From: Xuesong Gao @ 2019-07-26 13:56 UTC (permalink / raw)
To: pgsql-odbc
I am using MS ODBCTest tool for testing purpose here, and it crashed after I did following steps:
1. Full connect to DSN.
2. SQLPrepare: select city, ? as i from public.city where city = ?
3. SQLBindParameter: number 1, value type SQL_C_CHAR, parameter type SQL_CHAR, value 1;
4. SQLBindParameter: number 2, value type SQL_C_CHAR, parameter type SQL_CHAR, value Abha;
5. SQLExecute
* your ODBC driver version
Unicode x64, 9.06.05.00
* your PostgreSQL database version
PostgreSQL 10, sample database dvdrental
* any error messages you saw on the screen
messages in ODBCTest tool console:
Full Connect(Default)
Env. Attr. SQL_ATTR_ODBC_VERSION set to SQL_OV_ODBC3
Successfully connected to DSN 'dvdrental'.
SQLPrepare:
In: StatementHandle = 0x00000000047221C0, StatementText = "select city, ? as i from public.city where city = ...", TextLength = 51
Return: SQL_SUCCESS=0
SQLBindParameter:
In: StatementHandle = 0x00000000047221C0, ParameterNumber = 1, InputOutputtype = SQL_PARAM_INPUT=1, ValueType = SQL_C_CHAR=1,
ParameterType = SQL_CHAR=1, ColumnSize = 0, DecimalDigits = 0, ParameterValuePtr = "1", BufferLength = 0, StrLen_or_IndPtr = SQL_NTS=-3, SQL_LEN_DATA_AT_EXEC = FALSE,
Buffer Size = 600
Return: SQL_SUCCESS=0
SQLBindParameter:
In: StatementHandle = 0x00000000047221C0, ParameterNumber = 2, InputOutputtype = SQL_PARAM_INPUT=1, ValueType = SQL_C_CHAR=1,
ParameterType = SQL_CHAR=1, ColumnSize = 0, DecimalDigits = 0, ParameterValuePtr = "Abha", BufferLength = 0, StrLen_or_IndPtr = SQL_NTS=-3, SQL_LEN_DATA_AT_EXEC = FALSE,
Buffer Size = 600
Return: SQL_SUCCESS=0
* the debug log (mylog_????.log) file (you will have to enable the mylog driver option)
attached
[X]
Song X. Gao
Solutions Architect
Email xgao@senturus.com<mailto:xgao@senturus.com>
Mobile 732 406 6347
senturus.com<http://www.senturus.com/;
Attachments:
mylog_odbct32w_7728.log (application/octet-stream, 2.6K) download
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: psqlodbc - prepared statement crash
@ 2019-07-31 11:51 Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
parent: Xuesong Gao <xgao@senturus.com>
0 siblings, 1 reply; 3+ messages in thread
From: Inoue, Hiroshi @ 2019-07-31 11:51 UTC (permalink / raw)
To: Xuesong Gao <xgao@senturus.com>; +Cc: pgsql-odbc
Hi,
Sorry for the late reply.
You seem to turn on Mylog optipn of Global settings only.
Could you please turn on Mylog option of Advanced Options (DataSource)
as well?
I have a question.
What does "city = ..." of
StatementText = "select city, ? as i from public.city where city = ...",
mean?
regards,
Hiroshi Inoue
On 2019/07/26 22:56, Xuesong Gao wrote:
>
> I am using MS ODBCTest tool for testing purpose here, and it crashed
> after I did following steps:
>
> 1.Full connect to DSN.
>
> 2.SQLPrepare: select city, ? as i from public.city where city = ?
>
> 3.SQLBindParameter: number 1, value type SQL_C_CHAR, parameter type
> SQL_CHAR, value 1;
>
> 4.SQLBindParameter: number 2, value type SQL_C_CHAR, parameter type
> SQL_CHAR, value Abha;
>
> 5.SQLExecute
>
> * your ODBC driver version
>
> Unicode x64, 9.06.05.00
>
> * your PostgreSQL database version
>
> PostgreSQL 10, sample database dvdrental
>
> * any error messages you saw on the screen
>
> messages in ODBCTest tool console:
>
> Full Connect(Default)
>
> Env. Attr. SQL_ATTR_ODBC_VERSION set to SQL_OV_ODBC3
>
> Successfully connected to DSN 'dvdrental'.
>
> SQLPrepare:
>
> In: StatementHandle = 0x00000000047221C0, StatementText = "select
> city, ? as i from public.city where city = ...", TextLength = 51
>
> Return: SQL_SUCCESS=0
>
> SQLBindParameter:
>
> In: StatementHandle = 0x00000000047221C0, ParameterNumber = 1,
> InputOutputtype = SQL_PARAM_INPUT=1, ValueType = SQL_C_CHAR=1,
>
> ParameterType = SQL_CHAR=1, ColumnSize = 0, DecimalDigits = 0,
> ParameterValuePtr = "1", BufferLength = 0, StrLen_or_IndPtr =
> SQL_NTS=-3, SQL_LEN_DATA_AT_EXEC = FALSE,
>
> Buffer Size = 600
>
> Return: SQL_SUCCESS=0
>
> SQLBindParameter:
>
> In: StatementHandle = 0x00000000047221C0, ParameterNumber = 2,
> InputOutputtype = SQL_PARAM_INPUT=1, ValueType = SQL_C_CHAR=1,
>
> ParameterType = SQL_CHAR=1, ColumnSize = 0, DecimalDigits = 0,
> ParameterValuePtr = "Abha", BufferLength = 0, StrLen_or_IndPtr =
> SQL_NTS=-3, SQL_LEN_DATA_AT_EXEC = FALSE,
>
> Buffer Size = 600
>
> Return: SQL_SUCCESS=0
>
> * the debug log (mylog_????.log) file (you will have to enable the
> mylog driver option)
>
> attached
>
>
>
> *Song X. Gao*
> Solutions Architect
>
> Email xgao@senturus.com <mailto:xgao@senturus.com>
> Mobile 732 406 6347
> *senturus.com* <http://www.senturus.com/;
>
---
このメールは、AVG によってウイルス チェックされています。
http://www.avg.com
^ permalink raw reply [nested|flat] 3+ messages in thread
* RE: psqlodbc - prepared statement crash
@ 2019-07-31 14:01 Xuesong Gao <xgao@senturus.com>
parent: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
0 siblings, 0 replies; 3+ messages in thread
From: Xuesong Gao @ 2019-07-31 14:01 UTC (permalink / raw)
To: Inoue, Hiroshi <h-inoue@dream.email.ne.jp>; +Cc: pgsql-odbc
Hiroshi,
Thank you for looking into this issue.
I ran the same test case and new logs attached.
Dvdrental is a database I found online and imported into postgrsql 10.
Select city, ? as I from public.city where city.city = ?
Is the SQL I passed to SQLPrepare. Yes, city is a table and within city table there is a city column ;). Question marks (?) are parameters, I passed values via SQLBindParameter.
Thanks,
Song Gao
From: Inoue, Hiroshi [mailto:h-inoue@dream.email.ne.jp]
Sent: Wednesday, July 31, 2019 7:51 AM
To: Xuesong Gao <xgao@senturus.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: psqlodbc - prepared statement crash
Hi,
Sorry for the late reply.
You seem to turn on Mylog optipn of Global settings only.
Could you please turn on Mylog option of Advanced Options (DataSource) as well?
I have a question.
What does "city = ..." of
StatementText = "select city, ? as i from public.city where city = ...",
mean?
regards,
Hiroshi Inoue
On 2019/07/26 22:56, Xuesong Gao wrote:
I am using MS ODBCTest tool for testing purpose here, and it crashed after I did following steps:
1. Full connect to DSN.
2. SQLPrepare: select city, ? as i from public.city where city = ?
3. SQLBindParameter: number 1, value type SQL_C_CHAR, parameter type SQL_CHAR, value 1;
4. SQLBindParameter: number 2, value type SQL_C_CHAR, parameter type SQL_CHAR, value Abha;
5. SQLExecute
* your ODBC driver version
Unicode x64, 9.06.05.00
* your PostgreSQL database version
PostgreSQL 10, sample database dvdrental
* any error messages you saw on the screen
messages in ODBCTest tool console:
Full Connect(Default)
Env. Attr. SQL_ATTR_ODBC_VERSION set to SQL_OV_ODBC3
Successfully connected to DSN 'dvdrental'.
SQLPrepare:
In: StatementHandle = 0x00000000047221C0, StatementText = "select city, ? as i from public.city where city = ...", TextLength = 51
Return: SQL_SUCCESS=0
SQLBindParameter:
In: StatementHandle = 0x00000000047221C0, ParameterNumber = 1, InputOutputtype = SQL_PARAM_INPUT=1, ValueType = SQL_C_CHAR=1,
ParameterType = SQL_CHAR=1, ColumnSize = 0, DecimalDigits = 0, ParameterValuePtr = "1", BufferLength = 0, StrLen_or_IndPtr = SQL_NTS=-3, SQL_LEN_DATA_AT_EXEC = FALSE,
Buffer Size = 600
Return: SQL_SUCCESS=0
SQLBindParameter:
In: StatementHandle = 0x00000000047221C0, ParameterNumber = 2, InputOutputtype = SQL_PARAM_INPUT=1, ValueType = SQL_C_CHAR=1,
ParameterType = SQL_CHAR=1, ColumnSize = 0, DecimalDigits = 0, ParameterValuePtr = "Abha", BufferLength = 0, StrLen_or_IndPtr = SQL_NTS=-3, SQL_LEN_DATA_AT_EXEC = FALSE,
Buffer Size = 600
Return: SQL_SUCCESS=0
* the debug log (mylog_????.log) file (you will have to enable the mylog driver option)
attached
[X]
Song X. Gao
Solutions Architect
Email xgao@senturus.com<mailto:xgao@senturus.com>
Mobile 732 406 6347
senturus.com<http://www.senturus.com/;
[https://ipmcdn.avast.com/images/icons/icon-envelope-tick-green-avg-v1.png]<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&a...;
ウイルス フリー。 www.avg.com<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&a...;
Attachments:
psqlodbc_odbct32w_9376.log (application/octet-stream, 597B) download
mylog_3868.log (application/octet-stream, 121B) download
mylog_13160.log (application/octet-stream, 121B) download
mylog_odbct32w_9376.log (application/octet-stream, 15.3K) download
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2019-07-31 14:01 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-07-26 13:56 psqlodbc - prepared statement crash Xuesong Gao <xgao@senturus.com>
2019-07-31 11:51 ` Inoue, Hiroshi <h-inoue@dream.email.ne.jp>
2019-07-31 14:01 ` Xuesong Gao <xgao@senturus.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox