Description:
HI,
SQLForeignKeys doesn't return foreign key name. It just return "NULL" as a string. Here is the log:
DataArchitect 2808-2830 EXIT SQLGetData with return code 0 (SQL_SUCCESS)
HSTMT 011225A0
UWORD 12
SWORD 1 <SQL_C_CHAR>
PTR 0x0012F15C [ 4] "NULL"
SQLLEN 500
SQLLEN * 0x0012F360 (4)
The full log is here.
DataArchitect 2808-2830 EXIT SQLForeignKeysW with return code 0 (SQL_SUCCESS)
HSTMT 011225A0
WCHAR * 0x00000000
SWORD 0
WCHAR * 0x00000000
SWORD 0
WCHAR * 0x00000000
SWORD 0
WCHAR * 0x00000000
SWORD 0
WCHAR * 0x00000000
SWORD 0
WCHAR * 0x01121B38 [ -3] "sta"
SWORD -3
DataArchitect 2808-2830 ENTER SQLNumResultCols
HSTMT 011225A0
SWORD * 0x0012EB98
DataArchitect 2808-2830 EXIT SQLNumResultCols with return code 0 (SQL_SUCCESS)
HSTMT 011225A0
SWORD * 0x0012EB98 (14)
DataArchitect 2808-2830 ENTER SQLFetch
HSTMT 011225A0
DataArchitect 2808-2830 EXIT SQLFetch with return code 0 (SQL_SUCCESS)
HSTMT 011225A0
DataArchitect 2808-2830 ENTER SQLGetData
HSTMT 011225A0
UWORD 2
SWORD 1 <SQL_C_CHAR>
PTR 0x0012F424
SQLLEN 500
SQLLEN * 0x0012F360
DataArchitect 2808-2830 EXIT SQLGetData with return code 0 (SQL_SUCCESS)
HSTMT 011225A0
UWORD 2
SWORD 1 <SQL_C_CHAR>
PTR 0x0012F424
SQLLEN 500
SQLLEN * 0x0012F360 (0)
DataArchitect 2808-2830 ENTER SQLGetData
HSTMT 011225A0
UWORD 3
SWORD 1 <SQL_C_CHAR>
PTR 0x0012F61C
SQLLEN 500
SQLLEN * 0x0012F360
DataArchitect 2808-2830 EXIT SQLGetData with return code 0 (SQL_SUCCESS)
HSTMT 011225A0
UWORD 3
SWORD 1 <SQL_C_CHAR>
PTR 0x0012F61C [ 9] "countries"
SQLLEN 500
SQLLEN * 0x0012F360 (9)
DataArchitect 2808-2830 ENTER SQLGetData
HSTMT 011225A0
UWORD 4
SWORD 1 <SQL_C_CHAR>
PTR 0x0012EF64
SQLLEN 500
SQLLEN * 0x0012F360
DataArchitect 2808-2830 EXIT SQLGetData with return code 0 (SQL_SUCCESS)
HSTMT 011225A0
UWORD 4
SWORD 1 <SQL_C_CHAR>
PTR 0x0012EF64 [ 4] "`ID`"
SQLLEN 500
SQLLEN * 0x0012F360 (4)
DataArchitect 2808-2830 ENTER SQLGetData
HSTMT 011225A0
UWORD 8
SWORD 1 <SQL_C_CHAR>
PTR 0x0012F81C
SQLLEN 500
SQLLEN * 0x0012F360
DataArchitect 2808-2830 EXIT SQLGetData with return code 0 (SQL_SUCCESS)
HSTMT 011225A0
UWORD 8
SWORD 1 <SQL_C_CHAR>
PTR 0x0012F81C [ 4] "`ID`"
SQLLEN 500
SQLLEN * 0x0012F360 (4)
DataArchitect 2808-2830 ENTER SQLGetData
HSTMT 011225A0
UWORD 9
SWORD 5 <SQL_C_SHORT>
PTR <unknown type>
SQLLEN 500
SQLLEN * 0x0012F360
DataArchitect 2808-2830 EXIT SQLGetData with return code 0 (SQL_SUCCESS)
HSTMT 011225A0
UWORD 9
SWORD 5 <SQL_C_SHORT>
PTR <unknown type>
SQLLEN 500
SQLLEN * 0x0012F360 (2)
DataArchitect 2808-2830 ENTER SQLGetData
HSTMT 011225A0
UWORD 12
SWORD 1 <SQL_C_CHAR>
PTR 0x0012F15C
SQLLEN 500
SQLLEN * 0x0012F360
DataArchitect 2808-2830 EXIT SQLGetData with return code 0 (SQL_SUCCESS)
HSTMT 011225A0
UWORD 12
SWORD 1 <SQL_C_CHAR>
PTR 0x0012F15C [ 4] "NULL"
SQLLEN 500
SQLLEN * 0x0012F360 (4)
DataArchitect 2808-2830 ENTER SQLFetch
HSTMT 011225A0
DataArchitect 2808-2830 EXIT SQLFetch with return code 100 (SQL_NO_DATA_FOUND)
HSTMT 011225A0
DataArchitect 2808-2830 ENTER SQLFreeHandle
SQLSMALLINT 3 <SQL_HANDLE_STMT>
SQLHANDLE 011225A0
DataArchitect 2808-2830 EXIT SQLFreeHandle with return code 0 (SQL_SUCCESS)
SQLSMALLINT 3 <SQL_HANDLE_STMT>
SQLHANDLE 011225A0
Thanks,
Marian
How to repeat:
Every time when SQLForeignKeys is executed, this bug is reproduced.
I was connecting to MySQL 50 on linux.