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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
a77205c5
Commit
a77205c5
authored
Nov 14, 2006
by
istruewing@chilla.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into chilla.local:/home/mydev/mysql-5.0-axmrg
parents
b8643547
0f455a81
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
146 additions
and
43 deletions
+146
-43
client/mysql_upgrade.c
client/mysql_upgrade.c
+16
-21
mysql-test/include/report-features.test
mysql-test/include/report-features.test
+11
-0
mysql-test/install_test_db.sh
mysql-test/install_test_db.sh
+12
-5
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+79
-7
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+28
-10
No files found.
client/mysql_upgrade.c
View file @
a77205c5
...
@@ -386,18 +386,18 @@ find_file(const char *name, const char *root, uint flags, char *result, size_t l
...
@@ -386,18 +386,18 @@ find_file(const char *name, const char *root, uint flags, char *result, size_t l
cp
=
strmake
(
result
,
root
,
len
);
cp
=
strmake
(
result
,
root
,
len
);
if
(
cp
[
-
1
]
!=
FN_LIBCHAR
)
if
(
cp
[
-
1
]
!=
FN_LIBCHAR
)
*
cp
=
FN_LIBCHAR
;
*
cp
++
=
FN_LIBCHAR
;
ret
=
1
;
ret
=
1
;
va_start
(
va
,
len
);
va_start
(
va
,
len
);
subdir
=
(
!
(
flags
&
MY_SEARCH_SELF
))
?
va_arg
(
va
,
char
*
)
:
""
;
subdir
=
(
!
(
flags
&
MY_SEARCH_SELF
))
?
va_arg
(
va
,
char
*
)
:
""
;
while
(
ret
&&
subdir
)
while
(
subdir
)
{
{
MY_DIR
*
dir
;
MY_DIR
*
dir
;
FILEINFO
*
match
;
FILEINFO
*
match
;
char
*
cp1
;
char
*
cp1
;
cp1
=
strnmov
(
cp
+
1
,
subdir
,
len
-
(
cp
-
result
)
-
1
);
cp1
=
strnmov
(
cp
,
subdir
,
len
-
(
cp
-
result
)
-
1
);
dir
=
my_dir
(
result
,
(
flags
&
MY_ISDIR
)
?
MY_WANT_STAT
:
MYF
(
0
));
dir
=
my_dir
(
result
,
(
flags
&
MY_ISDIR
)
?
MY_WANT_STAT
:
MYF
(
0
));
if
(
dir
)
if
(
dir
)
...
@@ -406,25 +406,20 @@ find_file(const char *name, const char *root, uint flags, char *result, size_t l
...
@@ -406,25 +406,20 @@ find_file(const char *name, const char *root, uint flags, char *result, size_t l
sizeof
(
FILEINFO
),
(
qsort_cmp
)
comp_names
);
sizeof
(
FILEINFO
),
(
qsort_cmp
)
comp_names
);
if
(
match
)
if
(
match
)
{
{
if
(
!
(
flags
&
MY_PARENT
))
ret
=
(
flags
&
MY_ISDIR
)
?
!
MY_S_ISDIR
(
match
->
mystat
->
st_mode
)
:
0
;
{
if
(
!
ret
)
if
(
cp1
[
-
1
]
!=
FN_LIBCHAR
)
{
if
(
cp1
[
-
1
]
!=
FN_LIBCHAR
)
*
cp1
++=
FN_LIBCHAR
;
*
cp1
++=
FN_LIBCHAR
;
strnmov
(
cp1
,
name
,
len
-
(
cp1
-
result
));
}
if
(
!
(
flags
&
MY_PARENT
))
else
strnmov
(
cp1
,
name
,
len
-
(
cp1
-
result
));
{
else
if
(
cp1
[
-
1
]
==
FN_LIBCHAR
)
*
cp1
=
'\0'
;
--
cp1
;
while
(
*--
cp1
==
FN_LIBCHAR
)
my_dirend
(
dir
);
{}
break
;
*++
cp1
=
FN_LIBCHAR
;
*++
cp1
=
'\0'
;
}
}
if
(
flags
&
MY_ISDIR
)
ret
=
!
MY_S_ISDIR
(
match
->
mystat
->
st_mode
);
else
ret
=
0
;
}
}
my_dirend
(
dir
);
my_dirend
(
dir
);
}
}
...
@@ -484,7 +479,7 @@ int main(int argc, char **argv)
...
@@ -484,7 +479,7 @@ int main(int argc, char **argv)
||
find_file
(
mysqld_name
,
basedir
,
MYF
(
0
),
path
,
sizeof
(
path
),
||
find_file
(
mysqld_name
,
basedir
,
MYF
(
0
),
path
,
sizeof
(
path
),
"bin"
,
"libexec"
,
NullS
))
"bin"
,
"libexec"
,
NullS
))
{
{
my_
strdup
((
gptr
)
basedir
,
MYF
(
0
));
my_
free
((
gptr
)
basedir
,
MYF
(
0
));
basedir
=
(
char
*
)
DEFAULT_MYSQL_HOME
;
basedir
=
(
char
*
)
DEFAULT_MYSQL_HOME
;
}
}
}
}
...
...
mysql-test/include/report-features.test
0 → 100644
View file @
a77205c5
#
# show server variables
#
--
disable_query_log
--
echo
=====
ENGINES
=====
show
engines
;
--
echo
=====
VARIABLES
=====
show
variables
;
--
echo
=====
STOP
=====
--
enable_query_log
mysql-test/install_test_db.sh
View file @
a77205c5
#!/bin/sh
#!/bin/sh
# Copyright (C) 1997-200
2
MySQL AB
# Copyright (C) 1997-200
6
MySQL AB
# For a more info consult the file COPYRIGHT distributed with this file
# For a more info consult the file COPYRIGHT distributed with this file
# This scripts creates the privilege tables db, host, user, tables_priv,
# This scripts creates the privilege tables db, host, user, tables_priv,
...
@@ -7,19 +7,26 @@
...
@@ -7,19 +7,26 @@
if
[
x
$1
=
x
"--bin"
]
;
then
if
[
x
$1
=
x
"--bin"
]
;
then
shift
1
shift
1
BINARY_DIST
=
1
bindir
=
../bin
scriptdir
=
../bin
libexecdir
=
../libexec
# Check if it's a binary distribution or a 'make install'
# Check if it's a binary distribution or a 'make install'
if
test
-x
../libexec/mysqld
if
test
-x
../libexec/mysqld
then
then
execdir
=
../libexec
execdir
=
../libexec
elif
test
-x
../../sbin/mysqld
# RPM installation
then
execdir
=
../../sbin
bindir
=
../../bin
scriptdir
=
../../bin
libexecdir
=
../../libexec
else
else
execdir
=
../bin
execdir
=
../bin
fi
fi
bindir
=
../bin
BINARY_DIST
=
1
fix_bin
=
mysql-test
fix_bin
=
mysql-test
scriptdir
=
../bin
libexecdir
=
../libexec
else
else
execdir
=
../sql
execdir
=
../sql
bindir
=
../client
bindir
=
../client
...
...
mysql-test/mysql-test-run.pl
View file @
a77205c5
...
@@ -220,6 +220,7 @@ our $opt_ndbconnectstring_slave;
...
@@ -220,6 +220,7 @@ our $opt_ndbconnectstring_slave;
our
$opt_record
;
our
$opt_record
;
our
$opt_check_testcases
;
our
$opt_check_testcases
;
my
$opt_report_features
;
our
$opt_skip
;
our
$opt_skip
;
our
$opt_skip_rpl
;
our
$opt_skip_rpl
;
...
@@ -426,10 +427,14 @@ sub main () {
...
@@ -426,10 +427,14 @@ sub main () {
if
(
!
$need_im
)
if
(
!
$need_im
)
{
{
$opt_skip_im
=
1
;
$opt_skip_im
=
1
;
}
}
initialize_servers
();
initialize_servers
();
if
(
$opt_report_features
)
{
run_report_features
();
}
run_suite
(
$opt_suite
,
$tests
);
run_suite
(
$opt_suite
,
$tests
);
}
}
...
@@ -594,6 +599,7 @@ sub command_line_setup () {
...
@@ -594,6 +599,7 @@ sub command_line_setup () {
'
mem:s
'
=>
\
$opt_mem
,
'
mem:s
'
=>
\
$opt_mem
,
# Misc
# Misc
'
report-features
'
=>
\
$opt_report_features
,
'
comment=s
'
=>
\
$opt_comment
,
'
comment=s
'
=>
\
$opt_comment
,
'
debug
'
=>
\
$opt_debug
,
'
debug
'
=>
\
$opt_debug
,
'
fast
'
=>
\
$opt_fast
,
'
fast
'
=>
\
$opt_fast
,
...
@@ -637,7 +643,7 @@ sub command_line_setup () {
...
@@ -637,7 +643,7 @@ sub command_line_setup () {
$glob_hostname
=
mtr_short_hostname
();
$glob_hostname
=
mtr_short_hostname
();
#
'basedir' is always parent of "mysql-test"
directory
#
Find the absolute path to the test
directory
$glob_mysql_test_dir
=
cwd
();
$glob_mysql_test_dir
=
cwd
();
if
(
$glob_cygwin_perl
)
if
(
$glob_cygwin_perl
)
{
{
...
@@ -645,11 +651,27 @@ sub command_line_setup () {
...
@@ -645,11 +651,27 @@ sub command_line_setup () {
$glob_mysql_test_dir
=
`
cygpath -m "
$glob_mysql_test_dir
"
`;
$glob_mysql_test_dir
=
`
cygpath -m "
$glob_mysql_test_dir
"
`;
chomp
(
$glob_mysql_test_dir
);
chomp
(
$glob_mysql_test_dir
);
}
}
$glob_basedir
=
dirname
(
$glob_mysql_test_dir
);
# In most cases, the base directory we find everything relative to,
# is the parent directory of the "mysql-test" directory. For source
# distributions, TAR binary distributions and some other packages.
$glob_basedir
=
dirname
(
$glob_mysql_test_dir
);
# In the RPM case, binaries and libraries are installed in the
# default system locations, instead of having our own private base
# directory. And we install "/usr/share/mysql-test". Moving up one
# more directory relative to "mysql-test" gives us a usable base
# directory for RPM installs.
if
(
!
$opt_source_dist
and
!
-
d
"
$glob_basedir
/bin
"
)
{
$glob_basedir
=
dirname
(
$glob_basedir
);
}
# Expect mysql-bench to be located adjacent to the source tree, by default
# Expect mysql-bench to be located adjacent to the source tree, by default
$glob_mysql_bench_dir
=
"
$glob_basedir
/../mysql-bench
"
$glob_mysql_bench_dir
=
"
$glob_basedir
/../mysql-bench
"
unless
defined
$glob_mysql_bench_dir
;
unless
defined
$glob_mysql_bench_dir
;
$glob_mysql_bench_dir
=
undef
unless
-
d
$glob_mysql_bench_dir
;
$path_my_basedir
=
$path_my_basedir
=
$opt_source_dist
?
$glob_mysql_test_dir
:
$glob_basedir
;
$opt_source_dist
?
$glob_mysql_test_dir
:
$glob_basedir
;
...
@@ -677,7 +699,8 @@ sub command_line_setup () {
...
@@ -677,7 +699,8 @@ sub command_line_setup () {
"
$path_client_bindir
/mysqld-debug
",
"
$path_client_bindir
/mysqld-debug
",
"
$path_client_bindir
/mysqld-max
",
"
$path_client_bindir
/mysqld-max
",
"
$glob_basedir
/libexec/mysqld
",
"
$glob_basedir
/libexec/mysqld
",
"
$glob_basedir
/bin/mysqld
");
"
$glob_basedir
/bin/mysqld
",
"
$glob_basedir
/sbin/mysqld
");
# Use the mysqld found above to find out what features are available
# Use the mysqld found above to find out what features are available
collect_mysqld_features
();
collect_mysqld_features
();
...
@@ -794,6 +817,13 @@ sub command_line_setup () {
...
@@ -794,6 +817,13 @@ sub command_line_setup () {
$opt_vardir
=
"
$glob_mysql_test_dir
/
$opt_vardir
";
$opt_vardir
=
"
$glob_mysql_test_dir
/
$opt_vardir
";
}
}
# Ensure a proper error message
mkpath
("
$opt_vardir
");
unless
(
-
d
$opt_vardir
and
-
w
$opt_vardir
)
{
mtr_error
("
Writable 'var' directory is needed, use the '--vardir' option
");
}
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
# Set tmpdir
# Set tmpdir
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
...
@@ -1315,7 +1345,9 @@ sub executable_setup_im () {
...
@@ -1315,7 +1345,9 @@ sub executable_setup_im () {
$exe_im
=
$exe_im
=
mtr_exe_maybe_exists
(
mtr_exe_maybe_exists
(
"
$glob_basedir
/server-tools/instance-manager/mysqlmanager
",
"
$glob_basedir
/server-tools/instance-manager/mysqlmanager
",
"
$glob_basedir
/libexec/mysqlmanager
");
"
$glob_basedir
/libexec/mysqlmanager
",
"
$glob_basedir
/bin/mysqlmanager
",
"
$glob_basedir
/sbin/mysqlmanager
");
return
(
$exe_im
eq
"");
return
(
$exe_im
eq
"");
}
}
...
@@ -4210,6 +4242,43 @@ sub run_check_testcase ($$) {
...
@@ -4210,6 +4242,43 @@ sub run_check_testcase ($$) {
return
$res
;
return
$res
;
}
}
##############################################################################
#
# Report the features that were compiled in
#
##############################################################################
sub
run_report_features
()
{
my
$args
;
if
(
!
$glob_use_embedded_server
)
{
mysqld_start
(
$master
->
[
0
],
[]
,
[]
);
if
(
!
$master
->
[
0
]
->
{'
pid
'}
)
{
mtr_error
("
Can't start the mysqld server
");
}
mysqld_wait_started
(
$master
->
[
0
]);
}
my
$tinfo
=
{};
$tinfo
->
{'
name
'}
=
'
report features
';
$tinfo
->
{'
result_file
'}
=
undef
;
$tinfo
->
{'
component_id
'}
=
'
mysqld
';
$tinfo
->
{'
path
'}
=
'
include/report-features.test
';
$tinfo
->
{'
timezone
'}
=
"
GMT-3
";
$tinfo
->
{'
slave_num
'}
=
0
;
$tinfo
->
{'
master_opt
'}
=
[]
;
$tinfo
->
{'
slave_opt
'}
=
[]
;
$tinfo
->
{'
slave_mi
'}
=
[]
;
$tinfo
->
{'
comment
'}
=
'
report server features
';
run_mysqltest
(
$tinfo
);
if
(
!
$glob_use_embedded_server
)
{
stop_all_servers
();
}
}
sub
run_mysqltest
($)
{
sub
run_mysqltest
($)
{
...
@@ -4347,8 +4416,10 @@ sub run_mysqltest ($) {
...
@@ -4347,8 +4416,10 @@ sub run_mysqltest ($) {
mtr_add_arg
(
$args
,
"
--test-file
");
mtr_add_arg
(
$args
,
"
--test-file
");
mtr_add_arg
(
$args
,
$tinfo
->
{'
path
'});
mtr_add_arg
(
$args
,
$tinfo
->
{'
path
'});
mtr_add_arg
(
$args
,
"
--result-file
");
if
(
defined
$tinfo
->
{'
result_file
'}
)
{
mtr_add_arg
(
$args
,
$tinfo
->
{'
result_file
'});
mtr_add_arg
(
$args
,
"
--result-file
");
mtr_add_arg
(
$args
,
$tinfo
->
{'
result_file
'});
}
if
(
$opt_record
)
if
(
$opt_record
)
{
{
...
@@ -4762,3 +4833,4 @@ HERE
...
@@ -4762,3 +4833,4 @@ HERE
mtr_exit
(
1
);
mtr_exit
(
1
);
}
}
mysql-test/mysql-test-run.sh
View file @
a77205c5
...
@@ -174,18 +174,29 @@ fi
...
@@ -174,18 +174,29 @@ fi
# Misc. Definitions
# Misc. Definitions
#--
#--
if
[
-d
../sql
]
;
then
# BASEDIR is always above mysql-test directory ...
MYSQL_TEST_DIR
=
`
pwd
`
cd
..
if
[
-d
./sql
]
;
then
SOURCE_DIST
=
1
SOURCE_DIST
=
1
else
else
BINARY_DIST
=
1
BINARY_DIST
=
1
fi
fi
#BASEDIR is always one above mysql-test directory
# ... one level for tar.gz, two levels for a RPM installation
CWD
=
`
pwd
`
if
[
-d
./bin
]
;
then
cd
..
# this is not perfect: we have
BASEDIR
=
`
pwd
`
# /usr/share/mysql/ # mysql-test-run is here, so this is "$MYSQL_TEST_DIR"
cd
$CWD
# /usr/bin/ # with MySQL client programs
MYSQL_TEST_DIR
=
$BASEDIR
/mysql-test
# so the existence of "/usr/share/bin/" would make this test fail.
BASEDIR
=
`
pwd
`
else
cd
..
BASEDIR
=
`
pwd
`
fi
cd
$MYSQL_TEST_DIR
MYSQL_TEST_WINDIR
=
$MYSQL_TEST_DIR
MYSQL_TEST_WINDIR
=
$MYSQL_TEST_DIR
MYSQLTEST_VARDIR
=
$MYSQL_TEST_DIR
/var
MYSQLTEST_VARDIR
=
$MYSQL_TEST_DIR
/var
export
MYSQL_TEST_DIR MYSQL_TEST_WINDIR MYSQLTEST_VARDIR
export
MYSQL_TEST_DIR MYSQL_TEST_WINDIR MYSQLTEST_VARDIR
...
@@ -744,8 +755,15 @@ else
...
@@ -744,8 +755,15 @@ else
if
test
-x
"
$BASEDIR
/libexec/mysqld"
if
test
-x
"
$BASEDIR
/libexec/mysqld"
then
then
MYSQLD
=
"
$VALGRIND
$BASEDIR
/libexec/mysqld"
MYSQLD
=
"
$VALGRIND
$BASEDIR
/libexec/mysqld"
else
elif
test
-x
"
$BASEDIR
/bin/mysqld"
then
MYSQLD
=
"
$VALGRIND
$BASEDIR
/bin/mysqld"
MYSQLD
=
"
$VALGRIND
$BASEDIR
/bin/mysqld"
elif
test
-x
"
$BASEDIR
/sbin/mysqld"
then
MYSQLD
=
"
$VALGRIND
$BASEDIR
/sbin/mysqld"
else
$ECHO
"Fatal error: Cannot find program mysqld in
$BASEDIR
/{libexec,bin,sbin}"
1>&2
exit
1
fi
fi
CLIENT_BINDIR
=
"
$BASEDIR
/bin"
CLIENT_BINDIR
=
"
$BASEDIR
/bin"
if
test
-d
"
$BASEDIR
/tests"
if
test
-d
"
$BASEDIR
/tests"
...
@@ -1390,7 +1408,7 @@ start_master()
...
@@ -1390,7 +1408,7 @@ start_master()
then
then
$ECHO
"set args
$master_args
"
>
$GDB_MASTER_INIT$1
$ECHO
"set args
$master_args
"
>
$GDB_MASTER_INIT$1
$ECHO
"To start gdb for the master , type in another window:"
$ECHO
"To start gdb for the master , type in another window:"
$ECHO
"cd
$
CWD
; gdb -x
$GDB_MASTER_INIT$1
$MASTER_MYSQLD
"
$ECHO
"cd
$
MYSQL_TEST_DIR
; gdb -x
$GDB_MASTER_INIT$1
$MASTER_MYSQLD
"
wait_for_master
=
1500
wait_for_master
=
1500
else
else
(
$ECHO
set
args
$master_args
;
(
$ECHO
set
args
$master_args
;
...
@@ -1508,7 +1526,7 @@ start_slave()
...
@@ -1508,7 +1526,7 @@ start_slave()
then
then
$ECHO
"set args
$slave_args
"
>
$GDB_SLAVE_INIT
$ECHO
"set args
$slave_args
"
>
$GDB_SLAVE_INIT
echo
"To start gdb for the slave, type in another window:"
echo
"To start gdb for the slave, type in another window:"
echo
"cd
$
CWD
; gdb -x
$GDB_SLAVE_INIT
$SLAVE_MYSQLD
"
echo
"cd
$
MYSQL_TEST_DIR
; gdb -x
$GDB_SLAVE_INIT
$SLAVE_MYSQLD
"
wait_for_slave
=
1500
wait_for_slave
=
1500
else
else
(
$ECHO
set
args
$slave_args
;
(
$ECHO
set
args
$slave_args
;
...
...
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