Uploaded image for project: 'CUBRID APIs'
  1. CUBRID APIs
  2. APIS-595

Setting the DBI "TraceLevel" attribute does not work

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Perl-Aprium
    • Fix Version/s: Perl 9.1.0.0002
    • Component/s: Perl Driver
    • Labels:
      None

      Description

      Originally reported at http://www.cubrid.org/695364.

      Hi,

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

      {code}
      #!/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.
      ";{code}

      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.

        Activity

        Hide
        cn15800 谢韦华[Bert] added a comment -

        The reason of this issue is same with APIS-585.

        Show
        cn15800 谢韦华[Bert] added a comment - The reason of this issue is same with APIS-585 .

          People

          • Assignee:
            cn15800 谢韦华[Bert]
            Reporter:
            kadishmal Esen Sagynov
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: