• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2161
  • Last Modified:

equivalent of @@TRANCOUNT mysql

Hi,we are migrating iue db from mssql to mysql.
i have a procedure where they have used
@@TRANCOUNT ;
please tell me the equivalent of @@TRANCOUNT in mysql
rgds,
vijji
0
vijji_lakshmi
Asked:
vijji_lakshmi
  • 3
1 Solution
 
UmeshCommented:
very simple...........

SELECT COUNT(*) AS OpenQuestions from EE;


This should give you the answer for your question....
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
MySQL does not have such equivalent.
0
 
UmeshCommented:
Agree with Agelll, MySQL don't provide per connection stats such as "number of active transactions for the current connection.".. but you get a count of running threads which are not sleeping...

mysql> show status like 'Threads_running';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| Threads_running | 1     |
+-----------------+-------+
0
 
vijji_lakshmiAuthor Commented:
Hi ushastry,
what is EE here??
rfds,
vijji
0
 
UmeshCommented:
Hello,

Sorry I just wrote bcoz I noticed that you have lots of open questions and you didn't close(some 30+ open questions and which is not a good sign).. Why I'm telling you is lost of ppl help here to earn some points and when they notice that you don't close questions then they hardly try to attempt your questions..

EE means Experts-Exchange.

Coming to your question - unfortunately MySQL don't provide such variables @@TRANCOUNT as for as I know..


Thanks,
Umesh
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now