summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <msvensson@pilot.blaudden>2007-04-19 17:00:29 +0200
committerunknown <msvensson@pilot.blaudden>2007-04-19 17:00:29 +0200
commit4fff310ecfc2958483b3b01375c6b54afd443f7a (patch)
tree8bec7296de055f59aa5ceb634d9bb94c5a568354 /scripts
parentb4573eb4caff7e2a112c79f7923d565fb836e8a0 (diff)
downloadmariadb-git-4fff310ecfc2958483b3b01375c6b54afd443f7a.tar.gz
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
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/CMakeLists.txt9
-rw-r--r--scripts/comp_sql.c4
2 files changed, 8 insertions, 5 deletions
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')