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
f883d68a
Commit
f883d68a
authored
Nov 30, 2006
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
parents
d3090cc3
a743e17d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
9 deletions
+8
-9
client/mysqltest.c
client/mysqltest.c
+6
-8
mysql-test/r/mysqltest.result
mysql-test/r/mysqltest.result
+1
-1
mysql-test/t/mysqltest.test
mysql-test/t/mysqltest.test
+1
-0
No files found.
client/mysqltest.c
View file @
f883d68a
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
Holyfoot
Holyfoot
*/
*/
#define MTEST_VERSION "3.
0
"
#define MTEST_VERSION "3.
1
"
#include <my_global.h>
#include <my_global.h>
#include <mysql_embed.h>
#include <mysql_embed.h>
...
@@ -1819,12 +1819,11 @@ void do_copy_file(struct st_command *command)
...
@@ -1819,12 +1819,11 @@ void do_copy_file(struct st_command *command)
chmod <octal> <file>
chmod <octal> <file>
Change file permission of <file>
Change file permission of <file>
NOTE! Simplified version, only supports +r, -r, +w, -w
*/
*/
void
do_chmod_file
(
struct
st_command
*
command
)
void
do_chmod_file
(
struct
st_command
*
command
)
{
{
mode_t
mode
=
0
;
ulong
mode
=
0
;
static
DYNAMIC_STRING
ds_mode
;
static
DYNAMIC_STRING
ds_mode
;
static
DYNAMIC_STRING
ds_file
;
static
DYNAMIC_STRING
ds_file
;
const
struct
command_arg
chmod_file_args
[]
=
{
const
struct
command_arg
chmod_file_args
[]
=
{
...
@@ -1839,12 +1838,11 @@ void do_chmod_file(struct st_command *command)
...
@@ -1839,12 +1838,11 @@ void do_chmod_file(struct st_command *command)
' '
);
' '
);
/* Parse what mode to set */
/* Parse what mode to set */
if
(
ds_mode
.
length
!=
4
)
if
(
ds_mode
.
length
!=
4
||
str2int
(
ds_mode
.
str
,
8
,
0
,
INT_MAX
,
&
mode
)
==
NullS
)
die
(
"You must write a 4 digit octal number for mode"
);
die
(
"You must write a 4 digit octal number for mode"
);
str2int
(
ds_mode
.
str
,
8
,
0
,
INT_MAX
,
(
long
*
)
&
mode
);
DBUG_PRINT
(
"info"
,
(
"chmod %o %s"
,
(
uint
)
mode
,
ds_file
.
str
));
DBUG_PRINT
(
"info"
,
(
"chmod %o %s"
,
mode
,
ds_file
.
str
));
handle_command_error
(
command
,
chmod
(
ds_file
.
str
,
mode
));
handle_command_error
(
command
,
chmod
(
ds_file
.
str
,
mode
));
dynstr_free
(
&
ds_mode
);
dynstr_free
(
&
ds_mode
);
dynstr_free
(
&
ds_file
);
dynstr_free
(
&
ds_file
);
...
...
mysql-test/r/mysqltest.result
View file @
f883d68a
...
@@ -516,7 +516,7 @@ mysqltest: At line 1: Missing required argument 'mode' to command 'chmod'
...
@@ -516,7 +516,7 @@ mysqltest: At line 1: Missing required argument 'mode' to command 'chmod'
mysqltest: At line 1: You must write a 4 digit octal number for mode
mysqltest: At line 1: You must write a 4 digit octal number for mode
mysqltest: At line 1: You must write a 4 digit octal number for mode
mysqltest: At line 1: You must write a 4 digit octal number for mode
mysqltest: At line 1: Missing required argument 'file' to command 'chmod'
mysqltest: At line 1: Missing required argument 'file' to command 'chmod'
mysqltest: At line 1:
command "chmod" failed with error -1
mysqltest: At line 1:
You must write a 4 digit octal number for mode
mysqltest: At line 1: You must write a 4 digit octal number for mode
mysqltest: At line 1: You must write a 4 digit octal number for mode
hello
hello
hello
hello
...
...
mysql-test/t/mysqltest.test
View file @
f883d68a
...
@@ -1560,6 +1560,7 @@ remove_file $MYSQLTEST_VARDIR/tmp/file1.tmp;
...
@@ -1560,6 +1560,7 @@ remove_file $MYSQLTEST_VARDIR/tmp/file1.tmp;
--
error
1
--
error
1
--
exec
echo
"chmod 06789 from_file;"
|
$MYSQL_TEST
2
>&
1
--
exec
echo
"chmod 06789 from_file;"
|
$MYSQL_TEST
2
>&
1
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# test for perl
# test for perl
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
...
...
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