From: <ibr...@us...> - 2009-07-13 15:29:36
|
Revision: 3215 http://tora.svn.sourceforge.net/tora/?rev=3215&view=rev Author: ibre5041 Date: 2009-07-13 15:29:29 +0000 (Mon, 13 Jul 2009) Log Message: ----------- LONG datatype handling Modified Paths: -------------- branches/tora-trotl/src/tooracleconnection.cpp Modified: branches/tora-trotl/src/tooracleconnection.cpp =================================================================== --- branches/tora-trotl/src/tooracleconnection.cpp 2009-07-12 22:30:05 UTC (rev 3214) +++ branches/tora-trotl/src/tooracleconnection.cpp 2009-07-13 15:29:29 UTC (rev 3215) @@ -115,7 +115,7 @@ #include <QString> #include <QTextStream> -static int toMaxLong = toConfigurationSingle::Instance().maxLong(); +//static int toMaxLong = toConfigurationSingle::Instance().maxLong(); static toSQL SQLComment("toOracleConnection:Comments", "SELECT Column_name,Comments FROM sys.All_Col_Comments\n" @@ -996,7 +996,9 @@ virtual void initialize(void) { //toMaxLong = toConfigurationSingle::Instance().maxLong(); + ::trotl::g_OCIPL_MAX_LONG = ( toConfigurationSingle::Instance().maxLong() == -1 ? ::trotl::g_OCIPL_MAX_LONG : toConfigurationSingle::Instance().maxLong() ); ::trotl::OciEnvAlloc *_envallocp = new ::trotl::OciEnvAlloc; + _envp = new ::trotl::OciEnv(*_envallocp); //get_log().ts( std::string(__HERE_SHORT__)) << "TODO: initialize" << std::endl << __HERE_SHORT__ << std::endl; @@ -1600,15 +1602,22 @@ toConfigurationSingle::Instance().setPlanCheckpoint(CheckPoint->text()); toConfigurationSingle::Instance().setPlanTable(ExplainPlan->text()); toConfigurationSingle::Instance().setOpenCursors(OpenCursors->value()); + + /* + TODO - there is nothing like Unlimited size for LONG + max size for LONG col. is 2GB, so we should prepare + at least one 2GB buffer in RAM. In reality we use + 30000B if toMaxLong== -1. + */ if (Unlimited->isChecked()) { - toMaxLong = -1; + //toMaxLong = -1; toConfigurationSingle::Instance().setMaxLong(-1); } else { toConfigurationSingle::Instance().setMaxLong(MaxLong->text().toInt()); - toMaxLong = MaxLong->text().toInt(); + //toMaxLong = MaxLong->text().toInt(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |