Commit 6332f1d3 authored by Yuchen Pei's avatar Yuchen Pei

MDEV-30576 Add a script to output spider errors

usage example (from the build dir):

./storage/spider/pspderr 12701
parent 9811d23b
......@@ -31,6 +31,19 @@ ELSE()
IF(NOT TARGET spider)
RETURN()
ENDIF()
CONFIGURE_FILE(spd_err.h . COPYONLY)
CONFIGURE_FILE(pspderr . COPYONLY)
INSTALL(FILES
"spd_err.h"
DESTINATION ${INSTALL_PLUGINDIR}
COMPONENT Server
)
INSTALL_SCRIPT(
"pspderr"
DESTINATION ${INSTALL_PLUGINDIR}
COMPONENT Server
)
ENDIF()
IF(MSVC AND (TARGET spider))
......
#!/bin/bash
er=$(grep "$1" $(dirname "$0")/spd_err.h | grep -oE [A-Z_]+_NUM | sed 's/_NUM//')
grep -E "#define[[:space:]]+$er(_NUM|_STR)" $(dirname "$0")/spd_err.h
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment