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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
67451375
Commit
67451375
authored
Feb 09, 2011
by
Dmitry Shulga
Browse files
Options
Browse Files
Download
Plain Diff
Automerge from mysql-5.1 for follow-up bug#57450.
parents
3165285e
107b4607
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
client/mysql.cc
client/mysql.cc
+2
-0
client/readline.cc
client/readline.cc
+8
-0
No files found.
client/mysql.cc
View file @
67451375
...
...
@@ -1127,6 +1127,8 @@ int main(int argc,char *argv[])
if
(
status
.
batch
&&
!
status
.
line_buff
&&
!
(
status
.
line_buff
=
batch_readline_init
(
MAX_BATCH_BUFFER_SIZE
,
stdin
)))
{
put_info
(
"Can't initialize batch_readline - may be the input source is "
"a directory or a block device."
,
INFO_ERROR
,
0
);
free_defaults
(
defaults_argv
);
my_end
(
0
);
exit
(
1
);
...
...
client/readline.cc
View file @
67451375
...
...
@@ -18,6 +18,7 @@
#include <my_global.h>
#include <my_sys.h>
#include <m_string.h>
#include <my_dir.h>
#include "my_readline.h"
static
bool
init_line_buffer
(
LINE_BUFFER
*
buffer
,
File
file
,
ulong
size
,
...
...
@@ -30,6 +31,13 @@ static char *intern_read_line(LINE_BUFFER *buffer, ulong *out_length);
LINE_BUFFER
*
batch_readline_init
(
ulong
max_size
,
FILE
*
file
)
{
LINE_BUFFER
*
line_buff
;
MY_STAT
input_file_stat
;
if
(
my_fstat
(
fileno
(
file
),
&
input_file_stat
,
MYF
(
MY_WME
))
||
MY_S_ISDIR
(
input_file_stat
.
st_mode
)
||
MY_S_ISBLK
(
input_file_stat
.
st_mode
))
return
0
;
if
(
!
(
line_buff
=
(
LINE_BUFFER
*
)
my_malloc
(
sizeof
(
*
line_buff
),
MYF
(
MY_WME
|
MY_ZEROFILL
))))
return
0
;
...
...
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