Bug in Select count(*) via MyODBC

Bug in Select count(*) via MyODBC

am 06.10.2004 13:17:07 von Mario Neudeck

--dDRMvlgZJXvWKvBx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

I have a strange problem in the return types of the query:

select count(*) from table gives in MySQL Version 4.0.x an return
type of long. In Version 4.1.x its an char ("0").
The query goes vi MyODBC to MySQL. I checked the ODBC Trace to see
the different return types.

With Version 4.1.x I use MyODBC Version 3.52.00, with Version 4.0.x
I use MyODBC 3.52.

I did some test on W2K and SuSE Linux, but it doesn't matter.

Here are the important lines of the odbc-trace.

Query
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vfp8 af-bc ENTER SQLExecDirect
HSTMT 035F5998
UCHAR * 0x015CF1D0 [ -3] "select count(*) from test\ 0"
SDWORD -3

vfp8 af-bc EXIT SQLExecDirect with return code 0 (SQL_SUCCESS)
HSTMT 035F5998
UCHAR * 0x015CF1D0 [ -3] "select count(*) from test\ 0"
SDWORD -3

Result
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
vfp8 af-bc EXIT SQLColAttributes with return code 0 (SQL_SUCCESS)
HSTMT 035F5998
UWORD 1
UWORD 1
PTR 0x0012F4AC
SWORD 255
SWORD * 0x00000000
SQLLEN * 0x0012F724 (0)

vfp8 af-bc ENTER SQLFetch
HSTMT 035F5998

vfp8 af-bc EXIT SQLFetch with return code 0 (SQL_SUCCESS)
HSTMT 035F5998

vfp8 af-bc ENTER SQLGetData
HSTMT 035F5998
UWORD 1
SWORD 1
PTR 0x024CB151
SQLLEN 22
SQLLEN * 0x0012F5A4

vfp8 af-bc EXIT SQLGetData with return code 0 (SQL_SUCCESS)
HSTMT 035F5998
UWORD 1
SWORD 1
PTR 0x024CB151 [ 1] "1"
SQLLEN 22
SQLLEN * 0x0012F5A4 (1)
+++++++++++++++++++++++++++++++++++++++++++++

Does anyone know about this problem?
I already checked the manual/bug/changes section.
But I did get any ideas.

As attachment I send the full odbc-trace.

Sincerely,
Mario
--


--dDRMvlgZJXvWKvBx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="sql.log"


vfp8 af-bc ENTER SQLExecDirect
HSTMT 035F5998
UCHAR * 0x015CF1D0 [ -3] "select count(*) from test\ 0"
SDWORD -3

vfp8 af-bc EXIT SQLExecDirect with return code 0 (SQL_SUCCESS)
HSTMT 035F5998
UCHAR * 0x015CF1D0 [ -3] "select count(*) from test\ 0"
SDWORD -3

vfp8 af-bc ENTER SQLNumResultCols
HSTMT 035F5998
SWORD * 0x0012F98C

vfp8 af-bc EXIT SQLNumResultCols with return code 0 (SQL_SUCCESS)
HSTMT 035F5998
SWORD * 0x0012F98C (1)

vfp8 af-bc ENTER SQLNumResultCols
HSTMT 035F5998
SWORD * 0x0012F720

vfp8 af-bc EXIT SQLNumResultCols with return code 0 (SQL_SUCCESS)
HSTMT 035F5998
SWORD * 0x0012F720 (1)

vfp8 af-bc ENTER SQLColAttributes
HSTMT 035F5998
UWORD 1
UWORD 2
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x0012F724

vfp8 af-bc EXIT SQLColAttributes with return code 0 (SQL_SUCCESS)
HSTMT 035F5998
UWORD 1
UWORD 2
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x0012F724 (-5)

vfp8 af-bc ENTER SQLColAttributes
HSTMT 035F5998
UWORD 1
UWORD 6
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x0012F724

vfp8 af-bc EXIT SQLColAttributes with return code 0 (SQL_SUCCESS)
HSTMT 035F5998
UWORD 1
UWORD 6
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x0012F724 (21)

vfp8 af-bc ENTER SQLColAttributes
HSTMT 035F5998
UWORD 1
UWORD 4
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x0012F724

