ODBC GetSchema("Views") bug with Views

ODBC GetSchema("Views") bug with Views

am 28.04.2007 17:32:07 von Sebastian Talamoni

Hallo,
I hope this is the correct place to explain a problem with the odbc
driver. If it's not please apologize.

Applies to : ODBC 5.00.11 (latest from website) and 3.54.14 shows same
behaviour.
Server version : 5.0.22

Having an odbc connection with catalog/database set to a specific
database when executing this commands :

_connection.GetSchema("Tables") --> returns tables + views (should have
been only tables)
If this was expected behaviour it would have been handy that
"TABLE_TYPE" could be set as view.. (currently set as TABLE)
_connection.GetSchema("Views") --> returns null.

ODBC TRACE (just partial...)

When requesting VIEW ( _connection.GetSchema("Tables") ) --> 15 are
returned instead of 14 (1 is a view)
------------------------------------------------------------ ----

GenWise.IDE.vsh d44-1574 ENTER SQLTablesW
HSTMT 009FFCA0
WCHAR * 0x00000000
SWORD 0
WCHAR * 0x00000000
SWORD 0
WCHAR * 0x00000000
SWORD 0
WCHAR * 0x017691E4 [ 18] "TABLE,SYSTEM TABLE"
SWORD 18

GenWise.IDE.vsh d44-1574 EXIT SQLTablesW with return code 0
(SQL_SUCCESS)
HSTMT 009FFCA0
WCHAR * 0x00000000
SWORD 0
WCHAR * 0x00000000
SWORD 0
WCHAR * 0x00000000
SWORD 0
WCHAR * 0x017691E4 [ 18] "TABLE,SYSTEM TABLE"
SWORD 18

GenWise.IDE.vsh d44-1574 ENTER SQLRowCount
HSTMT 009FFCA0
SQLLEN * 0x0F0DE694

GenWise.IDE.vsh d44-1574 EXIT SQLRowCount with return code 0
(SQL_SUCCESS)
HSTMT 009FFCA0
* SQLLEN * 0x0F0DE694 (15)*



When requesting VIEW ( _connection.GetSchema("Views") )
------------------------------------------------------------ ----

GenWise.IDE.vsh d44-1574 ENTER SQLTablesW
HSTMT 009FFCA0
WCHAR * 0x00000000
SWORD 0
WCHAR * 0x00000000
SWORD 0
WCHAR * 0x00000000
SWORD 0
WCHAR * 0x0176921C [ 4] "VIEW"
SWORD 4

GenWise.IDE.vsh d44-1574 EXIT SQLTablesW with return code 0
(SQL_SUCCESS)
HSTMT 009FFCA0
WCHAR * 0x00000000
SWORD 0
WCHAR * 0x00000000
SWORD 0
WCHAR * 0x00000000
SWORD 0
WCHAR * 0x0176921C [ 4] "VIEW"
SWORD 4

GenWise.IDE.vsh d44-1574 ENTER SQLRowCount
HSTMT 009FFCA0
SQLLEN * 0x0F0DE694

GenWise.IDE.vsh d44-1574 EXIT SQLRowCount with return code 0
(SQL_SUCCESS)
HSTMT 009FFCA0

Is this a known bug ? (could not find it..)

NOTE: When INFORMATION_SCHEMA (at the server ) shows correct / expected
result
SELECT * FROM information_schema.VIEWS V;


Thanks in advance,
---------------------------------------
Sebastian Talamoni
GenWise Team
(www.genwise.com)


--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org

Re: ODBC GetSchema("Views") bug with Views

am 28.04.2007 20:10:55 von Jim Winstead

On Sat, Apr 28, 2007 at 05:32:07PM +0200, Sebastian Talamoni wrote:
> Is this a known bug ? (could not find it..)

Yes, this is Bug #23031. It won't be fixed in the next release of the
v3.51 driver (3.51.15), but perhaps in the one after that.

I don't know the status of supporting different table types in the v5
driver. (But a quick glance at the code shows it to also be unaware of
views.)

Jim Winstead
MySQL Inc.

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org

Re: ODBC GetSchema("Views") bug with Views

am 28.04.2007 21:30:17 von Sebastian Talamoni

Jim,
Thanks for the quick response.
Luckily I was able to so the information.schema as a work-around to
correctly determine the table type.

Sebastian
> On Sat, Apr 28, 2007 at 05:32:07PM +0200, Sebastian Talamoni wrote:
>
>> Is this a known bug ? (could not find it..)
>>
>
> Yes, this is Bug #23031. It won't be fixed in the next release of the
> v3.51 driver (3.51.15), but perhaps in the one after that.
>
> I don't know the status of supporting different table types in the v5
> driver. (But a quick glance at the code shows it to also be unaware of
> views.)
>
> Jim Winstead
> MySQL Inc.
>
>
>





--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org