Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Setting the DBI "TraceLevel" attribute does not work

CUBRID Official Forum » Programming Languages » Perl API » Setting the DBI "TraceLevel" attribute does not work

author
message
[Level:2]stefans

Post subject: Setting the DBI "TraceLevel" attribute does not work

registered: 06/29/2012

IP: *.116.213.202

views: 0

Hi,

I'm using the DBD::cubrid module v9.1.0.0001 and server v9.1.0, here is a short test:

#!/bin/env perl

use strict;
use warnings;
use DBI;

my $dbname = 'demodb';
my $user   = 'user';
my $pass   = 'pass';

my $dsn = qq{dbi:cubrid:database=$dbname;host=localhost;port=33000};

my $dbh = DBI->connect(
    $dsn, $user, $pass,
    {   AutoCommit  => 1,
        RaiseError  => 1,
        PrintError  => 1,
    }
) or die $DBI::errstr;

#$dbh->trace(1);                              # this works, globally
$dbh->{TraceLevel} = "1";                    # this doesn't work

{
    print "=== Trace ON 
";
    local $dbh->{TraceLevel} = "1";          # this doesn't work
    my $rez = $dbh->selectall_arrayref(q{ SELECT * FROM event; });
}
{
    print "=== Trace OFF 
";
    my $rez = $dbh->selectall_arrayref(q{ SELECT * FROM event; });
}
print "=== done.
";

The feature to set TraceLevel would be very useful for debuging portions of code, but it does not work.

Thank you.

Regards,

Stefan

P.S.: I hope I'm not inopportune with my postings..., I'm working on implementing a CUBRID engine for App::Sqitch and greater compatibility with other DB's would make this task easier for this and also for other projects.

Quote
[Level:3]Esen Sagynov

# Post subject:Re: Setting the DBI "TraceLevel" attribute does not work

profile

registered: 05/31/2011

IP: *.91.139.82

Hi Stefan,

The more issues you find and report us, the more we are happy! Really! So, I'm very happy to respond to your issues!

Reported to http://jira.cubrid.org/browse/APIS-595. If you'd like you can "watch" these Perl related issues by logging in to our JIRA Issue Tracker to receive notifications when the developer comments on the issue, fixes it, etc.

Quote




You are either using a very old browser or a browser that is not supported.
In order to browse cubrid.org you need to have one of the following browsers:



Internet Explorer: Mozilla Firefox: Google Chrome: