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
b0a4ec85
Commit
b0a4ec85
authored
Oct 14, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improving debugging support in 'read_line' function
parent
0d9e6366
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
client/mysqltest.c
client/mysqltest.c
+18
-8
No files found.
client/mysqltest.c
View file @
b0a4ec85
...
...
@@ -3346,7 +3346,7 @@ int read_line(char *buf, int size)
LINT_INIT
(
last_quote
);
start_lineno
=
cur_file
->
lineno
;
DBUG_PRINT
(
"info"
,
(
"
start_
lineno: %d"
,
start_lineno
));
DBUG_PRINT
(
"info"
,
(
"
Starting to read at
lineno: %d"
,
start_lineno
));
for
(;
p
<
buf_end
;)
{
skip_char
=
0
;
...
...
@@ -3370,7 +3370,7 @@ int read_line(char *buf, int size)
die
(
"Missing end of block"
);
*
p
=
0
;
DBUG_PRINT
(
"info"
,
(
"end of file
"
));
DBUG_PRINT
(
"info"
,
(
"end of file
at line %d"
,
cur_file
->
lineno
));
DBUG_RETURN
(
1
);
}
cur_file
--
;
...
...
@@ -3393,7 +3393,8 @@ int read_line(char *buf, int size)
if
(
end_of_query
(
c
))
{
*
p
=
0
;
DBUG_PRINT
(
"exit"
,
(
"Found delimiter '%s'"
,
delimiter
));
DBUG_PRINT
(
"exit"
,
(
"Found delimiter '%s' at line %d"
,
delimiter
,
cur_file
->
lineno
));
DBUG_RETURN
(
0
);
}
else
if
((
c
==
'{'
&&
...
...
@@ -3405,7 +3406,8 @@ int read_line(char *buf, int size)
/* Only if and while commands can be terminated by { */
*
p
++=
c
;
*
p
=
0
;
DBUG_PRINT
(
"exit"
,
(
"Found '{' indicating begining of block"
));
DBUG_PRINT
(
"exit"
,
(
"Found '{' indicating start of block at line %d"
,
cur_file
->
lineno
));
DBUG_RETURN
(
0
);
}
else
if
(
c
==
'\''
||
c
==
'"'
||
c
==
'`'
)
...
...
@@ -3420,7 +3422,8 @@ int read_line(char *buf, int size)
{
/* Comments are terminated by newline */
*
p
=
0
;
DBUG_PRINT
(
"exit"
,
(
"Found newline in comment"
));
DBUG_PRINT
(
"exit"
,
(
"Found newline in comment at line: %d"
,
cur_file
->
lineno
));
DBUG_RETURN
(
0
);
}
break
;
...
...
@@ -3435,13 +3438,19 @@ int read_line(char *buf, int size)
{
/* Skip all space at begining of line */
if
(
c
==
'\n'
)
start_lineno
=
cur_file
->
lineno
;
/* Query hasn't started yet */
{
/* Query hasn't started yet */
start_lineno
=
cur_file
->
lineno
;
DBUG_PRINT
(
"info"
,
(
"Query hasn't started yet, start_lineno: %d"
,
start_lineno
));
}
skip_char
=
1
;
}
else
if
(
end_of_query
(
c
))
{
*
p
=
0
;
DBUG_PRINT
(
"exit"
,
(
"Found delimiter '%s'"
,
delimiter
));
DBUG_PRINT
(
"exit"
,
(
"Found delimiter '%s' at line: %d"
,
delimiter
,
cur_file
->
lineno
));
DBUG_RETURN
(
0
);
}
else
if
(
c
==
'}'
)
...
...
@@ -3449,7 +3458,8 @@ int read_line(char *buf, int size)
/* A "}" need to be by itself in the begining of a line to terminate */
*
p
++=
c
;
*
p
=
0
;
DBUG_PRINT
(
"exit"
,
(
"Found '}' in begining of a line"
));
DBUG_PRINT
(
"exit"
,
(
"Found '}' in begining of a line at line: %d"
,
cur_file
->
lineno
));
DBUG_RETURN
(
0
);
}
else
if
(
c
==
'\''
||
c
==
'"'
||
c
==
'`'
)
...
...
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