summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2006-11-30 11:31:51 +0100
committerunknown <msvensson@neptunus.(none)>2006-11-30 11:31:51 +0100
commit822c0590c46abb06ef538c438be879bc8e241882 (patch)
treeaef51d87692e0d93083603556f3a8a4fec380624 /client
parentaaa853fa1f25ee9156f0a0036c34d250d84f9ee2 (diff)
parentdaa14544e0bfc0784ceb90158e618698b6296e89 (diff)
downloadmariadb-git-822c0590c46abb06ef538c438be879bc8e241882.tar.gz
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-maint mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/mysqltest.result: Auto merged mysql-test/t/mysqltest.test: Auto merged sql/handler.cc: Auto merged sql/sql_parse.cc: Auto merged client/mysqltest.c: Manual merge mysql-test/r/rpl_sp.result: Manual merge mysql-test/t/rpl_sp.test: Manual merge
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index a45984ffe02..d713c99ec62 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -32,7 +32,7 @@
Holyfoot
*/
-#define MTEST_VERSION "3.0"
+#define MTEST_VERSION "3.1"
#include <my_global.h>
#include <mysql_embed.h>
@@ -1817,15 +1817,14 @@ void do_copy_file(struct st_command *command)
command command handle
DESCRIPTION
- chmod <octal> <file>
+ chmod <octal> <file>
Change file permission of <file>
- NOTE! Simplified version, only supports +r, -r, +w, -w
*/
void do_chmod_file(struct st_command *command)
{
- mode_t mode= 0;
+ ulong mode= 0;
static DYNAMIC_STRING ds_mode;
static DYNAMIC_STRING ds_file;
const struct command_arg chmod_file_args[] = {
@@ -1840,12 +1839,11 @@ void do_chmod_file(struct st_command *command)
' ');
/* 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");
- str2int(ds_mode.str, 8, 0, INT_MAX, (long*)&mode);
-
- DBUG_PRINT("info", ("chmod %o %s", mode, ds_file.str));
+ DBUG_PRINT("info", ("chmod %o %s", (uint)mode, ds_file.str));
handle_command_error(command, chmod(ds_file.str, mode));
dynstr_free(&ds_mode);
dynstr_free(&ds_file);