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
72228ea8
Commit
72228ea8
authored
Sep 05, 2005
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#12959 mysqltest crashes if testcase passed with -x option
parent
78f32604
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
5 deletions
+22
-5
client/mysqltest.c
client/mysqltest.c
+7
-5
mysql-test/include/mysqltest-x.inc
mysql-test/include/mysqltest-x.inc
+2
-0
mysql-test/t/mysqltest.test
mysql-test/t/mysqltest.test
+13
-0
No files found.
client/mysqltest.c
View file @
72228ea8
...
@@ -2169,8 +2169,10 @@ int read_line(char *buf, int size)
...
@@ -2169,8 +2169,10 @@ int read_line(char *buf, int size)
if
(
feof
(
cur_file
->
file
))
if
(
feof
(
cur_file
->
file
))
{
{
found_eof:
found_eof:
if
(
cur_file
->
file
!=
stdin
)
if
(
cur_file
->
file
!=
stdin
)
{
my_fclose
(
cur_file
->
file
,
MYF
(
0
));
my_fclose
(
cur_file
->
file
,
MYF
(
0
));
cur_file
->
file
=
0
;
}
my_free
((
gptr
)
cur_file
->
file_name
,
MYF
(
MY_ALLOW_ZERO_PTR
));
my_free
((
gptr
)
cur_file
->
file_name
,
MYF
(
MY_ALLOW_ZERO_PTR
));
cur_file
->
file_name
=
0
;
cur_file
->
file_name
=
0
;
lineno
--
;
lineno
--
;
...
@@ -2556,10 +2558,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -2556,10 +2558,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
argument
=
buff
;
argument
=
buff
;
}
}
fn_format
(
buff
,
argument
,
""
,
""
,
4
);
fn_format
(
buff
,
argument
,
""
,
""
,
4
);
DBUG_ASSERT
(
cur_file
->
file
==
0
);
DBUG_ASSERT
(
cur_file
==
file_stack
&&
cur_file
->
file
==
0
);
if
(
!
(
cur_file
->
file
=
if
(
!
(
cur_file
->
file
=
my_fopen
(
buff
,
O_RDONLY
|
FILE_BINARY
,
MYF
(
MY_WME
))))
my_fopen
(
buff
,
O_RDONLY
|
FILE_BINARY
,
MYF
(
MY_WME
))))
die
(
"Could not open %s: errno = %d"
,
argument
,
errno
);
die
(
"Could not open %s: errno = %d"
,
buff
,
errno
);
cur_file
->
file_name
=
my_strdup
(
buff
,
MYF
(
MY_FAE
));
break
;
break
;
}
}
case
'm'
:
case
'm'
:
...
@@ -3746,9 +3749,8 @@ int main(int argc, char **argv)
...
@@ -3746,9 +3749,8 @@ int main(int argc, char **argv)
embedded_server_args
,
embedded_server_args
,
(
char
**
)
embedded_server_groups
))
(
char
**
)
embedded_server_groups
))
die
(
"Can't initialize MySQL server"
);
die
(
"Can't initialize MySQL server"
);
if
(
cur_file
==
file_stack
)
if
(
cur_file
==
file_stack
&&
cur_file
->
file
==
0
)
{
{
DBUG_ASSERT
(
cur_file
->
file
==
0
);
cur_file
->
file
=
stdin
;
cur_file
->
file
=
stdin
;
cur_file
->
file_name
=
my_strdup
(
"<stdin>"
,
MYF
(
MY_WME
));
cur_file
->
file_name
=
my_strdup
(
"<stdin>"
,
MYF
(
MY_WME
));
}
}
...
...
mysql-test/include/mysqltest-x.inc
0 → 100644
View file @
72228ea8
echo
Output
from
mysqltest
-
x
.
inc
;
mysql-test/t/mysqltest.test
View file @
72228ea8
...
@@ -792,6 +792,19 @@ select "a" as col1, "c" as col2;
...
@@ -792,6 +792,19 @@ select "a" as col1, "c" as col2;
--
error
1
--
error
1
--
exec
echo
"save_master_pos; sync_with_master a;"
|
$MYSQL_TEST
2
>&
1
--
exec
echo
"save_master_pos; sync_with_master a;"
|
$MYSQL_TEST
2
>&
1
# ----------------------------------------------------------------------------
# Test mysqltest arguments
# ----------------------------------------------------------------------------
# -x <file_name>, use the file specified after -x as the test file
--
exec
$MYSQL_TEST
<
$MYSQL_TEST_DIR
/
include
/
mysqltest
-
x
.
inc
--
exec
$MYSQL_TEST
-
x
$MYSQL_TEST_DIR
/
include
/
mysqltest
-
x
.
inc
--
exec
$MYSQL_TEST
--
result_file
=
$MYSQL_TEST_DIR
/
include
/
mysqltest
-
x
.
inc
--
error
1
--
exec
$MYSQL_TEST
-
x
non_existing_file
.
inc
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# TODO Test queries, especially their errormessages... so it's easy to debug
# TODO Test queries, especially their errormessages... so it's easy to debug
# new scripts and diagnose errors
# new scripts and diagnose errors
...
...
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