From 40981d2fc63d2507a4c882b6be03a7f028e3cf5f Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Wed, 19 Aug 2020 10:50:12 +1000 Subject: [PATCH] Only handle tables in SQLColumns, not other objects --- src/odbc/odbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/odbc/odbc.c b/src/odbc/odbc.c index 568b935..3359d11 100644 --- a/src/odbc/odbc.c +++ b/src/odbc/odbc.c @@ -1334,7 +1334,7 @@ SQLRETURN SQL_API SQLColumns( for (i=0; inum_catalog; i++) { entry = g_ptr_array_index(mdb->catalog, i); /* TODO: Do more advanced matching */ - if (g_ascii_strcasecmp((char*)szTableName, entry->object_name) != 0) + if (entry->object_type != MDB_TABLE || g_ascii_strcasecmp((char*)szTableName, entry->object_name) != 0) continue; table = mdb_read_table(entry); if ( !table )