vfp8 af-bc EXIT SQLColAttributes with return code 0 (SQL_SUCCESS)
HSTMT 035F5998
UWORD 1
UWORD 4
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x0012F724 (19)

vfp8 af-bc ENTER SQLColAttributes
HSTMT 035F5998
UWORD 1
UWORD 5
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x0012F724

vfp8 af-bc EXIT SQLColAttributes with return code 0 (SQL_SUCCESS)
HSTMT 035F5998
UWORD 1
UWORD 5
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x0012F724 (0)

vfp8 af-bc ENTER SQLColAttributes
HSTMT 035F5998
UWORD 1
UWORD 7
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x0012F724

vfp8 af-bc EXIT SQLColAttributes with return code 0 (SQL_SUCCESS)
HSTMT 035F5998
UWORD 1
UWORD 7
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x0012F724 (0)

vfp8 af-bc ENTER SQLColAttributes
HSTMT 035F5998
UWORD 1
UWORD 9
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x0012F724

vfp8 af-bc EXIT SQLColAttributes with return code 0 (SQL_SUCCESS)
HSTMT 035F5998
UWORD 1
UWORD 9
PTR 0x00000000
SWORD 0
SWORD * 0x00000000
SQLLEN * 0x0012F724 (0)

vfp8 af-bc ENTER SQLColAttributes
HSTMT 035F5998
UWORD 1
UWORD 1
PTR 0x0012F4AC
SWORD 255
SWORD * 0x00000000
SQLLEN * 0x0012F724

vfp8 af-bc EXIT SQLColAttributes with return code 0 (SQL_SUCCESS)
HSTMT 035F5998
UWORD 1
UWORD 1
PTR 0x0012F4AC
SWORD 255
SWORD * 0x00000000
SQLLEN * 0x0012F724 (0)

vfp8 af-bc ENTER SQLFetch
HSTMT 035F5998

vfp8 af-bc EXIT SQLFetch with return code 0 (SQL_SUCCESS)
HSTMT 035F5998

vfp8 af-bc ENTER SQLGetData
HSTMT 035F5998
UWORD 1
SWORD 1
PTR 0x024CB151
SQLLEN 22
SQLLEN * 0x0012F5A4

vfp8 af-bc EXIT SQLGetData with return code 0 (SQL_SUCCESS)
HSTMT 035F5998
UWORD 1
SWORD 1
PTR 0x024CB151 [ 1] "1"
SQLLEN 22
SQLLEN * 0x0012F5A4 (1)

vfp8 af-bc ENTER SQLFetch
HSTMT 035F5998

vfp8 af-bc EXIT SQLFetch with return code 100 (SQL_NO_DATA_FOUND)
HSTMT 035F5998

vfp8 af-bc ENTER SQLMoreResults
HSTMT 035F5998

vfp8 af-bc EXIT SQLMoreResults with return code 100 (SQL_NO_DATA_FOUND)
HSTMT 035F5998

vfp8 af-bc ENTER SQLFreeStmt
HSTMT 035F5998
UWORD 0

vfp8 af-bc EXIT SQLFreeStmt with return code 0 (SQL_SUCCESS)
HSTMT 035F5998
UWORD 0

vfp8 af-bc ENTER SQLFreeStmt
HSTMT 035F5998
UWORD 3

vfp8 af-bc EXIT SQLFreeStmt with return code 0 (SQL_SUCCESS)
HSTMT 035F5998
UWORD 3


--dDRMvlgZJXvWKvBx
Content-Type: text/plain; charset=us-ascii

--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org
--dDRMvlgZJXvWKvBx--

RE: Bug in Select count(*) via MyODBC

am 21.10.2004 02:36:37 von miguel solorzano

Hi,

I opened in our Bug System the bug report:

http://bugs.mysql.com/bug.php?id=6191

On another hands I would like to ask you for to use in the future
our Bug System for to report bugs.

Thanks in advance.

Regards,
Miguel


Hi,

I have a strange problem in the return types of the query:

select count(*) from table gives in MySQL Version 4.0.x an return
type of long. In Version 4.1.x its an char ("0").
The query goes vi MyODBC to MySQL. I checked the ODBC Trace to see
the different return types.

With Version 4.1.x I use MyODBC Version 3.52.00, with Version 4.0.x
I use MyODBC 3.52.

I did some test on W2K and SuSE Linux, but it doesn't matter.




--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org