summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladislav Vaintroub <vvaintroub@mysql.com>2008-10-23 15:28:53 +0200
committerVladislav Vaintroub <vvaintroub@mysql.com>2008-10-23 15:28:53 +0200
commit49ff055736b3b613005e5b17915d08fe48b7b532 (patch)
treedb430586277a725560fc7a2845f21b691e5ea119
parentd501f48757f891873bccedb7914d1348a981e0f6 (diff)
downloadmariadb-git-49ff055736b3b613005e5b17915d08fe48b7b532.tar.gz
Bug#40280: Message compiler(mc.exe) needed to compile MySQL on windows.
Visual Studio 2008 Express edition does not include message compiler mc.exe It is not possible to build MySQL server if only VC2008 Express is installed, because we use mc.exe to generate event log messages. This patch removes the mc.exe dependency. Generated files message.h, message.rc and MSG00001.bin are checked into source code repository. Instructions on how to add or change messages are added to messages.mc
-rwxr-xr-xsql/CMakeLists.txt15
-rw-r--r--sql/MSG00001.binbin0 -> 184 bytes
-rw-r--r--sql/Makefile.am3
-rw-r--r--sql/message.h55
-rw-r--r--sql/message.mc8
-rw-r--r--sql/message.rc2
6 files changed, 70 insertions, 13 deletions
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index 9ea9874c1b1..860afb42a27 100755
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -28,10 +28,8 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/bdb/build_win32
${CMAKE_SOURCE_DIR}/bdb/dbinc)
-SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/sql/message.rc
- ${CMAKE_SOURCE_DIR}/sql/message.h
- ${CMAKE_SOURCE_DIR}/sql/sql_yacc.h
- ${CMAKE_SOURCE_DIR}/sql/sql_yacc.cc
+SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/sql/sql_yacc.h
+ ${CMAKE_SOURCE_DIR}/sql/sql_yacc.cc
${CMAKE_SOURCE_DIR}/include/mysql_version.h
${CMAKE_SOURCE_DIR}/sql/lex_hash.h
${PROJECT_SOURCE_DIR}/include/mysqld_error.h
@@ -120,13 +118,6 @@ ADD_CUSTOM_COMMAND(
DEPENDS ${PROJECT_SOURCE_DIR}/sql/sql_yacc.cc
)
-# Windows message file
-ADD_CUSTOM_COMMAND(
- SOURCE ${PROJECT_SOURCE_DIR}/sql/message.mc
- OUTPUT message.rc message.h
- COMMAND mc ARGS ${PROJECT_SOURCE_DIR}/sql/message.mc
- DEPENDS ${PROJECT_SOURCE_DIR}/sql/message.mc)
-
# Gen_lex_hash
# About "mysqlclient_notls", see note in "client/CMakeLists.txt"
ADD_EXECUTABLE(gen_lex_hash gen_lex_hash.cc)
@@ -141,7 +132,7 @@ ADD_DEPENDENCIES(mysqld${MYSQLD_EXE_SUFFIX} gen_lex_hash)
# Remove the auto-generated files as part of 'Clean Solution'
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
- "lex_hash.h;message.rc;message.h;sql_yacc.h;sql_yacc.cc")
+ "lex_hash.h;sql_yacc.h;sql_yacc.cc")
ADD_LIBRARY(udf_example MODULE udf_example.c udf_example.def)
ADD_DEPENDENCIES(udf_example strings)
diff --git a/sql/MSG00001.bin b/sql/MSG00001.bin
new file mode 100644
index 00000000000..89f547694f5
--- /dev/null
+++ b/sql/MSG00001.bin
Binary files differ
diff --git a/sql/Makefile.am b/sql/Makefile.am
index 52a4c96f451..96cdd04d5ba 100644
--- a/sql/Makefile.am
+++ b/sql/Makefile.am
@@ -118,7 +118,8 @@ DEFS = -DMYSQL_SERVER \
BUILT_SOURCES = sql_yacc.cc sql_yacc.h lex_hash.h
EXTRA_DIST = $(BUILT_SOURCES) nt_servc.cc nt_servc.h \
- message.mc examples/CMakeLists.txt CMakeLists.txt \
+ message.mc message.h message.rc MSG00001.bin \
+ examples/CMakeLists.txt CMakeLists.txt \
udf_example.c udf_example.def
DISTCLEANFILES = lex_hash.h sql_yacc.output
diff --git a/sql/message.h b/sql/message.h
new file mode 100644
index 00000000000..0e7c282d5a1
--- /dev/null
+++ b/sql/message.h
@@ -0,0 +1,55 @@
+/*
+ To change or add messages mysqld writes to the Windows error log, run
+ mc.exe message.mc
+ and checkin generated messages.h, messages.rc and msg000001.bin under the
+ source control.
+ mc.exe can be installed with Windows SDK, some Visual Studio distributions
+ do not include it.
+*/
+//
+// Values are 32 bit values layed out as follows:
+//
+// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
+// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+// +---+-+-+-----------------------+-------------------------------+
+// |Sev|C|R| Facility | Code |
+// +---+-+-+-----------------------+-------------------------------+
+//
+// where
+//
+// Sev - is the severity code
+//
+// 00 - Success
+// 01 - Informational
+// 10 - Warning
+// 11 - Error
+//
+// C - is the Customer code flag
+//
+// R - is a reserved bit
+//
+// Facility - is the facility code
+//
+// Code - is the facility's status code
+//
+//
+// Define the facility codes
+//
+
+
+//
+// Define the severity codes
+//
+
+
+//
+// MessageId: MSG_DEFAULT
+//
+// MessageText:
+//
+// %1For more information, see Help and Support Center at http://www.mysql.com.
+//
+//
+//
+#define MSG_DEFAULT 0xC0000064L
+
diff --git a/sql/message.mc b/sql/message.mc
index a1a7c8cff7e..8d68d599365 100644
--- a/sql/message.mc
+++ b/sql/message.mc
@@ -1,3 +1,11 @@
+;/*
+; To change or add messages mysqld writes to the Windows error log, run
+; mc.exe message.mc
+; and checkin generated messages.h, messages.rc and msg000001.bin under the
+; source control.
+; mc.exe can be installed with Windows SDK, some Visual Studio distributions
+; do not include it.
+;*/
MessageId = 100
Severity = Error
Facility = Application
diff --git a/sql/message.rc b/sql/message.rc
new file mode 100644
index 00000000000..116522b7d48
--- /dev/null
+++ b/sql/message.rc
@@ -0,0 +1,2 @@
+LANGUAGE 0x9,0x1
+1 11 MSG00001.bin