![]() |
MySQL 9.6.0
Source Code Documentation
|
Namespaces | |
| namespace | mysql |
| namespace | mysql::debugging |
Macros | |
| #define | MY_SCOPED_TRACE(...) ([](auto &&...) {}(__VA_ARGS__)) |
| "Thread-safe", multi-argument replacement for SCOPED_TRACE. More... | |
| #define MY_SCOPED_TRACE | ( | ... | ) | ([](auto &&...) {}(__VA_ARGS__)) |
"Thread-safe", multi-argument replacement for SCOPED_TRACE.
On some platforms, including Solaris, GTest does not define GTEST_IS_THREADSAFE. Then, use of SCOPED_TRACE in multiple threads results in random crashes because it compiles and runs without warnings but does not synchronize between threads.
To avoid random crashes, use MY_SCOPED_TRACE instead. The downside is that on those platforms, the "scoped traces" are empty, i.e., you see less debug info when a test assertion fails.
SCOPED_TRACE only takes one argument. Sometimes it is convenient to pass multiple arguments. This macro accepts multiple arguments and concatenates them using mysql::strconv::throwing::concat.