From: <ibr...@us...> - 2013-09-03 11:48:45
|
Revision: 4810 http://sourceforge.net/p/tora/code/4810 Author: ibre5041 Date: 2013-09-03 11:48:42 +0000 (Tue, 03 Sep 2013) Log Message: ----------- trotl exception error reporting Modified Paths: -------------- trunk/tora/extlibs/trotl/src/trotl_error.cpp trunk/tora/extlibs/trotl/src/trotl_stat.cpp Modified: trunk/tora/extlibs/trotl/src/trotl_error.cpp =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_error.cpp 2013-09-02 21:23:33 UTC (rev 4809) +++ trunk/tora/extlibs/trotl/src/trotl_error.cpp 2013-09-03 11:48:42 UTC (rev 4810) @@ -110,15 +110,16 @@ { case OCI_SUCCESS: _sql_error_code.push_back(errorcode); - _mess += (const char *)buffer; + _mess.append((const char *)buffer); break; case OCI_INVALID_HANDLE: _sql_error_code.push_back(21001); // my bogus value - _mess += "ORACLE_HOME not found\n"; + _mess.append("ORACLE_HOME not found\n"); break; case OCI_NO_DATA: _sql_error_code.push_back(21002); // my bogus value - _mess += "OCIErrorGet: OCI_NO_DATA\n"; + _mess.append("OCIErrorGet: OCI_NO_DATA\n"); + break; default: _sql_error_code.push_back(0); } @@ -126,7 +127,8 @@ #ifdef DEBUG dbg::stack s; std::copy(s.begin(), s.end(), std::ostream_iterator<dbg::stack_frame>(_stack, "\n")); - _mess += "\n" + _stack.str(); + _mess.push_back('\n'); + _mess.append(_stack.str()); #endif _parse_offset = 0; @@ -145,25 +147,33 @@ case OCI_SUCCESS: { _sql_error_code.push_back(errorcode); - _mess += '\n' + buffer; + _mess.push_back('\n'); + _mess.append(buffer); break; } case OCI_NO_DATA: { _sql_error_code.push_back(21002); - _mess += '\n' + "OCIErrorGet: OCI_NO_DATA\n"; + _mess.push_back('\n'); + _mess.append("OCIErrorGet: OCI_NO_DATA\n"); + break; } default: { + tostream s; _sql_error_code.push_back(0); - _mess += '\n' + "OCIErrorGet: unknown error: \n" + res; + _mess.push_back('\n'); + _mess.append("OCIErrorGet: unknown error: \n"); + s << res; + _mess.append(s.str()); } } #ifdef DEBUG dbg::stack s; std::copy(s.begin(), s.end(), std::ostream_iterator<dbg::stack_frame>(_stack, "\n")); - _mess += "\n" + _stack.str(); + _mess.push_back('\n'); + _mess.append(_stack.str()); #endif _parse_offset = 0; @@ -172,12 +182,13 @@ OciException::OciException(tstring where, const char* msg) : _where(where), _mess(where), _last_sql(""), _parse_offset(0), _line(0), _column(0) { - _mess += '\n' + msg; - + _mess.push_back('\n'); + _mess.append(msg); #ifdef DEBUG dbg::stack s; std::copy(s.begin(), s.end(), std::ostream_iterator<dbg::stack_frame>(_stack, "\n")); - _mess += "\n" + _stack.str(); + _mess.push_back('\n'); + _mess.append(_stack.str()); #endif } Modified: trunk/tora/extlibs/trotl/src/trotl_stat.cpp =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_stat.cpp 2013-09-02 21:23:33 UTC (rev 4809) +++ trunk/tora/extlibs/trotl/src/trotl_stat.cpp 2013-09-03 11:48:42 UTC (rev 4810) @@ -1630,11 +1630,13 @@ snprintf(buffer+l, sizeof(buffer)-l, "\n\nlast SQL statement:\n%s\n", sql); //#endif } - _mess += '\n' + tstring(buffer); + _mess.push_back('\n'); + _mess.append(buffer); #ifdef DEBUG dbg::stack s; std::copy(s.begin(), s.end(), std::ostream_iterator<dbg::stack_frame>(_stack, "\n")); - _mess += "\n" + _stack.str(); + _mess.push_back('\n'); + _mess.append(_stack.str()); #endif } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ibr...@us...> - 2013-09-06 17:39:53
|
Revision: 4813 http://sourceforge.net/p/tora/code/4813 Author: ibre5041 Date: 2013-09-06 17:39:44 +0000 (Fri, 06 Sep 2013) Log Message: ----------- Get SID,SERIAL# via OCI - for cases when v$session can not be accessed Modified Paths: -------------- trunk/tora/extlibs/trotl/src/trotl_conn.h trunk/tora/extlibs/trotl/src/trotl_handle.h Modified: trunk/tora/extlibs/trotl/src/trotl_conn.h =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_conn.h 2013-09-05 17:37:15 UTC (rev 4812) +++ trunk/tora/extlibs/trotl/src/trotl_conn.h 2013-09-06 17:39:44 UTC (rev 4813) @@ -43,6 +43,9 @@ /// encapsulation of the OCIServer handle, used in OCIPL::OciLogin TROTL_EXPORT typedef OciHandleWrapper<OCISvcCtx> OciContext; +/// ten bytes (SID,SERIAL#) encoded +typedef struct UB10 { ub1 bytes[10]; } UB10; + struct TROTL_EXPORT OracleServer : public OciHandle<OCIServer> { typedef OciHandle<OCIServer> super; @@ -171,12 +174,16 @@ typedef OciHandle<OCISvcCtx> super; OciLogin(OciEnv& env, const LoginPara& login_para, ub4 mode=OCI_DEFAULT) - : super(env), - _server(env), - _session(env), - _connected(false) + : super(env) + , _server(env) + , _session(env) + , _connected(false) + , _sid(0) + , _serial(0) + { connect(login_para._username, login_para._password, login_para._tnsname, mode); + getSidAndSerial(); } OciLogin(OciEnv& env, const LoginAndPChangePara& login_para, ub4 mode=OCI_DEFAULT) @@ -186,6 +193,7 @@ _connected(false) { connect_and_pchange(login_para._username, login_para._password, login_para._new_password, login_para._tnsname, mode); + getSidAndSerial(); } OciLogin(OciEnv& env, const tstring& username, const tstring& password, const tstring& tnsname, ub4 mode=OCI_DEFAULT) @@ -195,6 +203,7 @@ _connected(false) { connect(username, password, tnsname, mode); + getSidAndSerial(); } void connect(const tstring& username, const tstring& password, const tstring& tnsname, ub4 mode=OCI_DEFAULT) @@ -294,9 +303,25 @@ oci_check_error(__TROTL_HERE__, _env._errh, res); } + void getSidAndSerial() + { + // See metalink note 971323.1 + UB10 s = _session.get_attribute<UB10>(OCI_ATTR_MIGSESSION); + ub1 * sessionInfo = &s.bytes[0]; + + // calculate SID by bitshifting - memcpy() would do fals order + for (int i=0; i< sessionInfo[1];i++) + _sid = _sid + ((ub4)(sessionInfo[2+i]) << ((3-i)*8)); + // calculate SERIAL# by bitshifting - memcpy() would do fals order + for (int i=0; i< sessionInfo[6];i++) + _serial = _serial + ((ub4)(sessionInfo[7+i]) << ((1-i)*8)); + } + OracleServer _server; tstring _warnings; tstring _tnsname; + ub4 _sid; + ub2 _serial; protected: #if _MSC_VER==1400 Modified: trunk/tora/extlibs/trotl/src/trotl_handle.h =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_handle.h 2013-09-05 17:37:15 UTC (rev 4812) +++ trunk/tora/extlibs/trotl/src/trotl_handle.h 2013-09-06 17:39:44 UTC (rev 4813) @@ -359,16 +359,32 @@ if( Loki::TypeTraits<RETTYPE>::isIntegral) { RETTYPE retval; - sword res = OCICALL(OCIAttrGet(_handle, OciHandleID<OCIParam>::get_type_id(), &retval, 0, attrtype, _env._errh)); + sword res = OCICALL(OCIAttrGet(_handle, OciHandleID<TYPE>::get_type_id(), &retval, 0, attrtype, _env._errh)); oci_check_error(__TROTL_HERE__, _env._errh, res); return retval; } else if( Loki::TypeTraits<RETTYPE>::isPointer) { RETTYPE retval; - sword res = OCICALL(OCIAttrGet(_handle, OciHandleID<OCIParam>::get_type_id(), &retval, 0, attrtype, _env._errh)); + sword res = OCICALL(OCIAttrGet(_handle, OciHandleID<TYPE>::get_type_id(), &retval, 0, attrtype, _env._errh)); oci_check_error(__TROTL_HERE__, _env._errh, res); return retval; + } else if( Loki::IsSameType<RETTYPE, UB10>::value) + { + RETTYPE retval; + ub1* p_retval = &retval.bytes[0]; + ub4 infoSize = sizeof(retval.bytes); + + sword res = OCICALL(OCIAttrGet(_handle, OciHandleID<TYPE>::get_type_id(), (dvoid *)(&p_retval), &infoSize, attrtype, _env._errh)); + oci_check_error(__TROTL_HERE__, _env._errh, res); // TODO potentical race. Use sessions local errh instead of "global" _env._errh + + if( p_retval != &retval.bytes[0]) + { + // Oracle does not use our provided bytes + // p_retval points into OCI interval structures (the example in the metalink note 971323.1 is wrong) + memcpy(&retval.bytes[0], p_retval, (std::min)(infoSize, sizeof(retval.bytes))); + } + return retval; } // NOTE: I can not specialize template method of the templace class. // see OCIParam::get_attribute<tstring>() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ibr...@us...> - 2013-09-07 20:38:12
|
Revision: 4814 http://sourceforge.net/p/tora/code/4814 Author: ibre5041 Date: 2013-09-07 20:38:09 +0000 (Sat, 07 Sep 2013) Log Message: ----------- g++ compile fix Modified Paths: -------------- trunk/tora/extlibs/trotl/src/trotl_common.h trunk/tora/extlibs/trotl/src/trotl_conn.h trunk/tora/extlibs/trotl/src/trotl_handle.h Modified: trunk/tora/extlibs/trotl/src/trotl_common.h =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_common.h 2013-09-06 17:39:44 UTC (rev 4813) +++ trunk/tora/extlibs/trotl/src/trotl_common.h 2013-09-07 20:38:09 UTC (rev 4814) @@ -84,6 +84,9 @@ typedef TROTL_EXPORT ::std::string tstring; typedef TROTL_EXPORT ::std::ostringstream tostream; +/// ten bytes (SID,SERIAL#) encoded +typedef struct UB10 { ub1 bytes[10]; } UB10; + //TODO //#include <fstream> //#define USE_BOOST_THREAD_MANAGER Modified: trunk/tora/extlibs/trotl/src/trotl_conn.h =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_conn.h 2013-09-06 17:39:44 UTC (rev 4813) +++ trunk/tora/extlibs/trotl/src/trotl_conn.h 2013-09-07 20:38:09 UTC (rev 4814) @@ -43,9 +43,6 @@ /// encapsulation of the OCIServer handle, used in OCIPL::OciLogin TROTL_EXPORT typedef OciHandleWrapper<OCISvcCtx> OciContext; -/// ten bytes (SID,SERIAL#) encoded -typedef struct UB10 { ub1 bytes[10]; } UB10; - struct TROTL_EXPORT OracleServer : public OciHandle<OCIServer> { typedef OciHandle<OCIServer> super; Modified: trunk/tora/extlibs/trotl/src/trotl_handle.h =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_handle.h 2013-09-06 17:39:44 UTC (rev 4813) +++ trunk/tora/extlibs/trotl/src/trotl_handle.h 2013-09-07 20:38:09 UTC (rev 4814) @@ -382,7 +382,7 @@ { // Oracle does not use our provided bytes // p_retval points into OCI interval structures (the example in the metalink note 971323.1 is wrong) - memcpy(&retval.bytes[0], p_retval, (std::min)(infoSize, sizeof(retval.bytes))); + memcpy(&retval.bytes[0], p_retval, (std::min)((size_t)infoSize, sizeof(retval.bytes))); } return retval; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ibr...@us...> - 2013-09-07 22:02:53
|
Revision: 4815 http://sourceforge.net/p/tora/code/4815 Author: ibre5041 Date: 2013-09-07 22:02:50 +0000 (Sat, 07 Sep 2013) Log Message: ----------- Modified Paths: -------------- trunk/tora/extlibs/trotl/src/trotl_conn.h trunk/tora/extlibs/trotl/src/trotl_handle.h Modified: trunk/tora/extlibs/trotl/src/trotl_conn.h =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_conn.h 2013-09-07 20:38:09 UTC (rev 4814) +++ trunk/tora/extlibs/trotl/src/trotl_conn.h 2013-09-07 22:02:50 UTC (rev 4815) @@ -314,6 +314,15 @@ _serial = _serial + ((ub4)(sessionInfo[7+i]) << ((1-i)*8)); } + bool hasTransaction() + { + boolean t = true; +#if (OCI_MAJOR_VERSION >= 12) + t = _session.get_attribute<boolean>(OCI_ATTR_TRANSACTION_IN_PROGRESS); +#endif + return t; + } + OracleServer _server; tstring _warnings; tstring _tnsname; Modified: trunk/tora/extlibs/trotl/src/trotl_handle.h =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_handle.h 2013-09-07 20:38:09 UTC (rev 4814) +++ trunk/tora/extlibs/trotl/src/trotl_handle.h 2013-09-07 22:02:50 UTC (rev 4815) @@ -356,26 +356,25 @@ template<class RETTYPE> RETTYPE get_attribute(ub4 attrtype) { + RETTYPE retval; if( Loki::TypeTraits<RETTYPE>::isIntegral) { - RETTYPE retval; sword res = OCICALL(OCIAttrGet(_handle, OciHandleID<TYPE>::get_type_id(), &retval, 0, attrtype, _env._errh)); oci_check_error(__TROTL_HERE__, _env._errh, res); return retval; } else if( Loki::TypeTraits<RETTYPE>::isPointer) { - RETTYPE retval; sword res = OCICALL(OCIAttrGet(_handle, OciHandleID<TYPE>::get_type_id(), &retval, 0, attrtype, _env._errh)); oci_check_error(__TROTL_HERE__, _env._errh, res); return retval; - } else if( Loki::IsSameType<RETTYPE, UB10>::value) + } + else if( Loki::IsSameType<RETTYPE, UB10>::value) { - RETTYPE retval; ub1* p_retval = &retval.bytes[0]; ub4 infoSize = sizeof(retval.bytes); - sword res = OCICALL(OCIAttrGet(_handle, OciHandleID<TYPE>::get_type_id(), (dvoid *)(&p_retval), &infoSize, attrtype, _env._errh)); + sword res = OCICALL(OCIAttrGet(_handle, OciHandleID<TYPE>::get_type_id(), &p_retval, &infoSize, attrtype, _env._errh)); oci_check_error(__TROTL_HERE__, _env._errh, res); // TODO potentical race. Use sessions local errh instead of "global" _env._errh if( p_retval != &retval.bytes[0]) @@ -386,8 +385,6 @@ } return retval; } - // NOTE: I can not specialize template method of the templace class. - // see OCIParam::get_attribute<tstring>() throw_oci_exception(OciException(__TROTL_HERE__, "Unsupported datatype: %s").arg(typeid(RETTYPE).name())); }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ibr...@us...> - 2013-09-25 11:19:13
|
Revision: 4849 http://sourceforge.net/p/tora/code/4849 Author: ibre5041 Date: 2013-09-25 11:19:08 +0000 (Wed, 25 Sep 2013) Log Message: ----------- Support for MERGE statement Modified Paths: -------------- trunk/tora/extlibs/trotl/src/trotl_stat.cpp trunk/tora/extlibs/trotl/src/trotl_stat.h Modified: trunk/tora/extlibs/trotl/src/trotl_stat.cpp =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_stat.cpp 2013-09-20 19:12:43 UTC (rev 4848) +++ trunk/tora/extlibs/trotl/src/trotl_stat.cpp 2013-09-25 11:19:08 UTC (rev 4849) @@ -200,6 +200,7 @@ case OCI_STMT_UPDATE: case OCI_STMT_DELETE: case OCI_STMT_INSERT: + case 16: // MERGE case OCI_STMT_CREATE: case OCI_STMT_DROP: case OCI_STMT_ALTER: @@ -417,6 +418,7 @@ _iters = 0; break; case STMT_UPDATE: + case STMT_MERGE: _iters = 1; break; case STMT_DELETE: @@ -448,6 +450,8 @@ // do nothing case STMT_NONE: break; + default: + throw_oci_exception(OciException(__TROTL_HERE__, "Unknown statement type: %d\n%s").arg(get_stmt_type()).arg(_parsed_stmt)); }; if(!_bound && _out_cnt) Modified: trunk/tora/extlibs/trotl/src/trotl_stat.h =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_stat.h 2013-09-20 19:12:43 UTC (rev 4848) +++ trunk/tora/extlibs/trotl/src/trotl_stat.h 2013-09-25 11:19:08 UTC (rev 4849) @@ -84,6 +84,7 @@ STMT_BEGIN = OCI_STMT_BEGIN, STMT_DECLARE = OCI_STMT_DECLARE, STMT_CALL = 10, // OCI_STMT_CALL on 11g OCI + STMT_MERGE = 16, STMT_NONE }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ibr...@us...> - 2013-09-27 11:02:50
|
Revision: 4853 http://sourceforge.net/p/tora/code/4853 Author: ibre5041 Date: 2013-09-27 11:02:43 +0000 (Fri, 27 Sep 2013) Log Message: ----------- Set EOF_QUERY early, when no rows are returned Modified Paths: -------------- trunk/tora/extlibs/trotl/src/trotl_stat.cpp trunk/tora/extlibs/trotl/src/trotl_stat.h Modified: trunk/tora/extlibs/trotl/src/trotl_stat.cpp =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_stat.cpp 2013-09-27 10:08:59 UTC (rev 4852) +++ trunk/tora/extlibs/trotl/src/trotl_stat.cpp 2013-09-27 11:02:43 UTC (rev 4853) @@ -379,8 +379,7 @@ if (_state & EOF_QUERY) return true; - if ((_state & EXECUTED) == 0 && (_state & EOF_DATA) == 0 && (_state & EOF_QUERY) == 0) - pre_read_value(); // will possibly call execute_internal and fetch (is necessary), but not if EOF flag is already set + pre_read_value(); // will possibly call execute_internal or fetch (if necessary), but not if EOF flag is already set if (_state >= EOF_DATA && _last_buff_row >= fetched_rows()) { @@ -592,6 +591,8 @@ _last_row += _last_buff_row; _last_fetched_row = row_count(); _last_buff_row = 0; + if ( _last_fetched_row == 0) // nothing was fetched + _state |= EOF_QUERY | EOF_DATA; } ub4 SqlStatement::row_count() const Modified: trunk/tora/extlibs/trotl/src/trotl_stat.h =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_stat.h 2013-09-27 10:08:59 UTC (rev 4852) +++ trunk/tora/extlibs/trotl/src/trotl_stat.h 2013-09-27 11:02:43 UTC (rev 4853) @@ -107,9 +107,13 @@ ub4 get_bindpar_count() const; const std::vector<DescribeColumn*>& get_columns() { - if((_state & EXECUTED) == 0) - execute_internal(g_OCIPL_BULK_ROWS, OCI_DEFAULT); + // Was not executed yet - or was executed but all rows were already fetched => re-execute + if ((_state & EXECUTED) == 0 && (_state & EOF_DATA) == 0) // Both flags are set to 0 => query was never executed + execute_internal(_buff_size, OCI_DEFAULT); + if ((_state & EXECUTED) == 0 && (_state & EOF_DATA) && (_state & EOF_QUERY)) // EXECUTED == 0 and EOF_QUERY was reached => re-execute + execute_internal(_buff_size, OCI_DEFAULT); + return _columns; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ibr...@us...> - 2013-10-08 20:56:57
|
Revision: 4863 http://sourceforge.net/p/tora/code/4863 Author: ibre5041 Date: 2013-10-08 20:56:51 +0000 (Tue, 08 Oct 2013) Log Message: ----------- clang compilation warnings Modified Paths: -------------- trunk/tora/extlibs/trotl/src/trotl_describe.cpp trunk/tora/extlibs/trotl/src/trotl_describe.h trunk/tora/extlibs/trotl/src/trotl_stat.cpp Modified: trunk/tora/extlibs/trotl/src/trotl_describe.cpp =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_describe.cpp 2013-10-08 05:39:01 UTC (rev 4862) +++ trunk/tora/extlibs/trotl/src/trotl_describe.cpp 2013-10-08 20:56:51 UTC (rev 4863) @@ -30,10 +30,11 @@ */ + + +#include "trotl_describe.h" #include "trotl_common.h" #include "trotl_export.h" -#include "trotl_describe.h" -#include "trotl_common.h" #include "trotl_error.h" #include <vector> @@ -211,6 +212,10 @@ //_desc.alloc(conn._env); } +Describe::~Describe() +{ +} + DescribeSynonym::DescribeSynonym(OciConnection &con, OciDescribe &desc, const tstring &objectName, bool isPublic) : Describe(con, desc, objectName) , _public(isPublic) Modified: trunk/tora/extlibs/trotl/src/trotl_describe.h =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_describe.h 2013-10-08 05:39:01 UTC (rev 4862) +++ trunk/tora/extlibs/trotl/src/trotl_describe.h 2013-10-08 20:56:51 UTC (rev 4863) @@ -209,6 +209,8 @@ static objectType getObjectType(OciConnection &con, const tstring &objectName); static Describe* createDescription(OciConnection &con, const tstring &objectName); + + virtual ~Describe(); protected: Describe(const tstring &objectName); Describe(OciConnection& con, const tstring &objectName); Modified: trunk/tora/extlibs/trotl/src/trotl_stat.cpp =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_stat.cpp 2013-10-08 05:39:01 UTC (rev 4862) +++ trunk/tora/extlibs/trotl/src/trotl_stat.cpp 2013-10-08 20:56:51 UTC (rev 4863) @@ -1485,7 +1485,7 @@ //#ifdef __STDC_WANT_SECURE_LIB__ // char* b = buffer+l + snprintf_s(buffer+l, sizeof(buffer)-l, _TRUNCATE, "\nerror at SQL position %d [%d.%d]:\n", _parse_offset, line, column); //#else - char* b = buffer+l + snprintf(buffer+l, sizeof(buffer)-l-1, "\nerror at SQL position %u [%u.%u]:\n", (unsigned)_parse_offset, line, column); + char* b = buffer+l + snprintf(buffer+l, sizeof(buffer)-l-1, "\nerror at SQL position %u [%u.%u]:\n", (unsigned)_parse_offset, line, (unsigned)column); //#endif char* p = b; s = lp; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ibr...@us...> - 2013-11-11 13:53:39
|
Revision: 4933 http://sourceforge.net/p/tora/code/4933 Author: ibre5041 Date: 2013-11-11 13:53:34 +0000 (Mon, 11 Nov 2013) Log Message: ----------- CDT static code checks - resolved Modified Paths: -------------- trunk/tora/extlibs/trotl/src/trotl_collection.cpp trunk/tora/extlibs/trotl/src/trotl_cursor.cpp trunk/tora/extlibs/trotl/src/trotl_describe.cpp trunk/tora/extlibs/trotl/src/trotl_error.cpp trunk/tora/extlibs/trotl/src/trotl_stat.cpp Modified: trunk/tora/extlibs/trotl/src/trotl_collection.cpp =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_collection.cpp 2013-11-11 13:46:42 UTC (rev 4932) +++ trunk/tora/extlibs/trotl/src/trotl_collection.cpp 2013-11-11 13:53:34 UTC (rev 4933) @@ -342,6 +342,7 @@ "Collection to string convertorsion - Not implemented yet: %d") .arg(_collection_data_type) ); + // no break here } } } Modified: trunk/tora/extlibs/trotl/src/trotl_cursor.cpp =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_cursor.cpp 2013-11-11 13:46:42 UTC (rev 4932) +++ trunk/tora/extlibs/trotl/src/trotl_cursor.cpp 2013-11-11 13:53:34 UTC (rev 4933) @@ -125,7 +125,9 @@ } -SqlCursor::SqlCursor() : c(NULL) +SqlCursor::SqlCursor() + : c(NULL) + , handle(NULL) { } Modified: trunk/tora/extlibs/trotl/src/trotl_describe.cpp =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_describe.cpp 2013-11-11 13:46:42 UTC (rev 4932) +++ trunk/tora/extlibs/trotl/src/trotl_describe.cpp 2013-11-11 13:53:34 UTC (rev 4933) @@ -113,8 +113,10 @@ case OCI_PTYPE_DATABASE: // - database case OCI_PTYPE_UNK: // - unknown schema object throw_oci_exception(OciException(__TROTL_HERE__, "Error describing object: %d\n").arg(obj_type)); + //no break here default: throw_oci_exception(OciException(__TROTL_HERE__, "Error describing object: %d\n").arg(obj_type)); + //no break here } }; @@ -190,8 +192,10 @@ case OCI_PTYPE_DATABASE: // - database case OCI_PTYPE_UNK: // - unknown schema object throw_oci_exception(OciException(__TROTL_HERE__, "Error describing object: %d\n").arg(obj_type)); + //no break here default: throw_oci_exception(OciException(__TROTL_HERE__, "Error describing object: %d\n").arg(obj_type)); + //no break here } }; Modified: trunk/tora/extlibs/trotl/src/trotl_error.cpp =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_error.cpp 2013-11-11 13:46:42 UTC (rev 4932) +++ trunk/tora/extlibs/trotl/src/trotl_error.cpp 2013-11-11 13:53:34 UTC (rev 4933) @@ -124,6 +124,7 @@ break; default: _sql_error_code.push_back(0); + //no break here } #ifdef DEBUG @@ -169,6 +170,7 @@ s << res; _mess.append(s.str()); } + // no break here } #ifdef DEBUG Modified: trunk/tora/extlibs/trotl/src/trotl_stat.cpp =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_stat.cpp 2013-11-11 13:46:42 UTC (rev 4932) +++ trunk/tora/extlibs/trotl/src/trotl_stat.cpp 2013-11-11 13:53:34 UTC (rev 4933) @@ -461,6 +461,7 @@ break; default: throw_oci_exception(OciException(__TROTL_HERE__, "Unknown statement type: %d\n%s").arg(get_stmt_type()).arg(_parsed_stmt)); + //no break here }; if(!_bound && _out_cnt) @@ -507,6 +508,7 @@ case OCI_ERROR: _state |= STMT_ERROR; throw_oci_exception(OciException(__TROTL_HERE__, *this)); + //no break here default: if (rows > 0) _state |= EXECUTED; @@ -574,6 +576,7 @@ case OCI_NO_DATA: _state |= EOF_DATA; _state &= ~EXECUTED; + //no break here case OCI_SUCCESS: _state |= FETCHED; break; @@ -583,6 +586,7 @@ _state |= EOF_DATA; _state |= EOF_QUERY; _state &= ~EXECUTED; + //no break here default: oci_check_error(__TROTL_HERE__, _errh, res); break; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ibr...@us...> - 2013-12-18 20:56:15
|
Revision: 4995 http://sourceforge.net/p/tora/code/4995 Author: ibre5041 Date: 2013-12-18 20:56:08 +0000 (Wed, 18 Dec 2013) Log Message: ----------- write only variable removed Modified Paths: -------------- trunk/tora/extlibs/trotl/src/trotl_stat.cpp trunk/tora/extlibs/trotl/src/trotl_stat.h Modified: trunk/tora/extlibs/trotl/src/trotl_stat.cpp =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_stat.cpp 2013-12-18 20:39:13 UTC (rev 4994) +++ trunk/tora/extlibs/trotl/src/trotl_stat.cpp 2013-12-18 20:56:08 UTC (rev 4995) @@ -622,10 +622,6 @@ sword res = OCICALL(OCIAttrGet(_handle, get_type_id(), &row_count, &size, OCI_ATTR_ROWS_FETCHED, _errh)); oci_check_error(__TROTL_HERE__, _errh, res); - _fetched_row = row_count; - - // std::cout << "ub4 SqlStatement::fetched_rows() const: " << row_count << std::endl; - return row_count; } Modified: trunk/tora/extlibs/trotl/src/trotl_stat.h =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_stat.h 2013-12-18 20:39:13 UTC (rev 4994) +++ trunk/tora/extlibs/trotl/src/trotl_stat.h 2013-12-18 20:56:08 UTC (rev 4995) @@ -354,7 +354,6 @@ ub4 _last_row, _last_fetched_row, _in_pos, _out_pos, _iters; ub4 _last_buff_row, _buff_size, _fetch_rows; // used in select statements - mutable ub4 _fetched_row; std::vector<DescribeColumn*> _columns; // TODO move into some SQL-result class This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ibr...@us...> - 2015-01-10 14:07:56
|
Revision: 5180 http://sourceforge.net/p/tora/code/5180 Author: ibre5041 Date: 2015-01-10 14:07:40 +0000 (Sat, 10 Jan 2015) Log Message: ----------- compiler warning fixes Modified Paths: -------------- trunk/tora/extlibs/trotl/src/trotl_conn.h trunk/tora/extlibs/trotl/src/trotl_cursor.cpp Modified: trunk/tora/extlibs/trotl/src/trotl_conn.h =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_conn.h 2014-12-29 23:37:59 UTC (rev 5179) +++ trunk/tora/extlibs/trotl/src/trotl_conn.h 2015-01-10 14:07:40 UTC (rev 5180) @@ -173,10 +173,10 @@ OciLogin(OciEnv& env, const LoginPara& login_para, ub4 mode=OCI_DEFAULT) : super(env) , _server(env) + , _sid(0) + , _serial(0) , _session(env) , _connected(false) - , _sid(0) - , _serial(0) { connect(login_para._username, login_para._password, login_para._tnsname, mode); @@ -186,6 +186,8 @@ OciLogin(OciEnv& env, const LoginAndPChangePara& login_para, ub4 mode=OCI_DEFAULT) : super(env), _server(env), + _sid(0), + _serial(0), _session(env), _connected(false) { Modified: trunk/tora/extlibs/trotl/src/trotl_cursor.cpp =================================================================== --- trunk/tora/extlibs/trotl/src/trotl_cursor.cpp 2014-12-29 23:37:59 UTC (rev 5179) +++ trunk/tora/extlibs/trotl/src/trotl_cursor.cpp 2015-01-10 14:07:40 UTC (rev 5180) @@ -126,8 +126,8 @@ SqlCursor::SqlCursor() - : c(NULL) - , handle(NULL) + : handle(NULL) + , c(NULL) { } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |