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
3d090552
Commit
3d090552
authored
Mar 21, 2003
by
jani@rhols221.adsl.netsonic.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a bug in comment handling.
parent
2a410e95
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
client/mysql.cc
client/mysql.cc
+10
-2
No files found.
client/mysql.cc
View file @
3d090552
...
...
@@ -40,7 +40,7 @@
#include <signal.h>
#include <violite.h>
const
char
*
VER
=
"12.
19
"
;
const
char
*
VER
=
"12.
20
"
;
/* Don't try to make a nice table if the data is too big */
#define MAX_COLUMN_LENGTH 1024
...
...
@@ -919,6 +919,7 @@ static bool add_line(String &buffer,char *line,char *in_string)
uchar
inchar
;
char
buff
[
80
],
*
pos
,
*
out
;
COMMANDS
*
com
;
my_bool
in_comment
=
0
;
if
(
!
line
[
0
]
&&
buffer
.
is_empty
())
return
0
;
...
...
@@ -978,7 +979,7 @@ static bool add_line(String &buffer,char *line,char *in_string)
continue
;
}
}
else
if
(
inchar
==
';'
&&
!*
in_string
)
else
if
(
inchar
==
';'
&&
!*
in_string
&&
!
in_comment
)
{
// ';' is end of command
if
(
out
!=
line
)
buffer
.
append
(
line
,(
uint
)
(
out
-
line
));
// Add this line
...
...
@@ -1009,6 +1010,13 @@ static bool add_line(String &buffer,char *line,char *in_string)
else
if
(
!*
in_string
&&
(
inchar
==
'\''
||
inchar
==
'"'
))
*
in_string
=
(
char
)
inchar
;
*
out
++
=
(
char
)
inchar
;
if
(
inchar
==
'*'
&&
!*
in_string
)
{
if
(
pos
!=
line
&&
pos
[
-
1
]
==
'/'
)
in_comment
=
1
;
else
if
(
in_comment
&&
pos
[
1
]
==
'/'
)
in_comment
=
0
;
}
}
}
if
(
out
!=
line
||
!
buffer
.
is_empty
())
...
...
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