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
ec9b088b
Commit
ec9b088b
authored
Nov 21, 2006
by
msvensson@shellback.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
into shellback.(none):/home/msvensson/mysql/mysql-5.1-maint
parents
3eeb0d79
fc144204
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
17 deletions
+32
-17
client/mysql_upgrade.c
client/mysql_upgrade.c
+21
-14
client/mysqltest.c
client/mysqltest.c
+11
-3
No files found.
client/mysql_upgrade.c
View file @
ec9b088b
...
...
@@ -31,10 +31,12 @@
const
char
*
mysqlcheck_name
=
"mysqlcheck.exe"
;
const
char
*
mysql_name
=
"mysql.exe"
;
const
char
*
mysqld_name
=
"mysqld.exe"
;
#define EXTRA_CLIENT_PATHS "client/release", "client/debug"
#else
const
char
*
mysqlcheck_name
=
"mysqlcheck"
;
const
char
*
mysql_name
=
"mysql"
;
const
char
*
mysqld_name
=
"mysqld"
;
#define EXTRA_CLIENT_PATHS "client"
#endif
/*__WIN__*/
extern
TYPELIB
sql_protocol_typelib
;
...
...
@@ -497,8 +499,9 @@ int main(int argc, char **argv)
"mysql"
,
NullS
))
{
ret
=
1
;
puts
(
"Can't find data directory. Please restart with"
" --datadir=path-to-writable-data-dir"
);
fprintf
(
stderr
,
"Can't find data directory. Please restart with"
" --datadir=path-to-writable-data-dir"
);
goto
error
;
}
...
...
@@ -541,11 +544,13 @@ int main(int argc, char **argv)
}
if
(
find_file
(
mysqlcheck_name
,
basedir
,
MYF
(
0
),
path
,
sizeof
(
path
),
"bin"
,
"client"
,
NullS
))
"bin"
,
EXTRA_CLIENT_PATHS
,
NullS
))
{
ret
=
1
;
printf
(
"Can't find program '%s'
\n
"
,
mysqlcheck_name
);
puts
(
"Please restart with --basedir=mysql-install-directory"
);
fprintf
(
stderr
,
"Can't find program '%s'
\n
"
"Please restart with --basedir=mysql-install-directory"
,
mysqlcheck_name
);
goto
error
;
}
else
...
...
@@ -567,7 +572,7 @@ int main(int argc, char **argv)
ret
=
system
(
cmdline
.
str
);
if
(
ret
)
{
printf
(
"Error executing '%s'
\n
"
,
cmdline
.
str
);
fprintf
(
stderr
,
"Error executing '%s'
\n
"
,
cmdline
.
str
);
goto
error
;
}
...
...
@@ -578,12 +583,13 @@ int main(int argc, char **argv)
fix_priv_tables:
if
(
find_file
(
mysql_name
,
basedir
,
MYF
(
0
),
path
,
sizeof
(
path
),
"bin"
,
"client"
,
NullS
))
"bin"
,
EXTRA_CLIENT_PATHS
,
NullS
))
{
ret
=
1
;
puts
(
"Could not find MySQL command-line client (mysql).
\n
"
"Please use --basedir to specify the directory"
" where MySQL is installed."
);
fprintf
(
stderr
,
"Could not find MySQL command-line client (mysql).
\n
"
"Please use --basedir to specify the directory"
" where MySQL is installed."
);
goto
error
;
}
else
...
...
@@ -598,9 +604,10 @@ fix_priv_tables:
"share/mysql"
,
NullS
))
{
ret
=
1
;
puts
(
"Could not find file "
MYSQL_FIX_PRIV_TABLES_NAME
"
\n
"
"Please use --basedir to specify the directory"
" where MySQL is installed"
);
fprintf
(
stderr
,
"Could not find file "
MYSQL_FIX_PRIV_TABLES_NAME
"
\n
"
"Please use --basedir to specify the directory"
" where MySQL is installed"
);
goto
error
;
}
else
...
...
@@ -621,7 +628,7 @@ fix_priv_tables:
ret
=
system
(
cmdline
.
str
);
if
(
ret
)
printf
(
"Error executing '%s'
\n
"
,
cmdline
.
str
);
fprintf
(
stderr
,
"Error executing '%s'
\n
"
,
cmdline
.
str
);
error:
dynstr_free
(
&
cmdline
);
...
...
client/mysqltest.c
View file @
ec9b088b
...
...
@@ -4138,8 +4138,9 @@ void init_win_path_patterns()
/* List of string patterns to match in order to find paths */
const
char
*
paths
[]
=
{
"$MYSQL_TEST_DIR"
,
"$MYSQL_TMP_DIR"
,
"./test/"
,
0
};
int
num_paths
=
3
;
"$MYSQLTEST_VARDIR"
,
"./test/"
};
int
num_paths
=
sizeof
(
paths
)
/
sizeof
(
char
*
),
int
i
;
char
*
p
;
...
...
@@ -4159,6 +4160,13 @@ void init_win_path_patterns()
else
p
=
my_strdup
(
paths
[
i
],
MYF
(
MY_FAE
));
/* Don't insert zero length strings in patterns array */
if
(
strlen
(
p
)
==
0
)
{
my_free
(
p
,
MYF
(
0
));
continue
;
}
if
(
insert_dynamic
(
&
patterns
,
(
gptr
)
&
p
))
die
(
NullS
);
...
...
@@ -4208,7 +4216,7 @@ void fix_win_paths(const char *val, int len)
{
const
char
**
pattern
=
dynamic_element
(
&
patterns
,
i
,
const
char
**
);
DBUG_PRINT
(
"info"
,
(
"pattern: %s"
,
*
pattern
));
if
(
strlen
(
*
pattern
)
==
0
)
continue
;
/* Search for the path in string */
while
((
p
=
strstr
(
val
,
*
pattern
)))
{
...
...
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