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
ff3f735c
Commit
ff3f735c
authored
Jun 10, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge jwinstead@production.mysql.com:my/mysql-4.1-10840
into mysql.com:/home/jimw/my/mysql-4.1-clean
parents
481f7632
e4cb7947
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
client/mysql.cc
client/mysql.cc
+22
-2
No files found.
client/mysql.cc
View file @
ff3f735c
...
...
@@ -931,6 +931,7 @@ static int read_lines(bool execute_commands)
{
#if defined( __WIN__) || defined(OS2) || defined(__NETWARE__)
char
linebuffer
[
254
];
String
buffer
;
#endif
char
*
line
;
char
in_string
=
0
;
...
...
@@ -972,8 +973,24 @@ static int read_lines(bool execute_commands)
*
p
=
'\0'
;
}
#else
linebuffer
[
0
]
=
(
char
)
sizeof
(
linebuffer
);
buffer
.
length
(
0
);
/* _cgets() expects the buffer size - 3 as the first byte */
linebuffer
[
0
]
=
(
char
)
sizeof
(
linebuffer
)
-
3
;
do
{
line
=
_cgets
(
linebuffer
);
buffer
.
append
(
line
,
(
unsigned
char
)
linebuffer
[
1
]);
/*
If _cgets() gets an input line that is linebuffer[0] bytes
long, the next call to _cgets() will return immediately with
linebuffer[1] == 0, and it does the same thing for input that
is linebuffer[0]-1 bytes long. So it appears that even though
_cgets() replaces the newline (which is two bytes on Window) with
a nil, it still needs the space in the linebuffer for it. This is,
naturally, undocumented.
*/
}
while
(
linebuffer
[
0
]
<=
linebuffer
[
1
]
+
1
);
line
=
buffer
.
c_ptr
();
#endif
/* __NETWARE__ */
#else
if
(
opt_outfile
)
...
...
@@ -1030,6 +1047,9 @@ static int read_lines(bool execute_commands)
status
.
exit_status
=
0
;
}
}
#if defined( __WIN__) || defined(OS2) || defined(__NETWARE__)
buffer
.
free
();
#endif
return
status
.
exit_status
;
}
...
...
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