1.2.1.2 Running a Test with the Debugger

转载自: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:

  1. Run libmysqld/examples/test_run --gdb some.test. This creates a libmysqld/examples/test-gdbinit file which contains the required parameters for mysqltest.

  2. Make a copy of the test-gdbinit file (call it, for example, some-gdbinit). The test-gdbinit file will be removed after test-run --gdbhas finished.

  3. Load libmysqld/examples/mysqltest_embedded into your favorite debugger, for example: gdb mysqltest_embedded.

  4. 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.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值