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
afdee6e0
Commit
afdee6e0
authored
Jun 14, 2007
by
stewart@willster.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix build of mgm client with history - caught by pb.
parent
13c4d317
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
storage/ndb/src/mgmclient/main.cpp
storage/ndb/src/mgmclient/main.cpp
+6
-0
No files found.
storage/ndb/src/mgmclient/main.cpp
View file @
afdee6e0
...
@@ -23,6 +23,8 @@ extern "C" {
...
@@ -23,6 +23,8 @@ extern "C" {
#elif !defined(__NETWARE__)
#elif !defined(__NETWARE__)
#include <readline/readline.h>
#include <readline/readline.h>
extern
"C"
int
add_history
(
const
char
*
command
);
/* From readline directory */
extern
"C"
int
add_history
(
const
char
*
command
);
/* From readline directory */
extern
"C"
int
read_history
(
const
char
*
command
);
extern
"C"
int
write_history
(
const
char
*
command
);
#define HAVE_READLINE
#define HAVE_READLINE
#endif
#endif
}
}
...
@@ -158,6 +160,7 @@ int main(int argc, char** argv){
...
@@ -158,6 +160,7 @@ int main(int argc, char** argv){
BaseString
histfile
;
BaseString
histfile
;
if
(
!
opt_execute_str
)
if
(
!
opt_execute_str
)
{
{
#ifdef HAVE_READLINE
char
*
histfile_env
=
getenv
(
"NDB_MGM_HISTFILE"
);
char
*
histfile_env
=
getenv
(
"NDB_MGM_HISTFILE"
);
if
(
histfile_env
)
if
(
histfile_env
)
histfile
.
assign
(
histfile_env
,
strlen
(
histfile_env
));
histfile
.
assign
(
histfile_env
,
strlen
(
histfile_env
));
...
@@ -168,10 +171,12 @@ int main(int argc, char** argv){
...
@@ -168,10 +171,12 @@ int main(int argc, char** argv){
}
}
if
(
histfile
.
length
())
if
(
histfile
.
length
())
read_history
(
histfile
.
c_str
());
read_history
(
histfile
.
c_str
());
#endif
ndbout
<<
"-- NDB Cluster -- Management Client --"
<<
endl
;
ndbout
<<
"-- NDB Cluster -- Management Client --"
<<
endl
;
while
(
read_and_execute
(
_try_reconnect
));
while
(
read_and_execute
(
_try_reconnect
));
#ifdef HAVE_READLINE
if
(
histfile
.
length
())
if
(
histfile
.
length
())
{
{
BaseString
histfile_tmp
;
BaseString
histfile_tmp
;
...
@@ -180,6 +185,7 @@ int main(int argc, char** argv){
...
@@ -180,6 +185,7 @@ int main(int argc, char** argv){
if
(
!
write_history
(
histfile_tmp
.
c_str
()))
if
(
!
write_history
(
histfile_tmp
.
c_str
()))
my_rename
(
histfile_tmp
.
c_str
(),
histfile
.
c_str
(),
MYF
(
MY_WME
));
my_rename
(
histfile_tmp
.
c_str
(),
histfile
.
c_str
(),
MYF
(
MY_WME
));
}
}
#endif
}
}
else
else
{
{
...
...
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