[Libreoffice-commits] core.git: Branch 'private/ajrhunt/firebird-improvement' - connectivity/source
Andrzej Hunt
andrzej.hunt at collabora.com
Wed Mar 19 13:56:58 PDT 2014
connectivity/source/drivers/firebird/Util.cxx | 108 --------------------------
connectivity/source/drivers/firebird/Util.hxx | 4
2 files changed, 112 deletions(-)
New commits:
commit 80f477367272ff0c5289250c2d76d35064ab384e
Author: Andrzej Hunt <andrzej.hunt at collabora.com>
Date: Wed Mar 19 20:56:07 2014 +0000
firebird-sdbc: Remove the now-unneeded mallocSQLVAR/freeSQLVAR.
Is all in the Sqlda wrapper and we don't handle raw XSQLDAs anymore.
Change-Id: I30f09e76351a5be9d25464313cd581cb89bae176
diff --git a/connectivity/source/drivers/firebird/Util.cxx b/connectivity/source/drivers/firebird/Util.cxx
index 74eb00c..4019c185 100644
--- a/connectivity/source/drivers/firebird/Util.cxx
+++ b/connectivity/source/drivers/firebird/Util.cxx
@@ -186,112 +186,4 @@ short firebird::getFBTypeFromBlrType(short blrType)
}
}
-void firebird::mallocSQLVAR(XSQLDA* pSqlda)
-{
- // TODO: confirm the sizings below.
- XSQLVAR* pVar = pSqlda->sqlvar;
- for (int i=0; i < pSqlda->sqld; i++, pVar++)
- {
- int dtype = (pVar->sqltype & ~1); /* drop flag bit for now */
- switch(dtype) {
- case SQL_TEXT:
- pVar->sqldata = (char *)malloc(sizeof(char)*pVar->sqllen);
- break;
- case SQL_VARYING:
- pVar->sqldata = (char *)malloc(sizeof(char)*pVar->sqllen + 2);
- break;
- case SQL_SHORT:
- pVar->sqldata = (char*) malloc(sizeof(sal_Int16));
- break;
- case SQL_LONG:
- pVar->sqldata = (char*) malloc(sizeof(sal_Int32));
- break;
- case SQL_FLOAT:
- pVar->sqldata = (char *)malloc(sizeof(float));
- break;
- case SQL_DOUBLE:
- pVar->sqldata = (char *)malloc(sizeof(double));
- break;
- case SQL_D_FLOAT:
- pVar->sqldata = (char *)malloc(sizeof(double));
- break;
- case SQL_TIMESTAMP:
- pVar->sqldata = (char*) malloc(sizeof(ISC_TIMESTAMP));
- break;
- case SQL_BLOB:
- pVar->sqldata = (char*) malloc(sizeof(ISC_QUAD));
- break;
- case SQL_ARRAY:
- assert(false); // TODO: implement
- break;
- case SQL_TYPE_TIME:
- pVar->sqldata = (char*) malloc(sizeof(ISC_TIME));
- break;
- case SQL_TYPE_DATE:
- pVar->sqldata = (char*) malloc(sizeof(ISC_DATE));
- break;
- case SQL_INT64:
- pVar->sqldata = (char *)malloc(sizeof(sal_Int64));
- break;
- case SQL_NULL:
- assert(false); // TODO: implement
- break;
- case SQL_QUAD:
- assert(false); // TODO: implement
- break;
- default:
- SAL_WARN("connectivity.firebird", "Unknown type: " << dtype);
- assert(false);
- break;
- }
- if (pVar->sqltype & 1)
- {
- /* allocate variable to hold NULL status */
- pVar->sqlind = (short *)malloc(sizeof(short));
- }
- }
-}
-
-void firebird::freeSQLVAR(XSQLDA* pSqlda)
-{
- XSQLVAR* pVar = pSqlda->sqlvar;
- for (int i=0; i < pSqlda->sqld; i++, pVar++)
- {
- int dtype = (pVar->sqltype & ~1); /* drop flag bit for now */
- switch(dtype) {
- case SQL_TEXT:
- case SQL_VARYING:
- case SQL_SHORT:
- case SQL_LONG:
- case SQL_FLOAT:
- case SQL_DOUBLE:
- case SQL_D_FLOAT:
- case SQL_TIMESTAMP:
- case SQL_BLOB:
- case SQL_INT64:
- case SQL_TYPE_TIME:
- case SQL_TYPE_DATE:
- free(pVar->sqldata);
- break;
- case SQL_ARRAY:
- assert(false); // TODO: implement
- break;
- case SQL_NULL:
- assert(false); // TODO: implement
- break;
- case SQL_QUAD:
- assert(false); // TODO: implement
- break;
- default:
- SAL_WARN("connectivity.firebird", "Unknown type: " << dtype);
- assert(false);
- break;
- }
-
- if (pVar->sqltype & 1)
- {
- free(pVar->sqlind);
- }
- }
-}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/firebird/Util.hxx b/connectivity/source/drivers/firebird/Util.hxx
index 3a992a8..e49c893 100644
--- a/connectivity/source/drivers/firebird/Util.hxx
+++ b/connectivity/source/drivers/firebird/Util.hxx
@@ -52,10 +52,6 @@ namespace connectivity
* between the two when retrieving column metadata.
*/
short getFBTypeFromBlrType(short blrType);
-
- void mallocSQLVAR(XSQLDA* pSqlda);
-
- void freeSQLVAR(XSQLDA* pSqlda);
}
}
#endif //CONNECTIVITY_FIREBIRD_UTIL_HXX
More information about the Libreoffice-commits
mailing list