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
40a614ed
Commit
40a614ed
authored
Jun 20, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/alik/MySQL/devel/5.1-tree
into mysql.com:/home/alik/MySQL/devel/5.1-rt
parents
db98fc94
7640f512
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
22 deletions
+23
-22
include/m_string.h
include/m_string.h
+1
-1
mysql-test/t/im_cmd_line.imtest
mysql-test/t/im_cmd_line.imtest
+2
-2
server-tools/instance-manager/commands.cc
server-tools/instance-manager/commands.cc
+3
-3
server-tools/instance-manager/instance.cc
server-tools/instance-manager/instance.cc
+1
-1
server-tools/instance-manager/instance_options.cc
server-tools/instance-manager/instance_options.cc
+3
-3
server-tools/instance-manager/options.cc
server-tools/instance-manager/options.cc
+6
-6
server-tools/instance-manager/priv.cc
server-tools/instance-manager/priv.cc
+1
-1
server-tools/instance-manager/user_management_commands.cc
server-tools/instance-manager/user_management_commands.cc
+2
-2
server-tools/instance-manager/user_management_commands.h
server-tools/instance-manager/user_management_commands.h
+4
-3
No files found.
include/m_string.h
View file @
40a614ed
...
@@ -256,6 +256,6 @@ typedef struct
...
@@ -256,6 +256,6 @@ typedef struct
}
LEX_STRING
;
}
LEX_STRING
;
#define STRING_WITH_LEN(X) (X), ((uint) (sizeof(X) - 1))
#define STRING_WITH_LEN(X) (X), ((uint) (sizeof(X) - 1))
#define C_STRING_WITH_
SIZE
(X) ((char *) (X)), ((uint) (sizeof(X) - 1))
#define C_STRING_WITH_
LEN
(X) ((char *) (X)), ((uint) (sizeof(X) - 1))
#endif
#endif
mysql-test/t/im_cmd_line.imtest
View file @
40a614ed
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
--echo
--echo
--echo --> Printing out line for 'testuser'...
--echo --> Printing out line for 'testuser'...
--exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --p
asswd
--username=testuser --password=abc | tail -1
--exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --p
rint-password-line
--username=testuser --password=abc | tail -1
--echo
--echo
--echo --> Listing users...
--echo --> Listing users...
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
--echo
--echo
--echo --> Printing out line for 'testuser'...
--echo --> Printing out line for 'testuser'...
--exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --p
asswd
--username=testuser --password=xyz | tail -1
--exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --p
rint-password-line
--username=testuser --password=xyz | tail -1
--echo
--echo
--echo --> Listing users...
--echo --> Listing users...
...
...
server-tools/instance-manager/commands.cc
View file @
40a614ed
...
@@ -695,7 +695,7 @@ bool Create_instance::parse_args(const char **text)
...
@@ -695,7 +695,7 @@ bool Create_instance::parse_args(const char **text)
if
(
!
option_value_str
)
if
(
!
option_value_str
)
{
{
LEX_STRING
empty_str
=
{
C_STRING_WITH_
SIZE
(
""
)
};
LEX_STRING
empty_str
=
{
C_STRING_WITH_
LEN
(
""
)
};
if
(
!
(
option_value_str
=
Named_value
::
alloc_str
(
&
empty_str
)))
if
(
!
(
option_value_str
=
Named_value
::
alloc_str
(
&
empty_str
)))
return
TRUE
;
/* out of memory during parsing. */
return
TRUE
;
/* out of memory during parsing. */
...
@@ -1511,7 +1511,7 @@ bool Set_option::parse_args(const char **text)
...
@@ -1511,7 +1511,7 @@ bool Set_option::parse_args(const char **text)
if
(
!
option_value_str
)
if
(
!
option_value_str
)
{
{
LEX_STRING
empty_str
=
{
C_STRING_WITH_
SIZE
(
""
)
};
LEX_STRING
empty_str
=
{
C_STRING_WITH_
LEN
(
""
)
};
if
(
!
(
option_value_str
=
Named_value
::
alloc_str
(
&
empty_str
)))
if
(
!
(
option_value_str
=
Named_value
::
alloc_str
(
&
empty_str
)))
return
TRUE
;
/* out of memory during parsing. */
return
TRUE
;
/* out of memory during parsing. */
...
@@ -1650,7 +1650,7 @@ bool Unset_option::parse_args(const char **text)
...
@@ -1650,7 +1650,7 @@ bool Unset_option::parse_args(const char **text)
return
TRUE
;
/* out of memory during parsing. */
return
TRUE
;
/* out of memory during parsing. */
{
{
LEX_STRING
empty_str
=
{
C_STRING_WITH_
SIZE
(
""
)
};
LEX_STRING
empty_str
=
{
C_STRING_WITH_
LEN
(
""
)
};
if
(
!
(
option_value_str
=
Named_value
::
alloc_str
(
&
empty_str
)))
if
(
!
(
option_value_str
=
Named_value
::
alloc_str
(
&
empty_str
)))
{
{
...
...
server-tools/instance-manager/instance.cc
View file @
40a614ed
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
const
LEX_STRING
const
LEX_STRING
Instance
::
DFLT_INSTANCE_NAME
=
{
C_STRING_WITH_
SIZE
(
"mysqld"
)
};
Instance
::
DFLT_INSTANCE_NAME
=
{
C_STRING_WITH_
LEN
(
"mysqld"
)
};
static
const
char
*
const
INSTANCE_NAME_PREFIX
=
Instance
::
DFLT_INSTANCE_NAME
.
str
;
static
const
char
*
const
INSTANCE_NAME_PREFIX
=
Instance
::
DFLT_INSTANCE_NAME
.
str
;
static
const
int
INSTANCE_NAME_PREFIX_LEN
=
Instance
::
DFLT_INSTANCE_NAME
.
length
;
static
const
int
INSTANCE_NAME_PREFIX_LEN
=
Instance
::
DFLT_INSTANCE_NAME
.
length
;
...
...
server-tools/instance-manager/instance_options.cc
View file @
40a614ed
...
@@ -120,7 +120,7 @@ int Instance_options::get_default_option(char *result, size_t result_len,
...
@@ -120,7 +120,7 @@ int Instance_options::get_default_option(char *result, size_t result_len,
{
{
int
rc
=
1
;
int
rc
=
1
;
LEX_STRING
verbose_option
=
LEX_STRING
verbose_option
=
{
C_STRING_WITH_
SIZE
(
" --no-defaults --verbose --help"
)
};
{
C_STRING_WITH_
LEN
(
" --no-defaults --verbose --help"
)
};
/* reserve space for the path + option + final '\0' */
/* reserve space for the path + option + final '\0' */
Buffer
cmd
(
mysqld_path
.
length
+
verbose_option
.
length
+
1
);
Buffer
cmd
(
mysqld_path
.
length
+
verbose_option
.
length
+
1
);
...
@@ -155,7 +155,7 @@ int Instance_options::fill_instance_version()
...
@@ -155,7 +155,7 @@ int Instance_options::fill_instance_version()
{
{
char
result
[
MAX_VERSION_LENGTH
];
char
result
[
MAX_VERSION_LENGTH
];
LEX_STRING
version_option
=
LEX_STRING
version_option
=
{
C_STRING_WITH_
SIZE
(
" --no-defaults --version"
)
};
{
C_STRING_WITH_
LEN
(
" --no-defaults --version"
)
};
int
rc
=
1
;
int
rc
=
1
;
Buffer
cmd
(
mysqld_path
.
length
+
version_option
.
length
+
1
);
Buffer
cmd
(
mysqld_path
.
length
+
version_option
.
length
+
1
);
...
@@ -210,7 +210,7 @@ int Instance_options::fill_mysqld_real_path()
...
@@ -210,7 +210,7 @@ int Instance_options::fill_mysqld_real_path()
{
{
char
result
[
FN_REFLEN
];
char
result
[
FN_REFLEN
];
LEX_STRING
help_option
=
LEX_STRING
help_option
=
{
C_STRING_WITH_
SIZE
(
" --no-defaults --help"
)
};
{
C_STRING_WITH_
LEN
(
" --no-defaults --help"
)
};
int
rc
=
1
;
int
rc
=
1
;
Buffer
cmd
(
mysqld_path
.
length
+
help_option
.
length
);
Buffer
cmd
(
mysqld_path
.
length
+
help_option
.
length
);
...
...
server-tools/instance-manager/options.cc
View file @
40a614ed
...
@@ -114,7 +114,6 @@ static const int ANGEL_PID_FILE_SUFFIX_LEN= strlen(ANGEL_PID_FILE_SUFFIX);
...
@@ -114,7 +114,6 @@ static const int ANGEL_PID_FILE_SUFFIX_LEN= strlen(ANGEL_PID_FILE_SUFFIX);
*/
*/
enum
options
{
enum
options
{
OPT_PASSWD
=
'P'
,
OPT_USERNAME
=
'u'
,
OPT_USERNAME
=
'u'
,
OPT_PASSWORD
=
'p'
,
OPT_PASSWORD
=
'p'
,
OPT_LOG
=
256
,
OPT_LOG
=
256
,
...
@@ -135,6 +134,7 @@ enum options {
...
@@ -135,6 +134,7 @@ enum options {
OPT_PORT
,
OPT_PORT
,
OPT_WAIT_TIMEOUT
,
OPT_WAIT_TIMEOUT
,
OPT_BIND_ADDRESS
,
OPT_BIND_ADDRESS
,
OPT_PRINT_PASSWORD_LINE
,
OPT_ADD_USER
,
OPT_ADD_USER
,
OPT_DROP_USER
,
OPT_DROP_USER
,
OPT_EDIT_USER
,
OPT_EDIT_USER
,
...
@@ -225,8 +225,8 @@ static struct my_option my_long_options[] =
...
@@ -225,8 +225,8 @@ static struct my_option my_long_options[] =
(
gptr
*
)
&
Options
::
Main
::
mysqld_safe_compatible
,
(
gptr
*
)
&
Options
::
Main
::
mysqld_safe_compatible
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
1
,
0
,
0
,
0
},
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
1
,
0
,
0
,
0
},
{
"p
asswd"
,
OPT_PASSWD
,
{
"p
rint-password-line"
,
OPT_PRINT_PASSWORD_LINE
,
"Pr
epare an entry
for the password file and exit."
,
"Pr
int out a user entry as a line
for the password file and exit."
,
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
0
,
0
,
0
,
GET_NO_ARG
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"password"
,
OPT_PASSWORD
,
"Password to update the password file"
,
{
"password"
,
OPT_PASSWORD
,
"Password to update the password file"
,
...
@@ -339,7 +339,7 @@ get_one_option(int optid,
...
@@ -339,7 +339,7 @@ get_one_option(int optid,
case
'V'
:
case
'V'
:
version
();
version
();
exit
(
0
);
exit
(
0
);
case
OPT_P
ASSWD
:
case
OPT_P
RINT_PASSWORD_LINE
:
case
OPT_ADD_USER
:
case
OPT_ADD_USER
:
case
OPT_DROP_USER
:
case
OPT_DROP_USER
:
case
OPT_EDIT_USER
:
case
OPT_EDIT_USER
:
...
@@ -354,8 +354,8 @@ get_one_option(int optid,
...
@@ -354,8 +354,8 @@ get_one_option(int optid,
}
}
switch
(
optid
)
{
switch
(
optid
)
{
case
OPT_P
ASSWD
:
case
OPT_P
RINT_PASSWORD_LINE
:
Options
::
User_management
::
cmd
=
new
P
asswd
_cmd
();
Options
::
User_management
::
cmd
=
new
P
rint_password_line
_cmd
();
break
;
break
;
case
OPT_ADD_USER
:
case
OPT_ADD_USER
:
Options
::
User_management
::
cmd
=
new
Add_user_cmd
();
Options
::
User_management
::
cmd
=
new
Add_user_cmd
();
...
...
server-tools/instance-manager/priv.cc
View file @
40a614ed
...
@@ -43,7 +43,7 @@ bool linuxthreads;
...
@@ -43,7 +43,7 @@ bool linuxthreads;
The following string must be less then 80 characters, as
The following string must be less then 80 characters, as
mysql_connection.cc relies on it
mysql_connection.cc relies on it
*/
*/
const
LEX_STRING
mysqlmanager_version
=
{
C_STRING_WITH_
SIZE
(
"1.0-beta"
)
};
const
LEX_STRING
mysqlmanager_version
=
{
C_STRING_WITH_
LEN
(
"1.0-beta"
)
};
const
unsigned
char
protocol_version
=
PROTOCOL_VERSION
;
const
unsigned
char
protocol_version
=
PROTOCOL_VERSION
;
...
...
server-tools/instance-manager/user_management_commands.cc
View file @
40a614ed
...
@@ -180,10 +180,10 @@ static int save_password_file(User_map *user_map)
...
@@ -180,10 +180,10 @@ static int save_password_file(User_map *user_map)
}
}
/*************************************************************************
/*************************************************************************
P
asswd
_cmd
P
rint_password_line
_cmd
*************************************************************************/
*************************************************************************/
int
P
asswd
_cmd
::
execute
()
int
P
rint_password_line
_cmd
::
execute
()
{
{
LEX_STRING
user_name
;
LEX_STRING
user_name
;
const
char
*
password
;
const
char
*
password
;
...
...
server-tools/instance-manager/user_management_commands.h
View file @
40a614ed
...
@@ -61,13 +61,14 @@ public:
...
@@ -61,13 +61,14 @@ public:
/*************************************************************************
/*************************************************************************
Passwd_cmd: support for --passwd command-line option.
Print_password_line_cmd: support for --print-password-line command-line
option.
*************************************************************************/
*************************************************************************/
class
P
asswd
_cmd
:
public
User_management_cmd
class
P
rint_password_line
_cmd
:
public
User_management_cmd
{
{
public:
public:
P
asswd
_cmd
()
P
rint_password_line
_cmd
()
{
}
{
}
public:
public:
...
...
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