You can activate fairly detailed tracing of the ASQL interface (into the ashlog.log file) by either setting the environment variable ASQLTRACE=1, or by passing the SQLCONF_TRACE flag to the SQLOP_INIT_LIB or SQLOP_INIT_CONN call. This feature was added in Jan 2013 to A-Shell 6.1.1330 and the ashmysql connector 1.4.132 (and improved in each connector update thru 1.4.140).
You can also activate MySQL tracing via the SQL_ATTR_TRACE and SQL_ATTR_TRACEFILE options in the SQLOP_SET_CONNATR call.