Oracle 5.0 Reference Manual page 1943

Table of Contents

Advertisement

mysql Information: 3 : 1: Query Opened: SHOW COLLATION
mysql Information: 4 : 1: Resultset Opened: field(s) = 6, affected rows = -1, inserted id = -1
mysql Information: 5 : 1: Resultset Closed. Total rows=127, skipped rows=0, size (bytes)=4102
mysql Information: 6 : 1: Query Closed
mysql Information: 3 : 1: Query Opened: SET character_set_results=NULL
mysql Information: 4 : 1: Resultset Opened: field(s) = 0, affected rows = 0, inserted id = 0
mysql Information: 5 : 1: Resultset Closed. Total rows=0, skipped rows=0, size (bytes)=0
mysql Information: 6 : 1: Query Closed
mysql Information: 10 : 1: Set Database: world
mysql Information: 3 : 1: Query Opened: SELECT Name, HeadOfState FROM Country WHERE Continent='Oceania'
mysql Information: 4 : 1: Resultset Opened: field(s) = 2, affected rows = -1, inserted id = -1
American Samoa -- George W. Bush
Australia -- Elisabeth II
...
Wallis and Futuna -- Jacques Chirac
Vanuatu -- John Bani
United States Minor Outlying Islands -- George W. Bush
mysql Information: 5 : 1: Resultset Closed. Total rows=28, skipped rows=0, size (bytes)=788
mysql Information: 6 : 1: Query Closed
Done.
mysql Information: 2 : 1: Connection Closed
The first number displayed in the trace message corresponds to the MySQL event type:
Event
1
2
3
4
5
6
7
8
9
10
11
12
13
The second number displayed in the trace message is the connection count.
Although this example uses the ConsoleTraceListener, any of the other standard listeners could
have been used. Another possibility is to create a custom listener that uses the information passed
using the
method. For example, a custom trace listener could be created to perform
TraceEvent
active monitoring of the MySQL event messages, rather than simply writing these to an output device.
It is also possible to add listeners to the MySQL Trace Source at runtime. This can be done with the
following code:
MySqlTrace.Listeners.Add(new ConsoleTraceListener());
MySQL Connector/Net 6.3.2 introduced the ability to switch tracing on and off at runtime. This
can be achieved using the calls
and MySqlTrace.DisableQueryAnalyzer(). The parameter
postInterval)
Connector/Net Programming
Description
ConnectionOpened: connection string
ConnectionClosed:
QueryOpened: mysql server thread id, query text
ResultOpened: field count, affected rows (-1 if select), inserted
id (-1 if select)
ResultClosed: total rows read, rows skipped, size of resultset in
bytes
QueryClosed:
StatementPrepared: prepared sql, statement id
StatementExecuted: statement id, mysql server thread id
StatementClosed: statement id
NonQuery: [varies]
UsageAdvisorWarning: usage advisor flag. NoIndex = 1,
BadIndex = 2, SkippedRows = 3, SkippedColumns = 4,
FieldConversion = 5.
Warning: level, code, message
Error: error number, error message
MySqlTrace.EnableQueryAnalyzer(string host, int
1923
is the URL of
host

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents