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
d25e3389
Commit
d25e3389
authored
Nov 17, 2010
by
Mattias Jonsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
post-push fix, backported --replace_result patch
for --list_files in mysqltest.
parent
67f640fd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
client/mysqltest.cc
client/mysqltest.cc
+5
-3
mysql-test/r/mysqltest.result
mysql-test/r/mysqltest.result
+1
-1
mysql-test/t/mysqltest.test
mysql-test/t/mysqltest.test
+2
-0
No files found.
client/mysqltest.cc
View file @
d25e3389
...
@@ -441,7 +441,7 @@ struct st_command
...
@@ -441,7 +441,7 @@ struct st_command
char
*
query
,
*
query_buf
,
*
first_argument
,
*
last_argument
,
*
end
;
char
*
query
,
*
query_buf
,
*
first_argument
,
*
last_argument
,
*
end
;
DYNAMIC_STRING
content
;
DYNAMIC_STRING
content
;
int
first_word_len
,
query_len
;
int
first_word_len
,
query_len
;
my_bool
abort_on_error
;
my_bool
abort_on_error
,
used_replace
;
struct
st_expected_errors
expected_errors
;
struct
st_expected_errors
expected_errors
;
char
require_file
[
FN_REFLEN
];
char
require_file
[
FN_REFLEN
];
enum
enum_commands
type
;
enum
enum_commands
type
;
...
@@ -3284,7 +3284,7 @@ static int get_list_files(DYNAMIC_STRING *ds, const DYNAMIC_STRING *ds_dirname,
...
@@ -3284,7 +3284,7 @@ static int get_list_files(DYNAMIC_STRING *ds, const DYNAMIC_STRING *ds_dirname,
if
(
ds_wild
&&
ds_wild
->
length
&&
if
(
ds_wild
&&
ds_wild
->
length
&&
wild_compare
(
file
->
name
,
ds_wild
->
str
,
0
))
wild_compare
(
file
->
name
,
ds_wild
->
str
,
0
))
continue
;
continue
;
dynstr_append
(
ds
,
file
->
name
);
replace_
dynstr_append
(
ds
,
file
->
name
);
dynstr_append
(
ds
,
"
\n
"
);
dynstr_append
(
ds
,
"
\n
"
);
}
}
set_wild_chars
(
0
);
set_wild_chars
(
0
);
...
@@ -3314,6 +3314,7 @@ static void do_list_files(struct st_command *command)
...
@@ -3314,6 +3314,7 @@ static void do_list_files(struct st_command *command)
{
"file"
,
ARG_STRING
,
FALSE
,
&
ds_wild
,
"Filename (incl. wildcard)"
}
{
"file"
,
ARG_STRING
,
FALSE
,
&
ds_wild
,
"Filename (incl. wildcard)"
}
};
};
DBUG_ENTER
(
"do_list_files"
);
DBUG_ENTER
(
"do_list_files"
);
command
->
used_replace
=
1
;
check_command_args
(
command
,
command
->
first_argument
,
check_command_args
(
command
,
command
->
first_argument
,
list_files_args
,
list_files_args
,
...
@@ -3355,6 +3356,7 @@ static void do_list_files_write_file_command(struct st_command *command,
...
@@ -3355,6 +3356,7 @@ static void do_list_files_write_file_command(struct st_command *command,
{
"file"
,
ARG_STRING
,
FALSE
,
&
ds_wild
,
"Filename (incl. wildcard)"
}
{
"file"
,
ARG_STRING
,
FALSE
,
&
ds_wild
,
"Filename (incl. wildcard)"
}
};
};
DBUG_ENTER
(
"do_list_files_write_file"
);
DBUG_ENTER
(
"do_list_files_write_file"
);
command
->
used_replace
=
1
;
check_command_args
(
command
,
command
->
first_argument
,
check_command_args
(
command
,
command
->
first_argument
,
list_files_args
,
list_files_args
,
...
@@ -8386,7 +8388,7 @@ int main(int argc, char **argv)
...
@@ -8386,7 +8388,7 @@ int main(int argc, char **argv)
memset
(
&
saved_expected_errors
,
0
,
sizeof
(
saved_expected_errors
));
memset
(
&
saved_expected_errors
,
0
,
sizeof
(
saved_expected_errors
));
}
}
if
(
command_executed
!=
last_command_executed
)
if
(
command_executed
!=
last_command_executed
||
command
->
used_replace
)
{
{
/*
/*
As soon as any command has been executed,
As soon as any command has been executed,
...
...
mysql-test/r/mysqltest.result
View file @
d25e3389
...
@@ -798,7 +798,7 @@ drop table t1;
...
@@ -798,7 +798,7 @@ drop table t1;
mysqltest: At line 1: change user failed: Unknown database 'inexistent'
mysqltest: At line 1: change user failed: Unknown database 'inexistent'
mysqltest: At line 1: change user failed: Access denied for user 'inexistent'@'localhost' (using password: NO)
mysqltest: At line 1: change user failed: Access denied for user 'inexistent'@'localhost' (using password: NO)
mysqltest: At line 1: change user failed: Access denied for user 'root'@'localhost' (using password: YES)
mysqltest: At line 1: change user failed: Access denied for user 'root'@'localhost' (using password: YES)
file
1.txt
REPLACED_FILE
1.txt
file1.txt
file1.txt
file2.txt
file2.txt
file11.txt
file11.txt
...
...
mysql-test/t/mysqltest.test
View file @
d25e3389
...
@@ -2496,6 +2496,8 @@ write_file $MYSQLTEST_VARDIR/tmp/testdir/file1.txt;
...
@@ -2496,6 +2496,8 @@ write_file $MYSQLTEST_VARDIR/tmp/testdir/file1.txt;
hello
hello
EOF
EOF
# Verify that --replace_result also work on list_files
--
replace_result
file
REPLACED_FILE
list_files
$MYSQLTEST_VARDIR
/
tmp
/
testdir
;
list_files
$MYSQLTEST_VARDIR
/
tmp
/
testdir
;
# list_files gets the directory list before creating the new file
# list_files gets the directory list before creating the new file
list_files_write_file
$MYSQLTEST_VARDIR
/
tmp
/
testdir
/
file2
.
txt
$MYSQLTEST_VARDIR
/
tmp
/
testdir
*
;
list_files_write_file
$MYSQLTEST_VARDIR
/
tmp
/
testdir
/
file2
.
txt
$MYSQLTEST_VARDIR
/
tmp
/
testdir
*
;
...
...
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