command to check value of autocommit and isolation level

Hi,

Pls let me know command to get following:

  1. how to check current value of autocommit
  2. how to check current value of isolation level
    I am using mysql-5.0.26 on unix

-Thanks

print "AutoCommit: $dbh->{AutoCommit}\n";

With AutoCommit enabled, that would print:
AutoCommit: 1 as you might expect. Actually, since AutoCommit is a boolean attribute, it would print 1 after any value that Perl considers true had been assigned to it.
After a false value was assigned, you may reasonably expect a 0 to be printed, but you might be surprised to see:
AutoCommit: That's because Perl uses an internal representation of false that is both a numeric zero and an empty string at the same time. When used in a string context, the empty string is printed. In a numeric context, the zero is used.

Advanced DBI (Programming the Perl DBI)

1 Like

go it commands are :

select @@session.autocommit,@@session.tx_isolation;
+----------------------+------------------------+
| @@session.autocommit | @@session.tx_isolation |
+----------------------+------------------------+
|                    1 | REPEATABLE-READ        |
+----------------------+------------------------+
1 row in set (0.00 sec)

---------- Post updated at 08:57 AM ---------- Previous update was at 08:55 AM ----------

thanks @itkamaraj
print with $dbh that you posted helps.