comp_err 创建了 errmsg.sys
文件,该文件由 mysqld 用于确定不同错误代码的错误消息。comp_err 通常在构建 MySQL 时自动运行。它将 errmsg.sys
文件从 MySQL 源代码分布中的文本格式错误信息编译:
错误信息来自 share
目录中的 messages_to_error_log.txt
和 messages_to_clients.txt
文件。
有关定义错误消息的更多信息,请参阅这些文件中的注释,以及 errmsg_readme.txt
文件。
comp_err 还生成了 mysqld_error.h
、mysqld_ername.h
和 mysqld_errmsg.h
头文件。
使用以下命令调用 comp_err:
comp_err [options]
comp_err 支持以下选项。
-
--help
,-?
Command-Line Format --help Type 布尔值 Default Value false 显示帮助信息并退出。
-
--charset=
,dir_name
-C
dir_name
Command-Line Format --charset Type 字符串 Default Value ../share/charsets 字符集目录。默认为
../sql/share/charsets
。 -
--debug=
,debug_options
-#
debug_options
Command-Line Format --debug=options Type 字符串 Default Value d:t:O,/tmp/comp_err.trace 写入调试日志。典型的
debug_options
字符串是d:t:O,
。默认是文件名
d:t:O,/tmp/comp_err.trace
。 -
--debug-info
,-T
Command-Line Format --debug-info Type 布尔值 Default Value false 程序退出时打印一些调试信息。
-
--errmsg-file=
,文件名
-H
文件名
Command-Line Format --errmsg-file=name Type 文件名 Default Value mysqld_errmsg.h 错误消息文件的名称。默认是
mysqld_errmsg.h
。 -
--header-file=
,文件名
-H
文件名
Command-Line Format --header-file=name Type 文件名 Default Value mysqld_error.h 错误头文件的名称。默认是
mysqld_error.h
。 -
--in-file-errlog=
,文件名
-e
文件名
Command-Line Format --in-file-errlog Type 文件名 Default Value ../share/messages_to_error_log.txt 定义要写入错误日志的错误消息的输入文件的名称。默认是
../share/messages_to_error_log.txt
。 -
--in-file-toclient=
,文件名
-c
文件名
Command-Line Format --in-file-toclient=path Type 文件名 Default Value ../share/messages_to_clients.txt 定义要写入客户端的错误消息的输入文件的名称。默认是
../share/messages_to_clients.txt
。 -
--名称文件=
,文件名
-N
文件名
Command-Line Format --名称文件=名称 Type 文件名 Default Value mysqld_ername.h 错误名称文件的名称。默认是
mysqld_ername.h
。 -
--输出目录=
,目录名
-D
目录名
Command-Line Format --输出目录=路径 Type 字符串 Default Value ../share/ 输出基目录的名称。默认是
../sql/share/
。 -
--输出文件=
,文件名
-O
文件名
Command-Line Format --输出文件=名称 Type 文件名 Default Value errmsg.sys 输出文件的名称。默认是
errmsg.sys
。 -
--版本
,-V
Command-Line Format --版本 Type 布尔值 Default Value false 显示版本信息并退出。