Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
179ffb24
Commit
179ffb24
authored
Apr 19, 2007
by
msvensson@pilot.blaudden
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-5.1-new-maint
into pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
parents
c4ee4e65
ce518d20
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
10 deletions
+16
-10
client/mysql_upgrade.c
client/mysql_upgrade.c
+8
-5
scripts/CMakeLists.txt
scripts/CMakeLists.txt
+6
-3
scripts/comp_sql.c
scripts/comp_sql.c
+2
-2
No files found.
client/mysql_upgrade.c
View file @
179ffb24
...
@@ -335,6 +335,10 @@ static int run_tool(char *tool_path, DYNAMIC_STRING *ds_res, ...)
...
@@ -335,6 +335,10 @@ static int run_tool(char *tool_path, DYNAMIC_STRING *ds_res, ...)
va_end
(
args
);
va_end
(
args
);
#ifdef __WIN__
dynstr_append
(
&
ds_cmdline
,
"
\"
"
);
#endif
DBUG_PRINT
(
"info"
,
(
"Running: %s"
,
ds_cmdline
.
str
));
DBUG_PRINT
(
"info"
,
(
"Running: %s"
,
ds_cmdline
.
str
));
ret
=
run_command
(
ds_cmdline
.
str
,
ds_res
);
ret
=
run_command
(
ds_cmdline
.
str
,
ds_res
);
DBUG_PRINT
(
"exit"
,
(
"ret: %d"
,
ret
));
DBUG_PRINT
(
"exit"
,
(
"ret: %d"
,
ret
));
...
@@ -354,11 +358,11 @@ static my_bool get_full_path_to_executable(char* path)
...
@@ -354,11 +358,11 @@ static my_bool get_full_path_to_executable(char* path)
{
{
my_bool
ret
;
my_bool
ret
;
DBUG_ENTER
(
"get_full_path_to_executable"
);
DBUG_ENTER
(
"get_full_path_to_executable"
);
#ifdef
WIN
#ifdef
__WIN__
ret
=
GetModuleFileName
(
NULL
,
path
,
FN_REFLEN
)
!=
0
;
ret
=
(
GetModuleFileName
(
NULL
,
path
,
FN_REFLEN
)
==
0
)
;
#else
#else
/* my_readlink returns 0 if a symlink was read */
/* my_readlink returns 0 if a symlink was read */
ret
=
my_readlink
(
path
,
"/proc/self/exe"
,
MYF
(
0
))
!=
0
;
ret
=
(
my_readlink
(
path
,
"/proc/self/exe"
,
MYF
(
0
))
!=
0
)
;
/* Might also want to try with /proc/$$/exe if the above fails */
/* Might also want to try with /proc/$$/exe if the above fails */
#endif
#endif
DBUG_PRINT
(
"exit"
,
(
"path: %s"
,
path
));
DBUG_PRINT
(
"exit"
,
(
"path: %s"
,
path
));
...
@@ -416,8 +420,7 @@ static void find_tool(char *tool_path, const char *tool_name)
...
@@ -416,8 +420,7 @@ static void find_tool(char *tool_path, const char *tool_name)
DBUG_PRINT
(
"enter"
,
(
"path: %s"
,
path
));
DBUG_PRINT
(
"enter"
,
(
"path: %s"
,
path
));
/* Chop off last char(since it might be a /) */
/* Chop off last char(since it might be a /) */
size_t
pos
=
max
((
strlen
(
path
)
-
1
),
0
);
path
[
max
((
strlen
(
path
)
-
1
),
0
)]
=
0
;
path
[
pos
]
=
0
;
/* Chop off last dir part */
/* Chop off last dir part */
dirname_part
(
path
,
path
);
dirname_part
(
path
,
path
);
...
...
scripts/CMakeLists.txt
View file @
179ffb24
...
@@ -20,9 +20,12 @@ TARGET_LINK_LIBRARIES(comp_sql dbug mysys strings)
...
@@ -20,9 +20,12 @@ TARGET_LINK_LIBRARIES(comp_sql dbug mysys strings)
# Build comp_sql - used for embedding SQL in C or C++ programs
# Build comp_sql - used for embedding SQL in C or C++ programs
GET_TARGET_PROPERTY
(
COMP_SQL_EXE comp_sql LOCATION
)
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
}
COMMAND
${
COMP_SQL_EXE
}
${
PROJECT_SOURCE_DIR
}
/scripts/
mysql_fix_privilege_tables.sql
mysql_fix_privilege_tables.sql
${
PROJECT_SOURCE_DIR
}
/client/
mysql_fix_privilege_tables_sql.c
mysql_fix_privilege_tables_sql.c
DEPENDS comp_sql
${
PROJECT_SOURCE_DIR
}
/scripts/mysql_fix_privilege_tables.sql
)
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
)
scripts/comp_sql.c
View file @
179ffb24
...
@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
...
@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
while
(
*
end
&&
*
end
!=
'.'
)
while
(
*
end
&&
*
end
!=
'.'
)
end
++
;
end
++
;
*
end
=
0
;
*
end
=
0
;
fprintf
(
out
,
"const char* %s={
\
"\\\n
"
,
infile_name
);
fprintf
(
out
,
"const char* %s={
\
n\"
"
,
infile_name
);
while
(
fgets
(
buff
,
sizeof
(
buff
),
in
))
while
(
fgets
(
buff
,
sizeof
(
buff
),
in
))
{
{
...
@@ -87,7 +87,7 @@ int main(int argc, char *argv[])
...
@@ -87,7 +87,7 @@ int main(int argc, char *argv[])
Reached end of line, add escaped newline, escaped
Reached end of line, add escaped newline, escaped
backslash and a newline to outfile
backslash and a newline to outfile
*/
*/
fprintf
(
out
,
"
\\
n
\\\n
"
);
fprintf
(
out
,
"
\\
n
\"\n\"
"
);
curr
++
;
curr
++
;
}
}
else
if
(
*
curr
==
'\r'
)
else
if
(
*
curr
==
'\r'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment