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
d40e0935
Commit
d40e0935
authored
Dec 12, 2004
by
petr@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix autobuild failures
parent
7d1b9541
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
15 deletions
+18
-15
server-tools/instance-manager/buffer.cc
server-tools/instance-manager/buffer.cc
+1
-1
server-tools/instance-manager/commands.cc
server-tools/instance-manager/commands.cc
+7
-7
server-tools/instance-manager/guardian.cc
server-tools/instance-manager/guardian.cc
+1
-1
server-tools/instance-manager/instance.cc
server-tools/instance-manager/instance.cc
+2
-2
server-tools/instance-manager/instance_map.cc
server-tools/instance-manager/instance_map.cc
+6
-3
server-tools/instance-manager/instance_map.h
server-tools/instance-manager/instance_map.h
+1
-1
No files found.
server-tools/instance-manager/buffer.cc
View file @
d40e0935
...
@@ -85,7 +85,7 @@ int Buffer::reserve(uint position, uint len_arg)
...
@@ -85,7 +85,7 @@ int Buffer::reserve(uint position, uint len_arg)
min
(
MAX_BUFFER_SIZE
,
min
(
MAX_BUFFER_SIZE
,
max
((
uint
)
(
buffer_size
*
1.5
),
max
((
uint
)
(
buffer_size
*
1.5
),
position
+
len_arg
)));
position
+
len_arg
)));
if
(
buffer
=
NULL
)
if
(
buffer
=
=
NULL
)
goto
err
;
goto
err
;
buffer_size
=
(
uint
)
(
buffer_size
*
1.5
);
buffer_size
=
(
uint
)
(
buffer_size
*
1.5
);
}
}
...
...
server-tools/instance-manager/commands.cc
View file @
d40e0935
...
@@ -63,7 +63,7 @@ int Show_instances::do_command(struct st_net *net)
...
@@ -63,7 +63,7 @@ int Show_instances::do_command(struct st_net *net)
Instance_map
::
Iterator
iterator
(
instance_map
);
Instance_map
::
Iterator
iterator
(
instance_map
);
instance_map
->
lock
();
instance_map
->
lock
();
while
(
instance
=
iterator
.
next
(
))
while
(
(
instance
=
iterator
.
next
()
))
{
{
position
=
0
;
position
=
0
;
store_to_string
(
&
send_buff
,
instance
->
options
.
instance_name
,
&
position
);
store_to_string
(
&
send_buff
,
instance
->
options
.
instance_name
,
&
position
);
...
@@ -117,7 +117,7 @@ Show_instance_status::Show_instance_status(Instance_map *instance_map_arg,
...
@@ -117,7 +117,7 @@ Show_instance_status::Show_instance_status(Instance_map *instance_map_arg,
Instance
*
instance
;
Instance
*
instance
;
/* we make a search here, since we don't want t store the name */
/* we make a search here, since we don't want t store the name */
if
(
instance
=
instance_map
->
find
(
name
,
len
))
if
(
(
instance
=
instance_map
->
find
(
name
,
len
)
))
{
{
instance_name
=
instance
->
options
.
instance_name
;
instance_name
=
instance
->
options
.
instance_name
;
}
}
...
@@ -222,7 +222,7 @@ Show_instance_options::Show_instance_options(Instance_map *instance_map_arg,
...
@@ -222,7 +222,7 @@ Show_instance_options::Show_instance_options(Instance_map *instance_map_arg,
Instance
*
instance
;
Instance
*
instance
;
/* we make a search here, since we don't want t store the name */
/* we make a search here, since we don't want t store the name */
if
(
instance
=
instance_map
->
find
(
name
,
len
))
if
(
(
instance
=
instance_map
->
find
(
name
,
len
)
))
{
{
instance_name
=
instance
->
options
.
instance_name
;
instance_name
=
instance
->
options
.
instance_name
;
}
}
...
@@ -306,7 +306,7 @@ int Show_instance_options::do_command(struct st_net *net,
...
@@ -306,7 +306,7 @@ int Show_instance_options::do_command(struct st_net *net,
}
}
/* loop through the options stored in DYNAMIC_ARRAY */
/* loop through the options stored in DYNAMIC_ARRAY */
for
(
int
i
=
0
;
i
<
instance
->
options
.
options_array
.
elements
;
i
++
)
for
(
u
int
i
=
0
;
i
<
instance
->
options
.
options_array
.
elements
;
i
++
)
{
{
char
*
tmp_option
,
*
option_value
;
char
*
tmp_option
,
*
option_value
;
get_dynamic
(
&
(
instance
->
options
.
options_array
),
(
gptr
)
&
tmp_option
,
i
);
get_dynamic
(
&
(
instance
->
options
.
options_array
),
(
gptr
)
&
tmp_option
,
i
);
...
@@ -355,7 +355,7 @@ Start_instance::Start_instance(Instance_map *instance_map_arg,
...
@@ -355,7 +355,7 @@ Start_instance::Start_instance(Instance_map *instance_map_arg,
:
Command
(
instance_map_arg
)
:
Command
(
instance_map_arg
)
{
{
/* we make a search here, since we don't want t store the name */
/* we make a search here, since we don't want t store the name */
if
(
instance
=
instance_map
->
find
(
name
,
len
))
if
(
(
instance
=
instance_map
->
find
(
name
,
len
)
))
instance_name
=
instance
->
options
.
instance_name
;
instance_name
=
instance
->
options
.
instance_name
;
}
}
...
@@ -388,7 +388,7 @@ Stop_instance::Stop_instance(Instance_map *instance_map_arg,
...
@@ -388,7 +388,7 @@ Stop_instance::Stop_instance(Instance_map *instance_map_arg,
:
Command
(
instance_map_arg
)
:
Command
(
instance_map_arg
)
{
{
/* we make a search here, since we don't want t store the name */
/* we make a search here, since we don't want t store the name */
if
(
instance
=
instance_map
->
find
(
name
,
len
))
if
(
(
instance
=
instance_map
->
find
(
name
,
len
)
))
instance_name
=
instance
->
options
.
instance_name
;
instance_name
=
instance
->
options
.
instance_name
;
}
}
...
@@ -406,7 +406,7 @@ int Stop_instance::execute(struct st_net *net, ulong connection_id)
...
@@ -406,7 +406,7 @@ int Stop_instance::execute(struct st_net *net, ulong connection_id)
if
(
instance
->
options
.
is_guarded
!=
NULL
)
if
(
instance
->
options
.
is_guarded
!=
NULL
)
instance_map
->
guardian
->
instance_map
->
guardian
->
stop_guard
(
instance
);
stop_guard
(
instance
);
if
(
err_code
=
instance
->
stop
(
))
if
(
(
err_code
=
instance
->
stop
()
))
return
err_code
;
return
err_code
;
printf
(
"instance was stopped
\n
"
);
printf
(
"instance was stopped
\n
"
);
net_send_ok
(
net
,
connection_id
);
net_send_ok
(
net
,
connection_id
);
...
...
server-tools/instance-manager/guardian.cc
View file @
d40e0935
...
@@ -110,7 +110,7 @@ int Guardian_thread::start()
...
@@ -110,7 +110,7 @@ int Guardian_thread::start()
Instance_map
::
Iterator
iterator
(
instance_map
);
Instance_map
::
Iterator
iterator
(
instance_map
);
instance_map
->
lock
();
instance_map
->
lock
();
while
(
instance
=
iterator
.
next
(
))
while
(
(
instance
=
iterator
.
next
()
))
{
{
if
((
instance
->
options
.
is_guarded
!=
NULL
)
&&
(
instance
->
is_running
()))
if
((
instance
->
options
.
is_guarded
!=
NULL
)
&&
(
instance
->
is_running
()))
if
(
guard
(
instance
))
if
(
guard
(
instance
))
...
...
server-tools/instance-manager/instance.cc
View file @
d40e0935
...
@@ -88,8 +88,8 @@ Instance::~Instance()
...
@@ -88,8 +88,8 @@ Instance::~Instance()
bool
Instance
::
is_running
()
bool
Instance
::
is_running
()
{
{
uint
port
;
uint
port
=
0
;
const
char
*
socket
;
const
char
*
socket
=
NULL
;
if
(
options
.
mysqld_port
)
if
(
options
.
mysqld_port
)
port
=
atoi
(
strchr
(
options
.
mysqld_port
,
'='
)
+
1
);
port
=
atoi
(
strchr
(
options
.
mysqld_port
,
'='
)
+
1
);
...
...
server-tools/instance-manager/instance_map.cc
View file @
d40e0935
...
@@ -203,9 +203,12 @@ int Instance_map::cleanup()
...
@@ -203,9 +203,12 @@ int Instance_map::cleanup()
while
(
i
<
hash
.
records
)
while
(
i
<
hash
.
records
)
{
{
instance
=
(
Instance
*
)
hash_element
(
&
hash
,
i
);
instance
=
(
Instance
*
)
hash_element
(
&
hash
,
i
);
instance
->
cleanup
();
if
(
instance
->
cleanup
())
return
1
;
i
++
;
i
++
;
}
}
return
0
;
}
}
...
@@ -250,7 +253,7 @@ Instance *Instance_map::Iterator::next()
...
@@ -250,7 +253,7 @@ Instance *Instance_map::Iterator::next()
{
{
if
(
current_instance
<
instance_map
->
hash
.
records
)
if
(
current_instance
<
instance_map
->
hash
.
records
)
return
(
Instance
*
)
hash_element
(
&
instance_map
->
hash
,
current_instance
++
);
return
(
Instance
*
)
hash_element
(
&
instance_map
->
hash
,
current_instance
++
);
else
return
NULL
;
return
NULL
;
}
}
server-tools/instance-manager/instance_map.h
View file @
d40e0935
...
@@ -38,7 +38,6 @@ extern void free_groups(char **groups);
...
@@ -38,7 +38,6 @@ extern void free_groups(char **groups);
class
Instance_map
class
Instance_map
{
{
friend
class
Iterator
;
public:
public:
/* Instance_map iterator */
/* Instance_map iterator */
class
Iterator
class
Iterator
...
@@ -54,6 +53,7 @@ public:
...
@@ -54,6 +53,7 @@ public:
void
go_to_first
();
void
go_to_first
();
Instance
*
next
();
Instance
*
next
();
};
};
friend
class
Iterator
;
public:
public:
/* returns a pointer to the instance or NULL, if there is no such instance */
/* returns a pointer to the instance or NULL, if there is no such instance */
Instance
*
find
(
const
char
*
name
,
uint
name_len
);
Instance
*
find
(
const
char
*
name
,
uint
name_len
);
...
...
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