From 4fff310ecfc2958483b3b01375c6b54afd443f7a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 19 Apr 2007 17:00:29 +0200 Subject: mysql_upgrade win fixes client/mysql_upgrade.c: Windows fix scripts/CMakeLists.txt: Fix problems with CMakeList causing build to fail scripts/comp_sql.c: Improve comp_sql.c to generate output file with shorter strings --- scripts/CMakeLists.txt | 9 ++++++--- scripts/comp_sql.c | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 8580844097e..cb5efd0ff9b 100755 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -20,9 +20,12 @@ TARGET_LINK_LIBRARIES(comp_sql dbug mysys strings) # Build comp_sql - used for embedding SQL in C or C++ programs GET_TARGET_PROPERTY(COMP_SQL_EXE comp_sql LOCATION) -ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/client/mysql_fix_privilege_tables_sql.c +ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tables_sql.c COMMAND ${COMP_SQL_EXE} - ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tables.sql - ${PROJECT_SOURCE_DIR}/client/mysql_fix_privilege_tables_sql.c + mysql_fix_privilege_tables.sql + mysql_fix_privilege_tables_sql.c DEPENDS comp_sql ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tables.sql) +ADD_CUSTOM_TARGET(GenFixPrivs + ALL + DEPENDS ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tables_sql.c) diff --git a/scripts/comp_sql.c b/scripts/comp_sql.c index 60236774701..328dab0cf13 100644 --- a/scripts/comp_sql.c +++ b/scripts/comp_sql.c @@ -74,7 +74,7 @@ int main(int argc, char *argv[]) while(*end && *end != '.') end++; *end= 0; - fprintf(out, "const char* %s={\"\\\n", infile_name); + fprintf(out, "const char* %s={\n\"", infile_name); while (fgets(buff, sizeof(buff), in)) { @@ -87,7 +87,7 @@ int main(int argc, char *argv[]) Reached end of line, add escaped newline, escaped backslash and a newline to outfile */ - fprintf(out, "\\n\\\n"); + fprintf(out, "\\n \"\n\""); curr++; } else if (*curr == '\r') -- cgit v1.2.1