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
87f81bce
Commit
87f81bce
authored
Aug 08, 2007
by
msvensson@shellback.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove extra newline added to files created by write_file and append_file
parent
86658784
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-0
client/mysqltest.c
client/mysqltest.c
+23
-0
mysql-test/r/mysqltest.result
mysql-test/r/mysqltest.result
+1
-0
mysql-test/t/mysqltest.test
mysql-test/t/mysqltest.test
+1
-0
No files found.
client/mysqltest.c
View file @
87f81bce
...
...
@@ -753,6 +753,15 @@ void check_command_args(struct st_command *command,
command
->
first_word_len
,
command
->
query
);
}
/* Check for too many arguments passed */
ptr
=
command
->
last_argument
;
while
(
ptr
<=
command
->
end
)
{
if
(
*
ptr
&&
*
ptr
!=
' '
)
die
(
"Extra argument '%s' passed to '%.*s'"
,
ptr
,
command
->
first_word_len
,
command
->
query
);
ptr
++
;
}
DBUG_VOID_RETURN
;
}
...
...
@@ -2691,8 +2700,22 @@ void read_until_delimiter(DYNAMIC_STRING *ds,
c
=
my_getc
(
cur_file
->
file
);
if
(
c
==
'\n'
)
{
cur_file
->
lineno
++
;
/* Skip newline from the same line as the command */
if
(
start_lineno
==
(
cur_file
->
lineno
-
1
))
continue
;
}
else
if
(
start_lineno
==
cur_file
->
lineno
)
{
/*
No characters except \n are allowed on
the same line as the command
*/
die
(
"Trailing characters found after command"
);
}
if
(
feof
(
cur_file
->
file
))
die
(
"End of file encountered before '%s' delimiter was found"
,
ds_delimiter
->
str
);
...
...
mysql-test/r/mysqltest.result
View file @
87f81bce
...
...
@@ -533,6 +533,7 @@ drop table t1;
mysqltest: At line 1: Missing required argument 'filename' to command 'remove_file'
mysqltest: At line 1: Missing required argument 'filename' to command 'write_file'
mysqltest: At line 1: End of file encountered before 'EOF' delimiter was found
Content for test_file1
Some data
for cat_file command
of mysqltest
...
...
mysql-test/t/mysqltest.test
View file @
87f81bce
...
...
@@ -1564,6 +1564,7 @@ write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
Content
for
test_file1
EOF
file_exists
$MYSQLTEST_VARDIR
/
tmp
/
test_file1
.
tmp
;
cat_file
$MYSQLTEST_VARDIR
/
tmp
/
test_file1
.
tmp
;
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
test_file1
.
tmp
;
write_file
$MYSQLTEST_VARDIR
/
tmp
/
test_file1
.
tmp
END_DELIMITER
;
...
...
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