~ubuntu-branches/ubuntu/wily/tora/wily-proposed

« back to all changes in this revision

Viewing changes to src/tooracleconnection.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Michael Meskes
  • Date: 2009-09-11 12:37:52 UTC
  • mfrom: (1.2.8 upstream) (3.3.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090911123752-qhu322xlclo2hpqu
Tags: 2.1.0-1
* New upstream version, the rebuild closes: #540046.
* Bumped Standards-Version to 3.8.3, no changes needed.
* New project homepage.
* Removed no longer needed 01_missing_includes.dpatch.
* Removed no longer used dh_desktop call.
* Added README.source file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
#if 0 /* OTL tracing */
76
76
#define OTL_TRACE_LEVEL 0xff
77
77
#define OTL_TRACE_STREAM cerr
78
 
#include <iostream.h>
 
78
#include <iostream>
 
79
using namespace std;
79
80
#endif
80
81
 
81
82
#include "otlv4.h"
177
178
class toOracleProvider : public toConnectionProvider
178
179
{
179
180
public:
180
 
class connectionDeleter : public toTask
181
 
    {
182
 
        otl_connect *Connection;
183
 
    public:
184
 
        connectionDeleter(otl_connect *connect)
185
 
                : Connection(connect)
186
 
        { }
187
 
        virtual void run(void)
188
 
        {
189
 
            delete Connection;
190
 
        }
191
 
    };
192
 
class oracleSub : public toConnectionSub
 
181
    class oracleSub : public toConnectionSub
193
182
    {
194
183
    public:
195
184
        otl_connect *Connection;
199
188
        }
200
189
        ~oracleSub()
201
190
        {
202
 
            toThread *thread = new toThread(new connectionDeleter(Connection));
203
 
            thread->start();
 
191
            try {
 
192
                delete Connection;
 
193
            }
 
194
            catch(...) {
 
195
            }
 
196
 
 
197
            Connection = 0;
204
198
        }
205
199
        virtual void cancel(void)
206
200
        {
438
432
                    if(conn)
439
433
                        conn->throwExtendedException(query()->connection(), exc);
440
434
                }
 
435
 
 
436
                return true;
441
437
            }
442
438
        }
443
439
        virtual int rowsProcessed(void)
1389
1385
    ExplainPlan->setText(toConfigurationSingle::Instance().planTable());
1390
1386
    OpenCursors->setValue(toConfigurationSingle::Instance().openCursors());
1391
1387
    KeepPlans->setChecked(toConfigurationSingle::Instance().keepPlans());
 
1388
    VsqlPlans->setChecked(toConfigurationSingle::Instance().vsqlPlans());
1392
1389
    int len = toConfigurationSingle::Instance().maxLong();
1393
1390
    if (len >= 0)
1394
1391
    {
1410
1407
void toOracleSetting::saveSetting()
1411
1408
{
1412
1409
    toConfigurationSingle::Instance().setKeepPlans(KeepPlans->isChecked());
 
1410
    toConfigurationSingle::Instance().setVsqlPlans(VsqlPlans->isChecked());
1413
1411
    toConfigurationSingle::Instance().setDateFormat(DefaultDate->text());
1414
1412
 
1415
1413
    // try to change NLS for already running sessions