MySQL Forums
Forum List  »  NDB clusters

Re: help:how to to get trace execution functions of a query?
Posted by: Mikael Ronström
Date: December 02, 2006 04:02PM

Hi,
The NDB handler you can trace in the normal DBUG_* way as for
other MySQL related code.

For the ndbd kernel you can trace messages sent internally in
ndbd and between ndbd by doing the following commands in the
management client:

1) all log block=all
or
nodeid log block=block_name

where block_name is any of
dbtup, dbacc, dbtc, ndbcntr, qmgr, dbdict, cmvmi, trix, dbutil,
ndbfs, lgman, tsman, dblqh, suma
I probably forgot some module but you'll find them in the code
in storage/ndb/src/kernel/blocks

2) all teston
or
nodeid teston

This activates the debug tracing of messages.

3) all testoff
or
nodeid testoff

This deactivates the debug tracing of messages.


The output of the message logging will end up in a
file per node in the DataDir in the file
with the name signal.log in the name (forgot the
exact name).

If you find a signal in the log that has the name
LQHKEYREQ and is sent towards DBTC from DBLQH then
you'll find the code that receives this signal in
execLQHKEYREQ in:
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
and the sending is done from one of the places in
the code where it says something like
sendSignal(GSN_LQHKEYREQ, .....) in dbtc/DbtcMain.cpp

The signal trace also contains the data words of the
signal.

Signal tracing is only possible if you compiled a debug
version. So change to compile-pentium-debug-max in your
case.

Rgrds Mikael



fu zhibo Wrote:
-------------------------------------------------------
> hello,everyone~
> I hava done BUILD/compile-pentium-max to
> compile a max build ndb cluster from source and
> install it.
> I want to investigate mysql NDB cluster how to
> execute a query,such as select * from table1 and
> so on . i find it is comlexity to trace sources by
> GDB;
>
> 1.can you give me some easy methods or some advice
> to trace.
> 2. how to use parameter DBUG_ENTER. if it is used
> ,can i get the execution functions of a query?
> 3. What developmemnt and debugg tools to be used
> in developing Mysql Cluster ?
>
>
>
> best regards

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: help:how to to get trace execution functions of a query?
1115
December 02, 2006 04:02PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.