Skip to Content.
Sympa Menu

shibboleth-dev - 64bit ODBC Storage Service

Subject: Shibboleth Developers

List archive

64bit ODBC Storage Service


Chronological Thread 
  • From: giacomo tenaglia <>
  • To:
  • Subject: 64bit ODBC Storage Service
  • Date: Tue, 22 Apr 2008 14:34:11 +0200

Hi,
I've succesfully built RPMs for RHEL 4 x86_64.
Now I'm testing the ODBC SS on Oracle via instant client 11g and
unixODBC 2.2.12 (everything 64bit), but I've encountered a similar
problem to the one André reported a couple of weeks ago:
https://mail.internet2.edu/wws/arc/shibboleth-users/2008-04/msg00098.html

2008-04-18 12:06:34 CRIT XMLTooling.StorageService : unknown database
version: 53.0
2008-04-18 12:06:34 CRIT Shibboleth.Config : failed to instantiate
StorageService (db): Unknown database version for ODBC StorageService.

After some ODBC playing I've managed to get it working with the attached
patch.

Note that since in Oracle there's no "tinyint" datatype, I've created
the version table with datatype "smallint" for both columns.. so maybe
this patch won't work on db other than Oracle. Anyway I will test it
against My/PostgreSQL (maybe trying to change the table structure) and
let you know.

Ciao,
giacomo

--
giacomo tenaglia
Technical Student at CERN IT/DES-SIS
CNR Biblioteca d'Area di Bologna - http://biblio.bo.cnr.it
Phone +41 76 5003376 -
sip:
--- shibboleth-2.0/odbc-store/odbc-store.cpp	2008-03-26 10:42:22.000000000 +0100
+++ tmp/2.0.0/odbc-store/odbc-store.cpp	2008-04-18 12:14:18.000000000 +0200
@@ -418,10 +418,10 @@
         throw IOException("ODBC StorageService failed to read version from database.");
     }
 
-    SQLINTEGER major;
-    SQLINTEGER minor;
-    SQLBindCol(stmt,1,SQL_C_SLONG,&major,0,NULL);
-    SQLBindCol(stmt,2,SQL_C_SLONG,&minor,0,NULL);
+    SQLSMALLINT major;
+    SQLSMALLINT minor;
+    SQLBindCol(stmt,1,SQL_C_SSHORT,&major,0,NULL);
+    SQLBindCol(stmt,2,SQL_C_SSHORT,&minor,0,NULL);
 
     if ((sr=SQLFetch(stmt)) != SQL_NO_DATA)
         return pair<int,int>(major,minor);



Archive powered by MHonArc 2.6.16.

Top of Page