转载自:https://dev.mysql.com/doc/internals/en/guided-tour-major-directories-test.html
To run a test named some.test with the
debugger in embedded mode you could do this:
-
Run
libmysqld/examples/test_run --gdb some.test. This creates alibmysqld/examples/test-gdbinitfile which contains the required parameters for mysqltest. -
Make a copy of the
test-gdbinitfile (call it, for example,some-gdbinit). Thetest-gdbinitfile will be removed aftertest-run --gdbhas finished. -
Load
libmysqld/examples/mysqltest_embeddedinto your favorite debugger, for example:gdb mysqltest_embedded. -
In the debugger, for example in
gdb, do:--sou some-gdbinit
Now some.test is running, and you can
see if it's passing or not.
If you just want to debug some queries with the embedded server (not the test), it's easier to just run libmysqld/examples/mysql.
It's the embedded server-based clone of the usual mysql tool,
and works fine under gdb or
whatever your favorite debugger is.
本文介绍如何使用调试器在嵌入式模式下运行MySQL测试。通过特定步骤,可以实现对名为 some.test 的测试用例进行调试,并提供了一种简便的方法来调试嵌入式服务器上的查询。
1680

被折叠的 条评论
为什么被折叠?



